5 SDC is the ONAP visual modeling and design tool. It creates internal metadata that describes assets used by all ONAP components, both at design time and run time.
7 The SDC manages the content of a catalog and logical assemblies of selected catalog items to completely define how and when VNFs are realized in a target environment.
8 A complete virtual assembly of specific catalog items, together with selected workflows and instance configuration data, completely defines how the deployment, activation, and life-cycle management of VNFs are accomplished.
10 SDC manages four levels of assets:
12 * Resource - A fundamental capability, implemented either entirely in software, or as software that interacts with a hardware device.
13 Each Resource is a combination of one or more Virtual Function Components (VFCs), along with all the information necessary to instantiate, update, delete and manage the Resource.
14 * Service - A well-formed object comprising one or more Resources. Service Designers create Services from Resources, and include all of the information about the Service needed to instantiate, update, delete and manage the Service.
16 The key output of SDC is a set of models containing descriptions of asset capabilities and instructions to manage them. These models are stored in the SDC Master Reference Catalog for the entire enterprise to use.
18 There are four major components of SDC:
20 * Catalog - The repository for assets at the Resource, Service and Product levels. Assets are added to the Catalog using the Design Studio.
21 * Design Studio - Used to create, modify and add Resource, Service and Product definitions in the Catalog.
22 * Certification Studio - Available in a future release, is used to test new assets at all levels. It will be used for sandbox experimentation, and will include support for automated testing.
23 * Distribution Studio - Used to deploy certified assets. From the Distribution studio, new Product assets, including their underlying Resources and Services, are deployed into lab environments for testing purposes, and into production after certification is complete. In a future release, there will be a way to export Product information to external Business Support Systems for customer ordering and billing.
27 Note that if you're working on Windows, it's important to enable long paths for your machine; otherwise git won't be able to handle some files.
29 In order to do so just add this section to your global git.config file under the `[core]` key:
33 ## Compiling the Project
35 SDC is built from several projects while the parent "sdc" contains the main pom.xml for all of them:
36 - asdctool - set of utilities used for scheme creation and data migration in SDC
37 - catalog-be - backend code
38 - catalog-fe - frontend java code (servlet, proxy)
39 - catalog-dao - database layer
40 - catalog-model - data model of the application
41 - catalog-ui - front end code (javascript, html, css)
42 - common - set of utilities used by the onboarding project
43 - common-app-api - common code for frontend and backend
44 - common-be - utilities, datatypes and enums
45 - security-utils - handle encryption/decryption of passwords
46 - onboarding-be - onboarding backend code
47 - onboarding-ui - onboarding frontend code
48 - integration-tests - The integration tests using the docker images to validate Backend API calls and FE with Selenium
49 - sdc-os-chef - chefs scripts used for docker creation and startup
50 - utils - set of dev utils used for working with the project locally
53 In order to build all the projects, as mentioned in the onap wiki https://wiki.onap.org/display/DW/Setting+Up+Your+Development+Environment, the settings.xml (https://git.onap.org/oparent/plain/settings.xml) from the oparent project must be installed in your ~/.m2 folder and referenced by your IDE.
54 Once maven is set up properly, go to sdc project and run the command: `mvn clean install`
56 By default, the "all" maven profile will be executed but others exist:
57 * fast-build - A fast build skipping all tests and useless maven plugins (only builds the jars)
58 * start-sdc - Once docker containers have been build, triggering this profile starts SDC CS, BE, FE, simulator
59 * stop-sdc - Stop all SDC containers started by using the profile "start-sdc"
60 * run-integration-tests - This runs only the integration tests against a running SDC started by using "start-sdc" profile.
61 * docker - This enables the docker images build for each SDC module
62 **Note: If you're working on Windows, you'll need to define an environment variable on your machine with key `DOCKER_HOST` and value: `tcp://<ip_address>:2375` in order to build and upload local dockers to a local environment.**
64 More flags to use in the build process are:
65 * -DskipITs - Skips integration tests only
66 * -DskipTests - Skips unit tests execution and integration tests
67 * -DskipUICleanup=true - Skips deleting the UI folders
68 * -Djacoco.skip=true - Skips running jacoco tests
69 * -DskipPMD - Skips creating a PMD report
73 After having started SDC with the command `mvn clean install -P start-sdc`, you can access it by accessing this URL: `http://<ip_address>:8285/login`
74 As ONAP AAF is not present, the url provided uses the 8285 simulator ports, just click on the user you want to use for accessing SDC (i.e. Carlos Santana)
75 For more information regarding using the webseal_simulator please refer to the following guide: [SDC Simulator](https://wiki.onap.org/display/DW/SDC+Simulator)
79 The following table shows the SDC containers found after a maven "start-sdc":
81 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
82 968a8168e412 onap/sdc-backend-init:latest "/bin/sh -c /home/${…" 9 minutes ago Exited (0) 54 seconds ago sdc-backend-init-1
83 621c0fda1b0f onap/sdc-backend-all-plugins:latest "sh -c ${JETTY_BASE}…" 9 minutes ago Up 9 minutes 0.0.0.0:4000->4000/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:8443->8443/tcp sdc-backend-all-plugins-1
84 d823078776d8 onap/sdc-onboard-backend:latest "sh -c ${JETTY_BASE}…" 9 minutes ago Up 9 minutes 0.0.0.0:4001->4001/tcp, 0.0.0.0:8081->8081/tcp, 0.0.0.0:8445->8445/tcp, 8080/tcp sdc-onboard-backend-1
85 4729b0b7f0fe onap/sdc-simulator:latest "sh -c ${JETTY_BASE}…" 9 minutes ago Up 9 minutes 0.0.0.0:8285->8080/tcp, 0.0.0.0:8286->8443/tcp sdc-simulator-1
86 583e0d7fa300 onap/sdc-onboard-cassandra-init:latest "/home/sdc/startup.sh" 9 minutes ago Exited (0) 9 minutes ago sdc-onboard-cassandra-init-1
87 92085524f19f onap/sdc-cassandra-init:latest "/home/sdc/startup.sh" 10 minutes ago Exited (0) 9 minutes ago sdc-cassandra-init-1
88 c6e90dd7ddaf selenium/standalone-firefox:2.53.1 "/opt/bin/entry_poin…" 10 minutes ago Up 10 minutes 0.0.0.0:4444->4444/tcp standalone-firefox-1
89 e02139c0379b onap/sdc-frontend:latest "sh -c ${JETTY_BASE}…" 10 minutes ago Up 10 minutes 0.0.0.0:6000->6000/tcp, 0.0.0.0:8181->8181/tcp, 0.0.0.0:9443->9443/tcp, 8080/tcp sdc-frontend-1
90 96843fae9e4c onap/sdc-cassandra:latest "/root/startup.sh" 10 minutes ago Up 10 minutes 7000-7001/tcp, 7199/tcp, 9160/tcp, 0.0.0.0:9042->9042/tcp sdc-cassandra-1
92 For further information and an image explaining the containers dependency map please refer to the following page: [SDC Docker Diagram](https://wiki.onap.org/display/DW/SDC+Troubleshooting)
95 ### Accessing the logs
97 To access the logs, there are different options:
98 * Connect to the docker container you want to inspect by doing `docker exec -it -u root sdc-XXXXXXXX-1 sh`
99 Then look at the logs generally in /var/lib/jetty/logs or /var/log/onap (that may differ !)
100 * A volume is shared between the BE, onboard-BE and FE containers, this volume is mapped to `/tmp/sdc-integration-tests`,
101 In that folder you can obtain the logs of the different containers
105 After having started SDC with the command `mvn clean install -P start-sdc`, different java remote debug ports are opened by default:
106 * Onboard Backend - 4001 (jetty)
107 * Backend - 4000 (jetty)
108 * Frontend - 6000 (jetty)
109 It's therefore possible to connect your IDE to those debug ports remotely to walk through the code and add some breakpoints.
111 **Look at the pom.xml of the integration-tests module to have a better understanding of all the docker settings provided to start SDC.**
113 ### Integration tests
114 The integration are composed of 2 parts, one to test the BE Apis and another one to test the FE with selenium.
115 The selenium tests make use of the selenium/standalone-firefox:2.53.1 container.
117 About BE APIs tests, onboarding E2E flow :
118 Onboarding E2E flow cover following SDC functionality:
127 Export TOSCA and validate it structure using external TOSCA parser
129 **as part of execution we open a connection to Titan and perform resources clean up both before and after tests execution (only resource with “ci” prefix will be deleted from the catalog)
130 List of VNFs/PNFs that proceed by onboarding flow, located in `integration-tests/src/test/resources/Files/`)
132 sample-signed-pnf-cms-includes-cert-1.0.1-SNAPSHOT.zip
133 sample-signed-pnf-1.0.1-SNAPSHOT.zip
134 sample-pnf-1.0.1-SNAPSHOT.csar
135 sample-pnf-custom-type.csar
138 database-substitution-mappings.csar
143 resource-ZteEpcMmeVf-csar_fix.csar
156 #### Start the integration tests manually
158 Those tests execute the following
159 There are 2 options to start them:
160 * After having started SDC with the command `mvn clean install -P start-sdc`, run the command `mvn clean install -P run-integration-tests`
161 * If you want to debug them and run them from your IDE, you must start them from the testNG Suites files, otherwise this won't work.
162 The test suites are located here:
163 * BE: `integration-tests/src/test/resources/ci/testSuites/backend`
164 * FE: `integration-tests/src/test/resources/ci/testSuites/frontend`
166 #### Integration tests with Helm Validator
168 Those tests use container built externally in other ONAP repository: [sdc/sdc-helm-validator](https://gerrit.onap.org/r/admin/repos/sdc/sdc-helm-validator)
170 You can run those tests same as default integration tests by adding additional profile to maven commands:
171 `integration-tests-with-helm-validator`
172 * To start SDC with Helm Validator run: `mvn clean install -P start-sdc,integration-tests-with-helm-validator`
173 * To execute tests that use Helm Validator use: `mvn clean install -P run-integration-tests,integration-tests-with-helm-validator`
174 ## Accessing SDC UI in Dev Mode (Legacy way)
176 In order to access the SDC UI from your dev environment you need to do the following:
178 1. Go to file `webpack.server.js` found under the catalog-ui folder in the main sdc project and update the "localhost" variable to be the ip of your local vagrant machine.
179 2. Navigate to the catalog-ui folder and run the command: `npm start -- --env.role <wanted_role>` with the wanted role to login to SDC as.
183 For more information regarding SDC on OOM please refer to the following page: [SDC on OOM](https://wiki.onap.org/display/DW/SDC+on+OOM)
185 ## Frontend Local Env - onboarding
189 Install nodejs & gulp
190 1. download nodejs from here: https://nodejs.org/en/ (take the "current" version with latest features) & install it.
191 2. install gulp by running the following command: npm install --global gulp-cli
193 ### Install DOX-UI a:
195 1. pull for latest changes
196 2. go to folder dox-sequence-diagram-ui
199 5. go to folder dox-ui
201 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)
202 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>
203 9. after everything is successful, run gulp
204 10. after server is up, your favorite UI will wait for you at: http://localhost:9000/sdc1/proxy-designer1#/onboardVendor
208 | Problem | Why is this happening | Solution |
209 |-------------------------------|-------------------------|--------------------------------------------------------------------------------------------|
210 | npm cannot reach destination | onboarding proxy | When within onboarding network, you should set onboarding proxy to NPM as the following: |
211 | | | npm config set proxy http://genproxy:8080 |
212 | | | npm config set https-proxy http://genproxy:8080 |
214 | git protocol is blocked | onboarding network | When within onboarding network, you should set globally that when git |
215 | and cannot connect | rules for protocols | protocol is used, it will be replaced with "https" |
216 | | | git config --global url."https://".insteadOf git:// |
217 --------------------------------------------------------------------------------------------------------------------------------------------------------
219 ## SDC Troubleshooting
221 In order to check the life state of SDC you can run the command `health` from inside the vagrant.
222 Alternatively you can run the following commands to check the FE and BE status:
224 FE - `curl http://<ip_address>:8181/sdc1/rest/healthCheck`
226 BE - `curl http://<ip_address>:8080/sdc2/rest/healthCheck`
228 Another method to check about problems in SDC is to look at the log files.
230 The jetty(Applicative) are found in the respective folder according to the wanted section
231 For example, the BE logs will found under the directory `/BE`.
233 For more information regarding SDC Troubleshooting please refer to the following guide: [SDC Troubleshooting](https://wiki.onap.org/display/DW/SDC+Troubleshooting)
237 ##### [Mailing list](mailto:onap-sdc@lists.onap.org)
239 ##### [JIRA](http://jira.onap.org)
241 ##### [WIKI](https://wiki.onap.org/display/DW/Service+Design+and+Creation+%28SDC%29+Portal)