blob: 8524ee874ab4f056ca09d7e8eeebc7305d90790a [file] [log] [blame]
Jack Lucas16a554c2018-03-23 19:30:49 -04001# ============LICENSE_START=======================================================
2# org.onap.dcae
3# ================================================================================
Jack Lucas205fc2e2019-03-22 18:31:55 -04004# Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
Jack Lucas16a554c2018-03-23 19:30:49 -04005# ================================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17# ============LICENSE_END=========================================================
18#
19# ECOMP is a trademark and service mark of AT&T Intellectual Property.
Jack Lucas45cb8992018-08-22 19:29:40 +000020FROM cloudifyplatform/community:18.7.23
Jack Lucas16a554c2018-03-23 19:30:49 -040021MAINTAINER maintainer
22
23ENV TYPE_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}
Jack Lucas43160302018-04-06 20:46:11 +000024ENV CCSDK_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}
25
Jack Lucas16a554c2018-03-23 19:30:49 -040026# Store type files locally
Jack Lucas16a554c2018-03-23 19:30:49 -040027RUN mkdir scripts
Jack Lucas205fc2e2019-03-22 18:31:55 -040028COPY scripts/* scripts/
Jack Lucas16a554c2018-03-23 19:30:49 -040029# Load our type files and the Cloudify 3.4 type files
Jack Lucas8ad4f6d2018-12-04 15:02:06 -050030# Setup rc.local to set up k8s credentials for CM
Jack Lucas43160302018-04-06 20:46:11 +000031RUN scripts/get-type-files.sh ${TYPE_REPO} ${CCSDK_REPO}\
Jack Lucas16a554c2018-03-23 19:30:49 -040032 && mkdir /opt/manager/resources/spec/cloudify/3.4\
33 && curl -Ss https://cloudify.co/spec/cloudify/3.4/types.yaml > /opt/manager/resources/spec/cloudify/3.4/types.yaml\
Jack Lucas45cb8992018-08-22 19:29:40 +000034 && chown -R cfyuser:cfyuser /opt/manager/resources/spec/cloudify/3.4\
Jack Lucas8ad4f6d2018-12-04 15:02:06 -050035 && chmod +x scripts/*.sh\
36 && echo "/scripts/setup-secret.sh" >> /etc/rc.d/rc.local\
Jack Lucas205fc2e2019-03-22 18:31:55 -040037 && echo "/scripts/set-resolver-rules.sh" >> /etc/rc.d/rc.local\
Jack Lucas8ad4f6d2018-12-04 15:02:06 -050038 && chmod +x /etc/rc.d/rc.local
Jack Lucas16a554c2018-03-23 19:30:49 -040039# Create mount point for CM config file
40RUN mkdir -p /opt/onap && chown cfyuser:cfyuser /opt/onap
Jack Lucasb16d16e2018-04-16 22:07:20 +000041
42# For HEAT environment, install software needed to use Cloudify CLI 4.2 to install plugins & deploy blueprints locally
43# Install python development-related packages
44RUN yum install -y gcc python-devel python-virtualenv python-pip
45
Jack Lucas45cb8992018-08-22 19:29:40 +000046# Install jq (used for cleanup--parsing output of CM API call)
47RUN curl -Ss -L "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" > /bin/jq \
48&& chmod +x /bin/jq
49
Jack Lucasb16d16e2018-04-16 22:07:20 +000050# Set up virtualenv and install Cloudify CLI 4.2
51RUN pip install --upgrade pip==9.0.3 \
52 && virtualenv cfy42 \
53 && source cfy42/bin/activate \
54 && pip install cloudify==4.2
Jack Lucas8ad4f6d2018-12-04 15:02:06 -050055
56CMD ["/scripts/start-persistent.sh"]