From 01d6019fca028906a5d4674a3a785b7851bb75e3 Mon Sep 17 00:00:00 2001 From: Jack Lucas Date: Wed, 17 Jun 2020 17:11:17 -0400 Subject: Remove plugin uploads from bootstrap container Update other blueprints Update blueprints for components loaded at boot time Move Consul service registrations out of bootstrap script (use Consul init container in OOM chart instead) Issue-ID: DCAEGEN2-1789 Issue-ID: DCAEGEN2-2237 Issue-ID: DCAEGEN2-2236 Signed-off-by: Jack Lucas Change-Id: I3532d21be3c520a63ca6176dc2c085665db0add8 --- Dockerfile-template | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) (limited to 'Dockerfile-template') diff --git a/Dockerfile-template b/Dockerfile-template index 54609ca..9810009 100644 --- a/Dockerfile-template +++ b/Dockerfile-template @@ -19,54 +19,35 @@ FROM centos:7.4.1708 LABEL maintainer="maintainer" -ENV DCAE_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }} -ENV CCSDK_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }} -ENV BP_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_blueprints_releases }} - # Install gcc RUN yum install -y gcc python-devel -# Install Consul -RUN yum install -y unzip \ - && mkdir -p /opt/consul/bin \ - && mkdir -p /opt/consul/data \ - && mkdir -p /opt/consul/config \ - && curl -Ssf https://releases.hashicorp.com/consul/1.2.1/consul_1.2.1_linux_amd64.zip > /tmp/consul.zip \ - && unzip -pj /tmp/consul.zip > /opt/consul/bin/consul \ - && chmod +x /opt/consul/bin/consul -COPY config/00-consul.json /opt/consul/config/ - # Install jq RUN curl -Ssf -L "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" > /bin/jq \ && chmod +x /bin/jq -# Install pip and Cloudify CLI (stay at version 4.2 because of changes in higher versions) +# Install pip and Cloudify CLI RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ && python get-pip.py \ && rm get-pip.py \ - && pip install cloudify==4.2 + && pip install cloudify==4.5.5 # Copy scripts RUN mkdir scripts COPY scripts/ /scripts -# Get plugins from raw repos -RUN scripts/load-plugins.sh ${DCAE_REPO} ${CCSDK_REPO} \ - && rm scripts/load-plugins.sh \ -# Make sure scripts are executable - && chmod +x /scripts/*.sh - # Load blueprints and input templates COPY blueprints/ /blueprints # Set up runtime script ENTRYPOINT exec "/scripts/bootstrap.sh" -# Set up a non-root user -RUN mkdir -p /opt/bootstrap \ +# Make scripts executable & set up a non-root user +RUN chmod +x /scripts/*.sh \ + && mkdir -p /opt/bootstrap \ && useradd -d /opt/bootstrap bootstrap \ && chown -R bootstrap:bootstrap /opt/bootstrap \ && chown -R bootstrap:bootstrap /scripts \ - && chown -R bootstrap:bootstrap /blueprints \ - && chown -R bootstrap:bootstrap /opt/consul + && chown -R bootstrap:bootstrap /blueprints + USER bootstrap -- cgit 1.2.3-korg