297457a3391cd9855fbdd13cdd74c752edcee187
[sdc.git] / README.md
1 # OpenECOMP SDC
2
3 ---
4 ---
5
6
7 # Introduction
8
9 OpenECOMP SDC is delivered with 5 Docker containers:
10 1. sdc-FE       - frontend SDC application running on jetty server
11 2. sdc-BE       - backend SDC application running on jetty server
12 3. sdc-kbn      - hosting kibana application
13 4. sdc-cs       - hosting cassandra
14 5. sdc-es       - hosting elastic search
15
16 All containers runs on the same machine and can be started by runnin the command:
17 /data/scripts/docker_run.sh -e <environment name> -r <release> -p <docker-hub-port>
18 Example: /data/scripts/docker_run.sh -e OS-ETE-DFW -p 51220
19
20
21 # Compiling SDC
22
23 SDC is built from several projects, while "sdc-main" contains the main pom.xml for all project:
24 - catalog-be            - backend code
25 - catalog-fe            - frontend java code (servlet, proxy)
26 - catalog-dao           - database layer
27 - catalog-model         - data model of the application
28 - catalog-ui            - front end code (javascript, html, css)
29 - common-app-api        - common code for frontend and backend
30 - common-be                     - utilities, datatypes and enums
31 - security-utils        - handle encryption/decryption of passwords
32
33 SDC projects can be compiled easily using maven command: `mvn clean install`. 
34 In order to build all projects, enter to sdc-main project and run the command: `mvn clean install`.
35 By default unit test will run when compiling
36
37 ** igor **
38 Docker containers are build with the following profile 
39 `-P docker -Ddocker.buildArg.chef_repo_branch_name=bugfix/external_adress -Ddocker.buildArg.chef_repo_git_username=git -Ddocker.buildArg.chef_repo_address=23.253.149.175/SDC -Ddocker.buildArg.chef_repo_git_name=chef-repo`
40
41
42 # Getting the containers
43
44 ***to be changed for rrelease*** OpenECOMP SDC containers are stored on the Rackspace Nexus Docker Registry
45
46 The following Docker images are the actual deployment images used for running SDC
47
48 | Name    | Tag       | Description                                                                                                                   |
49 |---------|-----------|-------------------------------------------------------------------------------------------------------------------------------|
50 | sdc-FE  | 1610.2.16 | Contains Jetty + OpenJDK + SDC frontend code + **3rd party jars**                                                             |
51 | sdc-BE  | 1610.2.16 | Contains Jetty + OpenJDK + SDC backend code + **3rd party jars**                                                              |
52 | sdc-kbn | 1610.2.16 | Contains nodeJs + Kibana application                                                                                          |
53 | sdc-cs  | 1610.2.16 | OpenJDK + Contains cassandra application                                                                                      |
54 | sdc-es  | 1610.2.16 | Elastic search application                                                                                                    |
55
56
57 *********************** Israel ************************
58 # Starting SDC
59 There are several ways to start OpenECOMP SDC:
60 TBD - Israel
61
62 # Accessing SDC
63 SDC UI can be accessed from:
64
65 ### Ecomp portal
66 Login to ecomp portal URL with user that has permission for SDC application.
67 Define in your hosts file the following:
68 <ip address of SDC application> sdc.api.simpledemo.openecomp.org
69 <ip address of Ecomp portal URL> portal.api.simpledemo.openecomp.org
70 Open browser and navigate to: http://portal.api.simpledemo.openecomp.org:8989/ECOMPPORTAL/login.htm
71
72 ### Webseal simulator
73 This options is for developers to run locally SDC
74 1. Build web simulator WAR file: run `mvn clean install` on project "webseal simulator". This will generate war file (WSSimulator.war) in the target folder.
75 2. Copy the war to: /home/vagrant/webseal-simulator/webapps
76 3. Add users to simulator: open configuration file - /home/vagrant/webseal-simulator/config/webseal.conf and add new user to the user list.
77    Note: You need to define the user in the SDC as well.
78 4. Restart the simulator:
79    Stop the simulator: stopWebsealSimulator.sh
80    Start the simulator: startWebsealSimulator.sh
81 5. Enter to UI: http://<ip address>:8285/sdc1/login
82
83 ### SDC import normatives from CLI
84 SDC needs to work with predefined basic normatives, in order to update the database with the normatives need to:
85 1. From catalog-be project copy:
86    src\main\resources\import\tosca -> to <machine ip address>:catalog-be/import/tosca
87    src\main\resources\scripts\import\tosca ->to <machine ip address>:catalog-be/scripts/import/tosca
88 2. cd catalog-be/scripts/import/tosca
89 3. Run: python importNormativeAll.py
90 4. Wait until all normatives are loaded to the database
91
92
93 ### SDC APIs
94 TBD
95
96 ##### Main API endpoints in the first open source release 
97
98 - ***to be completed*** APIHandler health checks
99 TBD
100
101 # Configuration of SDC
102 TBD
103
104 Here are the main parameters you could change: 
105 TBD
106
107 The credentials are defined in 2 places:
108 TBD
109
110 # Logging
111 TBD
112
113 ### Jetty
114 TBD
115
116 ### Debuging
117 TBD
118
119 # Testing SDC Functionalities
120 TBD
121
122 ### Frontend Local Env - onboarding
123
124 Steps:
125 ------
126 Install nodejs & gulp
127 1. download nodejs from here: https://nodejs.org/en/ (take the "current" version with latest features) & install it.
128 2. install gulp by running the following command: npm install --global gulp-cli
129
130 Install DOX-UI a:
131 -----------------
132 1. pull for latest changes
133 2. go to folder dox-sequence-diagram-ui
134 3. run npm install
135 4. wait for it...
136 5. go to folder dox-ui
137 6. run npm install
138 7. create a copy of devConfig.defaults.json file and name it devConfig.json (we already configured git to ignore it so it will not be pushed)
139 8. in that file, populate the fields of the IP addresses of your BE machine you'd like to connect (pay attention, it is a JSON file): For example http://<host>:<port>
140 9. after everything was successful, run gulp
141 10. after server was up, your favorite UI will wait for you at: http://localhost:9000/sdc1/proxy-designer1#/onboardVendor
142
143 Troubleshooting:
144 ----------------
145 | Problem                       |   Why is this happening | Solution                                                                                   |
146 --------------------------------------------------------------------------------------------------------------------------------------------------------
147 | npm cannot reach destination  | onboarding proxy        | When within onboarding network, you should set onboarding proxy to NPM as the following:   |
148 |                               |                         | npm config set proxy http://genproxy:8080                                                  |
149 |                               |                         | npm config set https-proxy http://genproxy:8080                                            |
150 |                               |                         |                                                                                            |
151 | git protocol is blocked       | onboarding network      | When within onboarding network, you should set globally that when git                      |
152 | and cannot connect            | rules for protocols     | protocol is used, then it will be replaced with "https"                                    |
153 |                               |                         | git config --global url."https://".insteadOf git://                                        |
154 --------------------------------------------------------------------------------------------------------------------------------------------------------
155
156 # Getting Help
157
158 *** to be completed on rrelease ***
159
160 SDC@lists.openecomp.org
161
162 SDC Javadoc and Maven site
163  
164 *** to be completed on rrelease ***
165