blob: 1fd44993ed5d2ecce7cf299328ffc3e5e93a00fd [file] [log] [blame]
Chen, Jackiefa00af92020-06-08 15:37:56 -04001.. 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
7Developer-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
27Deployment
28----------
Chen, Jackie243dc502020-06-16 15:47:46 -040029The following are typical steps used to deploy and run different components of OTF.
Chen, Jackiefa00af92020-06-08 15:37:56 -040030
31OTF Frontend
32^^^^^^^^^^^^
331) docker build -t otf-frontend:0.0.1-SNAPSHOT .
Chen, Jackie243dc502020-06-16 15:47:46 -0400342) docker run -e OTF_URL='http://localhost:8082/ -d --network="host" otf-frontend:0.0.1-SNAPSHOT
Chen, Jackiefa00af92020-06-08 15:37:56 -040035
36OTF SERVICE API
37^^^^^^^^^^^^^^^^
381) Modify src/main/resources/application.properties according to needs (disable aaf/ssl, set ports)
392) 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)
403) docker run -d --network="host" otf-service-api:0.0.1-SNAPSHOT
41
42OTF CAMUNDA
43^^^^^^^^^^^^
441) Modify src/main/resources/application.yaml according to needs, and validate the yaml is correct format (disable aaf/ssl, set ports)
452) 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)
463) docker run -d --network="host" otf-camunda:0.0.1-SNAPSHOT
47
48Virtual Test Head (VTH)
49^^^^^^^^^^^^^^^^^^^^^^^
50VTH 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
57To update vth port, you will have to update its python file (App.py). Most of them will default to port 5000.
58
59OTF-DATABASE
60-------------
61
621) run sudo installdbs.sh and export PATH=/usr/local/mysql/bin:$PATH to add mysql commands to path
632) run sudo createMongoUser.sh
643) edit mongo to create a replica set by modifying replication and net fields on file /etc/mongod.conf
65 - add security: authorization: 'enabled'
664) 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
76Common issues
77--------------
78Unable to log in to OTF UI as the first user on the platform
79^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80When registering as a new user, you will eventually need an admin to "enable" you. If you are the first User,
81there 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, Jackie243dc502020-06-16 15:47:46 -040082manually go into the mongo database and alter certain enabled and permission attribute for this new user.
Chen, Jackiefa00af92020-06-08 15:37:56 -040083
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
90Processes
91---------
92
93
94
95Actions
96-------
97