Jack Lucas | 16a554c | 2018-03-23 19:30:49 -0400 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # org.onap.dcae |
| 3 | # ================================================================================ |
Jack Lucas | 205fc2e | 2019-03-22 18:31:55 -0400 | [diff] [blame] | 4 | # Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved. |
Jack Lucas | 16a554c | 2018-03-23 19:30:49 -0400 | [diff] [blame] | 5 | # ================================================================================ |
| 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 Lucas | 45cb899 | 2018-08-22 19:29:40 +0000 | [diff] [blame] | 20 | FROM cloudifyplatform/community:18.7.23 |
Jack Lucas | 16a554c | 2018-03-23 19:30:49 -0400 | [diff] [blame] | 21 | MAINTAINER maintainer |
| 22 | |
| 23 | ENV TYPE_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }} |
Jack Lucas | 4316030 | 2018-04-06 20:46:11 +0000 | [diff] [blame] | 24 | ENV CCSDK_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }} |
| 25 | |
Jack Lucas | 16a554c | 2018-03-23 19:30:49 -0400 | [diff] [blame] | 26 | # Store type files locally |
Jack Lucas | 16a554c | 2018-03-23 19:30:49 -0400 | [diff] [blame] | 27 | RUN mkdir scripts |
Jack Lucas | 205fc2e | 2019-03-22 18:31:55 -0400 | [diff] [blame] | 28 | COPY scripts/* scripts/ |
Jack Lucas | 16a554c | 2018-03-23 19:30:49 -0400 | [diff] [blame] | 29 | # Load our type files and the Cloudify 3.4 type files |
Jack Lucas | 8ad4f6d | 2018-12-04 15:02:06 -0500 | [diff] [blame] | 30 | # Setup rc.local to set up k8s credentials for CM |
Jack Lucas | 4316030 | 2018-04-06 20:46:11 +0000 | [diff] [blame] | 31 | RUN scripts/get-type-files.sh ${TYPE_REPO} ${CCSDK_REPO}\ |
Jack Lucas | 16a554c | 2018-03-23 19:30:49 -0400 | [diff] [blame] | 32 | && 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 Lucas | 45cb899 | 2018-08-22 19:29:40 +0000 | [diff] [blame] | 34 | && chown -R cfyuser:cfyuser /opt/manager/resources/spec/cloudify/3.4\ |
Jack Lucas | 8ad4f6d | 2018-12-04 15:02:06 -0500 | [diff] [blame] | 35 | && chmod +x scripts/*.sh\ |
| 36 | && echo "/scripts/setup-secret.sh" >> /etc/rc.d/rc.local\ |
Jack Lucas | 205fc2e | 2019-03-22 18:31:55 -0400 | [diff] [blame] | 37 | && echo "/scripts/set-resolver-rules.sh" >> /etc/rc.d/rc.local\ |
Jack Lucas | 8ad4f6d | 2018-12-04 15:02:06 -0500 | [diff] [blame] | 38 | && chmod +x /etc/rc.d/rc.local |
Jack Lucas | 16a554c | 2018-03-23 19:30:49 -0400 | [diff] [blame] | 39 | # Create mount point for CM config file |
| 40 | RUN mkdir -p /opt/onap && chown cfyuser:cfyuser /opt/onap |
Jack Lucas | b16d16e | 2018-04-16 22:07:20 +0000 | [diff] [blame] | 41 | |
| 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 |
| 44 | RUN yum install -y gcc python-devel python-virtualenv python-pip |
| 45 | |
Jack Lucas | 45cb899 | 2018-08-22 19:29:40 +0000 | [diff] [blame] | 46 | # Install jq (used for cleanup--parsing output of CM API call) |
| 47 | RUN curl -Ss -L "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" > /bin/jq \ |
| 48 | && chmod +x /bin/jq |
| 49 | |
Jack Lucas | b16d16e | 2018-04-16 22:07:20 +0000 | [diff] [blame] | 50 | # Set up virtualenv and install Cloudify CLI 4.2 |
| 51 | RUN pip install --upgrade pip==9.0.3 \ |
| 52 | && virtualenv cfy42 \ |
| 53 | && source cfy42/bin/activate \ |
| 54 | && pip install cloudify==4.2 |
Jack Lucas | 8ad4f6d | 2018-12-04 15:02:06 -0500 | [diff] [blame] | 55 | |
| 56 | CMD ["/scripts/start-persistent.sh"] |