diff options
-rw-r--r-- | README.md | 59 | ||||
-rw-r--r-- | sdc-os-chef/sdc-backend/Dockerfile | 35 | ||||
-rw-r--r-- | sdc-os-chef/sdc-cassandra/Dockerfile | 27 | ||||
-rw-r--r-- | sdc-os-chef/sdc-elasticsearch/Dockerfile | 22 | ||||
-rw-r--r-- | sdc-os-chef/sdc-frontend/Dockerfile | 28 | ||||
-rw-r--r-- | sdc-os-chef/sdc-kibana/Dockerfile | 19 | ||||
-rw-r--r-- | sdc-os-chef/sdc-sanity/Dockerfile | 24 | ||||
-rw-r--r-- | utils/webseal-simulator/README.md (renamed from utils/webseal-simulator/readme.md) | 0 |
8 files changed, 84 insertions, 130 deletions
@@ -69,16 +69,65 @@ Define in your hosts file the following: <ip address of Ecomp portal URL> portal.api.simpledemo.openecomp.org Open browser and navigate to: http://portal.api.simpledemo.openecomp.org:8989/ECOMPPORTAL/login.htm -### Webseal simulator +### Webseal/SDC simulator This options is for developers to run locally SDC + +# SDC Simulator + +This options is for developers to run locally 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. + + - Provides sign on to the basic user roles/functionalities + - Creation of basic user accounts + +# Docker compilation - Docker Maven Build Profile (io.fabric8 maven Plugin) + +If you are using onap vagrant you can deploy the simulator by: + +Set up the DOCKER_HOST environmental variable + +To set environmental variable in Windows (the docker engine environment): +- Run `cmd` +-- Issue command `set NAME=VAL +Example: set DOCKER_HOST=tcp://127.0.0.1:2375 +--To check if the variable set succeeded issue `echo %DOCKER_HOST%` + +- To compile sdc-simulator docker: +1. Run `mvn clean install -Ddocker.buildArg.http_proxy=<http_proxy> -Ddocker.buildArg.https_proxy=<https_proxy> -P docker` +-- The proxy arguments are passed and used as environmental variables in Dockerfiles +2. Copy the script /webseal-simulator/scripts/simulator_docker_run.sh to the docker engine environment and run: +`simulator_docker_run.sh -r 1.1-STAGING-latest` +3. Run `docker ps` to verify that sdc-simulator docker is up and running. +4. Enter to UI: `http://<ip address>:8285/login` + +# Docker compilation - Docker Engine + +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. +2. Ftp war file: webseal-simulator/sdc-simulator folder to your localhost vagrant machine which runs docker engine daemon. +-- Check that WSSimulator.war exists after first step No.1 in webseal-simulator/sdc-simulator folder. +3. Run `docker build -t openecomp/sdc-simulator:1.1-STAGING-latest <PATH/sdc-simulator>` +Example: docker build -t openecomp/sdc-simulator:1.1-STAGING-latest /tmp/docker/sdc-simulator/ +-- If running behind a proxy: +`docker build --build-arg http_proxy=http://URL:PORT --build-arg https_proxy=http://URL:PORT -t openecomp/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 /webseal-simulator/scripts/simulator_docker_run.sh to the docker engine environment and run: `simulator_docker_run.sh -r 1.1-STAGING-latest` +6. Run `docker ps` to verify that sdc-simulator docker is up and running. +7. Enter to UI: `http://<ip address>:8285/login` + +# WAR compilation + + - To compile WSSimulator.war: 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. -2. Copy the war to: /home/vagrant/webseal-simulator/webapps -3. Add users to simulator: open configuration file - /home/vagrant/webseal-simulator/config/webseal.conf and add new user to the user list. +2. Ftp war file: webseal-simulator\target\WSSimulator.war to your localhost vagrant machine: /home/vagrant/webseal-simulator/webapps folder +3. Ftp configuration file: webseal-simulator\src\main\resources\webseal.conf to your localhost vagrant machine: /home/vagrant/webseal-simulator/config +4. Add users to simulator: open configuration file - webseal.conf and add new user to the user list. Note: You need to define the user in the SDC as well. -4. Restart the simulator: +5. To run the simulator, enter to your local vagrant and run: startWebsealSimulator.sh +-- Restart the simulator: Stop the simulator: stopWebsealSimulator.sh Start the simulator: startWebsealSimulator.sh -5. Enter to UI: http://<ip address>:8285/sdc1/login +6. Enter to UI: http://<ip address>:8285/login + ### SDC import normatives from CLI SDC needs to work with predefined basic normatives, in order to update the database with the normatives need to: diff --git a/sdc-os-chef/sdc-backend/Dockerfile b/sdc-os-chef/sdc-backend/Dockerfile index 7054cc10c3..9052e74b52 100644 --- a/sdc-os-chef/sdc-backend/Dockerfile +++ b/sdc-os-chef/sdc-backend/Dockerfile @@ -1,36 +1,21 @@ -FROM jetty:9.3-jre8 +FROM openecomp/base_sdc-backend:1.0.0-SNAPSHOT-latest -ARG HTTP_PROXY -ARG HTTPS_PROXY - -ENV HTTP_PROXY ${HTTP_PROXY} -ENV HTTPS_PROXY ${HTTPS_PROXY} - -RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \ - if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi +COPY chef-solo /root/chef-solo/ +COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/ -RUN apt-get -y update -RUN apt-get -y install apt-utils -RUN apt-get -y install curl -RUN apt-get -y install vim -RUN apt-get -y install jq -RUN apt-get -y install python libssl-dev libcurl4-openssl-dev python-dev gcc +#RUN python /root/chef-solo/cookbooks/sdc-normatives/files/default/get-pip.py -COPY chef-solo /root/chef-solo/ -COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/ +ADD onboarding-be-*.war ${JETTY_BASE}/webapps/ -RUN python /root/chef-solo/cookbooks/sdc-normatives/files/default/get-pip.py -RUN pip install pycurl +ADD catalog-be-*.war ${JETTY_BASE}/webapps/ -# install chef-solo -RUN curl -L https://omnitruck.chef.io/install.sh | bash +ADD api-docs.war ${JETTY_BASE}/webapps/ -ADD onboarding-be-*.war ${JETTY_BASE}/webapps/ -ADD catalog-be-*.war ${JETTY_BASE}/webapps/ -ADD api-docs.war ${JETTY_BASE}/webapps/ -RUN chown -R jetty:jetty ${JETTY_BASE}/webapps +RUN chown -R jetty:jetty ${JETTY_BASE}/webapps COPY startup.sh /root/ + RUN chmod 770 /root/startup.sh + ENTRYPOINT [ "/root/startup.sh" ] diff --git a/sdc-os-chef/sdc-cassandra/Dockerfile b/sdc-os-chef/sdc-cassandra/Dockerfile index 7af6de1de4..6066aeb453 100644 --- a/sdc-os-chef/sdc-cassandra/Dockerfile +++ b/sdc-os-chef/sdc-cassandra/Dockerfile @@ -1,30 +1,11 @@ -FROM cassandra:2.1.17 - -ARG HTTP_PROXY -ARG HTTPS_PROXY - -ENV HTTP_PROXY ${HTTP_PROXY} -ENV HTTPS_PROXY ${HTTPS_PROXY} - -RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \ - if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi - -#ENV DEBIAN_FRONTEND noninteractive -RUN apt-get -y update && apt-get -y install --no-install-recommends \ - curl \ - vim \ - apt-utils \ - openjdk-8-jdk - -RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java +FROM openecomp/base_sdc-cassandra:1.0.0-SNAPSHOT-latest COPY chef-solo /root/chef-solo/ -COPY chef-repo/cookbooks /root/chef-solo/cookbooks/ - -# install chef-solo -RUN curl -L https://omnitruck.chef.io/install.sh | bash +COPY chef-repo/cookbooks /root/chef-solo/cookbooks/ COPY startup.sh /root/ + RUN chmod 770 /root/startup.sh + ENTRYPOINT [ "/root/startup.sh" ] diff --git a/sdc-os-chef/sdc-elasticsearch/Dockerfile b/sdc-os-chef/sdc-elasticsearch/Dockerfile index 89516a6727..60db8e5b6b 100644 --- a/sdc-os-chef/sdc-elasticsearch/Dockerfile +++ b/sdc-os-chef/sdc-elasticsearch/Dockerfile @@ -1,27 +1,11 @@ -FROM elasticsearch:2.1.2 - -ARG HTTP_PROXY -ARG HTTPS_PROXY - -ENV HTTP_PROXY ${HTTP_PROXY} -ENV HTTPS_PROXY ${HTTPS_PROXY} - -RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \ - if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi - -RUN apt-get -y update -RUN apt-get -y install apt-utils -RUN apt-get -y install curl -RUN apt-get -y install vim -RUN mkdir -p /var/chef/nodes +FROM openecomp/base_sdc-elasticsearch:1.0.0-SNAPSHOT-latest COPY chef-solo /root/chef-solo/ -COPY chef-repo/cookbooks /root/chef-solo/cookbooks/ -# install chef-solo -RUN curl -L https://omnitruck.chef.io/install.sh | bash +COPY chef-repo/cookbooks /root/chef-solo/cookbooks/ COPY startup.sh /root/ + RUN chmod 770 /root/startup.sh ENTRYPOINT [ "/root/startup.sh" ] diff --git a/sdc-os-chef/sdc-frontend/Dockerfile b/sdc-os-chef/sdc-frontend/Dockerfile index c59d9e21da..7f9207d545 100644 --- a/sdc-os-chef/sdc-frontend/Dockerfile +++ b/sdc-os-chef/sdc-frontend/Dockerfile @@ -1,30 +1,16 @@ -FROM jetty:9.3-jre8 - -ARG HTTP_PROXY -ARG HTTPS_PROXY - -ENV HTTP_PROXY ${HTTP_PROXY} -ENV HTTPS_PROXY ${HTTPS_PROXY} - -RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \ - if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi - -RUN apt-get -y update -RUN apt-get -y install apt-utils -RUN apt-get -y install curl -RUN apt-get -y install vim +FROM openecomp/base_sdc-frontend:1.0.0-SNAPSHOT-latest COPY chef-solo /root/chef-solo/ -COPY chef-repo/cookbooks /root/chef-solo/cookbooks/ -# install chef-solo -RUN curl -L https://omnitruck.chef.io/install.sh | bash +COPY chef-repo/cookbooks /root/chef-solo/cookbooks/ RUN cp ${JETTY_HOME}/resources/log4j.properties ${JETTY_BASE}/resources/log4j.properties -ADD onboarding*.war ${JETTY_BASE}/webapps/ -ADD catalog-fe-*.war ${JETTY_BASE}/webapps/ -RUN chown -R jetty:jetty ${JETTY_BASE}/webapps +ADD onboarding*.war ${JETTY_BASE}/webapps/ + +ADD catalog-fe-*.war ${JETTY_BASE}/webapps/ + +RUN chown -R jetty:jetty ${JETTY_BASE}/webapps COPY startup.sh /root/ diff --git a/sdc-os-chef/sdc-kibana/Dockerfile b/sdc-os-chef/sdc-kibana/Dockerfile index a42225a91c..6a058def0e 100644 --- a/sdc-os-chef/sdc-kibana/Dockerfile +++ b/sdc-os-chef/sdc-kibana/Dockerfile @@ -1,23 +1,8 @@ -FROM kibana:4.3.3 - -ARG HTTP_PROXY -ARG HTTPS_PROXY - -ENV HTTP_PROXY ${HTTP_PROXY} -ENV HTTPS_PROXY ${HTTPS_PROXY} - -RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \ - if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi - -RUN apt-get -y update -RUN apt-get -y install curl -RUN apt-get -y install vim +FROM openecomp/base_sdc-kibana:1.0.0-SNAPSHOT-latest COPY chef-solo /root/chef-solo/ -COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/ -# install chef-solo -RUN curl -L https://omnitruck.chef.io/install.sh | bash +COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/ COPY startup.sh /root/ diff --git a/sdc-os-chef/sdc-sanity/Dockerfile b/sdc-os-chef/sdc-sanity/Dockerfile index 9dd829158f..ea137b401b 100644 --- a/sdc-os-chef/sdc-sanity/Dockerfile +++ b/sdc-os-chef/sdc-sanity/Dockerfile @@ -1,27 +1,11 @@ -FROM ubuntu:16.04 - -ARG HTTP_PROXY -ARG HTTPS_PROXY - -ENV HTTP_PROXY ${HTTP_PROXY} -ENV HTTPS_PROXY ${HTTPS_PROXY} - -RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \ -RUN apt-get -y update && \ - apt-get -y install --no-install-recommends apt-utils && \ - apt-get install curl \ - default-jre - openjdk-8-jdk - vim && \ - update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java - if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi +FROM openecomp/base_sdc-sanity:1.0.0-SNAPSHOT-latest COPY chef-solo /root/chef-solo/ -COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/ -# install chef-solo -RUN curl -L https://omnitruck.chef.io/install.sh | bash +COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/ COPY startup.sh /root/ + RUN chmod 770 /root/startup.sh + ENTRYPOINT [ "/root/startup.sh" ] diff --git a/utils/webseal-simulator/readme.md b/utils/webseal-simulator/README.md index c3e04b4b22..c3e04b4b22 100644 --- a/utils/webseal-simulator/readme.md +++ b/utils/webseal-simulator/README.md |