set url to https://omnitruck.chef.io/install.sh 67/1267/1
authorGrinberg Moti <mg877n@att.com>
Thu, 23 Feb 2017 09:24:34 +0000 (11:24 +0200)
committerGrinberg Moti <mg877n@att.com>
Thu, 23 Feb 2017 09:37:20 +0000 (11:37 +0200)
Change-Id: I1eb228adf80e44d97a0a95eb37477ee1c0d76ab9
Signed-off-by: Grinberg Moti <mg877n@att.com>
sdc-os-chef/pom.xml
sdc-os-chef/scripts/docker_run.sh
sdc-os-chef/sdc-backend/Dockerfile
sdc-os-chef/sdc-cassandra/Dockerfile
sdc-os-chef/sdc-elasticsearch/Dockerfile
sdc-os-chef/sdc-frontend/Dockerfile
sdc-os-chef/sdc-kibana/Dockerfile
sdc-os-chef/sdc-sanity/Dockerfile

index 3d761df..150b52f 100644 (file)
                                                                        </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>
 
                                                                                <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>
                                                                </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>
 
                                                                        <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>
index efae7fd..c6e316f 100644 (file)
@@ -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..."
index d68b590..128387a 100644 (file)
@@ -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/
index d8bc0b4..e2219c5 100644 (file)
@@ -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/
 
index 92821e5..9dee9dc 100644 (file)
@@ -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/
 
index 940dd23..79fd918 100644 (file)
@@ -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
 
index 6428931..54aeb2c 100644 (file)
@@ -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/
index be62976..3c63c1d 100644 (file)
@@ -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/