# ONAP SDC ## Introduction 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. 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. 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. SDC manages four levels of assets: * Resource - A fundamental capability, implemented either entirely in software, or as software that interacts with a hardware device. 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. * 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. 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. There are four major components of SDC: * Catalog - The repository for assets at the Resource, Service and Product levels. Assets are added to the Catalog using the Design Studio. * Design Studio - Used to create, modify and add Resource, Service and Product definitions in the Catalog. * 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. * 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. ## Git Configuration 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. In order to do so just add this section to your global git.config file under the `[core]` key: longpaths = true ## Compiling the Project SDC is built from several projects while the parent "sdc" contains the main pom.xml for all of them: - asdctool - set of utilities used for scheme creation and data migration in SDC - catalog-be - backend code - catalog-fe - frontend java code (servlet, proxy) - catalog-dao - database layer - catalog-model - data model of the application - catalog-ui - front end code (javascript, html, css) - common - set of utilities used by the onboarding project - common-app-api - common code for frontend and backend - common-be - utilities, datatypes and enums - security-utils - handle encryption/decryption of passwords - onboarding-be - onboarding backend code - onboarding-ui - onboarding frontend code - integration-tests - The integration tests using the docker images to validate Backend API calls and FE with Selenium - sdc-os-chef - chefs scripts used for docker creation and startup - utils - set of dev utils used for working with the project locally 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. Once maven is set up properly, go to sdc project and run the command: `mvn clean install` By default, the "all" maven profile will be executed but others exist: * fast-build - A fast build skipping all tests and useless maven plugins (only builds the jars) * start-sdc - Once docker containers have been build, triggering this profile starts SDC CS, BE, FE, simulator * stop-sdc - Stop all SDC containers started by using the profile "start-sdc" * run-integration-tests - This runs only the integration tests against a running SDC started by using "start-sdc" profile. * docker - This enables the docker images build for each SDC module **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://:2375` in order to build and upload local dockers to a local environment.** More flags to use in the build process are: * -DskipITs - Skips integration tests only * -DskipTests - Skips unit tests execution and integration tests * -DskipUICleanup=true - Skips deleting the UI folders * -Djacoco.skip=true - Skips running jacoco tests * -DskipPMD - Skips creating a PMD report ## Accessing SDC After having started SDC with the command `mvn clean install -P start-sdc`, you can access it by accessing this URL: `http://:8285/login` 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) For more information regarding using the webseal_simulator please refer to the following guide: [SDC Simulator](https://wiki.onap.org/display/DW/SDC+Simulator) ### SDC Containers The following table shows the SDC containers found after a maven "start-sdc": CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
{
  "name": "@odlux/maintenance-app",
  "version": "0.1.0",
  "description": "A react based modular UI for the maintenance app.",
  "main": "index.js",
  "scripts": {
    "start": "webpack-dev-server --env debug",
    "build": "webpack --