summaryrefslogtreecommitdiffstats
path: root/boot/dcae2_install.sh
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2018-04-03 23:18:58 -0400
committerLusheng Ji <lji@research.att.com>2018-04-04 03:43:47 +0000
commit1b98d1abab0dd111b25b4d5cbc1201f992e7cd78 (patch)
treeb92a7cafddd69d03e3702833a5ce29474b8e7e13 /boot/dcae2_install.sh
parent638615104024658d5c49ee4f385e1d092a4c0f5b (diff)
Add code for R2MVP deployment
Added code using a "dcae_deployment_profile" parameter to control what kind of deployment for DCAE. R1 is for ONAP Amsterdam deployment (bootstrap installs Cloudify Manager then uses CM to deploy additional VMs). R2MVP is a new MVP deployment, with only service components such as VES collector and supporting components. All components are deployed with their default configurations. R2MVP does not support dynamic depoyment of additional assets and configuration via CLAMP. Issue-ID: DCAEGEN2-206 Change-Id: Ide51c780a45c23f33123d52f9df225b8715833d3 Signed-off-by: Lusheng Ji <lji@research.att.com>
Diffstat (limited to 'boot/dcae2_install.sh')
-rwxr-xr-x[-rw-r--r--]boot/dcae2_install.sh71
1 files changed, 49 insertions, 22 deletions
diff --git a/boot/dcae2_install.sh b/boot/dcae2_install.sh
index 3c84c62d..b59f06f2 100644..100755
--- a/boot/dcae2_install.sh
+++ b/boot/dcae2_install.sh
@@ -100,25 +100,52 @@ chmod 777 /opt/app/config/key
# move keystone url file
#cp /opt/config/keystone_url.txt /opt/app/config/keystone_url.txt
-# download blueprint input template files
-rm -rf /opt/app/inputs-templates
-mkdir -p /opt/app/inputs-templates
-wget -P /opt/app/inputs-templates https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.blueprints/releases/input-templates/inputs.yaml
-wget -P /opt/app/inputs-templates https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.blueprints/releases/input-templates/cdapinputs.yaml
-wget -P /opt/app/inputs-templates https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.blueprints/releases/input-templates/phinputs.yaml
-wget -P /opt/app/inputs-templates https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.blueprints/releases/input-templates/dhinputs.yaml
-wget -P /opt/app/inputs-templates https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.blueprints/releases/input-templates/invinputs.yaml
-wget -P /opt/app/inputs-templates https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.blueprints/releases/input-templates/vesinput.yaml
-wget -P /opt/app/inputs-templates https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.blueprints/releases/input-templates/tcainputs.yaml
-wget -P /opt/app/inputs-templates https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.blueprints/releases/input-templates/he-ip.yaml
-wget -P /opt/app/inputs-templates https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.blueprints/releases/input-templates/hr-ip.yaml
-
-
-# generate blueprint input files
-pip install --upgrade jinja2
-wget https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.deployments/releases/scripts/detemplate-bpinputs.py && (python detemplate-bpinputs.py /opt/config /opt/app/inputs-templates /opt/app/config; rm detemplate-bpinputs.py)
-
-
-# Run docker containers
-cd /opt
-./dcae2_vm_init.sh
+
+URL_ROOT='nexus.onap.org/service/local/repositories/raw/content'
+REPO_BLUEPRINTS='org.onap.dcaegen2.platform.blueprints'
+REPO_DEPLOYMENTS='org.onap.dcaegen2.deployments'
+
+if [ -e /opt/config/dcae_deployment_profile.txt ]; then
+ DEPLOYMENT_PROFILE=$(cat /opt/config/dcae_deployment_profile.txt)
+fi
+DEPLOYMENT_PROFILE=${DEPLOYMENT_PROFILE:-R1}
+if [ "$DEPLOYMENT_PROFILE" == "R1" ]; then
+ RELEASE_TAG='releases'
+ # download blueprint input template files
+ rm -rf /opt/app/inputs-templates
+ mkdir -p /opt/app/inputs-templates
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_BLUEPRINTS}/${RELEASE_TAG}/input-templates/inputs.yaml
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_BLUEPRINTS}/${RELEASE_TAG}/input-templates/cdapinputs.yaml
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_BLUEPRINTS}/${RELEASE_TAG}/input-templates/phinputs.yaml
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_BLUEPRINTS}/${RELEASE_TAG}/input-templates/dhinputs.yaml
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_BLUEPRINTS}/${RELEASE_TAG}/input-templates/invinputs.yaml
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_BLUEPRINTS}/${RELEASE_TAG}/input-templates/vesinput.yaml
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_BLUEPRINTS}/${RELEASE_TAG}/input-templates/tcainputs.yaml
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_BLUEPRINTS}/${RELEASE_TAG}/input-templates/he-ip.yaml
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_BLUEPRINTS}/${RELEASE_TAG}/input-templates/hr-ip.yaml
+
+
+ # generate blueprint input files
+ pip install --upgrade jinja2
+ wget https://${URL_ROOT}/${REPO_DEPLOYMENTS}/${RELEASE_TAG}/scripts/detemplate-bpinputs.py && \
+ (python detemplate-bpinputs.py /opt/config /opt/app/inputs-templates /opt/app/config; rm detemplate-bpinputs.py)
+
+ # Run docker containers
+ cd /opt
+ ./dcae2_vm_init.sh
+fi
+
+if [ "$DEPLOYMENT_PROFILE" == "R2MVP" ]; then
+ RELEASE_TAG='R2'
+ rm -rf /opt/app/inputs-templates
+ mkdir -p /opt/app/inputs-templates
+ wget -P /opt/app/inputs-templates https://${URL_ROOT}/${REPO_DEPLOYMENTS}/${RELEASE_TAG}/heat/${DEPLOYMENT_PROFILE}/docker-compose.yaml
+
+ pip install --upgrade jinja2
+ wget https://${URL_ROOT}/${REPO_DEPLOYMENTS}/${RELEASE_TAG}/scripts/detemplate-bpinputs.py && \
+ (python detemplate-bpinputs.py /opt/config /opt/app/inputs-templates /opt/app/config; rm detemplate-bpinputs.py)
+
+ cd /opt
+ ./dcae2_vm_init.sh
+fi
+