Move k8s-bootstrap container to blueprints repo 79/101079/2 1.9.0
authorJack Lucas <jflucas@research.att.com>
Mon, 3 Feb 2020 23:21:29 +0000 (18:21 -0500)
committerJack Lucas <jflucas@research.att.com>
Fri, 7 Feb 2020 18:07:09 +0000 (13:07 -0500)
Cleanup of unnecessary input templates and other files
Use non-templatized blueprints instead of blueprint templates
Copy blueprints from blueprints/ directory into image
Move reference_templates to top-level directory

Issue-ID: DCAEGEN2-2041
Signed-off-by: Jack Lucas <jflucas@research.att.com>
Change-Id: Ib846a96a4995eb97383f63ff764705e6277a24b0

79 files changed:
.gitignore [new file with mode: 0644]
Dockerfile-template [new file with mode: 0644]
README.md [new file with mode: 0644]
blueprints/k8s-helm-override.yaml [moved from blueprints/k8s-helm-override.yaml-template with 96% similarity]
blueprints/k8s-helm.yaml [moved from blueprints/k8s-helm.yaml-template with 94% similarity]
blueprints/k8s-holmes-engine.yaml [moved from blueprints/k8s-holmes-engine.yaml-template with 87% similarity]
blueprints/k8s-holmes-rules.yaml [moved from blueprints/k8s-holmes-rules.yaml-template with 93% similarity]
blueprints/k8s-hv-ves.yaml [moved from blueprints/k8s-hv-ves.yaml-template with 94% similarity]
blueprints/k8s-pgaas-initdb.yaml [moved from blueprints/k8s-pgaas-initdb.yaml-template with 85% similarity]
blueprints/k8s-prh.yaml [moved from blueprints/k8s-prh.yaml-template with 96% similarity]
blueprints/k8s-snmptrap.yaml [moved from blueprints/k8s-snmptrap.yaml-template with 93% similarity]
blueprints/k8s-tca-clampnode.yaml [moved from blueprints/k8s-tca-clampnode.yaml-template with 96% similarity]
blueprints/k8s-tca-policynode.yaml [moved from blueprints/k8s-tca-policynode.yaml-template with 95% similarity]
blueprints/k8s-tca.yaml [moved from blueprints/k8s-tca.yaml-template with 97% similarity]
blueprints/k8s-ves.yaml [moved from blueprints/k8s-ves.yaml-template with 97% similarity]
blueprints/pom.xml [deleted file]
check-blueprint-vs-input/bin/check-blueprint-vs-input [deleted file]
check-blueprint-vs-input/lib/sample-inputs.yaml [deleted file]
check-blueprint-vs-input/man/check-blueprint-vs-input.1 [deleted file]
check-blueprint-vs-input/man/check-blueprint-vs-input.man [deleted file]
check-blueprint-vs-input/pom.xml [deleted file]
config/00-consul.json [new file with mode: 0644]
input-templates/cdapinputs.yaml [deleted file]
input-templates/datafile-collector-input.yaml [deleted file]
input-templates/dhinputs.yaml [deleted file]
input-templates/he-ip.yaml [deleted file]
input-templates/heartbeat-input.json [deleted file]
input-templates/hr-ip.yaml [deleted file]
input-templates/inputs.yaml [deleted file]
input-templates/invinputs.yaml [deleted file]
input-templates/phinputs.yaml [deleted file]
input-templates/pom.xml [deleted file]
input-templates/prh-input.json [deleted file]
input-templates/prh-input.yaml [deleted file]
input-templates/snmptrap-input.json [deleted file]
input-templates/tcadocker-input.json [deleted file]
input-templates/tcainputs.yaml [deleted file]
input-templates/vesinput.yaml [deleted file]
mvn-phase-script.sh
pom.xml
reference_templates/DeploymentHandler-README.md [moved from blueprints/reference_templates/DeploymentHandler-README.md with 100% similarity]
reference_templates/DeploymentHandler.yaml-template [moved from blueprints/reference_templates/DeploymentHandler.yaml-template with 100% similarity]
reference_templates/DockerBP.yaml-template [moved from blueprints/reference_templates/DockerBP.yaml-template with 100% similarity]
reference_templates/README.txt [moved from blueprints/reference_templates/README.txt with 100% similarity]
reference_templates/cdap-sdk.yaml-template [moved from blueprints/reference_templates/cdap-sdk.yaml-template with 100% similarity]
reference_templates/cdap_broker.yaml-template [moved from blueprints/reference_templates/cdap_broker.yaml-template with 100% similarity]
reference_templates/cdapbp7.yaml-template [moved from blueprints/reference_templates/cdapbp7.yaml-template with 100% similarity]
reference_templates/centos_vm.yaml-template [moved from blueprints/reference_templates/centos_vm.yaml-template with 100% similarity]
reference_templates/config_binding_service.yaml-template [moved from blueprints/reference_templates/config_binding_service.yaml-template with 100% similarity]
reference_templates/consul_cluster.yaml-template [moved from blueprints/reference_templates/consul_cluster.yaml-template with 100% similarity]
reference_templates/heartbeat-service.yaml-template [moved from blueprints/reference_templates/heartbeat-service.yaml-template with 100% similarity]
reference_templates/holmes-engine.yaml-template [moved from blueprints/reference_templates/holmes-engine.yaml-template with 100% similarity]
reference_templates/holmes-rules.yaml-template [moved from blueprints/reference_templates/holmes-rules.yaml-template with 100% similarity]
reference_templates/inventory.yaml-template [moved from blueprints/reference_templates/inventory.yaml-template with 100% similarity]
reference_templates/k8s-dashboard.yaml-template [moved from blueprints/reference_templates/k8s-dashboard.yaml-template with 100% similarity]
reference_templates/k8s-datafile-collector.yaml-template [moved from blueprints/reference_templates/k8s-datafile-collector.yaml-template with 100% similarity]
reference_templates/k8s-pgaas-database.yaml-template [moved from blueprints/reference_templates/k8s-pgaas-database.yaml-template with 100% similarity]
reference_templates/k8s-pgaas-getdbinfo.yaml-template [moved from blueprints/reference_templates/k8s-pgaas-getdbinfo.yaml-template with 100% similarity]
reference_templates/pgaas-cluster.yaml-template [moved from blueprints/reference_templates/pgaas-cluster.yaml-template with 100% similarity]
reference_templates/pgaas-database.yaml-template [moved from blueprints/reference_templates/pgaas-database.yaml-template with 100% similarity]
reference_templates/pgaas-disk.yaml-template [moved from blueprints/reference_templates/pgaas-disk.yaml-template with 100% similarity]
reference_templates/pgaas-getdbinfo.yaml-template [moved from blueprints/reference_templates/pgaas-getdbinfo.yaml-template with 100% similarity]
reference_templates/pgaas-onevm.yaml-template [moved from blueprints/reference_templates/pgaas-onevm.yaml-template with 100% similarity]
reference_templates/pgaas.yaml-template [moved from blueprints/reference_templates/pgaas.yaml-template with 100% similarity]
reference_templates/policy_handler.yaml-template [moved from blueprints/reference_templates/policy_handler.yaml-template with 100% similarity]
reference_templates/prh-service.yaml-template [moved from blueprints/reference_templates/prh-service.yaml-template with 100% similarity]
reference_templates/snmptrap-collector.yaml-template [moved from blueprints/reference_templates/snmptrap-collector.yaml-template with 100% similarity]
reference_templates/tca.yaml-template [moved from blueprints/reference_templates/tca.yaml-template with 100% similarity]
reference_templates/tcadocker-service.yaml-template [moved from blueprints/reference_templates/tcadocker-service.yaml-template with 100% similarity]
reference_templates/test_dr_mr.yaml-template [moved from blueprints/reference_templates/test_dr_mr.yaml-template with 100% similarity]
reference_templates/test_dr_pubsub.yaml-template [moved from blueprints/reference_templates/test_dr_pubsub.yaml-template with 100% similarity]
reference_templates/test_mr_multipub.yaml-template [moved from blueprints/reference_templates/test_mr_multipub.yaml-template with 100% similarity]
reference_templates/test_mr_multisub.yaml-template [moved from blueprints/reference_templates/test_mr_multisub.yaml-template with 100% similarity]
reference_templates/test_mr_pubsub.yaml-template [moved from blueprints/reference_templates/test_mr_pubsub.yaml-template with 100% similarity]
reference_templates/test_mr_pubsub_extra.yaml-template [moved from blueprints/reference_templates/test_mr_pubsub_extra.yaml-template with 100% similarity]
reference_templates/ves.yaml-template [moved from blueprints/reference_templates/ves.yaml-template with 100% similarity]
scripts/bootstrap.sh [new file with mode: 0755]
scripts/load-plugins.sh [new file with mode: 0755]
scripts/uninstall.sh [moved from input-templates/cdap-sdk-inputs.yaml with 54% similarity, mode: 0755]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..aa7a830
--- /dev/null
@@ -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 (file)
index 0000000..8c2e084
--- /dev/null
@@ -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 (file)
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.
+
similarity index 96%
rename from blueprints/k8s-helm-override.yaml-template
rename to blueprints/k8s-helm-override.yaml
index dc53dde..639d2a0 100644 (file)
@@ -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:
similarity index 94%
rename from blueprints/k8s-helm.yaml-template
rename to blueprints/k8s-helm.yaml
index 958f0e6..4aed5ba 100644 (file)
@@ -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:
similarity index 87%
rename from blueprints/k8s-holmes-engine.yaml-template
rename to blueprints/k8s-holmes-engine.yaml
index f14dea2..707d2ed 100644 (file)
@@ -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:
similarity index 93%
rename from blueprints/k8s-holmes-rules.yaml-template
rename to blueprints/k8s-holmes-rules.yaml
index 1cff89f..269692a 100644 (file)
@@ -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
similarity index 94%
rename from blueprints/k8s-hv-ves.yaml-template
rename to blueprints/k8s-hv-ves.yaml
index c66a606..3723200 100644 (file)
@@ -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'
similarity index 85%
rename from blueprints/k8s-pgaas-initdb.yaml-template
rename to blueprints/k8s-pgaas-initdb.yaml
index 2022300..4cdf5ae 100644 (file)
@@ -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:
similarity index 96%
rename from blueprints/k8s-prh.yaml-template
rename to blueprints/k8s-prh.yaml
index 3d3107c..4486412 100644 (file)
@@ -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
similarity index 93%
rename from blueprints/k8s-snmptrap.yaml-template
rename to blueprints/k8s-snmptrap.yaml
index bf83a27..e1d50c7 100644 (file)
@@ -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:
similarity index 96%
rename from blueprints/k8s-tca-clampnode.yaml-template
rename to blueprints/k8s-tca-clampnode.yaml
index d43d017..56dbc2c 100644 (file)
@@ -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
similarity index 95%
rename from blueprints/k8s-tca-policynode.yaml-template
rename to blueprints/k8s-tca-policynode.yaml
index c24dfed..2dec8c0 100644 (file)
@@ -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
similarity index 97%
rename from blueprints/k8s-tca.yaml-template
rename to blueprints/k8s-tca.yaml
index 78c3f03..f006531 100644 (file)
@@ -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
similarity index 97%
rename from blueprints/k8s-ves.yaml-template
rename to blueprints/k8s-ves.yaml
index bb372a9..7a45a5c 100644 (file)
@@ -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 (file)
index 9b886ea..0000000
+++ /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 (executable)
index c6b271b..0000000
+++ /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 (file)
index a56652b..0000000
+++ /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 (file)
index 247fbc6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-check-blueprint-vs-input(1UTIL)      ONAP      check-blueprint-vs-input(1UTIL)
-
-
-
-N\bNA\bAM\bME\bE
-       check-blueprint-vs-input
-
-S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-       check-blueprint-vs-input [-h] [-b BLUEPRINT] [-i INPUTS]
-                                       [-B BLUEPRINT_EXCLUSION_LIST]
-                                       [-I INPUTS_EXCLUSION_LIST] [-t] [-v]
-
-D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       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.
-
-   O\bOP\bPT\bTI\bIO\bON\bNS\bS
-       -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 (file)
index 017d529..0000000
+++ /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 (file)
index 14b4d50..0000000
+++ /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 (file)
index 0000000..a7d6ff4
--- /dev/null
@@ -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 (file)
index 879b59c..0000000
+++ /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 (file)
index 242eba2..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# ================================================================================\r
-# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.\r
-# ================================================================================\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-#\r
-#     http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-# ============LICENSE_END=========================================================\r
-\r
-#dmaap_host: '{{ dmaap_host }}'\r
-#dmaap_port: '{{ dmaap_port }}'\r
-#dmaap_user: '{{ dmaap_user }}'\r
-#dmaap_passwd: '{{ dmaap_passwd }}'\r
-#tag_version: '{{ tag_version }}'\r
-#replicas: '{{ replicas }}'
\ No newline at end of file
diff --git a/input-templates/dhinputs.yaml b/input-templates/dhinputs.yaml
deleted file mode 100644 (file)
index 9014ac6..0000000
+++ /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 (file)
index 284aa2d..0000000
+++ /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 (file)
index eaf13a3..0000000
+++ /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 (file)
index 10c65e0..0000000
+++ /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 (file)
index b87a760..0000000
+++ /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 (file)
index 9701b9b..0000000
+++ /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 (file)
index bbdab63..0000000
+++ /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 (file)
index c0d7a75..0000000
+++ /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 (file)
index 5dab4f5..0000000
+++ /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 (file)
index 6b54630..0000000
+++ /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 (file)
index b3be3df..0000000
+++ /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 (file)
index 56a1681..0000000
+++ /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 (file)
index a4d3828..0000000
+++ /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 (file)
index 8ddfb2c..0000000
+++ /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/"
-}
index 892ea23..2f43cff 100755 (executable)
@@ -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"
diff --git a/pom.xml b/pom.xml
index c0caee5..9f97f47 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -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/scripts/bootstrap.sh b/scripts/bootstrap.sh
new file mode 100755 (executable)
index 0000000..e47ccd6
--- /dev/null
@@ -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 (executable)
index 0000000..c67258e
--- /dev/null
@@ -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}"
old mode 100644 (file)
new mode 100755 (executable)
similarity index 54%
rename from input-templates/cdap-sdk-inputs.yaml
rename to scripts/uninstall.sh
index e55c796..71f8161
@@ -1,3 +1,4 @@
+#!/bin/bash
 # ================================================================================
 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
 # ================================================================================
 # 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 %'