summaryrefslogtreecommitdiffstats
path: root/kubernetes/dcae/pgaas/Dockerfile
diff options
context:
space:
mode:
authorMandeep Khinda <Mandeep.Khinda@amdocs.com>2017-09-12 19:54:32 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-12 19:54:32 +0000
commitd99d1d2956c3f5afac1dfc569a3389a445b179e9 (patch)
tree994d498a77e35a6c93cdae7722f0201af872cb3d /kubernetes/dcae/pgaas/Dockerfile
parentd93f13b14a49e10f036e1d9014ff7909ea504570 (diff)
parent586f03b6e2249f2da8b1e35b5290b8cc334c204e (diff)
Merge "Add helm-configured DCAE Gen 1"
Diffstat (limited to 'kubernetes/dcae/pgaas/Dockerfile')
-rwxr-xr-xkubernetes/dcae/pgaas/Dockerfile45
1 files changed, 45 insertions, 0 deletions
diff --git a/kubernetes/dcae/pgaas/Dockerfile b/kubernetes/dcae/pgaas/Dockerfile
new file mode 100755
index 0000000000..e1d147dfa9
--- /dev/null
+++ b/kubernetes/dcae/pgaas/Dockerfile
@@ -0,0 +1,45 @@
+FROM ubuntu:16.04
+
+# Install additional packages
+RUN apt-get update && apt-get -y install maven openjdk-8-jdk unzip python-pip curl dnsutils vim gawk wget openssh-client-ssh1
+RUN pip install pyyaml
+
+RUN apt-get update && apt-get install -y postgresql libpq5 repmgr python-psycopg2 python3-psycopg2 libgetopt-java
+RUN rm -f /usr/sbin/policy-rc.d
+
+# Install Groovy
+RUN mkdir -p /opt/app
+RUN (cd /opt/app ; curl -Lo apache-groovy-binary-2.4.6.zip https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.6.zip )
+RUN (cd /opt/app ; unzip apache-groovy-binary-2.4.6.zip )
+RUN mkdir -p /opt/app/java/jdk
+RUN ln -s /usr /opt/app/java/jdk/jdk170
+RUN mkdir -p /opt/app/groovy
+RUN ln -s /opt/app/groovy-2.4.6 /opt/app/groovy/246
+
+# Create user dcae
+RUN if [ ! -e /home/dcae ]; then useradd -m -s /bin/bash dcae; fi
+
+# Download required packages
+RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-cdf_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-cdf_1.0.0.deb
+RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-postgresql-prep_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-postgresql-prep_1.0.0.deb
+RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-postgresql-config_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-postgresql-config_1.0.0.deb
+RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-pgaas_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-pgaas_1.0.0.deb
+RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-pgaas-post_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-pgaas-post_1.0.0.deb
+
+RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*
+
+RUN mkdir -p /opt/tools
+RUN mkdir -p /dbroot/pgdata
+RUN mkdir -p /dbroot/pglogs
+
+EXPOSE 5432
+
+VOLUME /opt/tools
+VOLUME /dbroot/pgdata
+VOLUME /dbroot/pglogs
+
+# Setup the entrypoint
+COPY setup.sh /usr/local/bin/entrypoint.sh
+RUN chmod a+x /usr/local/bin/entrypoint.sh
+
+ENTRYPOINT ["usr/local/bin/entrypoint.sh"]