Developer-Guide

Deployment

The following are typical steps used to deploy and run different components of OTF.

OTF Frontend

  1. docker build -t otf-frontend:0.0.1-SNAPSHOT .
  2. docker run -e OTF_URL=’http://localhost:8082/ -d –network=”host” otf-frontend:0.0.1-SNAPSHOT

OTF SERVICE API

  1. Modify src/main/resources/application.properties according to needs (disable aaf/ssl, set ports)
  2. navigate to otf-service-api folder and run “docker build -t otf-service-api:0.0.1-SNAPSHOT -f docker/Dockerfile .” (maven will run from inside the container, command is inside the Dockerfile)
  3. docker run -d –network=”host” otf-service-api:0.0.1-SNAPSHOT

OTF CAMUNDA

  1. Modify src/main/resources/application.yaml according to needs, and validate the yaml is correct format (disable aaf/ssl, set ports)
  2. navigate to otf-camunda folder and run “docker build -t otf-camunda:0.0.1-SNAPSHOT -f docker/Dockerfile .” (maven will run from inside the container, command is inside the Dockerfile)
  3. docker run -d –network=”host” otf-camunda:0.0.1-SNAPSHOT

Virtual Test Head (VTH)

VTH can be deployed in many ways. The following is a simple example of running vths via docker and using it on OTF UI.

  • Sample vth deployment example
    1. docker build -t [VTH_NAME] .
    2. docker run –rm –network [NETWORK-NAME] –name [VTH-NAME] -dit [DOCKER_IMAGE_NAME]
    3. use url and port to onboard it via OTF UI (instructions can be found in user guide)

To update vth port, you will have to update its python file (App.py). Most of them will default to port 5000.

OTF-DATABASE

  1. run sudo installdbs.sh and export PATH=/usr/local/mysql/bin:$PATH to add mysql commands to path
  2. run sudo createMongoUser.sh
  3. edit mongo to create a replica set by modifying replication and net fields on file /etc/mongod.conf
    • add security: authorization: ‘enabled’
  4. after script is ran mysql should be able to be used, connect to mysql using the password set by script and mysql command and
    • alter the root password
    • grant root ability to connect remotely
      • grant all on . to ‘root’@’%’ identified by ‘password’
    • create db and exit mysql shell
      • create database ‘new_db’
    • create tables using mysql scripts
      • mysql -u root -p db < engine.sql

Common issues

Unable to log in to OTF UI as the first user on the platform

When registering as a new user, you will eventually need an admin to “enable” you. If you are the first User, there will be no admin and you will be unable to log in even after you register. In order to fix this, you will have to manually go into the mongo database and alter certain enabled and permission attribute for this new user.

_images/mongo-user.PNG
  • make sure enabled is set to true
  • on the permission section, change role from user to admin