summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2018-04-05 13:33:26 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-05 13:33:26 +0000
commit3044455f4dc7959d8daa5410e1d6acb09ae24439 (patch)
treeb905c7969fe2515ae7555b7144c31ec188f39a7d
parent3622f7a20e615d409dd5a8dea3ae592115df91ae (diff)
parent5b12c6d479c0bfe411967e1451735ff40807cfaf (diff)
Merge "Add more Consul registrations"
-rwxr-xr-xk8s-bootstrap-container/bootstrap.sh36
-rw-r--r--k8s-bootstrap-container/pom.xml2
2 files changed, 35 insertions, 3 deletions
diff --git a/k8s-bootstrap-container/bootstrap.sh b/k8s-bootstrap-container/bootstrap.sh
index 5fc831c..3459edc 100755
--- a/k8s-bootstrap-container/bootstrap.sh
+++ b/k8s-bootstrap-container/bootstrap.sh
@@ -1,4 +1,20 @@
#!/bin/bash
+# ================================================================================
+# Copyright (c) 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=========================================================
+
# Install DCAE via Cloudify Manager
# Expects:
# CM address (IP or DNS) in CMADDR environment variable
@@ -11,7 +27,16 @@
set -ex
+# 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}'
+CM_REG='{"ID": "dcae-cm0", "Name": "cloudify_manager", "Address": "cloudify-manager.onap", "Port": 80}'
+INV_REG='{"ID": "dcae-inv0", "Name": "inventory", "Address": "inventory", "Port": 8080}'
+
+
+
+
+
# Deploy components
# $1 -- name (for bp and deployment)
# $2 -- blueprint name
@@ -19,7 +44,7 @@ CBS_REG='{"ID": "dcae-cbs0", "Name": "config_binding_service", "Address": "confi
function deploy {
cfy install -b $1 -d $1 -i /inputs/$3 /blueprints/$2
}
-# Set up profile to access CMs
+# Set up profile to access Cloudify Manager
cfy profiles use -u admin -t default_tenant -p "${CMPASS}" "${CMADDR}"
# Output status, for debugging purposes
@@ -35,8 +60,15 @@ do
curl -v -X PUT -H "Content-Type: application/json" --data-binary @/tmp/dcae-upload ${CONSUL}/v1/kv/${key}
done
-# For backward compatibility, load config_binding_service into Consul as service
+# For backward compatibility, load some platform services into Consul service registry
+# Some components still rely on looking up a service in Consul
curl -v -X PUT -H "Content-Type: application/json" --data "${CBS_REG}" ${CONSUL}/v1/agent/service/register
+curl -v -X PUT -H "Content-Type: application/json" --data "${CBS_REG1}" ${CONSUL}/v1/agent/service/register
+curl -v -X PUT -H "Content-Type: application/json" --data "${CM_REG}" ${CONSUL}/v1/agent/service/register
+curl -v -X PUT -H "Content-Type: application/json" --data "${INV_REG}" ${CONSUL}/v1/agent/service/register
+
+# Store the CM password into a Cloudify secret
+cfy secret create -s ${CMPASS} cmpass
# Load plugins onto CM
# Allow "already loaded" error
diff --git a/k8s-bootstrap-container/pom.xml b/k8s-bootstrap-container/pom.xml
index e2645c7..724ada3 100644
--- a/k8s-bootstrap-container/pom.xml
+++ b/k8s-bootstrap-container/pom.xml
@@ -27,7 +27,7 @@ limitations under the License.
<groupId>org.onap.dcaegen2.deployments</groupId>
<artifactId>k8s-bootstrap-container</artifactId>
<name>dcaegen2-deployments-k8s-bootstrap-container</name>
- <version>1.1.2</version>
+ <version>1.1.3</version>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>