blob: 021a954359fe9883286d5f381aaadf9e3967b330 [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----------
29
30OTF Frontend
31^^^^^^^^^^^^
321) docker build -t otf-frontend:0.0.1-SNAPSHOT .
332) docker run -d --network="host" otf-frontend:0.0.1-SNAPSHOT
34
35OTF SERVICE API
36^^^^^^^^^^^^^^^^
371) Modify src/main/resources/application.properties according to needs (disable aaf/ssl, set ports)
382) 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)
393) docker run -d --network="host" otf-service-api:0.0.1-SNAPSHOT
40
41OTF CAMUNDA
42^^^^^^^^^^^^
431) Modify src/main/resources/application.yaml according to needs, and validate the yaml is correct format (disable aaf/ssl, set ports)
442) 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)
453) docker run -d --network="host" otf-camunda:0.0.1-SNAPSHOT
46
47Virtual Test Head (VTH)
48^^^^^^^^^^^^^^^^^^^^^^^
49VTH can be deployed in many ways. The following is a simple example of running vths via docker and using it on OTF UI.
50
51 - Sample vth deployment example
52 1) docker build -t [VTH_NAME] .
53 2) docker run --rm --network [NETWORK-NAME] --name [VTH-NAME] -dit [DOCKER_IMAGE_NAME]
54 3) use url and port to onboard it via OTF UI (instructions can be found in user guide)
55
56To update vth port, you will have to update its python file (App.py). Most of them will default to port 5000.
57
58OTF-DATABASE
59-------------
60
611) run sudo installdbs.sh and export PATH=/usr/local/mysql/bin:$PATH to add mysql commands to path
622) run sudo createMongoUser.sh
633) edit mongo to create a replica set by modifying replication and net fields on file /etc/mongod.conf
64 - add security: authorization: 'enabled'
654) after script is ran mysql should be able to be used, connect to mysql using the password set by script and mysql command and
66 - alter the root password
67 - alter user 'root'@'localhost' identified by 'new_password'
68 - grant root ability to connect remotely
69 - grant all on *.* to 'root'@'%' identified by 'password'
70 - create db and exit mysql shell
71 - create database 'new_db'
72 - create tables using mysql scripts
73 - mysql -u root -p db < engine.sql
74
75Common issues
76--------------
77Unable to log in to OTF UI as the first user on the platform
78^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79When registering as a new user, you will eventually need an admin to "enable" you. If you are the first User,
80there 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
81manually go into the mongo database and alter certain attributes for this new user.
82
83.. image:: images/mongo-user.PNG
84
85- make sure enabled is set to true
86- on the permission section, change role from user to admin
87
88
89Processes
90---------
91
92
93
94Actions
95-------
96