summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sdc-os-chef/pom.xml33
-rw-r--r--sdc-os-chef/scripts/docker_run.sh30
-rw-r--r--sdc-os-chef/sdc-backend/Dockerfile5
-rw-r--r--sdc-os-chef/sdc-cassandra/Dockerfile6
-rw-r--r--sdc-os-chef/sdc-elasticsearch/Dockerfile6
-rw-r--r--sdc-os-chef/sdc-frontend/Dockerfile5
-rw-r--r--sdc-os-chef/sdc-kibana/Dockerfile6
-rw-r--r--sdc-os-chef/sdc-sanity/Dockerfile5
8 files changed, 61 insertions, 35 deletions
diff --git a/sdc-os-chef/pom.xml b/sdc-os-chef/pom.xml
index 3d761df5e6..150b52f54f 100644
--- a/sdc-os-chef/pom.xml
+++ b/sdc-os-chef/pom.xml
@@ -92,6 +92,25 @@
</resources>
</configuration>
</execution>
+ <execution>
+ <id>copy-resources-sanity</id>
+ <!-- here the phase you need -->
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${project.parent.basedir}/openecomp-ui/target</directory>
+ <includes>
+ <include>onboarding-fe-${project.version}.war</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
</executions>
</plugin>
@@ -157,6 +176,16 @@
<dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
</build>
</image>
+
+ <!-- Build sanity image -->
+ <image>
+ <name>openecomp/sdc-sanity:%l</name>
+ <alias>sdc-sanity</alias>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
+ </build>
+ </image>
</images>
</configuration>
@@ -169,7 +198,7 @@
</goals>
<configuration>
<removeAll>true</removeAll>
- <image>openecomp/sdc-backend:%l,openecomp/sdc-frontend:%l,openecomp/sdc-elasticsearch:%l,openecomp/sdc-kibana:%l</image>
+ <image>openecomp/sdc-backend:%l,openecomp/sdc-frontend:%l,openecomp/sdc-elasticsearch:%l,openecomp/sdc-kibana:%l,openecomp/sdc-sanity:%l</image>
</configuration>
</execution>
@@ -188,7 +217,7 @@
<goal>push</goal>
</goals>
<configuration>
- <image>openecomp/sdc-backend:%l,openecomp/sdc-frontend:%l,openecomp/sdc-elasticsearch:%l,openecomp/sdc-kibana:%l</image>
+ <image>openecomp/sdc-backend:%l,openecomp/sdc-frontend:%l,openecomp/sdc-elasticsearch:%l,openecomp/sdc-kibana:%l,openecomp/sdc-sanity:%l</image>
</configuration>
</execution>
</executions>
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index efae7fd2df..c6e316f91e 100644
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -1,12 +1,28 @@
#!/bin/bash
-function usage
-{
+function usage {
echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -h|--help ]"
}
+function cleanup {
+ echo "performing old dockers cleanup"
+ docker_ids=`docker ps -a | egrep "ecomp-nexus:${PORT}/sdc|sdc|Exit" | awk '{print $1}'`
+ for X in ${docker_ids}
+ do
+ docker rm -f ${X}
+ done
+}
+
+
+function dir_perms {
+ mkdir -p /data/logs/BE/ASDC/ASDC-BE
+ mkdir -p /data/logs/FE/ASDC/ASDC-FE
+ chmod -R 775 /data/logs
+}
+
+
RELEASE=latest
[ -f /opt/config/env_name.txt ] && DEP_ENV=$(cat /opt/config/env_name.txt) || DEP_ENV=__ENV-NAME__
[ -f /opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) || NEXUS_USERNAME=release
@@ -41,13 +57,8 @@ done
[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
-# cleanup
-echo "performing old dockers cleanup"
-docker_ids=`docker ps -a | egrep "ecomp-nexus:${PORT}/sdc|sdc|Exit" | awk '{print $1}'`
-for X in ${docker_ids}
-do
- docker rm -f ${X}
-done
+cleanup
+
export IP=`ifconfig eth0 | awk -F: '/inet addr/ {gsub(/ .*/,"",$2); print $2}'`
@@ -82,6 +93,7 @@ echo "docker run sdc-kibana..."
docker pull ${NEXUS_DOCKER_REPO}/openecomp/sdc-kibana:${RELEASE}
docker run --detach --name sdc-kbn --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 2g --memory-swap=2g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume /data/environments:/root/chef-solo/environments --publish 5601:5601 ${NEXUS_DOCKER_REPO}/openecomp/sdc-kibana:${RELEASE}
+dir_perms
# Back-End
echo "docker run sdc-backend..."
diff --git a/sdc-os-chef/sdc-backend/Dockerfile b/sdc-os-chef/sdc-backend/Dockerfile
index d68b59078a..128387ae14 100644
--- a/sdc-os-chef/sdc-backend/Dockerfile
+++ b/sdc-os-chef/sdc-backend/Dockerfile
@@ -14,10 +14,7 @@ RUN python /root/chef-solo/cookbooks/sdc-normatives/files/default/get-pip.py
RUN pip install pycurl
# install chef-solo
-#RUN curl -L http://www.opscode.com/chef/install.sh | bash
-COPY chef-install.sh /root/
-RUN chmod 770 /root/chef-install.sh
-RUN bash /root/chef-install.sh
+RUN curl -L https://omnitruck.chef.io/install.sh | bash
ADD onboarding-be-__SDC-RELEASE__.war ${JETTY_BASE}/webapps/
ADD catalog-be-__SDC-RELEASE__.war ${JETTY_BASE}/webapps/
diff --git a/sdc-os-chef/sdc-cassandra/Dockerfile b/sdc-os-chef/sdc-cassandra/Dockerfile
index d8bc0b472e..e2219c533d 100644
--- a/sdc-os-chef/sdc-cassandra/Dockerfile
+++ b/sdc-os-chef/sdc-cassandra/Dockerfile
@@ -34,10 +34,8 @@ COPY chef-solo /root/chef-solo/
COPY chef-repo/cookbooks /root/chef-solo/cookbooks/
# install chef-solo
-#RUN curl -L http://www.opscode.com/chef/install.sh | bash
-COPY chef-install.sh /root/
-RUN chmod 770 /root/chef-install.sh
-RUN bash /root/chef-install.sh
+RUN curl -L https://omnitruck.chef.io/install.sh | bash
+
COPY startup.sh /root/
diff --git a/sdc-os-chef/sdc-elasticsearch/Dockerfile b/sdc-os-chef/sdc-elasticsearch/Dockerfile
index 92821e58ae..9dee9dcd8b 100644
--- a/sdc-os-chef/sdc-elasticsearch/Dockerfile
+++ b/sdc-os-chef/sdc-elasticsearch/Dockerfile
@@ -12,10 +12,8 @@ COPY chef-repo/cookbooks /root/chef-solo/cookbooks/
ENV BASE_NEXUS zl999y:ChangeMe@10.208.197.75:8443/repository/maven-public/org/openecomp/sdc
# install chef-solo
-#RUN curl -L http://www.opscode.com/chef/install.sh | bash
-COPY chef-install.sh /root/
-RUN chmod 770 /root/chef-install.sh
-RUN bash /root/chef-install.sh
+RUN curl -L https://omnitruck.chef.io/install.sh | bash
+
COPY startup.sh /root/
diff --git a/sdc-os-chef/sdc-frontend/Dockerfile b/sdc-os-chef/sdc-frontend/Dockerfile
index 940dd2341e..79fd9186d6 100644
--- a/sdc-os-chef/sdc-frontend/Dockerfile
+++ b/sdc-os-chef/sdc-frontend/Dockerfile
@@ -9,10 +9,7 @@ COPY chef-solo /root/chef-solo/
COPY chef-repo/cookbooks /root/chef-solo/cookbooks/
# install chef-solo
-#RUN curl -L http://www.opscode.com/chef/install.sh | bash
-COPY chef-install.sh /root/
-RUN chmod 770 /root/chef-install.sh
-RUN bash /root/chef-install.sh
+RUN curl -L https://omnitruck.chef.io/install.sh | bash
RUN cp ${JETTY_HOME}/resources/log4j.properties ${JETTY_BASE}/resources/log4j.properties
diff --git a/sdc-os-chef/sdc-kibana/Dockerfile b/sdc-os-chef/sdc-kibana/Dockerfile
index 6428931121..54aeb2c685 100644
--- a/sdc-os-chef/sdc-kibana/Dockerfile
+++ b/sdc-os-chef/sdc-kibana/Dockerfile
@@ -9,10 +9,8 @@ COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/
# install chef-solo
-#RUN curl -L http://www.opscode.com/chef/install.sh | bash
-COPY chef-install.sh /root/
-RUN chmod 770 /root/chef-install.sh
-RUN bash /root/chef-install.sh
+RUN curl -L https://omnitruck.chef.io/install.sh | bash
+
COPY startup.sh /root/
diff --git a/sdc-os-chef/sdc-sanity/Dockerfile b/sdc-os-chef/sdc-sanity/Dockerfile
index be629760bf..3c63c1d156 100644
--- a/sdc-os-chef/sdc-sanity/Dockerfile
+++ b/sdc-os-chef/sdc-sanity/Dockerfile
@@ -11,10 +11,7 @@ COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/
# install chef-solo
-#RUN curl -L http://www.opscode.com/chef/install.sh | bash
-COPY chef-install.sh /root/
-RUN chmod 770 /root/chef-install.sh
-RUN bash /root/chef-install.sh
+RUN curl -L https://omnitruck.chef.io/install.sh | bash
COPY startup.sh /root/