diff options
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | Dockerfile-template | 63 | ||||
-rw-r--r-- | README.md | 36 | ||||
-rw-r--r-- | blueprints/k8s-helm-override.yaml (renamed from blueprints/k8s-helm-override.yaml-template) | 2 | ||||
-rw-r--r-- | blueprints/k8s-helm.yaml (renamed from blueprints/k8s-helm.yaml-template) | 2 | ||||
-rw-r--r-- | blueprints/k8s-holmes-engine.yaml (renamed from blueprints/k8s-holmes-engine.yaml-template) | 8 | ||||
-rw-r--r-- | blueprints/k8s-holmes-rules.yaml (renamed from blueprints/k8s-holmes-rules.yaml-template) | 8 | ||||
-rw-r--r-- | blueprints/k8s-hv-ves.yaml (renamed from blueprints/k8s-hv-ves.yaml-template) | 4 | ||||
-rw-r--r-- | blueprints/k8s-pgaas-initdb.yaml (renamed from blueprints/k8s-pgaas-initdb.yaml-template) | 6 | ||||
-rw-r--r-- | blueprints/k8s-prh.yaml (renamed from blueprints/k8s-prh.yaml-template) | 4 | ||||
-rw-r--r-- | blueprints/k8s-snmptrap.yaml (renamed from blueprints/k8s-snmptrap.yaml-template) | 4 | ||||
-rw-r--r-- | blueprints/k8s-tca-clampnode.yaml (renamed from blueprints/k8s-tca-clampnode.yaml-template) | 4 | ||||
-rw-r--r-- | blueprints/k8s-tca-policynode.yaml (renamed from blueprints/k8s-tca-policynode.yaml-template) | 6 | ||||
-rw-r--r-- | blueprints/k8s-tca.yaml (renamed from blueprints/k8s-tca.yaml-template) | 4 | ||||
-rw-r--r-- | blueprints/k8s-ves.yaml (renamed from blueprints/k8s-ves.yaml-template) | 2 | ||||
-rw-r--r-- | blueprints/pom.xml | 174 | ||||
-rwxr-xr-x | check-blueprint-vs-input/bin/check-blueprint-vs-input | 262 | ||||
-rw-r--r-- | check-blueprint-vs-input/lib/sample-inputs.yaml | 35 | ||||
-rw-r--r-- | check-blueprint-vs-input/man/check-blueprint-vs-input.1 | 50 | ||||
-rw-r--r-- | check-blueprint-vs-input/man/check-blueprint-vs-input.man | 55 | ||||
-rw-r--r-- | check-blueprint-vs-input/pom.xml | 250 | ||||
-rw-r--r-- | config/00-consul.json | 9 | ||||
-rw-r--r-- | input-templates/cdapinputs.yaml | 35 | ||||
-rw-r--r-- | input-templates/datafile-collector-input.yaml | 22 | ||||
-rw-r--r-- | input-templates/dhinputs.yaml | 22 | ||||
-rw-r--r-- | input-templates/he-ip.yaml | 28 | ||||
-rw-r--r-- | input-templates/heartbeat-input.json | 7 | ||||
-rw-r--r-- | input-templates/hr-ip.yaml | 26 | ||||
-rw-r--r-- | input-templates/inputs.yaml | 35 | ||||
-rw-r--r-- | input-templates/invinputs.yaml | 27 | ||||
-rw-r--r-- | input-templates/phinputs.yaml | 108 | ||||
-rw-r--r-- | input-templates/pom.xml | 174 | ||||
-rw-r--r-- | input-templates/prh-input.json | 7 | ||||
-rw-r--r-- | input-templates/prh-input.yaml | 26 | ||||
-rw-r--r-- | input-templates/snmptrap-input.json | 7 | ||||
-rw-r--r-- | input-templates/tcadocker-input.json | 11 | ||||
-rw-r--r-- | input-templates/tcainputs.yaml | 21 | ||||
-rw-r--r-- | input-templates/vesinput.yaml | 27 | ||||
-rwxr-xr-x | mvn-phase-script.sh | 11 | ||||
-rw-r--r-- | pom.xml | 117 | ||||
-rw-r--r-- | reference_templates/DeploymentHandler-README.md (renamed from blueprints/reference_templates/DeploymentHandler-README.md) | 0 | ||||
-rw-r--r-- | reference_templates/DeploymentHandler.yaml-template (renamed from blueprints/reference_templates/DeploymentHandler.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/DockerBP.yaml-template (renamed from blueprints/reference_templates/DockerBP.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/README.txt (renamed from blueprints/reference_templates/README.txt) | 0 | ||||
-rw-r--r-- | reference_templates/cdap-sdk.yaml-template (renamed from blueprints/reference_templates/cdap-sdk.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/cdap_broker.yaml-template (renamed from blueprints/reference_templates/cdap_broker.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/cdapbp7.yaml-template (renamed from blueprints/reference_templates/cdapbp7.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/centos_vm.yaml-template (renamed from blueprints/reference_templates/centos_vm.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/config_binding_service.yaml-template (renamed from blueprints/reference_templates/config_binding_service.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/consul_cluster.yaml-template (renamed from blueprints/reference_templates/consul_cluster.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/heartbeat-service.yaml-template (renamed from blueprints/reference_templates/heartbeat-service.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/holmes-engine.yaml-template (renamed from blueprints/reference_templates/holmes-engine.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/holmes-rules.yaml-template (renamed from blueprints/reference_templates/holmes-rules.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/inventory.yaml-template (renamed from blueprints/reference_templates/inventory.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/k8s-dashboard.yaml-template (renamed from blueprints/reference_templates/k8s-dashboard.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/k8s-datafile-collector.yaml-template (renamed from blueprints/reference_templates/k8s-datafile-collector.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/k8s-pgaas-database.yaml-template (renamed from blueprints/reference_templates/k8s-pgaas-database.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/k8s-pgaas-getdbinfo.yaml-template (renamed from blueprints/reference_templates/k8s-pgaas-getdbinfo.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/pgaas-cluster.yaml-template (renamed from blueprints/reference_templates/pgaas-cluster.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/pgaas-database.yaml-template (renamed from blueprints/reference_templates/pgaas-database.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/pgaas-disk.yaml-template (renamed from blueprints/reference_templates/pgaas-disk.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/pgaas-getdbinfo.yaml-template (renamed from blueprints/reference_templates/pgaas-getdbinfo.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/pgaas-onevm.yaml-template (renamed from blueprints/reference_templates/pgaas-onevm.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/pgaas.yaml-template (renamed from blueprints/reference_templates/pgaas.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/policy_handler.yaml-template (renamed from blueprints/reference_templates/policy_handler.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/prh-service.yaml-template (renamed from blueprints/reference_templates/prh-service.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/snmptrap-collector.yaml-template (renamed from blueprints/reference_templates/snmptrap-collector.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/tca.yaml-template (renamed from blueprints/reference_templates/tca.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/tcadocker-service.yaml-template (renamed from blueprints/reference_templates/tcadocker-service.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/test_dr_mr.yaml-template (renamed from blueprints/reference_templates/test_dr_mr.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/test_dr_pubsub.yaml-template (renamed from blueprints/reference_templates/test_dr_pubsub.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/test_mr_multipub.yaml-template (renamed from blueprints/reference_templates/test_mr_multipub.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/test_mr_multisub.yaml-template (renamed from blueprints/reference_templates/test_mr_multisub.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/test_mr_pubsub.yaml-template (renamed from blueprints/reference_templates/test_mr_pubsub.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/test_mr_pubsub_extra.yaml-template (renamed from blueprints/reference_templates/test_mr_pubsub_extra.yaml-template) | 0 | ||||
-rw-r--r-- | reference_templates/ves.yaml-template (renamed from blueprints/reference_templates/ves.yaml-template) | 0 | ||||
-rwxr-xr-x | scripts/bootstrap.sh | 233 | ||||
-rwxr-xr-x | scripts/load-plugins.sh | 62 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/uninstall.sh (renamed from input-templates/cdap-sdk-inputs.yaml) | 26 |
79 files changed, 565 insertions, 1460 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa7a830 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.project +Dockerfile +.vscode +bootstrap-container.code-workspace +target
\ No newline at end of file diff --git a/Dockerfile-template b/Dockerfile-template new file mode 100644 index 0000000..8c2e084 --- /dev/null +++ b/Dockerfile-template @@ -0,0 +1,63 @@ +# ============LICENSE_START======================================================= +# org.onap.dcae +# ================================================================================ +# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= + +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) +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 + +# 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" diff --git a/README.md b/README.md new file mode 100644 index 0000000..8d3a870 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# DCAE Blueprints and Bootstrap Container +This repository holds the source code needed to build the +Docker image for the DCAE bootstrap container. The bootstrap +container runs at DCAE deployment time (via a Helm chart) and +does initial setup of the DCAE environment. This includes +deploying several service components using Cloudify Manager. + +This repository also holds Cloudify blueprints for service components. +The Docker build process copies these blueprints into the Docker image +for the bootstrap container. + +_Note: Prior to the Frankfurt release (R6), this repository held blueprint templates +for components deployed using Cloudify Manager. The build process for this +repository expanded the templates and pushed them to the Nexus raw +repository. The DCAE bootstrap container was hosted in the `dcaegen2.deployments` repository. The Docker build process for the bootstrap containter image pulled the blueprints it needed from the Nexus raw repository._ + +## DCAE Bootstrap Container +This container is responsible for loading plugins and wagons onto the +DCAE Cloudify Manager instance and for launching DCAE components. + +The Docker image build process loads plugins and blueprints into the +image's file system. The plugins are pulled from the Nexus raw repository. The +blueprints are copied from the `blueprints` directory in this repository. At run time, the main script in the container +(`bootstrap.sh`) uploads the plugins to Cloudify Manager, then installs +components using the blueprints. + +The container expects to be started with two environment variables: + - `CMADDR` -- the address of the target Cloudify Manager + - `CMPASS` -- the password for Cloudify Manager + +The container expects input files to use when deploying the blueprints. +It expects to find them in /inputs. The normal method for launching +the container is via a Helm Chart launched by OOM. That chart creates +a Kubernetes ConfigMap containing the input files. The ConfigMap is +mounted as a volume at /inputs. + diff --git a/blueprints/k8s-helm-override.yaml-template b/blueprints/k8s-helm-override.yaml index dc53dde..639d2a0 100644 --- a/blueprints/k8s-helm-override.yaml-template +++ b/blueprints/k8s-helm-override.yaml @@ -18,7 +18,7 @@ tosca_definitions_version: cloudify_dsl_1_3 imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/helm/4.0.0/helm-type.yaml" + - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/helm/4.0.0/helm-type.yaml" inputs: tiller-server-ip: diff --git a/blueprints/k8s-helm.yaml-template b/blueprints/k8s-helm.yaml index 958f0e6..4aed5ba 100644 --- a/blueprints/k8s-helm.yaml-template +++ b/blueprints/k8s-helm.yaml @@ -18,7 +18,7 @@ tosca_definitions_version: cloudify_dsl_1_3 imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/helm/4.0.0/helm-type.yaml" + - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/helm/4.0.0/helm-type.yaml" inputs: tiller-server-ip: diff --git a/blueprints/k8s-holmes-engine.yaml-template b/blueprints/k8s-holmes-engine.yaml index f14dea2..707d2ed 100644 --- a/blueprints/k8s-holmes-engine.yaml-template +++ b/blueprints/k8s-holmes-engine.yaml @@ -20,9 +20,9 @@ tosca_definitions_version: cloudify_dsl_1_3 imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml -- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.7.2/k8splugin_types.yaml" -- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/dcaepolicyplugin/2.4.0/dcaepolicyplugin_types.yaml" -- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml" +- "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml" +- "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/dcaepolicyplugin/2.4.0/dcaepolicyplugin_types.yaml" +- "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/pgaas/1.1.0/pgaas_types.yaml" inputs: dcae_CL_publish_url: type: string @@ -45,7 +45,7 @@ inputs: default: holmes he_image: type: string - default: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/holmes/engine-management:v1.0.0" + default: "nexus3.onap.org:10001/onap/holmes/engine-management:v1.0.0" node_templates: pgaasvm: diff --git a/blueprints/k8s-holmes-rules.yaml-template b/blueprints/k8s-holmes-rules.yaml index 1cff89f..269692a 100644 --- a/blueprints/k8s-holmes-rules.yaml-template +++ b/blueprints/k8s-holmes-rules.yaml @@ -20,9 +20,9 @@ tosca_definitions_version: cloudify_dsl_1_3 imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml -- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.7.2/k8splugin_types.yaml" -- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/dcaepolicyplugin/2.4.0/dcaepolicyplugin_types.yaml" -- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml" +- "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml" +- "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/dcaepolicyplugin/2.4.0/dcaepolicyplugin_types.yaml" +- "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/pgaas/1.1.0/pgaas_types.yaml" inputs: msb_hostname: type: string @@ -37,7 +37,7 @@ inputs: default: holmes hr_image: type: string - default: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/holmes/rule-management:v1.0.0" + default: "nexus3.onap.org:10001/onap/holmes/rule-management:v1.0.0" node_templates: pgaasvm: type: dcae.nodes.pgaas.database diff --git a/blueprints/k8s-hv-ves.yaml-template b/blueprints/k8s-hv-ves.yaml index c66a606..3723200 100644 --- a/blueprints/k8s-hv-ves.yaml-template +++ b/blueprints/k8s-hv-ves.yaml @@ -21,12 +21,12 @@ tosca_definitions_version: cloudify_dsl_1_3 imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.7.2/k8splugin_types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml inputs: tag_version: type: string - default: '{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.3.0' + default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.3.0' hv_ves_name: type: string default: 'dcae-hv-ves-collector' diff --git a/blueprints/k8s-pgaas-initdb.yaml-template b/blueprints/k8s-pgaas-initdb.yaml index 2022300..4cdf5ae 100644 --- a/blueprints/k8s-pgaas-initdb.yaml-template +++ b/blueprints/k8s-pgaas-initdb.yaml @@ -30,9 +30,9 @@ description: |- imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.1.0/relationshipplugin_types.yaml" - - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml" - - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml" + - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/relationshipplugin/1.1.0/relationshipplugin_types.yaml" + - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/sshkeyshare/sshkey_types.yaml" + - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/pgaas/1.1.0/pgaas_types.yaml" inputs: blueprint_version: diff --git a/blueprints/k8s-prh.yaml-template b/blueprints/k8s-prh.yaml index 3d3107c..4486412 100644 --- a/blueprints/k8s-prh.yaml-template +++ b/blueprints/k8s-prh.yaml @@ -21,7 +21,7 @@ tosca_definitions_version: cloudify_dsl_1_3 imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.7.2/k8splugin_types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml inputs: pnfUrl: @@ -63,7 +63,7 @@ inputs: default: "admin" tag_version: type: string - default: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.services.prh.prh-app-server:1.4.0" + default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:1.4.0" replicas: type: integer description: number of instances diff --git a/blueprints/k8s-snmptrap.yaml-template b/blueprints/k8s-snmptrap.yaml index bf83a27..e1d50c7 100644 --- a/blueprints/k8s-snmptrap.yaml-template +++ b/blueprints/k8s-snmptrap.yaml @@ -21,11 +21,11 @@ tosca_definitions_version: cloudify_dsl_1_3 imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.7.2/k8splugin_types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml inputs: tag_version: type: string - default: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.collectors.snmptrap:1.4.0" + default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.snmptrap:1.4.0" cache: type: string default: diff --git a/blueprints/k8s-tca-clampnode.yaml-template b/blueprints/k8s-tca-clampnode.yaml index d43d017..56dbc2c 100644 --- a/blueprints/k8s-tca-clampnode.yaml-template +++ b/blueprints/k8s-tca-clampnode.yaml @@ -23,8 +23,8 @@ description: > imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.7.2/k8splugin_types.yaml" - - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/clamppolicyplugin/1.1.0/clamppolicyplugin_types.yaml" + - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml" + - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/clamppolicyplugin/1.1.0/clamppolicyplugin_types.yaml" inputs: aaiEnrichmentHost: type: string diff --git a/blueprints/k8s-tca-policynode.yaml-template b/blueprints/k8s-tca-policynode.yaml index c24dfed..2dec8c0 100644 --- a/blueprints/k8s-tca-policynode.yaml-template +++ b/blueprints/k8s-tca-policynode.yaml @@ -23,8 +23,8 @@ description: > imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.7.2/k8splugin_types.yaml - - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/dcaepolicyplugin/2.4.0/dcaepolicyplugin_types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/dcaepolicyplugin/2.4.0/dcaepolicyplugin_types.yaml inputs: aaiEnrichmentHost: type: string @@ -49,7 +49,7 @@ inputs: default: dcae-redis.onap.svc.cluster.local:6379 tag_version: type: string - default: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.0.0" + default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.0.0" consul_host: type: string default: consul-server.onap.svc.cluster.local diff --git a/blueprints/k8s-tca.yaml-template b/blueprints/k8s-tca.yaml index 78c3f03..f006531 100644 --- a/blueprints/k8s-tca.yaml-template +++ b/blueprints/k8s-tca.yaml @@ -23,7 +23,7 @@ description: > imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.7.2/k8splugin_types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml inputs: aaiEnrichmentHost: type: string @@ -48,7 +48,7 @@ inputs: default: dcae-redis.onap.svc.cluster.local:6379 tag_version: type: string - default: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.2.2" + default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.2.2" consul_host: type: string default: consul-server.onap.svc.cluster.local diff --git a/blueprints/k8s-ves.yaml-template b/blueprints/k8s-ves.yaml index bb372a9..7a45a5c 100644 --- a/blueprints/k8s-ves.yaml-template +++ b/blueprints/k8s-ves.yaml @@ -21,7 +21,7 @@ tosca_definitions_version: cloudify_dsl_1_3 imports: - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml - - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.7.2/k8splugin_types.yaml + - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml inputs: ves_other_publish_url: diff --git a/blueprints/pom.xml b/blueprints/pom.xml deleted file mode 100644 index 9b886ea..0000000 --- a/blueprints/pom.xml +++ /dev/null @@ -1,174 +0,0 @@ -<?xml version="1.0"?> -<!-- -================================================================================ -Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. -================================================================================ -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -============LICENSE_END========================================================= - -ECOMP is a trademark and service mark of AT&T Intellectual Property. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.dcaegen2.platform</groupId> - <artifactId>blueprints</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <groupId>org.onap.dcaegen2.platform.blueprints</groupId> - <artifactId>blueprints</artifactId> - <name>blueprints</name> - <version>1.0.0-SNAPSHOT</version> - <url>http://maven.apache.org</url> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <sonar.skip>true</sonar.skip> - <sonar.sources>.</sonar.sources> - <!-- customize the SONARQUBE URL --> - <!-- sonar.host.url>http://localhost:9000</sonar.host.url --> - <!-- below are language dependent --> - <!-- for Python --> - <sonar.language>py</sonar.language> - <sonar.pluginName>Python</sonar.pluginName> - <sonar.inclusions>**/*.py</sonar.inclusions> - <!-- for JavaScaript --> - <!-- - <sonar.language>js</sonar.language> - <sonar.pluginName>JS</sonar.pluginName> - <sonar.inclusions>**/*.js</sonar.inclusions> - --> - </properties> - <build> - <finalName>${project.artifactId}-${project.version}</finalName> - <plugins> - <!-- plugin> - <artifactId>maven-assembly-plugin</artifactId> - <version>2.4.1</version> - <configuration> - <descriptors> - <descriptor>assembly/dep.xml</descriptor> - </descriptors> - </configuration> - <executions> - <execution> - <id>make-assembly</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin --> - <!-- now we configure custom action (calling a script) at various lifecycle phases --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> - <executions> - <execution> - <id>clean phase script</id> - <phase>clean</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>clean</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>generate-sources script</id> - <phase>generate-sources</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>generate-sources</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>compile script</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>compile</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>package script</id> - <phase>package</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>package</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>test script</id> - <phase>test</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>test</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>install script</id> - <phase>install</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>install</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>deploy script</id> - <phase>deploy</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>deploy</argument> - </arguments> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/check-blueprint-vs-input/bin/check-blueprint-vs-input b/check-blueprint-vs-input/bin/check-blueprint-vs-input deleted file mode 100755 index c6b271b..0000000 --- a/check-blueprint-vs-input/bin/check-blueprint-vs-input +++ /dev/null @@ -1,262 +0,0 @@ -#!/usr/bin/env python3 -# -*- indent-tabs-mode: nil -*- -# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this code except in compliance -# with the License. You may obtain a copy of the License -# at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. See the License for the specific language governing -# permissions and limitations under the License. - -from __future__ import print_function - -""" - - NAME - check-blueprint-vs-input - given a blueprint and inputs file pair, validate them against each other - - USAGE - check-blueprint-vs-input [-v] [-t] -b BLUEPRINT [-B exclusion-list] -i INPUTS [-B exclusion-list] - - DESCRIPTION -""" -description = """ - Validate a blueprint and inputs file against each other. This looks for the inputs: node of the blueprint - file, the inputs used by {get_input} within the blueprint, and the values found in the inputs file. The - files may be in either YAML or JSON formats. The names default to blueprint.yaml and inputs.yaml. If - a blueprint inputs name has a default value, it is not considered an error if it is not in the inputs file. - - If using a template inputs file, add the -t/--template option. This will look for the inputs under - an "inputs:" node instead of at the top level. - - If there are blueprint nodes or inputs nodes that should not be considered an error, specify them - using the -B/--blueprint-exclusion-list and -I/inputs-exclusion-list parameters. - - "check-blueprint-vs-input --help" will list all of the available options. -""" - -import sys, argparse, json, yaml -from yaml.composer import Composer -from yaml.constructor import Constructor -from yaml.constructor import SafeConstructor -from yaml.constructor import ScalarNode - -def main(): - DEF_BLUEPRINT_NAME = "blueprint.yaml" - DEF_INPUTS_NAME = "inputs.yaml" - parser = argparse.ArgumentParser(description=description) - parser.add_argument("-b", "--blueprint", type=str, help="Path to blueprint file, defaults to '%s'" % DEF_BLUEPRINT_NAME, - default=DEF_BLUEPRINT_NAME) - parser.add_argument("-i", "--inputs", type=str, help="Port to listen on, defaults to '%s'" % DEF_INPUTS_NAME, - default=DEF_INPUTS_NAME) - parser.add_argument("-B", "--blueprint-exclusion-list", type=str, help="Comma-separated list of names not to warn about not being in the blueprint file", default="") - parser.add_argument("-I", "--inputs-exclusion-list", type=str, help="Comma-separated list of names not to warn about not being in the inputs file", default="") - parser.add_argument("-t", "--inputs-template", help="Treat inputs file as coming from template area", action="store_true") - parser.add_argument("-v", "--verbose", help="Verbose, may be specified multiple times", action="count", default=0) - args = parser.parse_args() - - blueprintExclusionList = args.blueprint_exclusion_list.split(",") - if args.verbose: print("blueprintExclusionList=%s" % blueprintExclusionList) - - inputsExclusionList = args.inputs_exclusion_list.split(",") - if args.verbose: print("inputsExclusionList=%s" % inputsExclusionList) - - def loadYaml(filename, where): - """ - Load a YAML file - - Line number manipulation is inspired by: - https://stackoverflow.com/questions/13319067/parsing-yaml-return-with-line-number - - The YAML loader parses the file first into a set of nodes. Capture the - line numbers and column numbers during that parsing pass. - The YAML object is then created from those objects. - """ - - def compose_node(parent, index): - lineno = loader.line # the line number where the previous token has ended (plus empty lines) - # column = loader.column - node = Composer.compose_node(loader, parent, index) - node.__lineno__ = lineno + 1 - # node.__column__ = column + 1 - return node - - def construct_scalar(node): - where[node.value] = str(node.__lineno__) # + ":" + str(node.__column__) - return SafeConstructor.construct_scalar(loader, node) - - def construct_mapping(node, deep=False): - mapping = SafeConstructor.construct_mapping(loader, node, deep=deep) - mapping['__lineno__'] = str(node.__lineno__) # + ":" + str(node.__column__) - return mapping - - yread = None - try: - with open(filename, "r") as fd: - yread = fd.read() - except: - type, value, traceback = sys.exc_info() - sys.exit(value) - - loader = yaml.SafeLoader(yread) - loader.compose_node = compose_node - loader.construct_mapping = construct_mapping - loader.construct_scalar = construct_scalar - data = loader.get_single_data() - if args.verbose > 2: - print("================ %s ================" % filename) - yaml.dump(data, sys.stdout) - print("================================") - return data - - blueprint = loadYaml(args.blueprint, {}) - inputsWhere = { } - inputs = loadYaml(args.inputs, inputsWhere) - - # if inputs file is empty, provide an empty dictionary - if inputs is None: inputs = { } - - # blueprint file has inputs under the inputs: node - blueprintInputs = blueprint['inputs'] - - # inputs file normally has inputs at the top level, - # but templated inputs files have themunder the inputs: node - if args.inputs_template: inputs = inputs['inputs'] - - - exitval = 0 - - def check_blueprint_inputs(blueprintInputs, inputs, inputsExclusionList): - """ - check the blueprint inputs against the inputs file - """ - foundone = False - for input in blueprintInputs: - if input == '__lineno__': continue - if args.verbose: print("blueprint input=%s\n%s" % (input, blueprintInputs[input])) - if input in inputs: - if args.verbose: print("\tIS in inputs file") - else: - # print("blueprintInputs.get(input)=%s and blueprintInputs[input].get('default')=%s" % (blueprintInputs.get(input), blueprintInputs[input].get('default'))) - if blueprintInputs.get(input) and blueprintInputs[input].get('default'): - if args.verbose: print("\tHAS a default value") - elif input not in inputsExclusionList: - print("<<<<<<<<<<<<<<<< %s (blueprint line %s) not in inputs file" % (input, blueprintInputs[input].get('__lineno__'))) - foundone = True - else: - if args.verbose: print("<<<<<<<<<<<<<<<< %s not in inputs file, but being ignored" % input) - return foundone - - # check the blueprint inputs: against the inputs file - if args.verbose: print("================ check the blueprint inputs: against the inputs file") - foundone = check_blueprint_inputs(blueprintInputs, inputs, inputsExclusionList) - if foundone: print("") - if foundone: exitval = 1 - - def prettyprint(msg,j): - print(msg) - json.dump(j, sys.stdout, indent=4, sort_keys=True) - print("") - - def check_get_inputs(blueprint, blueprintInputs, inputs, inputsExclusionList): - """ - check the blueprint get_input values against the inputs file - """ - - def findInputs(d, where): - if args.verbose > 2: print("check_get_inputs(): d=%s" % d) - ret = [ ] - if isinstance(d, dict): - if args.verbose: print("type(d) is dict") - for key,val in d.items(): - linecol = d.get('__lineno__') - if args.verbose: print("looking at d[key=%s], line=%s" % (key, linecol)) - if key == '__lineno__': continue - if key == "get_input": - if args.verbose: print("found get_input, adding '%s'" % val) - ret += [ val ] - if not where.get(val): where[val] = str(linecol) - else: where[val] += "," + str(linecol) - return ret - else: - if args.verbose: print("going recursive on '%s'" % val) - ret += findInputs(val, where) - elif isinstance(d, list): - if args.verbose: print("type(d) is list") - for val in d: - if args.verbose: print("going recursive on '%s'" % val) - ret += findInputs(val, where) - else: - if args.verbose: print("type(d) is scalar: %s" % d) - return ret - - foundone = False - where = {} - inputList = findInputs(blueprint, where) - if args.verbose: - print("done looking for get_input, found:\n%s" % inputList) - prettyprint("where=",where) - alreadySeen = { } - for input in inputList: - if input not in alreadySeen: - alreadySeen[input] = True - if args.verbose: print("checking input %s" % input) - if input in inputs: - if args.verbose: print("\tIS in input file") - else: - if blueprintInputs.get(input) and blueprintInputs[input].get('default'): - if args.verbose: print("\tHAS a default value") - elif input not in inputsExclusionList: - line = where[input] - s = "s" if line.find(",") >= 0 else "" - print(":::::::::::::::: get_input: {0} is NOT in input file (blueprint line{1} {2})".format(input, s, line)) - foundone = True - else: - if args.verbose: - line = where[input] - s = "s" if line.find(",") >= 0 else "" - print(":::::::::::::::: get_input: %s is NOT in input file (blueprint line{1} {2}), but being ignored" % (input, s, line)) - - return foundone - - - - # check the blueprint's get_input calls against the inputs file - if args.verbose: print("================ check the blueprint's get_input calls against the inputs file ================") - foundone = check_get_inputs(blueprint, blueprintInputs, inputs, inputsExclusionList) - if foundone: print("") - if foundone: exitval = 1 - - def check_inputs(blueprintInputs, inputs, blueprintExclusionList): - """ - check the inputs file against the blueprints inputs list - """ - foundone = False - # prettyprint("inputs=", inputs) - for key,val in inputs.items(): - if key == '__lineno__': continue - if args.verbose: print("inputs key=%s" % key) - # print("inputs key=%s, line=%s, val=%s" % (key,inputsWhere[key],val)) # DELETE - if key in blueprintInputs: - if args.verbose: print("\tIS in blueprint") - else: - if key not in blueprintExclusionList: - print(">>>>>>>>>>>>>>>> %s is in inputs file (around line %s) but not in blueprint file" % (key, inputsWhere[key])) - foundone = True - else: - if args.verbose: print(">>>>>>>>>>>>>>>> %s is in inputs file (around line %s), but not in blueprint file and being ignored" % (key, inputsWhere[key])) - return foundone - - # check the inputs file against the blueprints input: section - if args.verbose: print("================ check the inputs file against the blueprints input: section ================") - foundone = check_inputs(blueprintInputs, inputs, blueprintExclusionList) - if foundone: exitval = 1 - sys.exit(exitval) - -if __name__ == "__main__": - main() diff --git a/check-blueprint-vs-input/lib/sample-inputs.yaml b/check-blueprint-vs-input/lib/sample-inputs.yaml deleted file mode 100644 index a56652b..0000000 --- a/check-blueprint-vs-input/lib/sample-inputs.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -centos7image_id: 'some-value-in-guid-format' -ubuntu1604image_id: 'another-value-in-guid-format' -flavor_id: '4' -security_group: '55a11193-6559-4f6c-b2d2-0119a9817062' -public_net: 'admin_floating_228_net' -private_net: 'onap-f-net' -openstack: - username: 'MY_LOGIN' - password: 'MY_PASSWORD' - tenant_name: 'TENANT_NAME' - auth_url: 'KEYSTONE_AUTH_URL' - region: 'RegionOne' -keypair: 'KEYNME' -key_filename: '/opt/dcae/key' -location_prefix: 'onapr1' -location_domain: 'onapdevlab.onap.org' -codesource_url: 'https://nexus.onap.org/service/local/repositories/raw/content' -codesource_version: 'org.onap.dcaegen2.deployments/releases/scripts' diff --git a/check-blueprint-vs-input/man/check-blueprint-vs-input.1 b/check-blueprint-vs-input/man/check-blueprint-vs-input.1 deleted file mode 100644 index 247fbc6..0000000 --- a/check-blueprint-vs-input/man/check-blueprint-vs-input.1 +++ /dev/null @@ -1,50 +0,0 @@ -check-blueprint-vs-input(1UTIL) ONAP check-blueprint-vs-input(1UTIL) - - - -NNAAMMEE - check-blueprint-vs-input - -SSYYNNOOPPSSIISS - check-blueprint-vs-input [-h] [-b BLUEPRINT] [-i INPUTS] - [-B BLUEPRINT_EXCLUSION_LIST] - [-I INPUTS_EXCLUSION_LIST] [-t] [-v] - -DDEESSCCRRIIPPTTIIOONN - Validate a blueprint and inputs file against each other. This looks for - the inputs: node of the blueprint file, the inputs used by {get_input} - within the blueprint, and the values found in the inputs file. The - files may be in either YAML or JSON formats. The names default to blue‐ - print.yaml and inputs.yaml. If a blueprint inputs name has a default - value, it is not considered an error if it is not in the inputs file. - If using a template inputs file, add the -t/--template option. This - will look for the inputs under an "inputs:" node instead of at the top - level. If there are blueprint nodes or inputs nodes that should not be - considered an error, specify them using the -B/--blueprint- exclusion- - list and -I/inputs-exclusion-list parameters. "check-blueprint-vs- - input --help" will list all of the available options. - - OOPPTTIIOONNSS - -h, --help show this help message and exit - - -b BLUEPRINT, --blueprint BLUEPRINT Path to blueprint file, defaults to - 'blueprint.yaml' - - -i INPUTS, --inputs INPUTS Port to listen on, defaults to 'inputs.yaml' - - -B BLUEPRINT_EXCLUSION_LIST, --blueprint-exclusion-list BLUE‐ - PRINT_EXCLUSION_LIST Comma-separated list of names - not to warn about not - being in the blueprint file - - -I INPUTS_EXCLUSION_LIST, --inputs-exclusion-list INPUTS_EXCLUSION_LIST - Comma-separated list of names not to warn about not - being in the inputs file - - -t, --inputs-template Treat inputs file as coming from template area - - -v, --verbose Verbose, may be specified multiple times - - - -ONAP {{DATE}} check-blueprint-vs-input(1UTIL) diff --git a/check-blueprint-vs-input/man/check-blueprint-vs-input.man b/check-blueprint-vs-input/man/check-blueprint-vs-input.man deleted file mode 100644 index 017d529..0000000 --- a/check-blueprint-vs-input/man/check-blueprint-vs-input.man +++ /dev/null @@ -1,55 +0,0 @@ -'\" Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. -'\" -'\" Licensed under the Apache License, Version 2.0 (the "License"); -'\" you may not use this code except in compliance -'\" with the License. You may obtain a copy of the License -'\" at http://www.apache.org/licenses/LICENSE-2.0 -'\" -'\" Unless required by applicable law or agreed to in writing, software -'\" distributed under the License is distributed on an "AS IS" BASIS, -'\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -'\" implied. See the License for the specific language governing -'\" permissions and limitations under the License. -.TH check-blueprint-vs-input 1UTIL {{DATE}} ONAP ONAP -.SH NAME -check-blueprint-vs-input -.SH SYNOPSIS -check-blueprint-vs-input [-h] [-b BLUEPRINT] [-i INPUTS] - [-B BLUEPRINT_EXCLUSION_LIST] - [-I INPUTS_EXCLUSION_LIST] [-t] [-v] -.SH DESCRIPTION -Validate a blueprint and inputs file against each other. This looks for the -inputs: node of the blueprint file, the inputs used by {get_input} within the -blueprint, and the values found in the inputs file. The files may be in either -YAML or JSON formats. The names default to blueprint.yaml and inputs.yaml. If -a blueprint inputs name has a default value, it is not considered an error if -it is not in the inputs file. If using a template inputs file, add the --t/--template option. This will look for the inputs under an "inputs:" node -instead of at the top level. If there are blueprint nodes or inputs nodes that -should not be considered an error, specify them using the -B/--blueprint- -exclusion-list and -I/inputs-exclusion-list parameters. "check-blueprint-vs- -input --help" will list all of the available options. -.SS OPTIONS -.HP 20 --h, --help -show this help message and exit -.HP 20 --b BLUEPRINT, --blueprint BLUEPRINT -Path to blueprint file, defaults to 'blueprint.yaml' -.HP 20 --i INPUTS, --inputs INPUTS -Port to listen on, defaults to 'inputs.yaml' -.HP 20 --B BLUEPRINT_EXCLUSION_LIST, --blueprint-exclusion-list BLUEPRINT_EXCLUSION_LIST -Comma-separated list of names not to warn about not - being in the blueprint file -.HP 20 --I INPUTS_EXCLUSION_LIST, --inputs-exclusion-list INPUTS_EXCLUSION_LIST -Comma-separated list of names not to warn about not - being in the inputs file -.HP 20 --t, --inputs-template -Treat inputs file as coming from template area -.HP 20 --v, --verbose -Verbose, may be specified multiple times diff --git a/check-blueprint-vs-input/pom.xml b/check-blueprint-vs-input/pom.xml deleted file mode 100644 index 14b4d50..0000000 --- a/check-blueprint-vs-input/pom.xml +++ /dev/null @@ -1,250 +0,0 @@ -<?xml version="1.0"?> -<!-- -================================================================================ -Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. -================================================================================ -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -============LICENSE_END========================================================= - -ECOMP is a trademark and service mark of AT&T Intellectual Property. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.dcaegen2.platform.blueprints</groupId> - <artifactId>blueprints</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <groupId>org.onap.dcaegen2.plaform.blueprints</groupId> - <artifactId>check-blueprint-vs-input</artifactId> - <name>dcaegen2-plaform-blueprints-check-blueprint-vs-input</name> - <version>1.0.0-SNAPSHOT</version> - <url>http://maven.apache.org</url> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <sonar.skip>true</sonar.skip> - <sonar.sources>.</sonar.sources> - <!-- customize the SONARQUBE URL --> - <!-- sonar.host.url>http://localhost:9000</sonar.host.url --> - <!-- below are language dependent --> - <!-- for Python --> - <sonar.language>py</sonar.language> - <sonar.pluginName>Python</sonar.pluginName> - <sonar.inclusions>**/*.py</sonar.inclusions> - <!-- for JavaScaript --> - <!-- - <sonar.language>js</sonar.language> - <sonar.pluginName>JS</sonar.pluginName> - <sonar.inclusions>**/*.js</sonar.inclusions> - --> - </properties> - <build> - <finalName>${project.artifactId}-${project.version}</finalName> - <pluginManagement> - <plugins> - <!-- the following plugins are invoked from oparent, we do not need them --> - <plugin> - <groupId>org.sonatype.plugins</groupId> - <artifactId>nexus-staging-maven-plugin</artifactId> - <version>1.6.7</version> - <configuration> - <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - <!-- This version supports the "deployAtEnd" parameter --> - <version>2.8</version> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - <!-- first disable the default Java plugins at various stages --> - <!-- maven-resources-plugin is called during "*resource" phases by default behavior. it prepares - the resources dir. we do not need it --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>2.6</version> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - <!-- maven-compiler-plugin is called during "compile" phases by default behavior. we do not need it --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - <!-- maven-jar-plugin is called during "compile" phase by default behavior. we do not need it --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - <executions> - <execution> - <id>default-jar</id> - <phase/> - </execution> - </executions> - </plugin> - <!-- maven-install-plugin is called during "install" phase by default behavior. it tries to copy stuff under - target dir to ~/.m2. we do not need it --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-install-plugin</artifactId> - <version>2.4</version> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - <!-- maven-surefire-plugin is called during "test" phase by default behavior. it triggers junit test. - we do not need it --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.12.4</version> - <configuration> - <skipTests>true</skipTests> - </configuration> - </plugin> - </plugins> - </pluginManagement> - <plugins> - <!-- plugin> - <artifactId>maven-assembly-plugin</artifactId> - <version>2.4.1</version> - <configuration> - <descriptors> - <descriptor>assembly/dep.xml</descriptor> - </descriptors> - </configuration> - <executions> - <execution> - <id>make-assembly</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin --> - <!-- now we configure custom action (calling a script) at various lifecycle phases --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> - <executions> - <execution> - <id>clean phase script</id> - <phase>clean</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>clean</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>generate-sources script</id> - <phase>generate-sources</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>generate-sources</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>compile script</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>compile</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>package script</id> - <phase>package</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>package</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>test script</id> - <phase>test</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>test</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>install script</id> - <phase>install</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>install</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>deploy script</id> - <phase>deploy</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>deploy</argument> - <argument>bin/check-blueprint-vs-input</argument> - <argument>man/check-blueprint-vs-input.1</argument> - </arguments> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/config/00-consul.json b/config/00-consul.json new file mode 100644 index 0000000..a7d6ff4 --- /dev/null +++ b/config/00-consul.json @@ -0,0 +1,9 @@ +{ + "datacenter": "dc1", + "data_dir": "/opt/consul", + "log_level": "INFO", + "server": false, + "retry_join": ["consul"], + "node_name": "dcae-bootstrap", + "disable_update_check": true + }
\ No newline at end of file diff --git a/input-templates/cdapinputs.yaml b/input-templates/cdapinputs.yaml deleted file mode 100644 index 879b59c..0000000 --- a/input-templates/cdapinputs.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -ubuntu1604image_id: '{{ ubuntu_1604_image }}' -centos7image_id: '{{ centos_7_image }}' -flavor_id: '{{ flavor_id_cdap }}' -security_group: '{{ security_group }}' -public_net: '{{ public_net_id }}' -private_net: '{{ openstack_private_network_name }}' -openstack: - username: '{{ openstack_user }}' - password: '{{ openstack_password }}' - tenant_name: '{{ tenant_name }}' - auth_url: '{{ keystone_url }}' - region: '{{ openstack_region }}' -keypair: '{{ key_name }}' -key_filename: '/opt/dcae/key' -location_prefix: 'dcae' -location_domain: '{{ dcae_zone }}.{{ dcae_domain }}' -codesource_url: 'https://nexus.onap.org/service/local/repositories/raw/content' -codesource_version: 'org.onap.dcaegen2.deployments/releases' diff --git a/input-templates/datafile-collector-input.yaml b/input-templates/datafile-collector-input.yaml deleted file mode 100644 index 242eba2..0000000 --- a/input-templates/datafile-collector-input.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# ================================================================================
-# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=========================================================
-
-#dmaap_host: '{{ dmaap_host }}'
-#dmaap_port: '{{ dmaap_port }}'
-#dmaap_user: '{{ dmaap_user }}'
-#dmaap_passwd: '{{ dmaap_passwd }}'
-#tag_version: '{{ tag_version }}'
-#replicas: '{{ replicas }}'
\ No newline at end of file diff --git a/input-templates/dhinputs.yaml b/input-templates/dhinputs.yaml deleted file mode 100644 index 9014ac6..0000000 --- a/input-templates/dhinputs.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -application_config: - cloudify: - protocol: "http" - inventory: - protocol: "http" diff --git a/input-templates/he-ip.yaml b/input-templates/he-ip.yaml deleted file mode 100644 index 284aa2d..0000000 --- a/input-templates/he-ip.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -{ - "dh_location_id": "{{ dcae_zone }}", - "docker_host_override": "component_dockerhost", - "msb_hostname": "{{ openo_ip_addr }}", - "dcae_CL_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.DCAE_CL_OUTPUT", - "ves_fault_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.SEC_FAULT_OUTPUT", - "location_domain" : "{{ dcae_zone }}.{{ dcae_domain }}", - "location_prefix" : "dcae", - "pgaas_cluster_name" : "pgvm", - "database_name":"holmes" -} diff --git a/input-templates/heartbeat-input.json b/input-templates/heartbeat-input.json deleted file mode 100644 index eaf13a3..0000000 --- a/input-templates/heartbeat-input.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "dh_location_id": "{{ dcae_zone }}", - "docker_host_override": "component_dockerhost", - "dcae_CL_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.DCAE_CL_OUTPUT/", - "ves_heartbeat_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/", - "tag_version": "nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.heartbeat:2.0" -} diff --git a/input-templates/hr-ip.yaml b/input-templates/hr-ip.yaml deleted file mode 100644 index 10c65e0..0000000 --- a/input-templates/hr-ip.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -{ - "dh_location_id": "{{ dcae_zone }}", - "docker_host_override": "component_dockerhost", - "msb_hostname": "{{ openo_ip_addr }}", - "location_domain" : "{{ dcae_zone }}.{{ dcae_domain }}", - "location_prefix" : "dcae", - "pgaas_cluster_name" : "pgvm", - "database_name":"holmes" -} diff --git a/input-templates/inputs.yaml b/input-templates/inputs.yaml deleted file mode 100644 index b87a760..0000000 --- a/input-templates/inputs.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -ubuntu1604image_id: '{{ ubuntu_1604_image }}' -centos7image_id: '{{ centos_7_image }}' -flavor_id: '{{ flavor_id }}' -security_group: '{{ security_group }}' -public_net: '{{ public_net_id }}' -private_net: '{{ openstack_private_network_name }}' -openstack: - username: '{{ openstack_user }}' - password: '{{ openstack_password }}' - tenant_name: '{{ tenant_name }}' - auth_url: '{{ keystone_url }}' - region: '{{ openstack_region }}' -keypair: '{{ key_name }}' -key_filename: '/opt/dcae/key' -location_prefix: 'dcae' -location_domain: '{{ dcae_zone }}.{{ dcae_domain }}' -codesource_url: 'https://nexus.onap.org/service/local/repositories/raw/content' -codesource_version: 'org.onap.dcaegen2.deployments/releases' diff --git a/input-templates/invinputs.yaml b/input-templates/invinputs.yaml deleted file mode 100644 index 9701b9b..0000000 --- a/input-templates/invinputs.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -docker_host_override: "platform_dockerhost" -asdc_address: '{{ sdc_ip_addr }}:8443' -asdc_uri: 'https://{{ sdc_ip_addr }}:8443' -asdc_user: "dcae" -asdc_password: !!str Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -asdc_environment_name: "AUTO" -postgres_user_inventory: "postgres" -postgres_password_inventory: "onap123" -service_change_handler_image: "{{ nexus_docker_repo }}/onap/org.onap.dcaegen2.platform.servicechange-handler:v1.0.0" -inventory_image: "{{ nexus_docker_repo }}/onap/org.onap.dcaegen2.platform.inventory-api:v1.2.0" diff --git a/input-templates/phinputs.yaml b/input-templates/phinputs.yaml deleted file mode 100644 index bbdab63..0000000 --- a/input-templates/phinputs.yaml +++ /dev/null @@ -1,108 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. - -application_config: - policy_handler : - # parallelize the getConfig queries to policy-engine on each policy-update notification - thread_pool_size : 4 - - # parallelize requests to policy-engine and keep them alive - pool_connections : 20 - - # retry to getConfig from policy-engine on policy-update notification - policy_retry_count : 5 - policy_retry_sleep : 5 - - # mode of operation for the policy-handler - # either active or passive - # in passive mode the policy-hanlder will not listen to - # and will not bring the policy-updates from policy-engine - mode_of_operation : "active" - - # config of automatic catch_up for resiliency - catch_up : - # interval in seconds on how often to call automatic catch_up - # example: 1200 is 20*60 seconds that is 20 minutes - interval : 1200 - - # config of periodic reconfigure-rediscover for adaptability - reconfigure: - # interval in seconds on how often to call automatic reconfigure - # example: 600 is 10*60 seconds that is 10 minutes - interval : 600 - - # policy-engine config - # These are the url of and the auth for the external system, namely the policy-engine (PDP). - # We obtain that info manually from PDP folks at the moment. - # In long run we should figure out a way of bringing that info into consul record - # related to policy-engine itself. - policy_engine : - url : "http://{{ policy_ip_addr }}:8081" - path_decision : "/decision/v1" - path_notifications : "/pdp/notifications" - path_api : "/pdp/api/" - headers : - Accept : "application/json" - "Content-Type" : "application/json" - ClientAuth : "cHl0aG9uOnRlc3Q=" - Authorization : "Basic dGVzdHBkcDphbHBoYTEyMw==" - Environment : "TEST" - target_entity : "policy_engine" - # optional tls_ca_mode specifies where to find the cacert.pem for tls - # can be one of these: - # "cert_directory" - use the cacert.pem stored locally in cert_directory. - # this is the default if cacert.pem file is found - # - # "os_ca_bundle" - use the public ca_bundle provided by linux system. - # this is the default if cacert.pem file not found - # - # "do_not_verify" - special hack to turn off the verification by cacert and hostname - tls_ca_mode : "cert_directory" - # optional tls_wss_ca_mode specifies the same for the tls based web-socket - tls_wss_ca_mode : "cert_directory" - # optional timeout_in_secs specifies the timeout for the http requests - timeout_in_secs: 60 - # optional ws_ping_interval_in_secs specifies the ping interval for the web-socket connection - ws_ping_interval_in_secs: 30 - # deploy_handler config - # changed from string "deployment_handler" in 2.3.1 to structure in 2.4.0 - deploy_handler : - # name of deployment-handler service used by policy-handler for logging - target_entity : "deployment_handler" - # url of the deployment-handler service for policy-handler to direct the policy-updates to - # - expecting dns to resolve the hostname deployment-handler to ip address - url : "http://deployment-handler:8188" - # limit the size of a single data segment for policy-update messages - # from policy-handler to deployment-handler in megabytes - max_msg_length_mb : 5 - query : - # optionally specify the tenant name for the cloudify under deployment-handler - # if not specified the "default_tenant" is used by the deployment-handler - cfy_tenant_name : "default_tenant" - # optional tls_ca_mode specifies where to find the cacert.pem or skip tls verification - # can be one of these: - # "cert_directory" - use the cacert.pem stored locally in cert_directory. - # this is the default if cacert.pem file is found - # - # "os_ca_bundle" - use the public ca_bundle provided by linux system. - # this is the default if cacert.pem file not found - # - # "do_not_verify" - special hack to turn off the verification by cacert and hostname - tls_ca_mode : "cert_directory" - # optional timeout_in_secs specifies the timeout for the http requests - timeout_in_secs: 60 diff --git a/input-templates/pom.xml b/input-templates/pom.xml deleted file mode 100644 index c0d7a75..0000000 --- a/input-templates/pom.xml +++ /dev/null @@ -1,174 +0,0 @@ -<?xml version="1.0"?> -<!-- -================================================================================ -Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. -================================================================================ -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -============LICENSE_END========================================================= - -ECOMP is a trademark and service mark of AT&T Intellectual Property. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.dcaegen2.platform</groupId> - <artifactId>blueprints</artifactId> - <version>1.2.0-SNAPSHOT</version> - </parent> - <groupId>org.onap.dcaegen2.platform.blueprints</groupId> - <artifactId>input-templates</artifactId> - <name>dcaegen2-platform-blueprints-input-templates</name> - <version>1.0.0-SNAPSHOT</version> - <url>http://maven.apache.org</url> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <sonar.skip>true</sonar.skip> - <sonar.sources>.</sonar.sources> - <!-- customize the SONARQUBE URL --> - <!-- sonar.host.url>http://localhost:9000</sonar.host.url --> - <!-- below are language dependent --> - <!-- for Python --> - <sonar.language>py</sonar.language> - <sonar.pluginName>Python</sonar.pluginName> - <sonar.inclusions>**/*.py</sonar.inclusions> - <!-- for JavaScaript --> - <!-- - <sonar.language>js</sonar.language> - <sonar.pluginName>JS</sonar.pluginName> - <sonar.inclusions>**/*.js</sonar.inclusions> - --> - </properties> - <build> - <finalName>${project.artifactId}-${project.version}</finalName> - <plugins> - <!-- plugin> - <artifactId>maven-assembly-plugin</artifactId> - <version>2.4.1</version> - <configuration> - <descriptors> - <descriptor>assembly/dep.xml</descriptor> - </descriptors> - </configuration> - <executions> - <execution> - <id>make-assembly</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin --> - <!-- now we configure custom action (calling a script) at various lifecycle phases --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> - <executions> - <execution> - <id>clean phase script</id> - <phase>clean</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>clean</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>generate-sources script</id> - <phase>generate-sources</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>generate-sources</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>compile script</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>compile</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>package script</id> - <phase>package</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>package</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>test script</id> - <phase>test</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>test</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>install script</id> - <phase>install</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>install</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>deploy script</id> - <phase>deploy</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <arguments> - <argument>${project.artifactId}</argument> - <argument>deploy</argument> - </arguments> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/input-templates/prh-input.json b/input-templates/prh-input.json deleted file mode 100644 index 5dab4f5..0000000 --- a/input-templates/prh-input.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "dh_location_id": "{{ dcae_zone }}", - "docker_host_override": "component_dockerhost", - "prh_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.unauthenticated.PNF_READY/", - "prh_subscribe_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.VES_PNFREG_OUTPUT/", - "tag_version": "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh:1.2.2" -} diff --git a/input-templates/prh-input.yaml b/input-templates/prh-input.yaml deleted file mode 100644 index 6b54630..0000000 --- a/input-templates/prh-input.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= - -#aaiEnrichmentHost: '{{ aaiEnrichmentHost }}' -#aaiEnrichmentPort: '{{ aaiEnrichmentPort }}' -#aaiEnrichmentUser: '{{ aaiEnrichmentUser }}' -#aaiEnrichmentPasswd: '{{ aaiEnrichmentPasswd }}' -#dmaap_host: '{{ dmaap_host }}' -#dmaap_port: '{{ dmaap_port }}' -#dmaap_user: '{{ dmaap_user }}' -#dmaap_passwd: '{{ dmaap_passwd }}' -#tag_version: '{{ tag_version }}' -#replicas: '{{ replicas }}'
\ No newline at end of file diff --git a/input-templates/snmptrap-input.json b/input-templates/snmptrap-input.json deleted file mode 100644 index b3be3df..0000000 --- a/input-templates/snmptrap-input.json +++ /dev/null @@ -1,7 +0,0 @@ - -{ - "dh_location_id": "{{ dcae_zone }}", - "docker_host_override": "component_dockerhost", - "snmp_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP/", - "tag_version": "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.snmptrap:1.3" -} diff --git a/input-templates/tcadocker-input.json b/input-templates/tcadocker-input.json deleted file mode 100644 index 56a1681..0000000 --- a/input-templates/tcadocker-input.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "aaiEnrichmentHost": "{{ aai1_ip_addr }}", - "enableAAIEnrichment": true, - "subscriberHostName": "{{ mr_ip_addr }}", - "publisherHostName": "{{ mr_ip_addr }}", - "dh_location_id": "{{ dcae_zone }}", - "dh_override": "component_dockerhost", - "redisHosts": "{{ redis_ip_port_addr }}", - "enableRedisCaching": true, - "tag_version": "nexus3.onap.org:10001/onap/tca-cdap-container:1.0" -} diff --git a/input-templates/tcainputs.yaml b/input-templates/tcainputs.yaml deleted file mode 100644 index a4d3828..0000000 --- a/input-templates/tcainputs.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -aaiEnrichmentHost: '{{ aai1_ip_addr }}' -enableAAIEnrichment: true -subscriberHostName: '{{ mr_ip_addr }}' -publisherHostName: '{{ mr_ip_addr }}' diff --git a/input-templates/vesinput.yaml b/input-templates/vesinput.yaml deleted file mode 100644 index 8ddfb2c..0000000 --- a/input-templates/vesinput.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -{ - "dh_location_id": "{{ dcae_zone }}", - "dh_override": "component_dockerhost", - "ves_other_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.SEC_OTHER_OUTPUT/", - "ves_heartbeat_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/", - "ves_fault_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.SEC_FAULT_OUTPUT/", - "ves_measurement_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.SEC_MEASUREMENT_OUTPUT/", - "ves_pnfRegistration_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.VES_PNFREG_OUTPUT/", - "ves_notification_publish_url": "http://{{ mr_ip_addr }}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/" -} diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh index 892ea23..2f43cff 100755 --- a/mvn-phase-script.sh +++ b/mvn-phase-script.sh @@ -1,7 +1,7 @@ #!/bin/bash # ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ if [ -z "$SETTINGS_FILE" ]; then echo "SETTINGS_FILE environment variable not set. Cannot proceed" exit fi - + # mvn phase in life cycle @@ -122,12 +122,7 @@ install) echo "==> install phase script" ;; deploy) - echo "==> deploy phase script" - if [ -z "$MVN_PROJECT_MODULEID" ]; then - upload_files_of_extension yaml - else - upload_files_of_extension yaml "$MVN_PROJECT_MODULEID" - fi + build_and_push_docker ;; *) echo "==> unprocessed phase" @@ -25,16 +25,12 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. <artifactId>oparent</artifactId> <version>1.2.0</version> </parent> - <groupId>org.onap.dcaegen2.platform</groupId> - <artifactId>blueprints</artifactId> - <name>dcaegen2-platform-blueprints</name> - <version>1.2.0-SNAPSHOT</version> + <groupId>org.onap.dcaegen2.deployments</groupId> + <artifactId>k8s-bootstrap-container</artifactId> + <name>dcaegen2-deployments-k8s-bootstrap-container</name> + <version>1.9.0-SNAPSHOT</version> <url>http://maven.apache.org</url> <packaging>pom</packaging> - <modules> - <module>blueprints</module> - <module>input-templates</module> - </modules> <properties> <onap.nexus.url>https://nexus.onap.org</onap.nexus.url> @@ -92,7 +88,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. </configuration> </plugin> <!-- first disable the default Java plugins at various stages --> - <!-- maven-resources-plugin is called during "*resource" phases by default behavior. it prepares + <!-- maven-resources-plugin is called during "*resource" phases by default behavior. it prepares the resources dir. we do not need it --> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -123,7 +119,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. </execution> </executions> </plugin> - <!-- maven-install-plugin is called during "install" phase by default behavior. it tries to copy stuff under + <!-- maven-install-plugin is called during "install" phase by default behavior. it tries to copy stuff under target dir to ~/.m2. we do not need it --> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -173,5 +169,106 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. </plugin> </plugins> </pluginManagement> + <plugins> + <!-- now we configure custom action (calling a script) at various lifecycle phases --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <executions> + <execution> + <id>clean phase script</id> + <phase>clean</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <arguments> + <argument>${project.artifactId}</argument> + <argument>clean</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>generate-sources script</id> + <phase>generate-sources</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <arguments> + <argument>${project.artifactId}</argument> + <argument>generate-sources</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>compile script</id> + <phase>compile</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <arguments> + <argument>${project.artifactId}</argument> + <argument>compile</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>package script</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <arguments> + <argument>${project.artifactId}</argument> + <argument>package</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>test script</id> + <phase>test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <arguments> + <argument>${project.artifactId}</argument> + <argument>test</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>install script</id> + <phase>install</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <arguments> + <argument>${project.artifactId}</argument> + <argument>install</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>deploy script</id> + <phase>deploy</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <arguments> + <argument>${project.artifactId}</argument> + <argument>deploy</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + </plugins> </build> </project> diff --git a/blueprints/reference_templates/DeploymentHandler-README.md b/reference_templates/DeploymentHandler-README.md index 8b76890..8b76890 100644 --- a/blueprints/reference_templates/DeploymentHandler-README.md +++ b/reference_templates/DeploymentHandler-README.md diff --git a/blueprints/reference_templates/DeploymentHandler.yaml-template b/reference_templates/DeploymentHandler.yaml-template index 4856636..4856636 100644 --- a/blueprints/reference_templates/DeploymentHandler.yaml-template +++ b/reference_templates/DeploymentHandler.yaml-template diff --git a/blueprints/reference_templates/DockerBP.yaml-template b/reference_templates/DockerBP.yaml-template index e655063..e655063 100644 --- a/blueprints/reference_templates/DockerBP.yaml-template +++ b/reference_templates/DockerBP.yaml-template diff --git a/blueprints/reference_templates/README.txt b/reference_templates/README.txt index 3834c38..3834c38 100644 --- a/blueprints/reference_templates/README.txt +++ b/reference_templates/README.txt diff --git a/blueprints/reference_templates/cdap-sdk.yaml-template b/reference_templates/cdap-sdk.yaml-template index cd1244f..cd1244f 100644 --- a/blueprints/reference_templates/cdap-sdk.yaml-template +++ b/reference_templates/cdap-sdk.yaml-template diff --git a/blueprints/reference_templates/cdap_broker.yaml-template b/reference_templates/cdap_broker.yaml-template index 3c29634..3c29634 100644 --- a/blueprints/reference_templates/cdap_broker.yaml-template +++ b/reference_templates/cdap_broker.yaml-template diff --git a/blueprints/reference_templates/cdapbp7.yaml-template b/reference_templates/cdapbp7.yaml-template index 7fddaa1..7fddaa1 100644 --- a/blueprints/reference_templates/cdapbp7.yaml-template +++ b/reference_templates/cdapbp7.yaml-template diff --git a/blueprints/reference_templates/centos_vm.yaml-template b/reference_templates/centos_vm.yaml-template index aa3bdb4..aa3bdb4 100644 --- a/blueprints/reference_templates/centos_vm.yaml-template +++ b/reference_templates/centos_vm.yaml-template diff --git a/blueprints/reference_templates/config_binding_service.yaml-template b/reference_templates/config_binding_service.yaml-template index 28dfb43..28dfb43 100644 --- a/blueprints/reference_templates/config_binding_service.yaml-template +++ b/reference_templates/config_binding_service.yaml-template diff --git a/blueprints/reference_templates/consul_cluster.yaml-template b/reference_templates/consul_cluster.yaml-template index a4ae89e..a4ae89e 100644 --- a/blueprints/reference_templates/consul_cluster.yaml-template +++ b/reference_templates/consul_cluster.yaml-template diff --git a/blueprints/reference_templates/heartbeat-service.yaml-template b/reference_templates/heartbeat-service.yaml-template index 2654c71..2654c71 100644 --- a/blueprints/reference_templates/heartbeat-service.yaml-template +++ b/reference_templates/heartbeat-service.yaml-template diff --git a/blueprints/reference_templates/holmes-engine.yaml-template b/reference_templates/holmes-engine.yaml-template index 4661299..4661299 100644 --- a/blueprints/reference_templates/holmes-engine.yaml-template +++ b/reference_templates/holmes-engine.yaml-template diff --git a/blueprints/reference_templates/holmes-rules.yaml-template b/reference_templates/holmes-rules.yaml-template index dc0ab7d..dc0ab7d 100644 --- a/blueprints/reference_templates/holmes-rules.yaml-template +++ b/reference_templates/holmes-rules.yaml-template diff --git a/blueprints/reference_templates/inventory.yaml-template b/reference_templates/inventory.yaml-template index c427f8c..c427f8c 100644 --- a/blueprints/reference_templates/inventory.yaml-template +++ b/reference_templates/inventory.yaml-template diff --git a/blueprints/reference_templates/k8s-dashboard.yaml-template b/reference_templates/k8s-dashboard.yaml-template index 1d0fa10..1d0fa10 100644 --- a/blueprints/reference_templates/k8s-dashboard.yaml-template +++ b/reference_templates/k8s-dashboard.yaml-template diff --git a/blueprints/reference_templates/k8s-datafile-collector.yaml-template b/reference_templates/k8s-datafile-collector.yaml-template index 2de0a24..2de0a24 100644 --- a/blueprints/reference_templates/k8s-datafile-collector.yaml-template +++ b/reference_templates/k8s-datafile-collector.yaml-template diff --git a/blueprints/reference_templates/k8s-pgaas-database.yaml-template b/reference_templates/k8s-pgaas-database.yaml-template index 309c962..309c962 100644 --- a/blueprints/reference_templates/k8s-pgaas-database.yaml-template +++ b/reference_templates/k8s-pgaas-database.yaml-template diff --git a/blueprints/reference_templates/k8s-pgaas-getdbinfo.yaml-template b/reference_templates/k8s-pgaas-getdbinfo.yaml-template index 6869f2c..6869f2c 100644 --- a/blueprints/reference_templates/k8s-pgaas-getdbinfo.yaml-template +++ b/reference_templates/k8s-pgaas-getdbinfo.yaml-template diff --git a/blueprints/reference_templates/pgaas-cluster.yaml-template b/reference_templates/pgaas-cluster.yaml-template index d7b0cd0..d7b0cd0 100644 --- a/blueprints/reference_templates/pgaas-cluster.yaml-template +++ b/reference_templates/pgaas-cluster.yaml-template diff --git a/blueprints/reference_templates/pgaas-database.yaml-template b/reference_templates/pgaas-database.yaml-template index a89d638..a89d638 100644 --- a/blueprints/reference_templates/pgaas-database.yaml-template +++ b/reference_templates/pgaas-database.yaml-template diff --git a/blueprints/reference_templates/pgaas-disk.yaml-template b/reference_templates/pgaas-disk.yaml-template index 3f96bae..3f96bae 100644 --- a/blueprints/reference_templates/pgaas-disk.yaml-template +++ b/reference_templates/pgaas-disk.yaml-template diff --git a/blueprints/reference_templates/pgaas-getdbinfo.yaml-template b/reference_templates/pgaas-getdbinfo.yaml-template index 8672f04..8672f04 100644 --- a/blueprints/reference_templates/pgaas-getdbinfo.yaml-template +++ b/reference_templates/pgaas-getdbinfo.yaml-template diff --git a/blueprints/reference_templates/pgaas-onevm.yaml-template b/reference_templates/pgaas-onevm.yaml-template index be2d044..be2d044 100644 --- a/blueprints/reference_templates/pgaas-onevm.yaml-template +++ b/reference_templates/pgaas-onevm.yaml-template diff --git a/blueprints/reference_templates/pgaas.yaml-template b/reference_templates/pgaas.yaml-template index 4a7e16a..4a7e16a 100644 --- a/blueprints/reference_templates/pgaas.yaml-template +++ b/reference_templates/pgaas.yaml-template diff --git a/blueprints/reference_templates/policy_handler.yaml-template b/reference_templates/policy_handler.yaml-template index 29e66e6..29e66e6 100644 --- a/blueprints/reference_templates/policy_handler.yaml-template +++ b/reference_templates/policy_handler.yaml-template diff --git a/blueprints/reference_templates/prh-service.yaml-template b/reference_templates/prh-service.yaml-template index 77d681b..77d681b 100644 --- a/blueprints/reference_templates/prh-service.yaml-template +++ b/reference_templates/prh-service.yaml-template diff --git a/blueprints/reference_templates/snmptrap-collector.yaml-template b/reference_templates/snmptrap-collector.yaml-template index 694fde5..694fde5 100644 --- a/blueprints/reference_templates/snmptrap-collector.yaml-template +++ b/reference_templates/snmptrap-collector.yaml-template diff --git a/blueprints/reference_templates/tca.yaml-template b/reference_templates/tca.yaml-template index 9699456..9699456 100644 --- a/blueprints/reference_templates/tca.yaml-template +++ b/reference_templates/tca.yaml-template diff --git a/blueprints/reference_templates/tcadocker-service.yaml-template b/reference_templates/tcadocker-service.yaml-template index 92deaa4..92deaa4 100644 --- a/blueprints/reference_templates/tcadocker-service.yaml-template +++ b/reference_templates/tcadocker-service.yaml-template diff --git a/blueprints/reference_templates/test_dr_mr.yaml-template b/reference_templates/test_dr_mr.yaml-template index 4667186..4667186 100644 --- a/blueprints/reference_templates/test_dr_mr.yaml-template +++ b/reference_templates/test_dr_mr.yaml-template diff --git a/blueprints/reference_templates/test_dr_pubsub.yaml-template b/reference_templates/test_dr_pubsub.yaml-template index dfde13a..dfde13a 100644 --- a/blueprints/reference_templates/test_dr_pubsub.yaml-template +++ b/reference_templates/test_dr_pubsub.yaml-template diff --git a/blueprints/reference_templates/test_mr_multipub.yaml-template b/reference_templates/test_mr_multipub.yaml-template index 84ae247..84ae247 100644 --- a/blueprints/reference_templates/test_mr_multipub.yaml-template +++ b/reference_templates/test_mr_multipub.yaml-template diff --git a/blueprints/reference_templates/test_mr_multisub.yaml-template b/reference_templates/test_mr_multisub.yaml-template index ad84a9c..ad84a9c 100644 --- a/blueprints/reference_templates/test_mr_multisub.yaml-template +++ b/reference_templates/test_mr_multisub.yaml-template diff --git a/blueprints/reference_templates/test_mr_pubsub.yaml-template b/reference_templates/test_mr_pubsub.yaml-template index 0d09216..0d09216 100644 --- a/blueprints/reference_templates/test_mr_pubsub.yaml-template +++ b/reference_templates/test_mr_pubsub.yaml-template diff --git a/blueprints/reference_templates/test_mr_pubsub_extra.yaml-template b/reference_templates/test_mr_pubsub_extra.yaml-template index f034e6c..f034e6c 100644 --- a/blueprints/reference_templates/test_mr_pubsub_extra.yaml-template +++ b/reference_templates/test_mr_pubsub_extra.yaml-template diff --git a/blueprints/reference_templates/ves.yaml-template b/reference_templates/ves.yaml-template index 0653e3d..0653e3d 100644 --- a/blueprints/reference_templates/ves.yaml-template +++ b/reference_templates/ves.yaml-template diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh new file mode 100755 index 0000000..e47ccd6 --- /dev/null +++ b/scripts/bootstrap.sh @@ -0,0 +1,233 @@ +#!/bin/bash +# ================================================================================ +# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= + +# Install DCAE via Cloudify Manager +# Expects: +# CM address (IP or DNS) in CMADDR environment variable +# CM password in CMPASS environment variable (assumes user is "admin") +# ONAP common Kubernetes namespace in ONAP_NAMESPACE environment variable +# If DCAE components are deployed in a separate Kubernetes namespace, that namespace in DCAE_NAMESPACE variable. +# Consul address with port in CONSUL variable +# Plugin wagon files in /wagons +# Blueprints for components to be installed in /blueprints +# Input files for components to be installed in /inputs +# Configuration JSON files that need to be loaded into Consul in /dcae-configs +# Consul is installed in /opt/consul/bin/consul, with base config in /opt/consul/config/00consul.json +# Optionally, allows: +# CM protocol in CMPROTO environment variable (defaults to HTTP) +# CM port in CMPORT environment variable (defaults to 80) +# If CMPROTO is set to "https", bootstrap will use HTTPS to communicate with CM. Otherwise, +# it will use HTTP. +# If CMPROTO is set to "https", the script assumes the CA cert needed to verify the cert +# presented by CM is mounted at /certs/cacert.pem. + +# Set defaults for CM protocol and port +CMPROTO=${CMPROTO:-http} +CMPORT=${CMPORT:-80} + +# Set up additional parameters for using HTTPS +CFYTLS="" +CURLTLS="" +if [ $CMPROTO = "https" ] +then + CFYTLS="--rest-certificate /certs/cacert.pem --ssl" + CURLTLS="--cacert /certs/cacert.pem" +fi + +### FUNCTION DEFINITIONS ### + +# keep_running: Keep running after bootstrap finishes or after error +keep_running() { + echo $1 + sleep infinity & + wait +} + +# cm_hasany: Query Cloudify Manager and return 0 (true) if there are any entities matching the query +# Used to see if something is already present on CM +# $1 -- query fragment, for instance "plugins?archive_name=xyz.wgn" to get +# the number of plugins that came from the archive file "xyz.wgn" +function cm_hasany { + # We use _include=id to limit the amount of data the CM sends back + # We rely on the "metadata.pagination.total" field in the response + # for the total number of matching entities + COUNT=$(curl -Ss -H "Tenant: default_tenant" --user admin:${CMPASS} ${CURLTLS} "${CMPROTO}://${CMADDR}:${CMPORT}/api/v3.1/$1&_include=id" \ + | /bin/jq .metadata.pagination.total) + if (( $COUNT > 0 )) + then + return 0 + else + return 1 + fi +} + +# deploy: Deploy components if they're not already deployed +# $1 -- name (for bp and deployment) +# $2 -- blueprint file name +# $3 -- inputs file name (optional) +function deploy { + # Don't crash the script on error + set +e + + # Upload blueprint if it's not already there + if cm_hasany "blueprints?id=$1" + then + echo blueprint $1 is already installed on ${CMADDR} + else + cfy blueprints upload -b $1 /blueprints/$2 + fi + + # Create deployment if it doesn't already exist + if cm_hasany "deployments?id=$1" + then + echo deployment $1 has already been created on ${CMADDR} + else + INPUTS= + if [ -n "$3" ] + then + INPUTS="-i/inputs/$3" + fi + cfy deployments create -b $1 ${INPUTS} $1 + fi + + # Run the install workflow if it hasn't been run already + # We don't have a completely certain way of determining this. + # We check to see if the deployment has any node instances + # that are in the 'uninitialized' or 'deleted' states. (Note that + # the & in the query acts as a logical OR for the multiple state values.) + # We'll try to install when a deployment has node instances in those states + if cm_hasany "node-instances?deployment_id=$1&state=uninitialized&state=deleted" + then + cfy executions start -d $1 install + else + echo deployment $1 appears to have had an install workflow executed already or is not ready for an install + fi +} + +# Install plugin if it's not already installed +# $1 -- path to wagon file for plugin +function install_plugin { + ARCHIVE=$(basename $1) + # See if it's already installed + if cm_hasany "plugins?archive_name=$ARCHIVE" + then + echo plugin $1 already installed on ${CMADDR} + else + cfy plugin upload $1 + fi +} + +### END FUNCTION DEFINTIONS ### + +set -x + +# Make sure we keep the container alive after an error +trap keep_running ERR + +set -e + +# Consul service registration data +CBS_REG='{"ID": "dcae-cbs0", "Name": "config_binding_service", "Address": "config-binding-service", "Port": 10000}' +CBS_REG1='{"ID": "dcae-cbs1", "Name": "config-binding-service", "Address": "config-binding-service", "Port": 10000}' + +# Set up profile to access Cloudify Manager +cfy profiles use -u admin -t default_tenant -p "${CMPASS}" ${CFYTLS} "${CMADDR}" + +# Output status, for debugging purposes +cfy status + +# Check Consul readiness +# The readiness container waits for a "consul-server" container to be ready, +# but this isn't always enough. We need the Consul API to be up and for +# the cluster to be formed, otherwise our Consul accesses might fail. +# (Note in ONAP R2, we never saw a problem, but occasionally in R3 we +# have seen Consul not be fully ready, so we add these checks, originally +# used in the R1 HEAT-based deployment.) +# Wait for Consul API to come up +until curl http://${CONSUL}/v1/agent/services +do + echo Waiting for Consul API + sleep 60 +done +# Wait for a leader to be elected +until [[ "$(curl -Ss http://{$CONSUL}/v1/status/leader)" != '""' ]] +do + echo Waiting for leader + sleep 30 +done + +# Load configurations into Consul KV store +for config in /dcae-configs/*.json +do + # The basename of the file is the Consul key + key=$(basename ${config} .json) + # Strip out comments, empty lines + egrep -v "^#|^$" ${config} > /tmp/dcae-upload + curl -v -X PUT -H "Content-Type: application/json" --data-binary @/tmp/dcae-upload ${CONSUL}/v1/kv/${key} +done + +# Put service registrations into the local Consul configuration directory +for sr in CBS_REG CBS_REG1 +do + echo '{"service" : ' ${!sr} ' }'> /opt/consul/config/${sr}.json +done + +# Start the local consul agent instance +/opt/consul/bin/consul agent --config-dir /opt/consul/config 2>&1 | tee /opt/consul/consul.log & + +# Store the CM password into a Cloudify secret +cfy secret create -s ${CMPASS} cmpass + +# Load plugins onto CM +for wagon in /wagons/*.wgn +do + install_plugin ${wagon} +done + +# In some oversubscribed cloud environments, we have +# observed that even though the plugin installations appear +# to have completed, there are background installation tasks +# that might still be running. So we check for running system workflows +while cm_hasany "executions?is_system_workflow=true&status=pending&status=started&status=queued&status=scheduled" +do + echo "Waiting for running system workflows to complete" + sleep 15 +done + +# After this point, failures should not stop the script or block later commands +trap - ERR +set +e + +# Initialize the DCAE postgres instance +deploy pgaas_initdb k8s-pgaas-initdb.yaml k8s-pgaas-initdb-inputs.yaml + +# Deploy service components +# tca, ves, prh, hv-ves, datafile-collector can be deployed simultaneously +deploy tca k8s-tca.yaml k8s-tca-inputs.yaml & +deploy ves k8s-ves.yaml k8s-ves-inputs.yaml & +deploy prh k8s-prh.yaml k8s-prh-inputs.yaml & +deploy hv-ves k8s-hv-ves.yaml k8s-hv_ves-inputs.yaml & +# holmes_rules must be deployed before holmes_engine, but holmes_rules can go in parallel with other service components +deploy holmes_rules k8s-holmes-rules.yaml k8s-holmes_rules-inputs.yaml +deploy holmes_engine k8s-holmes-engine.yaml k8s-holmes_engine-inputs.yaml + +# Display deployments, for debugging purposes +cfy deployments list + +# Continue running +keep_running "Finished bootstrap steps." +echo "Exiting!" diff --git a/scripts/load-plugins.sh b/scripts/load-plugins.sh new file mode 100755 index 0000000..c67258e --- /dev/null +++ b/scripts/load-plugins.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# org.onap.dcae +# ================================================================================ +# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. + +# Pull plugin archives from repos +# $1 is the DCAE repo URL +# $2 is the CCSDK repo URL +# (This script runs at Docker image build time) +# +set -x +set -e +DEST=wagons + +# For DCAE, starting in R5, we pull down wagons directly +DCAEPLUGINFILES=\ +"\ +k8splugin/1.7.2/k8splugin-1.7.2-py27-none-linux_x86_64.wgn +relationshipplugin/1.1.0/relationshipplugin-1.1.0-py27-none-linux_x86_64.wgn +clamppolicyplugin/1.1.0/clamppolicyplugin-1.1.0-py27-none-linux_x86_64.wgn +dcaepolicyplugin/2.4.0/dcaepolicyplugin-2.4.0-py27-none-linux_x86_64.wgn \ +" + +# For CCSDK, we pull down the wagon files directly +CCSDKPLUGINFILES=\ +"\ +plugins/pgaas-1.1.0-py27-none-any.wgn +plugins/dmaap-1.3.5-py27-none-any.wgn +plugins/sshkeyshare-1.0.0-py27-none-any.wgn +plugins/helm-4.0.0-py27-none-linux_x86_64.wgn +" + +# Copy a set of wagons from a repo +# $1 -- repo baseURL +# $2 -- list of paths to wagons in the repo +function get_wagons { + for wagon in $2 + do + target=$(basename ${wagon}) + curl -Ssf $1/${wagon} > ${DEST}/${target} + done +} + +mkdir ${DEST} +get_wagons $1 "${DCAEPLUGINFILES}" +get_wagons $2 "${CCSDKPLUGINFILES}" diff --git a/input-templates/cdap-sdk-inputs.yaml b/scripts/uninstall.sh index e55c796..71f8161 100644..100755 --- a/input-templates/cdap-sdk-inputs.yaml +++ b/scripts/uninstall.sh @@ -1,3 +1,4 @@ +#!/bin/bash # ================================================================================ # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. # ================================================================================ @@ -13,10 +14,23 @@ # See the License for the specific language governing permissions and # limitations under the License. # ============LICENSE_END========================================================= + +# Clean up DCAE during ONAP uninstall + +set -x +set +e + +# Leave the Consul cluster +/opt/consul/bin/consul leave + +# Uninstall components managed by Cloudify +# Get the list of deployment ids known to Cloudify via curl to Cloudify API. +# The output of the curl is JSON that looks like {"items" :[{"id": "config_binding_service"}, ...], "metadata" :{...}} # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -{ - "dh_location_id": "{{ dcae_zone }}", - "dh_override": "component_dockerhost", - "cdap_cluster_name": "cdap" -} +# jq gives us the just the deployment ids (e.g., "config_binding_service"), one per line +# +# xargs -I lets us run the cfy uninstall command once for each deployment id extracted by jq + +curl -Ss --user admin:$CMPASS -H "Tenant: default_tenant" "$CMADDR/api/v3.1/deployments?_include=id" \ +| /bin/jq .items[].id \ +| xargs -I % sh -c 'cfy uninstall %' |