diff options
-rw-r--r-- | .idea/workspace.xml | 151 | ||||
-rw-r--r-- | deliveries/configure-and-run.sh | 5 | ||||
-rw-r--r-- | deliveries/os_Dockerfile | 74 | ||||
-rw-r--r-- | deliveries/os_build_febe.sh | 69 | ||||
-rw-r--r-- | deliveries/os_docker_push.sh | 7 | ||||
-rw-r--r-- | deliveries/run.sh | 5 |
6 files changed, 296 insertions, 15 deletions
diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2858996e..02573872 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,6 +2,10 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="9f8fedf4-4e3c-46d3-845e-c0f9aba359d6" name="Default" comment=""> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/deliveries/configure-and-run.sh" /> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/deliveries/os_Dockerfile" /> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/deliveries/os_build_febe.sh" /> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/deliveries/os_docker_push.sh" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/deliveries/run.sh" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> </list> @@ -24,25 +28,55 @@ <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/ecomp-portal-BE/pom.xml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="782"> + <state relative-caret-position="566"> <caret line="46" column="0" lean-forward="false" selection-start-line="46" selection-start-column="0" selection-end-line="57" selection-end-column="21" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/ecomp-portal-FE/pom.xml"> + <file leaf-file-name="configure-and-run.sh" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/deliveries/configure-and-run.sh"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="476"> - <caret line="28" column="49" lean-forward="false" selection-start-line="28" selection-start-column="49" selection-end-line="28" selection-end-column="49" /> + <state relative-caret-position="17"> + <caret line="1" column="0" lean-forward="true" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/pom.xml"> + <file leaf-file-name="os_build_febe.sh" pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/deliveries/os_build_febe.sh"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="228"> + <caret line="54" column="14" lean-forward="false" selection-start-line="54" selection-start-column="14" selection-end-line="54" selection-end-column="14" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="os_docker_push.sh" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/deliveries/os_docker_push.sh"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="34"> + <caret line="2" column="13" lean-forward="false" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="os_Dockerfile" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/deliveries/os_Dockerfile"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-734"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="os_settings.sh" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/deliveries/os_settings.sh"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="0"> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> @@ -51,11 +85,31 @@ </provider> </entry> </file> - <file leaf-file-name="run.sh" pinned="false" current-in-tab="true"> + <file leaf-file-name="run.sh" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/deliveries/run.sh"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="34"> - <caret line="2" column="16" lean-forward="false" selection-start-line="2" selection-start-column="16" selection-end-line="2" selection-end-column="16" /> + <state relative-caret-position="51"> + <caret line="3" column="16" lean-forward="false" selection-start-line="3" selection-start-column="16" selection-end-line="3" selection-end-column="16" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/ecomp-portal-FE/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="476"> + <caret line="28" column="49" lean-forward="false" selection-start-line="28" selection-start-column="49" selection-end-line="28" selection-end-column="49" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <folding /> </state> </provider> @@ -76,7 +130,10 @@ <list> <option value="$PROJECT_DIR$/ecomp-portal-BE/pom.xml" /> <option value="$PROJECT_DIR$/pom.xml" /> + <option value="$PROJECT_DIR$/deliveries/configure-and-run.sh" /> + <option value="$PROJECT_DIR$/deliveries/os_docker_push.sh" /> <option value="$PROJECT_DIR$/deliveries/run.sh" /> + <option value="$PROJECT_DIR$/deliveries/os_build_febe.sh" /> </list> </option> </component> @@ -101,8 +158,6 @@ <foldersAlwaysOnTop value="true" /> </navigator> <panes> - <pane id="PackagesPane" /> - <pane id="Scratches" /> <pane id="ProjectPane"> <subPane> <PATH> @@ -131,7 +186,9 @@ </PATH> </subPane> </pane> + <pane id="PackagesPane" /> <pane id="Scope" /> + <pane id="Scratches" /> </panes> </component> <component name="PropertiesComponent"> @@ -391,7 +448,7 @@ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.29144096" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> - <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2553305" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25799572" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="BPMNPalette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> @@ -467,10 +524,74 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/deliveries/run.sh"> + <entry file="file://$PROJECT_DIR$/ecomp-portal-BE/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="566"> + <caret line="46" column="0" lean-forward="false" selection-start-line="46" selection-start-column="0" selection-end-line="57" selection-end-column="21" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/ecomp-portal-FE/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="476"> + <caret line="28" column="49" lean-forward="false" selection-start-line="28" selection-start-column="49" selection-end-line="28" selection-end-column="49" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/pom.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/deliveries/configure-and-run.sh"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="17"> + <caret line="1" column="0" lean-forward="true" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/deliveries/os_docker_push.sh"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="34"> - <caret line="2" column="16" lean-forward="false" selection-start-line="2" selection-start-column="16" selection-end-line="2" selection-end-column="16" /> + <caret line="2" column="13" lean-forward="false" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/deliveries/os_Dockerfile"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-734"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/deliveries/os_settings.sh"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/deliveries/run.sh"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="51"> + <caret line="3" column="16" lean-forward="false" selection-start-line="3" selection-start-column="16" selection-end-line="3" selection-end-column="16" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/deliveries/os_build_febe.sh"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="228"> + <caret line="54" column="14" lean-forward="false" selection-start-line="54" selection-start-column="14" selection-end-line="54" selection-end-column="14" /> <folding /> </state> </provider> diff --git a/deliveries/configure-and-run.sh b/deliveries/configure-and-run.sh new file mode 100644 index 00000000..cb515765 --- /dev/null +++ b/deliveries/configure-and-run.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +LOGFILE=/opt/apache-tomcat-8.0.37/logs/catalina.out +echo "`date`:<-------------------- Starting -------------------->" >> $LOGFILE +exec /opt/apache-tomcat-8.0.37/bin/catalina.sh run 2>&1 | tee -a $LOGFILE
\ No newline at end of file diff --git a/deliveries/os_Dockerfile b/deliveries/os_Dockerfile new file mode 100644 index 00000000..efba0bdd --- /dev/null +++ b/deliveries/os_Dockerfile @@ -0,0 +1,74 @@ +# Pull base image. +#FROM ubuntu-openjdk-8-jdk + +FROM ubuntu:14.04 + +# Install the python script required for "add-apt-repository" +RUN apt-get update && apt-get install -y software-properties-common + +# Sets language to UTF8 : this works in pretty much all cases +ENV LANG en_US.UTF-8 +RUN locale-gen $LANG + +# Setup the openjdk 8 repo +RUN add-apt-repository ppa:openjdk-r/ppa + +# Install java8 +RUN apt-get update && apt-get install -y openjdk-8-jdk + +# Setup JAVA_HOME, this is useful for docker commandline +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/ +RUN export JAVA_HOME + +# Show java version (for debugging) +# RUN java -version + +RUN apt-get update +RUN apt-get install -y curl +# Install Tomcat +RUN cd /tmp && curl -O https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz +RUN tar -xzf /tmp/apache-tomcat-8.0.37.tar.gz +RUN mv apache-tomcat-8.0.37 /opt + +# Define working directory. +WORKDIR /opt/apache-tomcat-8.0.37/bin + +# Define commonly used ENV variables +ENV PATH $PATH:$JAVA_HOME/bin:/opt/apache-tomcat-8.0.37/bin + +VOLUME /opt/apache-tomcat-8.0.37/logs + +ARG VERSION=${VERSION:-1.1.0} +#LABEL Version=${VERSION} +ARG SDK_DIR=${SDK_DIR} +ARG FE_DIR=${FE_DIR} +ARG PORTAL_SDK_DIR=${PORTAL_SDK_DIR} +ARG PORTAL_DBC_DIR=${PORTAL_DBC_DIR} +# Set up variables: +ENV TOMCATHOME /opt/apache-tomcat-8.0.37 +ENV SDKHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPPORTALAPP +ENV PORTALSDKHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPSDKAPP +ENV PORTALDBCHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPDBCAPP +# Install Common Software,Git,Apache +RUN mkdir -p $SDKHOME && mkdir -p $PORTALSDKHOME && mkdir -p $PORTALDBCHOME + +COPY ${SDK_DIR} ${SDKHOME}/ +COPY ${PORTAL_SDK_DIR} ${PORTALSDKHOME}/ +COPY ${PORTAL_DBC_DIR} ${PORTALDBCHOME}/ + +RUN ln -s ${SDKHOME} ${TOMCATHOME}/webapps/ECOMPPORTAL && ln -s ${PORTALSDKHOME} ${TOMCATHOME}/webapps/ECOMPSDKAPP && ln -s ${PORTALDBCHOME} ${TOMCATHOME}/webapps/ECOMPDBCAPP + + +# Define working directory. +WORKDIR ${TOMCATHOME}/bin +VOLUME ${TOMCATHOME}/logs +# Define commonly used ENV variables +ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin +COPY configure-and-run.sh /PROJECT/OpenSource/UbuntuEP/ + +#RUN cp -r ${FE_DIR}/dist/public ${SDKHOME}/public + +COPY ${FE_DIR}/dist/public ${SDKHOME}/public +# Define default command. +#CMD ["bash"] +CMD ["/PROJECT/OpenSource/UbuntuEP/configure-and-run.sh"] diff --git a/deliveries/os_build_febe.sh b/deliveries/os_build_febe.sh new file mode 100644 index 00000000..4497befa --- /dev/null +++ b/deliveries/os_build_febe.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +source $(dirname $0)/os_settings.sh + +CURRENTDIR="$(pwd)" + + +# install ecomp portal +rm -rf $CURRENTDIR/$WORKINGDIR +mkdir $CURRENTDIR/$WORKINGDIR +cd $CURRENTDIR/$WORKINGDIR +SOURCEDIR=$CURRENTDIR/$WORKINGDIR/Source +mkdir $SOURCEDIR +cd $SOURCEDIR +PROJECTDIR=$SOURCEDIR/ecomp-portal-core +mkdir $PROJECTDIR + +#create project dir +#copy FE and BE +cd $CURRENTDIR +cd .. + +cp -r ecomp-portal-FE $PROJECTDIR/ecomp-portal-FE +cp -r ecomp-portal-BE $PROJECTDIR/ecomp-portal-BE +cp -r ecompsdkos/ecomp-sdk $PROJECTDIR/ecomp-sdk + +#!/bin/bash +shopt -s expand_aliases +source ~/.bashrc + +cd $PROJECTDIR/ecomp-portal-FE/ + +${MVN} install + +cd $PROJECTDIR/ecomp-portal-BE + +${MVN} install + +# now install sdk app +cd $PROJECTDIR/ecomp-sdk/sdk-app + +${MVN} install + +mv target/ep-sdk-app-1.0.0 target/ep-sdk-app + +# now install DBC app +cd $SOURCEDIR +DBCDIR=$SOURCEDIR/ST_DBPA +mkdir $DBCDIR + +#copy DBC project +cd $CURRENTDIR +cd .. + +cp -r dmaapbc/dcae_dmaapbc_webapp $DBCDIR/dcae_dmaapbc_webapp + +cd $DBCDIR/dcae_dmaapbc_webapp + +${MVN} install + +cd target +mv dmaap-bc-app.1.0.0.0 ep-dbc-app + + +# install into docker +cd $CURRENTDIR + +echo "running: docker build -t ${IMGNAME} --build-arg VERSION=${VERSION} --build-arg PORTAL_SDK_DIR=${PORTAL_SDK_DIR} --build-arg SDK_DIR=${SDK_DIR} --build-arg FE_DIR=${FE_DIR} --build-arg PORTAL_DBC_DIR=${PORTAL_DBC_DIR} -f ./os_Dockerfile ." +docker build -t ${IMGNAME} --build-arg VERSION=${VERSION} --build-arg PORTAL_SDK_DIR=${PORTAL_SDK_DIR} --build-arg SDK_DIR=${SDK_DIR} --build-arg FE_DIR=${FE_DIR} --build-arg PORTAL_DBC_DIR=${PORTAL_DBC_DIR} -f ./os_Dockerfile . diff --git a/deliveries/os_docker_push.sh b/deliveries/os_docker_push.sh new file mode 100644 index 00000000..a58f5aae --- /dev/null +++ b/deliveries/os_docker_push.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +#docker login +docker tag ep:1610-1 portalapps:1.0.0 +docker tag ecompdb:portal portaldb:1.0.0 +docker push portalapps:1.0.0 +docker push portaldb:1.0.0
\ No newline at end of file diff --git a/deliveries/run.sh b/deliveries/run.sh new file mode 100644 index 00000000..92cf1b9c --- /dev/null +++ b/deliveries/run.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +./os_build_febe.sh +./createMaria.sh +docker images
\ No newline at end of file |