diff options
-rw-r--r-- | cm-container/Dockerfile-template | 5 | ||||
-rwxr-xr-x | cm-container/get-type-files.sh | 36 | ||||
-rw-r--r-- | cm-container/pom.xml | 2 |
3 files changed, 33 insertions, 10 deletions
diff --git a/cm-container/Dockerfile-template b/cm-container/Dockerfile-template index 7d97a24..cbfca20 100644 --- a/cm-container/Dockerfile-template +++ b/cm-container/Dockerfile-template @@ -21,12 +21,13 @@ FROM cloudifyplatform/community:cloudify-manager-18.2.28 MAINTAINER maintainer ENV TYPE_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }} +ENV CCSDK_REPO {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }} + # Store type files locally -RUN pwd RUN mkdir scripts COPY get-type-files.sh scripts # Load our type files and the Cloudify 3.4 type files -RUN scripts/get-type-files.sh ${TYPE_REPO}\ +RUN scripts/get-type-files.sh ${TYPE_REPO} ${CCSDK_REPO}\ && mkdir /opt/manager/resources/spec/cloudify/3.4\ && curl -Ss https://cloudify.co/spec/cloudify/3.4/types.yaml > /opt/manager/resources/spec/cloudify/3.4/types.yaml\ && chown -R cfyuser:cfyuser /opt/manager/resources/spec/cloudify/3.4 diff --git a/cm-container/get-type-files.sh b/cm-container/get-type-files.sh index 038e8e0..414c8e1 100755 --- a/cm-container/get-type-files.sh +++ b/cm-container/get-type-files.sh @@ -21,27 +21,49 @@ # Pull type files from repos # Set up the CM import resolver -# $1 is the repo URL +# $1 is the DCAE repo URL +# $2 is the CCSDK repo URL # set -x DEST=/opt/manager/resources/onapspec -ONAPTYPEFILES=\ + +DCAETYPEFILES=\ "\ -/dcaepolicyplugin/2.0.0/dcaepolicyplugin_types.yaml \ +/dcaepolicyplugin/2.2.1/dcaepolicyplugin_types.yaml \ /relationshipplugin/1.0.0/relationshipplugin_types.yaml \ -/k8splugin/1.0.0/k8splugin_types.yaml \ +/k8splugin/1.0.1/k8splugin_types.yaml \ " + +CCSDKTYPEFILES=\ +"\ +/type_files/pgaas/1.1.0/pgaas_types.yaml \ +/type_files/sshkeyshare/sshkey_types.yaml \ + +" + mkdir ${DEST} -for typefile in ${ONAPTYPEFILES} + +for typefile in ${DCAETYPEFILES} do mkdir -p ${DEST}/$(dirname ${typefile}) curl -Ss $1/${typefile} >> ${DEST}/${typefile} done + +for typefile in ${CCSDKTYPEFILES} +do + mkdir -p ${DEST}/$(dirname ${typefile}) + curl -Ss $2/${typefile} >> ${DEST}/${typefile} +done + chown cfyuser:cfyuser ${DEST} + # Add our local type file store to CM import resolver configuration -TYPE_RULE="{${TYPE_REPO}: file://${DEST}}" +TYPE_RULE0="{$1: file://${DEST}}" +TYPE_RULE1="{$2: file://${DEST}}" # This sed re is 'brittle' but we can be sure the config.yaml file # won't change as long as we do not change the source Docker image for CM -sed -i -e "s# rules:# rules:\n - ${TYPE_RULE}#" /etc/cloudify/config.yaml +sed -i -e "s# rules:# rules:\n - ${TYPE_RULE0}#" /etc/cloudify/config.yaml +sed -i -e "s# rules:# rules:\n - ${TYPE_RULE1}#" /etc/cloudify/config.yaml + chown cfyuser:cfyuser /etc/cloudify/config.yaml diff --git a/cm-container/pom.xml b/cm-container/pom.xml index 35b2d66..fb3dae3 100644 --- a/cm-container/pom.xml +++ b/cm-container/pom.xml @@ -27,7 +27,7 @@ limitations under the License. <groupId>org.onap.dcaegen2.deployments</groupId> <artifactId>cm-container</artifactId> <name>dcaegen2-deployments-cm-container</name> - <version>1.0.0</version> + <version>1.1.0</version> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |