Chen, Jackie | fa00af9 | 2020-06-08 15:37:56 -0400 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License.
|
| 2 | .. http://creativecommons.org/licenses/by/4.0
|
| 3 | ..
|
| 4 | .. Copyright (C) 2019 AT&T Intellectual Property
|
| 5 |
|
| 6 |
|
| 7 | Developer-Guide
|
| 8 | ===============
|
| 9 |
|
| 10 | .. contents::
|
| 11 | :depth: 3
|
| 12 | :local:
|
| 13 |
|
| 14 | .. note:
|
| 15 | .. * This section is used to describe what a contributor needs to know in order to work on the componenta
|
| 16 |
|
| 17 | .. * this should be very technical, aimed at people who want to help develop the components
|
| 18 |
|
| 19 | .. * this should be how the component does what it does, not a requirements document of what the component should do
|
| 20 |
|
| 21 | .. * this should contain what language(s) and frameworks are used, with versions
|
| 22 |
|
| 23 | .. * this should contain how to obtain the code, where to look at work items (Jira tickets), how to get started developing
|
| 24 |
|
| 25 | .. * This note must be removed after content has been added.
|
| 26 |
|
| 27 | Deployment
|
| 28 | ----------
|
Chen, Jackie | 243dc50 | 2020-06-16 15:47:46 -0400 | [diff] [blame^] | 29 | The following are typical steps used to deploy and run different components of OTF.
|
Chen, Jackie | fa00af9 | 2020-06-08 15:37:56 -0400 | [diff] [blame] | 30 |
|
| 31 | OTF Frontend
|
| 32 | ^^^^^^^^^^^^
|
| 33 | 1) docker build -t otf-frontend:0.0.1-SNAPSHOT .
|
Chen, Jackie | 243dc50 | 2020-06-16 15:47:46 -0400 | [diff] [blame^] | 34 | 2) docker run -e OTF_URL='http://localhost:8082/ -d --network="host" otf-frontend:0.0.1-SNAPSHOT
|
Chen, Jackie | fa00af9 | 2020-06-08 15:37:56 -0400 | [diff] [blame] | 35 |
|
| 36 | OTF SERVICE API
|
| 37 | ^^^^^^^^^^^^^^^^
|
| 38 | 1) Modify src/main/resources/application.properties according to needs (disable aaf/ssl, set ports)
|
| 39 | 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)
|
| 40 | 3) docker run -d --network="host" otf-service-api:0.0.1-SNAPSHOT
|
| 41 |
|
| 42 | OTF CAMUNDA
|
| 43 | ^^^^^^^^^^^^
|
| 44 | 1) Modify src/main/resources/application.yaml according to needs, and validate the yaml is correct format (disable aaf/ssl, set ports)
|
| 45 | 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)
|
| 46 | 3) docker run -d --network="host" otf-camunda:0.0.1-SNAPSHOT
|
| 47 |
|
| 48 | Virtual Test Head (VTH)
|
| 49 | ^^^^^^^^^^^^^^^^^^^^^^^
|
| 50 | VTH can be deployed in many ways. The following is a simple example of running vths via docker and using it on OTF UI.
|
| 51 |
|
| 52 | - Sample vth deployment example
|
| 53 | 1) docker build -t [VTH_NAME] .
|
| 54 | 2) docker run --rm --network [NETWORK-NAME] --name [VTH-NAME] -dit [DOCKER_IMAGE_NAME]
|
| 55 | 3) use url and port to onboard it via OTF UI (instructions can be found in user guide)
|
| 56 |
|
| 57 | To update vth port, you will have to update its python file (App.py). Most of them will default to port 5000.
|
| 58 |
|
| 59 | OTF-DATABASE
|
| 60 | -------------
|
| 61 |
|
| 62 | 1) run sudo installdbs.sh and export PATH=/usr/local/mysql/bin:$PATH to add mysql commands to path
|
| 63 | 2) run sudo createMongoUser.sh
|
| 64 | 3) edit mongo to create a replica set by modifying replication and net fields on file /etc/mongod.conf
|
| 65 | - add security: authorization: 'enabled'
|
| 66 | 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
|
| 67 | - alter the root password
|
| 68 | - alter user 'root'@'localhost' identified by 'new_password'
|
| 69 | - grant root ability to connect remotely
|
| 70 | - grant all on *.* to 'root'@'%' identified by 'password'
|
| 71 | - create db and exit mysql shell
|
| 72 | - create database 'new_db'
|
| 73 | - create tables using mysql scripts
|
| 74 | - mysql -u root -p db < engine.sql
|
| 75 |
|
| 76 | Common issues
|
| 77 | --------------
|
| 78 | Unable to log in to OTF UI as the first user on the platform
|
| 79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 80 | When registering as a new user, you will eventually need an admin to "enable" you. If you are the first User,
|
| 81 | 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
|
Chen, Jackie | 243dc50 | 2020-06-16 15:47:46 -0400 | [diff] [blame^] | 82 | manually go into the mongo database and alter certain enabled and permission attribute for this new user.
|
Chen, Jackie | fa00af9 | 2020-06-08 15:37:56 -0400 | [diff] [blame] | 83 |
|
| 84 | .. image:: images/mongo-user.PNG
|
| 85 |
|
| 86 | - make sure enabled is set to true
|
| 87 | - on the permission section, change role from user to admin
|
| 88 |
|
| 89 |
|
| 90 | Processes
|
| 91 | ---------
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 | Actions
|
| 96 | -------
|
| 97 |
|