Introduction

This option is for developers working locally on SDC.

SDC Simulator is a project that enables emulation of WEB server that provides security policy and sign-on to the SDC component in dev environments.

Docker compilation - Docker Maven Build Profile (io.fabric8 maven Plugin)

If you are using ONAP-Vagrant environment you can deploy the simulator by:

Set up the DOCKER_HOST environmental variable

To set environmental variable in Windows (the docker engine environment):

  1. Run `cmd`
  2. Issue command  `set NAME=VALUE`
set DOCKER_HOST=tcp://192.168.50.5:2375
echo %DOCKER_HOST%

To compile sdc-simulator docker:

1.  Run 

mvn clean install -pl utils/webseal-simulator -P docker

2.  Copy the script /sdc-chef-os/scripts/docker_run.sh to the docker engine environment and run:

/data/scripts/docker_run.sh -l -d sdc-sim -sim 
/data/scripts/docker_run.sh -r <docker tag> -d sdc-sim -sim 

3. To verify that sdc-simulator docker is up and running run:

docker ps

Make sure that a docker with id: sdc-simulator exists

4. Enter to UI: `http://<ip address>:8285/login`

http://192.168.50.5:8285/login

Docker compilation - Docker Engine

1. Build web simulator WAR file run in project “webseal simulator”:

mvn clean install

2. Ftp war file: webseal-simulator/sdc-simulator folder to your localhost vagrant machine which runs docker engine daemon.
3. Run `docker build -t onap/sdc-simulator:1.1-STAGING-latest <PATH/sdc-simulator>`

docker build -t onap/sdc-simulator:1.1-STAGING-latest /tmp/docker/sdc-simulator/

4. Validate that images pushed to the local repo by executing:

docker images

5. Copy the script /sdc-chef-os/scriptsdocker_run.sh to the docker engine environment, make it executable (chmod ugo+x) and run: 

/data/scripts/docker_run.sh -l -d sdc-sim -sim 


6.To verify that sdc-simulator docker is up and running execute:

docker ps

7. Enter to UI: http://<ip address>:8285/login

http://localhost:8285/login