diff options
author | Jack Lucas <jflucas@research.att.com> | 2018-04-04 21:47:28 +0000 |
---|---|---|
committer | Jack Lucas <jflucas@research.att.com> | 2018-04-04 21:48:08 +0000 |
commit | 5b12c6d479c0bfe411967e1451735ff40807cfaf (patch) | |
tree | 3a995a6e8cb255992e4334b8cdd1b169003df470 /k8s-bootstrap-container | |
parent | 73adaf1d822be53f446a0e655adbef5405a9693f (diff) |
Add more Consul registrations
Change-Id: I3d548b26a2868529cf85057aa348b8ce4ba2f6a8
Issue-ID: DCAEGEN2-421
Signed-off-by: Jack Lucas <jflucas@research.att.com>
Diffstat (limited to 'k8s-bootstrap-container')
-rwxr-xr-x | k8s-bootstrap-container/bootstrap.sh | 36 | ||||
-rw-r--r-- | k8s-bootstrap-container/pom.xml | 2 |
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> |