summaryrefslogtreecommitdiffstats
path: root/kubernetes/oneclick
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/oneclick')
-rwxr-xr-xkubernetes/oneclick/createAll.bash35
-rw-r--r--kubernetes/oneclick/setenv.bash9
2 files changed, 43 insertions, 1 deletions
diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash
index afe71af8e1..c8810aa615 100755
--- a/kubernetes/oneclick/createAll.bash
+++ b/kubernetes/oneclick/createAll.bash
@@ -39,11 +39,46 @@ create_registry_key() {
check_return_code $cmd
}
+configure_dcaegen2() {
+ if [ ! -s "$OPENSTACK_PRIVATE_KEY_PATH" ]
+ then
+ echo "ERROR: $OPENSTACK_PRIVATE_KEY_PATH does not exist or is empty. Cannot launch dcae gen2."
+ return 1
+ fi
+
+ cmd=`echo kubectl --namespace $1-$2 create secret generic $2-openstack-ssh-private-key --from-file=key=${OPENSTACK_PRIVATE_KEY_PATH}`
+ eval ${cmd}
+ check_return_code $cmd
+
+ if [ ! -s "$DCAEGEN2_CONFIG_INPUT_FILE_PATH" ]
+ then
+ echo "ERROR: $DCAEGEN2_CONFIG_INPUT_FILE_PATH does not exist or is empty. Cannot launch dcae gen2."
+ return 1
+ fi
+
+ cmd=`echo kubectl --namespace $1-$2 create configmap $2-config-inputs --from-file=inputs.yaml=${DCAEGEN2_CONFIG_INPUT_FILE_PATH}`
+ eval ${cmd}
+ check_return_code $cmd
+}
+
create_onap_helm() {
HELM_VALUES_ADDITION=""
if [[ ! -z $HELM_VALUES_FILEPATH ]]; then
HELM_VALUES_ADDITION="--values=$HELM_VALUES_FILEPATH"
fi
+ # Have to put a check for dcaegen2 because it requires external files to helm
+ # which should not be part of the Chart.
+ if [ "$2" = "dcaegen2" ];
+ then
+ configure_dcaegen2 $1 $2
+ local result=$?
+ if [ $result -ne 0 ]
+ then
+ echo "ERROR: dcaegen2 failed to configure: Pre-requisites not met. Skipping deploying it and continue"
+ return
+ fi
+ fi
+
cmd=`echo helm install $LOCATION/$2/ --name $1-$2 --namespace $1 --set nsPrefix=$1,nodePortPrefix=$3 ${HELM_VALUES_ADDITION}`
eval ${cmd}
check_return_code $cmd
diff --git a/kubernetes/oneclick/setenv.bash b/kubernetes/oneclick/setenv.bash
index a1aba3daf4..6dfd948924 100644
--- a/kubernetes/oneclick/setenv.bash
+++ b/kubernetes/oneclick/setenv.bash
@@ -1,8 +1,15 @@
#!/bin/bash
# Deploying MSB first and kube2msb last will ensure all the ONAP services can be registered to MSB
-HELM_APPS=('consul' 'msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcae' 'log' 'cli' 'multicloud' 'clamp' 'kube2msb')
+HELM_APPS=('consul' 'msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcaegen2' 'log' 'cli' 'multicloud' 'clamp' 'kube2msb')
ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001}
ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker}
ONAP_DOCKER_PASS=${ONAP_DOCKER_PASS:-docker}
ONAP_DOCKER_MAIL=${ONAP_DOCKER_MAIL:-$USERNAME@$USERDOMAIN}
+# Openstack key pair private key file location required to enable dcaegen2 installer CRUD operations in your Openstack
+# Ensure you set the name of your keypair in the dcae-parameters.yaml entry "keypair: "dcae-g2"
+# example: export OPENSTACK_PRIVATE_KEY_PATH=/home/user/Downloads/dcae-g2.pem
+OPENSTACK_PRIVATE_KEY_PATH=${OPENSTACK_PRIVATE_KEY_PATH:-~/.ssh/onap_rsa}
+# dcaegen2 bootstrap configuration input yaml file. Start from the sample, and set your environments real values:
+# example: export DCAEGEN2_CONFIG_INPUT_FILE_PATH=/tmp/dcae-parameters.yaml
+DCAEGEN2_CONFIG_INPUT_FILE_PATH=${DCAEGEN2_CONFIG_INPUT_FILE_PATH:-../dcaegen2/dcae-parameters-sample.yaml} \ No newline at end of file