diff options
author | Alexis de Talhouët <adetalhouet89@gmail.com> | 2018-01-23 11:03:54 -0500 |
---|---|---|
committer | Alexis de Talhouët <adetalhouet89@gmail.com> | 2018-01-23 13:58:35 -0500 |
commit | bbfe29d8cabfd347fa75e947a5753f7aa9a24177 (patch) | |
tree | ee883fa832bf0dbda6344e3197fa6aa64cb49f41 | |
parent | f9478cf471c94f1cd7412873705c5213d3d23131 (diff) |
Rework onap-parameters.yaml
Change-Id: Ifeb5ac30a5f057865195431270908022eecb64eb
Issue-ID: OOM-599
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
-rwxr-xr-x | kubernetes/config/docker/init/config-init.sh | 277 | ||||
-rw-r--r-- | kubernetes/config/onap-parameters-sample.yaml | 160 | ||||
-rw-r--r-- | kubernetes/config/onap-parameters.yaml | 149 |
3 files changed, 367 insertions, 219 deletions
diff --git a/kubernetes/config/docker/init/config-init.sh b/kubernetes/config/docker/init/config-init.sh index 0fc4c42f2e..3ce194272c 100755 --- a/kubernetes/config/docker/init/config-init.sh +++ b/kubernetes/config/docker/init/config-init.sh @@ -1,20 +1,26 @@ #!/bin/bash -x -echo "Validating onap-parameters.yaml has been populated" +concat_array() { + local arr=("$@") + local str='' + for i in ${!arr[@]}; do + if (( $i > 0 )); then + str="${str};" + fi + str="${str}${arr[$i]}" + done + echo "$str" +} -[[ -z "$DEPLOY_DCAE" ]] && { echo "Error: DEPLOY_DCAE must be set in onap-parameters.yaml"; exit 1; } +echo "Validating onap-parameters.yaml has been populated" [[ -z "$NEXUS_HTTP_REPO" ]] && { echo "Error: NEXUS_HTTP_REPO must be set in onap-parameters.yaml"; exit 1; } [[ -z "$NEXUS_DOCKER_REPO" ]] && { echo "Error: NEXUS_DOCKER_REPO must be set in onap-parameters.yaml"; exit 1; } [[ -z "$NEXUS_USERNAME" ]] && { echo "Error: NEXUS_USERNAME must be set in onap-parameters.yaml"; exit 1; } [[ -z "$NEXUS_PASSWORD" ]] && { echo "Error: NEXUS_PASSWORD must be set in onap-parameters.yaml"; exit 1; } -[[ -z "$OPENSTACK_PUBLIC_NET_ID" ]] && { echo "Error: OPENSTACK_PUBLIC_NET_ID must be set in onap-parameters.yaml"; exit 1; } -[[ -z "$OPENSTACK_PUBLIC_NET_NAME" ]] && { echo "Error: OPENSTACK_PUBLIC_NET_NAME must be set in onap-parameters.yaml"; exit 1; } -[[ -z "$OPENSTACK_OAM_NETWORK_CIDR" ]] && { echo "Error: OPENSTACK_OAM_NETWORK_CIDR must be set in onap-parameters.yaml"; exit 1; } - [[ -z "$OPENSTACK_USERNAME" ]] && { echo "Error: OPENSTACK_USERNAME must be set in onap-parameters.yaml"; exit 1; } -[[ -z "$OPENSTACK_API_KEY" ]] && { echo "Error: OPENSTACK_API_KEY must be set in onap-parameters.yaml"; exit 1; } +[[ -z "$OPENSTACK_PASSWORD" ]] && { echo "Error: OPENSTACK_PASSWORD must be set in onap-parameters.yaml"; exit 1; } [[ -z "$OPENSTACK_TENANT_NAME" ]] && { echo "Error: OPENSTACK_TENANT_NAME must be set in onap-parameters.yaml"; exit 1; } [[ -z "$OPENSTACK_TENANT_ID" ]] && { echo "Error: OPENSTACK_TENANT_ID must be set in onap-parameters.yaml"; exit 1; } [[ -z "$OPENSTACK_REGION" ]] && { echo "Error: OPENSTACK_REGION must be set in onap-parameters.yaml"; exit 1; } @@ -22,39 +28,62 @@ echo "Validating onap-parameters.yaml has been populated" [[ -z "$OPENSTACK_KEYSTONE_URL" ]] && { echo "Error: OPENSTACK_KEYSTONE_URL must be set in onap-parameters.yaml"; exit 1; } [[ -z "$OPENSTACK_SERVICE_TENANT_NAME" ]] && { echo "Error: OPENSTACK_SERVICE_TENANT_NAME must be set in onap-parameters.yaml"; exit 1; } -[[ -z "$OPENSTACK_FLAVOUR_SMALL" ]] && { echo "Error: OPENSTACK_FLAVOUR_SMALL must be set in onap-parameters.yaml"; exit 1; } -[[ -z "$OPENSTACK_FLAVOUR_MEDIUM" ]] && { echo "Error: OPENSTACK_FLAVOUR_MEDIUM must be set in onap-parameters.yaml"; exit 1; } -[[ -z "$OPENSTACK_FLAVOUR_LARGE" ]] && { echo "Error: OPENSTACK_FLAVOUR_LARGE must be set in onap-parameters.yaml"; exit 1; } - -[[ -z "$OPENSTACK_UBUNTU_14_IMAGE" ]] && { echo "Error: OPENSTACK_UBUNTU_14_IMAGE must be set in onap-parameters.yaml"; exit 1; } -[[ -z "$OPENSTACK_UBUNTU_16_IMAGE" ]] && { echo "Error: OPENSTACK_UBUNTU_16_IMAGE must be set in onap-parameters.yaml"; exit 1; } -[[ -z "$OPENSTACK_CENTOS_7_IMAGE" ]] && { echo "Error: OPENSTACK_CENTOS_7_IMAGE must be set in onap-parameters.yaml"; exit 1; } - [[ -z "$DMAAP_TOPIC" ]] && { echo "Error: DMAAP_TOPIC must be set in onap-parameters.yaml"; exit 1; } [[ -z "$DEMO_ARTIFACTS_VERSION" ]] && { echo "Error: DEMO_ARTIFACTS_VERSION must be set in onap-parameters.yaml"; exit 1; } +[[ -z "$DEPLOY_DCAE" ]] && { echo "Error: DEPLOY_DCAE must be set in onap-parameters.yaml"; exit 1; } if [ "$DEPLOY_DCAE" = "true" ] then - [[ -z "$DCAE_IP_ADDR" ]] && { echo "Error: DCAE_IP_ADDR must be set in onap-parameters.yaml"; exit 1; } - [[ -z "$DCAE_VM_BASE_NAME" ]] && { echo "Error: DCAE_VM_BASE_NAME must be set in onap-parameters.yaml"; exit 1; } [[ -z "$DCAE_DOCKER_VERSION" ]] && { echo "Error: DCAE_DOCKER_VERSION must be set in onap-parameters.yaml"; exit 1; } - [[ -z "$OPENSTACK_KEY_NAME" ]] && { echo "Error: OPENSTACK_KEY_NAME must be set in onap-parameters.yaml"; exit 1; } - [[ -z "$OPENSTACK_PUB_KEY" ]] && { echo "Error: OPENSTACK_PUB_KEY must be set in onap-parameters.yaml"; exit 1; } - [[ -z "$OPENSTACK_PRIVATE_KEY" ]] && { echo "Error: OPENSTACK_PRIVATE_KEY must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$IS_SAME_OPENSTACK_AS_VNF" ]] && { echo "Error: IS_SAME_OPENSTACK_AS_VNF must be set in onap-parameters.yaml"; exit 1; } + if [ "$IS_SAME_OPENSTACK_AS_VNF" = "false" ] + then + [[ -z "$DCAE_OS_API_VERSION" ]] && { echo "Error: DCAE_OS_API_VERSION must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_KEYSTONE_URL" ]] && { echo "Error: DCAE_OS_KEYSTONE_URL must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_USERNAME" ]] && { echo "Error: DCAE_OS_USERNAME must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_PASSWORD" ]] && { echo "Error: DCAE_OS_PASSWORD must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_TENANT_NAME" ]] && { echo "Error: DCAE_OS_TENANT_NAME must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_TENANT_ID" ]] && { echo "Error: DCAE_OS_TENANT_ID must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_REGION" ]] && { echo "Error: DCAE_OS_REGION must be set in onap-parameters.yaml"; exit 1; } + fi + + [[ -z "$DCAE_OS_PUBLIC_NET_ID" ]] && { echo "Error: DCAE_OS_PUBLIC_NET_ID must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_PUBLIC_NET_NAME" ]] && { echo "Error: DCAE_OS_PUBLIC_NET_NAME must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_OAM_NETWORK_CIDR" ]] && { echo "Error: DCAE_OS_OAM_NETWORK_CIDR must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_IP_ADDR" ]] && { echo "Error: DCAE_IP_ADDR must be set in onap-parameters.yaml"; exit 1; } - [[ -z "$DNS_LIST" ]] && { echo "Error: DNS_LIST must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_FLAVOR_SMALL" ]] && { echo "Error: DCAE_OS_FLAVOR_SMALL must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_FLAVOR_MEDIUM" ]] && { echo "Error: DCAE_OS_FLAVOR_MEDIUM must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_FLAVOR_LARGE" ]] && { echo "Error: DCAE_OS_FLAVOR_LARGE must be set in onap-parameters.yaml"; exit 1; } + + [[ -z "$DCAE_OS_UBUNTU_14_IMAGE" ]] && { echo "Error: DCAE_OS_UBUNTU_14_IMAGE must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_UBUNTU_16_IMAGE" ]] && { echo "Error: DCAE_OS_UBUNTU_16_IMAGE must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_CENTOS_7_IMAGE" ]] && { echo "Error: DCAE_OS_CENTOS_7_IMAGE must be set in onap-parameters.yaml"; exit 1; } + + [[ -z "$DCAE_OS_KEY_NAME" ]] && { echo "Error: DCAE_OS_KEY_NAME must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_PUB_KEY" ]] && { echo "Error: DCAE_OS_PUB_KEY must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DCAE_OS_PRIVATE_KEY" ]] && { echo "Error: DCAE_OS_PRIVATE_KEY must be set in onap-parameters.yaml"; exit 1; } + + [[ -z "$DNS_IP" ]] && { echo "Error: DNS_LIST must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DNS_FORWARDER" ]] && { echo "Error: DNS_FORWARDER must be set in onap-parameters.yaml"; exit 1; } [[ -z "$EXTERNAL_DNS" ]] && { echo "Error: EXTERNAL_DNS must be set in onap-parameters.yaml"; exit 1; } - [[ -z "$OPENSTACK_TENANT_NAME" ]] && { echo "Error: OPENSTACK_TENANT_NAME must be set in onap-parameters.yaml"; exit 1; } + + [[ -z "$DCAE_DOMAIN" ]] && { echo "Error: DCAE_DOMAIN must be set in onap-parameters.yaml"; exit 1; } [[ -z "$DNSAAS_PROXY_ENABLE" ]] && { echo "Error: DNSAAS_PROXY_ENABLE must be set in onap-parameters.yaml"; exit 1; } + if [ "$$DNSAAS_PROXY_ENABLE" = "true" ] + then + [[ -z "$DCAE_PROXIED_KEYSTONE_URL" ]] && { echo "Error: DCAE_PROXIED_KEYSTONE_URL must be set in onap-parameters.yaml"; exit 1; } + fi + [[ -z "$DNSAAS_API_VERSION" ]] && { echo "Error: DNSAAS_API_VERSION must be set in onap-parameters.yaml"; exit 1; } [[ -z "$DNSAAS_REGION" ]] && { echo "Error: DNSAAS_REGION must be set in onap-parameters.yaml"; exit 1; } [[ -z "$DNSAAS_KEYSTONE_URL" ]] && { echo "Error: DNSAAS_KEYSTONE_URL must be set in onap-parameters.yaml"; exit 1; } + [[ -z "$DNSAAS_TENANT_ID" ]] && { echo "Error: DNSAAS_TENANT_ID must be set in onap-parameters.yaml"; exit 1; } [[ -z "$DNSAAS_TENANT_NAME" ]] && { echo "Error: DNSAAS_TENANT_NAME must be set in onap-parameters.yaml"; exit 1; } [[ -z "$DNSAAS_USERNAME" ]] && { echo "Error: DNSAAS_USERNAME must be set in onap-parameters.yaml"; exit 1; } [[ -z "$DNSAAS_PASSWORD" ]] && { echo "Error: DNSAAS_PASSWORD must be set in onap-parameters.yaml"; exit 1; } - [[ -z "$DCAE_DOMAIN" ]] && { echo "Error: DCAE_DOMAIN must be set in onap-parameters.yaml"; exit 1; } fi #make NAMESPACE directory @@ -107,110 +136,54 @@ chmod -R 777 /config-init/$NAMESPACE/aai/sparky-be/logs/ chmod -R 777 /config-init/$NAMESPACE/aai/elasticsearch/es-data/ chmod -R 777 /config-init/$NAMESPACE/aai/search-data-service/logs/ chmod -R 777 /config-init/$NAMESPACE/aai/data-router/logs/ +chmod -R 777 /config-init/$NAMESPACE/policy/mariadb/ chmod -R 777 /config-init/$NAMESPACE/log/elasticsearch chown -R root:root /config-init/$NAMESPACE/log -echo "Substituting configuration parameters" - -# replace the default 'onap' namespace qualification of K8s hostnames within the config files -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/\.onap-/\.$NAMESPACE-/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/kubectl -n onap/kubectl -n $NAMESPACE/g" {} \; - -######### -# NEXUS # -######### -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,NEXUS_HTTP_REPO_HERE,$NEXUS_HTTP_REPO,g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,NEXUS_DOCKER_REPO_HERE,$NEXUS_DOCKER_REPO,g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/NEXUS_USERNAME_HERE/$NEXUS_USERNAME/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/NEXUS_PASSWORD_HERE/$NEXUS_PASSWORD/g" {} \; - -########## -# Images # -########## -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/UBUNTU_14_IMAGE_NAME_HERE/$OPENSTACK_UBUNTU_14_IMAGE/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/UBUNTU_16_IMAGE_NAME_HERE/$OPENSTACK_UBUNTU_16_IMAGE/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_CENTOS_7_IMAGE_HERE/$OPENSTACK_CENTOS_7_IMAGE/g" {} \; - -############## -# Networking # -############## -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_PUBLIC_NET_ID_HERE/$OPENSTACK_PUBLIC_NET_ID/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_PUBLIC_NET_NAME_HERE/$OPENSTACK_PUBLIC_NET_NAME/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_NETWORK_ID_WITH_ONAP_ROUTE_HERE/$OPENSTACK_OAM_NETWORK_ID/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_SUBNET_ID_WITH_ONAP_ROUTE_HERE/$OPENSTACK_OAM_SUBNET_ID/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,NETWORK_CIDR_WITH_ONAP_ROUTE_HERE,$OPENSTACK_OAM_NETWORK_CIDR,g" {} \; - -################## -# Authentication # -################## -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_USERNAME_HERE/$OPENSTACK_USERNAME/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_TENANT_ID_HERE/$OPENSTACK_TENANT_ID/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_TENANT_NAME_HERE/$OPENSTACK_TENANT_NAME/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_PASSWORD_HERE/$OPENSTACK_API_KEY/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_REGION_HERE/$OPENSTACK_REGION/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,OPENSTACK_KEYSTONE_IP_HERE,$OPENSTACK_KEYSTONE_URL,g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,OPENSTACK_API_VERSION_HERE,$OPENSTACK_API_VERSION,g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_SERVICE_TENANT_NAME_HERE/$OPENSTACK_SERVICE_TENANT_NAME/g" {} \; - -########### -# Flavors # -########### -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_FLAVOUR_SMALL_HERE/$OPENSTACK_FLAVOUR_SMALL/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_FLAVOUR_MEDIUM_HERE/$OPENSTACK_FLAVOUR_MEDIUM/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_FLAVOUR_LARGE_HERE/$OPENSTACK_FLAVOUR_LARGE/g" {} \; - -######## -# ONAP # -######## -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DMAAP_TOPIC_HERE/$DMAAP_TOPIC/g" {} \; -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DEMO_ARTIFACTS_VERSION_HERE/$DEMO_ARTIFACTS_VERSION/g" {} \; # SDNC/Robot preload files manipulation OPENSTACK_OAM_NETWORK_CIDR_PREFIX=`cut -d. -f1-3 <<<"$OPENSTACK_OAM_NETWORK_CIDR"` -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_OAM_NETWORK_CIDR_PREFIX_HERE/$OPENSTACK_OAM_NETWORK_CIDR_PREFIX/g" {} \; + # MSO post install steps to encrypt openstack password MSO_ENCRYPTION_KEY=$(cat /config-init/$NAMESPACE/mso/mso/encryption.key) OPENSTACK_API_ENCRYPTED_KEY=`echo -n "$OPENSTACK_API_KEY" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p` -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_ENCRYPTED_PASSWORD_HERE/$OPENSTACK_API_ENCRYPTED_KEY/g" {} \; - - -find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DEPLOY_DCAE_HERE/$DEPLOY_DCAE/g" {} \; -if [ "$DEPLOY_DCAE" = "true" ] -then - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DCAE_IP_ADDR_HERE/$DCAE_IP_ADDR/g" {} \; - - ######## - # DCAE # - ######## - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DCAE_VM_BASE_NAME_HERE/$DCAE_VM_BASE_NAME/g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,DCAE_KEYSTONE_URL_HERE,$DCAE_KEYSTONE_URL,g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,DCAE_DOMAIN_HERE,$DCAE_DOMAIN,g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,DCAE_DOCKER_VERSION_HERE,$DCAE_DOCKER_VERSION,g" {} \; - - ########### - # KeyPair # - ########### - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/OPENSTACK_KEY_NAME_HERE/$OPENSTACK_KEY_NAME/g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,OPENSTACK_PUB_KEY_HERE,$OPENSTACK_PUB_KEY,g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,OPENSTACK_PRIVATE_KEY_HERE,$OPENSTACK_PRIVATE_KEY,g" {} \; - - ####### - # DNS # - ####### - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DNS_LIST_HERE/$DNS_LIST/g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/EXTERNAL_DNS_HERE/$EXTERNAL_DNS/g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DNS_FORWARDER_HERE/$DNS_FORWARDER/g" {} \; - ################# - # DNS Designate # - ################# - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DNSAAS_PROXY_ENABLE_HERE/$DNSAAS_PROXY_ENABLE/g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DNSAAS_REGION_HERE/$DNSAAS_REGION/g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s,DNSAAS_KEYSTONE_URL_HERE,$DNSAAS_KEYSTONE_URL,g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DNSAAS_TENANT_NAME_HERE/$DNSAAS_TENANT_NAME/g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DNSAAS_USERNAME_HERE/$DNSAAS_USERNAME/g" {} \; - find /config-init/$NAMESPACE/ -type f -exec sed -i -e "s/DNSAAS_PASSWORD_HERE/$DNSAAS_PASSWORD/g" {} \; -fi +echo "Substituting configuration parameters" +# replace the default 'onap' namespace qualification of K8s hostnames within the config files +SED_NS_PATHS="/config-init/$NAMESPACE/" +SED_NS_STRINGS=( + "s/\.onap-/\.${NAMESPACE}-/g" + "s/kubectl -n onap/kubectl -n ${NAMESPACE}/g" +) +SED_NS_STRING=$(concat_array "${SED_NS_STRINGS[@]}") +find $SED_NS_PATHS -type f -exec sed -i -e "${SED_NS_STRING}" {} \; + +# set variable parameters +# ATTENTION: the list of the paths must be verified if more parameters are added! +SED_CONFIG_PATHS="/config-init/$NAMESPACE/robot/ /config-init/$NAMESPACE/mso/ /config-init/$NAMESPACE/dcaegen2/heat/" +SED_CONFIG_STRINGS=( \ + "s,NEXUS_HTTP_REPO_HERE,$NEXUS_HTTP_REPO,g" \ + "s,NEXUS_DOCKER_REPO_HERE,$NEXUS_DOCKER_REPO,g" \ + "s/NEXUS_USERNAME_HERE/$NEXUS_USERNAME/g" \ + "s/NEXUS_PASSWORD_HERE/$NEXUS_PASSWORD/g" \ + "s/DMAAP_TOPIC_HERE/${DMAAP_TOPIC}/g" \ + "s/DEMO_ARTIFACTS_VERSION_HERE/${DEMO_ARTIFACTS_VERSION}/g" \ + "s/OPENSTACK_USERNAME_HERE/${OPENSTACK_USERNAME}/g" \ + "s/OPENSTACK_TENANT_ID_HERE/${OPENSTACK_TENANT_ID}/g" \ + "s/OPENSTACK_TENANT_NAME_HERE/$OPENSTACK_TENANT_NAME/g" \ + "s/OPENSTACK_PASSWORD_HERE/${OPENSTACK_PASSWORD}/g" \ + "s/OPENSTACK_REGION_HERE/${OPENSTACK_REGION}/g" \ + "s,OPENSTACK_KEYSTONE_IP_HERE,${OPENSTACK_KEYSTONE_URL},g" \ + "s,OPENSTACK_API_VERSION_HERE,$OPENSTACK_API_VERSION,g" \ + "s/OPENSTACK_SERVICE_TENANT_NAME_HERE/$OPENSTACK_SERVICE_TENANT_NAME/g" \ + "s/OPENSTACK_ENCRYPTED_PASSWORD_HERE/${OPENSTACK_API_ENCRYPTED_KEY}/g" \ + "s/VNF_OPENSTACK_OAM_NETWORK_ID_HERE/$OPENSTACK_OAM_NETWORK_ID/g" \ + "s/VNF_OPENSTACK_PUBLIC_ID_HERE/$OPENSTACK_PUBLIC_NETWORK_ID/g" \ + "s/VNF_OPENSTACK_FLAVOR/$OPENSTACK_FLAVOR/g" \ + "s/VNF_OPENSTACK_IMAGE/$OPENSTACK_IMAGE/g" \ +) +SED_CONFIG_STRING=$(concat_array "${SED_CONFIG_STRINGS[@]}") +find $SED_CONFIG_PATHS -type f -exec sed -i -e "${SED_CONFIG_STRING}" {} \; # Instal kubectl commands apt -y install curl @@ -218,6 +191,75 @@ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s htt chmod +x ./kubectl mv ./kubectl /usr/local/bin/kubectl +if [ "$DEPLOY_DCAE" = "true" ] +then + SED_CONFIG_PATHS="/config-init/$NAMESPACE/dcaegen2/heat/" + SED_CONFIG_STRINGS=( \ + "s,DCAE_IP_ADDR_HERE,$DCAE_IP_ADDR,g" \ + "s,DCAE_VM_BASE_NAME_HERE,$DCAE_VM_BASE_NAME,g" \ + "s,DCAE_DOCKER_VERSION_HERE,$DCAE_DOCKER_VERSION,g" \ + "s,DCAE_OS_PUBLIC_NET_ID_HERE,$DCAE_OS_PUBLIC_NET_ID,g" \ + "s,DCAE_OS_PUBLIC_NET_NAME_HERE,$DCAE_OS_PUBLIC_NET_NAME,g" \ + "s,DCAE_OS_OAM_NETWORK_CIDR_HERE,$DCAE_OS_OAM_NETWORK_CIDR,g" \ + "s,DCAE_IP_ADDR_HERE,$DCAE_IP_ADDR,g" \ + "s,DCAE_DOMAIN_HERE,$DCAE_DOMAIN,g" \ + "s,OPENSTACK_FLAVOR_SMALL_HERE,$DCAE_OS_FLAVOR_SMALL,g" \ + "s,OPENSTACK_FLAVOR_MEDIUM_HERE,$DCAE_OS_FLAVOR_MEDIUM,g" \ + "s,OPENSTACK_FLAVOR_LARGE_HERE,$DCAE_OS_FLAVOR_LARGE,g" \ + "s,UBUNTU_14_IMAGE_NAME_HERE,$DCAE_OS_UBUNTU_14_IMAGE,g" \ + "s,UBUNTU_16_IMAGE_NAME_HERE,$DCAE_OS_UBUNTU_16_IMAGE,g" \ + "s,OPENSTACK_CENTOS_7_IMAGE_HERE,$DCAE_OS_CENTOS_7_IMAGE,g" \ + "s,OPENSTACK_KEY_NAME_HERE,$DCAE_OS_KEY_NAME,g" \ + "s,OPENSTACK_PUB_KEY_HERE,$DCAE_OS_PUB_KEY,g" \ + "s,OPENSTACK_PRIVATE_KEY_HERE,$DCAE_OS_PRIVATE_KEY,g" \ + "s,DNS_LIST_HERE,$DNS_IP,g" \ + "s,EXTERNAL_DNS_HERE,$EXTERNAL_DNS,g" \ + "s,DNS_FORWARDER_HERE,$DNS_FORWARDER,g" \ + "s,DNSAAS_API_VERSION_HERE,$DNSAAS_API_VERSION,g" \ + "s,DNSAAS_REGION_HERE,$DNSAAS_REGION,g" \ + "s,DNSAAS_KEYSTONE_URL_HERE,$DNSAAS_KEYSTONE_URL,g" \ + "s,DNSAAS_TENANT_NAME_HERE,$DNSAAS_TENANT_NAME,g" \ + "s,DNSAAS_TENANT_ID_HERE,$DNSAAS_TENANT_ID,g" \ + "s,DNSAAS_USERNAME_HERE,$DNSAAS_USERNAME,g" \ + "s,DNSAAS_PASSWORD_HERE,$DNSAAS_PASSWORD,g" \ + ) + SED_CONFIG_STRING=$(concat_array "${SED_CONFIG_STRINGS[@]}") + find $SED_CONFIG_PATHS -type f -exec sed -i -e "${SED_CONFIG_STRING}" {} \; + + if [ "$IS_SAME_OPENSTACK_AS_VNF" = "false" ] + then + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_USERNAME_HERE/$DCAE_OS_USERNAME/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_PASSWORD_HERE/$DCAE_OS_PASSWORD/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_TENANT_NAME_HERE/$DCAE_OS_TENANT_NAME/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_TENANT_ID_HERE/$DCAE_OS_TENANT_ID/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_REGION_HERE/$DCAE_OS_REGION/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_API_VERSION_HERE/$DCAE_OS_API_VERSION/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s,DCAE_OS_KEYSTONE_URL_HERE,$DCAE_OS_KEYSTONE_URL,g" {} \; + else + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_USERNAME_HERE/$OPENSTACK_USERNAME/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_PASSWORD_HERE/$OPENSTACK_PASSWORD/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_TENANT_NAME_HERE/$OPENSTACK_TENANT_NAME/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_TENANT_ID_HERE/$OPENSTACK_TENANT_ID/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_REGION_HERE/$OPENSTACK_REGION/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DCAE_OS_API_VERSION_HERE/$OPENSTACK_API_VERSION/g" {} \; + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s,DCAE_OS_KEYSTONE_URL_HERE,$OPENSTACK_KEYSTONE_URL,g" {} \; + fi + + ################# + # DNS Designate # + ################# + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s/DNSAAS_PROXY_ENABLE_HERE/$DNSAAS_PROXY_ENABLE/g" {} \; + if [ "$DNSAAS_PROXY_ENABLE" = "true" ] + then + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s,DCAE_FINAL_KEYSTONE_URL_HERE,$DCAE_PROXIED_KEYSTONE_URL,g" {} \; + else + find /config-init/$NAMESPACE/dcaegen2/heat/ -type f -exec sed -i -e "s,DCAE_FINAL_KEYSTONE_URL_HERE,$DCAE_OS_KEYSTONE_URL/$DCAE_OS_API_VERSION,g" {} \; + fi + + # Install kube-dns ip in the nginx conf + KUBE_DNS_IP=`kubectl get service -n kube-system kube-dns -o jsonpath='{.spec.clusterIP}'` + find /config-init/$NAMESPACE/dcaegen2/nginx/ -type f -exec sed -i -e "s/KUBE_DNS_IP_HERE/$KUBE_DNS_IP/g" {} \; +fi # Inject node ip for UEB config # There is actually two places where we need to inject this list, and one required to list to be comma seperated and quote separated, @@ -238,4 +280,5 @@ fi sed -i -e "s/UEB_ADDR_IP_COMMA_AND_QUOTE_SEPERATED_HERE/$UEB_ADDR_IP_COMMA_AND_QUOTE_SEPERATED/g" /config-init/$NAMESPACE/sdc/environments/AUTO.json sed -i -e "s/UEB_ADDR_IP_COMMA_SEPERATE_HERE/$UEB_ADDR_IP_COMMA_SEPERATED/g" /config-init/$NAMESPACE/sdc/environments/AUTO.json + echo "Done!" diff --git a/kubernetes/config/onap-parameters-sample.yaml b/kubernetes/config/onap-parameters-sample.yaml index 8f9f422b51..2f694ca3ea 100644 --- a/kubernetes/config/onap-parameters-sample.yaml +++ b/kubernetes/config/onap-parameters-sample.yaml @@ -10,73 +10,117 @@ NEXUS_DOCKER_REPO: nexus3.onap.org:10001 NEXUS_USERNAME: docker NEXUS_PASSWORD: docker -# Networking -OPENSTACK_PUBLIC_NET_ID: "af6880a2-3173-430a-aaa2-6229df57ee15" -OPENSTACK_PUBLIC_NET_NAME: "vlan200_net_ext" -# Could be reduced, it needs 15 IPs for DCAE VMs -OPENSTACK_OAM_NETWORK_CIDR: "10.0.0.0/16" - -# Authentication -OPENSTACK_USERNAME: "nso" -OPENSTACK_API_KEY: "Password123" -OPENSTACK_TENANT_NAME: "nso-rancher" -OPENSTACK_TENANT_ID: "5c59f02201d54aa89af1f2207f7be2c1" -OPENSTACK_REGION: "RegionOne" -# Either v2.0 or v3 -OPENSTACK_API_VERSION: "v2.0" -OPENSTACK_KEYSTONE_URL: "http://10.195.194.216:5000" -OPENSTACK_SERVICE_TENANT_NAME: "service" - -# Flavors's name -OPENSTACK_FLAVOUR_SMALL: "m1.small" -OPENSTACK_FLAVOUR_MEDIUM: "m1.medium" -OPENSTACK_FLAVOUR_LARGE: "m1.large" - -# Images' name -OPENSTACK_UBUNTU_14_IMAGE: "trusty" -OPENSTACK_UBUNTU_16_IMAGE: "xenial" -OPENSTACK_CENTOS_7_IMAGE: "centos-7" - # ONAP config # Do not change unless you know what you're doing DMAAP_TOPIC: "AUTO" DEMO_ARTIFACTS_VERSION: "1.1.1" +# ------------------------------------------------# +# OpenStack Config on which VNFs will be deployed # +# ------------------------------------------------# + +# The four below parameters are only used by Robot. +# As Robot is able to perform some automated actions, +# e.g. onboard/distribute/instantiate, it has to be +# configured with four below parameters (in addition +# to the OPENSTACK ones). +# If you don't intend to use Robot for those actions, +# you can put dummy values, but you will have to provide +# those values when deploying VNF anyway. +# -------------------------------------------------- +# This is the OAM Network ID used for internal network by VNFs. +# You could create 10.10.10.0/24 (256 IPs should be enough) in your cloud instance. +OPENSTACK_OAM_NETWORK_ID: "YOUR_OPENSTACK_OAM_NETWORK" +# This is the public Network ID. Public = external network in OpenStack. +# Floating IPs will be created and assigned to VNFs from this network, +# to provide external reachability. +OPENSTACK_PUBLIC_NETWORK_ID: "YOUR_OPENSTACK_PUBLIC_NET_ID" +# VM Flavor to be used by VNF. +OPENSTACK_FLAVOR: "m1.medium" +# VM image to be used by VNF. Here ubuntu 14.04 is provided. +OPENSTACK_IMAGE: "trusty" + +OPENSTACK_USERNAME: "vnf" +OPENSTACK_PASSWORD: "Password" +OPENSTACK_TENANT_NAME: "nso-rancher" +OPENSTACK_TENANT_ID: "7320ec4a5b9d4589ba7c412ccfd290f" +OPENSTACK_REGION: "RegionOne" +# Either v2.0 or v3 +OPENSTACK_API_VERSION: "v2.0" +OPENSTACK_KEYSTONE_URL: "http://10.1.1.3:5000" +# Don't change this if you don't know what it is +OPENSTACK_SERVICE_TENANT_NAME: "service" ######## # DCAE # ######## # Whether or not to deploy DCAE -# If set to false, all the parameters bellow can be left empty or removed +# If set to false, all the parameters below can be left empty or removed # If set to false, update ../dcaegen2/values.yaml disableDcae value to true, # this is to avoid deploying the DCAE deployments and services. DEPLOY_DCAE: "true" -DCAE_IP_ADDR: "10.0.4.1" - -# Config -# Do not change unless you know what you're doing +# DCAE Config DCAE_DOCKER_VERSION: v1.1.1 DCAE_VM_BASE_NAME: "dcae" -# Can be the same as OPENSTACK_KEYSTONE_URL/OPENSTACK_API_VERSION -DCAE_KEYSTONE_URL: "http://10.195.194.216:5000/v2.0" +# ------------------------------------------------# +# OpenStack Config on which DCAE will be deployed # +# ------------------------------------------------# -# The private key needs to be in a specific format so it's formatted properly +# Whether to have DCAE deployed on the same OpenStack instance on which VNF will be deployed. +# (e.g. re-use the same config as defined above) +# If set to true, discard the next config block, else provide the values. +IS_SAME_OPENSTACK_AS_VNF: "false" + +# Fill in the values in below block only if IS_SAME_OPENSTACK_AS_VNF set to "false" +# --- +# Either v2.0 or v3 +DCAE_OS_API_VERSION: "v2.0" +DCAE_OS_KEYSTONE_URL: "http://10.1.1.5:5000" +DCAE_OS_USERNAME: "nso" +DCAE_OS_PASSWORD: "Password" +DCAE_OS_TENANT_NAME: "nso-rancher" +DCAE_OS_TENANT_ID: "21ca0f4c2239475fb1b4b499399163e" +DCAE_OS_REGION: "RegionOne" +# --- + +# We need to provide the config of the public network here, because the DCAE VMs will be +# assigned a floating IP on this network so one can access them, to debug for instance. +# The ID of the public network. +DCAE_OS_PUBLIC_NET_ID: "d7567c9e-d26d-444d-9e1b-ffeb752e583a" +# The name of the public network. +DCAE_OS_PUBLIC_NET_NAME: "vlan200_net_ext" +# This is the private network that will be used by DCAE VMs. The network will be created during the DCAE boostrap process, +# and will the subnet created will use this CIDR. (/28 provides 16 IPs, DCAE requires 15.) +DCAE_OS_OAM_NETWORK_CIDR: "10.99.0.0/28" +# This will be the private ip of the DCAE boostrap VM. This VM is responsible for spinning up the whole DCAE stack (14 VMs total) +DCAE_IP_ADDR: "10.99.0.2" + +# The flavors' name to be used by DCAE VMs +DCAE_OS_FLAVOR_SMALL: "m1.small" +DCAE_OS_FLAVOR_MEDIUM: "m1.medium" +DCAE_OS_FLAVOR_LARGE: "m1.large" +# The images' name to be used by DCAE VMs +DCAE_OS_UBUNTU_14_IMAGE: "trusty" +DCAE_OS_UBUNTU_16_IMAGE: "xenial" +DCAE_OS_CENTOS_7_IMAGE: "centos-7" + +# This is the keypair that will be created in OpenStack, and that one can use to access DCAE VMs using ssh. +# The private key needs to be in a specific format so at the end of the process, it's formatted properly # when ending up in the DCAE HEAT stack. The best way is to do the following: # - copy paste your key # - surround it with quote # - add \n at the end of each line # - escape the result using https://www.freeformatter.com/java-dotnet-escape.html#ad-output -OPENSTACK_KEY_NAME: "onap_key" -OPENSTACK_PUB_KEY: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7G5MqLJvkchuD/YGS/lUlTXXkPqdBLz8AhF/Dosln4YpVg9oD2X2fH2Nxs6Gz0wjB6w1pIqQm7ypz3kk2920PiRV2W1L0/mTF/9Wmi9ReVJzkC6VoBxL20MhRi0dx/Wxg4vmbAT4NGk+8ufqA45oFB6l0bQIdtmjzZH/WZFVB+rc1CtX6Ia0hrMyeLbzLM7IzLdVeb411hxumsQ1N0L4dQWY0E1SeynS2azQNU61Kbxjmm4b89Kw/y9iNW9GdFUodOFWbhK8XU/duSLS+NpoQ/kPJXuBzgPFCy6B7DCJhqZ20j0oXGPqZzXcKApZUJdgeLGML3q4DyiNkXAP4okaN Generated-by-Nova" -OPENSTACK_PRIVATE_K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o7VEJVBgUhWccHKbBo0dB26VOic8xtUI/pDWeR9ryEMCgYEA10M6\\n\r\nrgFhvb4fleS0bzMe+Yv7YsbvEWeHDEgO060n050eIpcvrDtpnc4ag1BFKy9MSqnY\\n\r\n4VUIjIWI9i5Gq7rwxahduJfH/MgjagLtSmvIXA2uYni7unOKarqq75Nko9NG93b7\\n\r\np0nRKxFMm2hCVL7/gy6KzEuLkUhtok8+HOc3cO8CgYEAt/Fs9cvOguP6xNPYhEgz\\n\r\nW1J6HQDxlkU6XHZ5CPZtJ9og6MsIRZdR2tuZK9c5IBYKm0NjSxiTHfF6J4BbKdHf\\n\r\nPMq1ZNj+2JB9TLkVOwKLIAOmUMEfUJIsU4UnjFx9FEpjUfFmg/INrc1vpQUYYjIE\\n\r\n7T/c3FXTSAqThNz2buoqj0ECgYEAx9TiWXxw5vrjSXw5wG0dmR3I7aatcmPAK7eN\\n\r\nBBZfvYPC4Oum1uWEo3kchcBzpaZP1ZQdAPm2aPTh8198PZnaQDOPZXiJr/F/Zr92\\n\r\n1zp9km8k7scTxv/RhEjrvGIA8FCHNd1fuqm9IpT5n99GjHOOsZH4SbTryKALHr0f\\n\r\ndSd0AUMCgYEAi36u1D0Ht40WgGHp+T8AVaYHnXvx+IlH2EXqMDwwv0aINOcHfsUG\\n\r\nG7OrxyJAVaEgwtxgskS7LLp9ANvccyI+F9KLZbBoe2aYcCHjWdtvnc9bJUUs+ERk\\n\r\nJpJwR9NyQ5iObsnAEebILOLP+4yLGAxBz18ZvTRrSz1To456+EO+E+k=\\n\r\n-----END RSA PRIVATE KEY-----\\n\" - -# This settings allows one to configure the /etc/resolv.conf nameserver resolution for all the DCAE VMs. +# This below settings allows one to configure the /etc/resolv.conf nameserver resolution for all the DCAE VMs. # - -# In the HEAT setup, it's meant to be a list, as the HEAT setup deploys a DNS Server VM in addition to DNS Designate +# In the HEAT setup, it's meant to be a DNS list, as the HEAT setup deploys a DNS Server VM in addition to DNS Designate # and this DNS Server is setup to forward request to the DNS Designate backend when it cannot resolve, hence the # DNS_FORWARDER config here. The DCAE Boostrap requires both inputs, even though they are now similar, we have to pass # them. @@ -84,23 +128,31 @@ OPENSTACK_PRIVATE_KEY: \"-----BEGIN RSA PRIVATE KEY-----\\n\r\nMIIEpQIBAAKCAQEAu # ATTENTION: Assumption is made the DNS Designate backend is configure to forward request to a public DNS (e.g. 8.8.8.8) # - # Put the IP of the DNS Designate backend (e.g. the OpenStack IP supporting DNS Designate) -DNS_LIST : "10.195.194.16" -DNS_FORWARDER: "10.195.194.16" +DNS_IP : "10.1.1.16" +DNS_FORWARDER: "10.1.1.16" -# Do not change - Public DNS - not used but required by the DCAE boostrap container +# Public DNS - not used but required by the DCAE boostrap container EXTERNAL_DNS: "8.8.8.8" -# Proxy DNS Designate is only supportted for windriver-multicloud adapter (limitation from DCAE) -# Set to true if you wish to use it (e.g. Integration lab) -DNSAAS_PROXY_ENABLE: "false" +# DNS domain for the DCAE VMs +DCAE_DOMAIN: "dcaeg2.onap.org" -# Possibility to have DNS Designate installed in another OpenStack, if not, provide the same values -# as the OPENSTACK_* ones above. +# Proxy DNS Designate. This means DCAE will run in an instance not support Designate, and Designate will be provided by another instance. +# Set to true if you wish to use it +DNSAAS_PROXY_ENABLE: "true" +# Provide this only if DNSAAS_PROXY_ENABLE set to true. The IP has to be the IP of one of the K8S hosts. +DCAE_PROXIED_KEYSTONE_URL: "http://10.1.1.15/api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0" + +# -----------------------------------------------------# +# OpenStack Config on which DNS Designate is supported # +# -----------------------------------------------------# + +# If this is the same OpenStack used for the VNF or DCAE, please re-enter the values here. + +DNSAAS_API_VERSION: "v2.0" DNSAAS_REGION: "RegionOne" -DNSAAS_KEYSTONE_URL: "http://10.195.194.216:5000/v2.0" +DNSAAS_KEYSTONE_URL: "http://10.1.1.2:5000" +DNSAAS_TENANT_ID: "5c59f02201d54aa89aff2207f7be2c1" DNSAAS_TENANT_NAME: "nso-rancher" DNSAAS_USERNAME: "nso" -DNSAAS_PASSWORD: "Password123" - -# DNS domain for the DCAE VMs -DCAE_DOMAIN: "dcaeg2.onap.org" +DNSAAS_PASSWORD: "Password"
\ No newline at end of file diff --git a/kubernetes/config/onap-parameters.yaml b/kubernetes/config/onap-parameters.yaml index 11813fff50..0e5031f5ea 100644 --- a/kubernetes/config/onap-parameters.yaml +++ b/kubernetes/config/onap-parameters.yaml @@ -10,73 +10,117 @@ NEXUS_DOCKER_REPO: nexus3.onap.org:10001 NEXUS_USERNAME: docker NEXUS_PASSWORD: docker -# Networking -OPENSTACK_PUBLIC_NET_ID: "" -OPENSTACK_PUBLIC_NET_NAME: "" -# Could be reduced, it needs 15 IPs for DCAE VMs -OPENSTACK_OAM_NETWORK_CIDR: "" +# ONAP config +# Do not change unless you know what you're doing +DMAAP_TOPIC: "AUTO" +DEMO_ARTIFACTS_VERSION: "1.1.1" + +# ------------------------------------------------# +# OpenStack Config on which VNFs will be deployed # +# ------------------------------------------------# + +# The four below parameters are only used by Robot. +# As Robot is able to perform some automated actions, +# e.g. onboard/distribute/instantiate, it has to be +# configured with four below parameters (in addition +# to the OPENSTACK ones). +# If you don't intend to use Robot for those actions, +# you can put dummy values, but you will have to provide +# those values when deploying VNF anyway. +# -------------------------------------------------- +# This is the OAM Network ID used for internal network by VNFs. +# You could create 10.10.10.0/24 (256 IPs should be enough) in your cloud instance. +OPENSTACK_OAM_NETWORK_ID: "" +# This is the public Network ID. Public = external network in OpenStack. +# Floating IPs will be created and assigned to VNFs from this network, +# to provide external reachability. +OPENSTACK_PUBLIC_NETWORK_ID: "" +# VM Flavor to be used by VNF. +OPENSTACK_FLAVOR: "" +# VM image to be used by VNF. Here ubuntu 14.04 is provided. +OPENSTACK_IMAGE: "" -# Authentication OPENSTACK_USERNAME: "" -OPENSTACK_API_KEY: "" +OPENSTACK_PASSWORD: "" OPENSTACK_TENANT_NAME: "" OPENSTACK_TENANT_ID: "" OPENSTACK_REGION: "" # Either v2.0 or v3 OPENSTACK_API_VERSION: "" OPENSTACK_KEYSTONE_URL: "" +# Don't change this if you don't know what it is OPENSTACK_SERVICE_TENANT_NAME: "service" -# Flavors's name -OPENSTACK_FLAVOUR_SMALL: "m1.small" -OPENSTACK_FLAVOUR_MEDIUM: "m1.medium" -OPENSTACK_FLAVOUR_LARGE: "m1.large" - -# Images' name -OPENSTACK_UBUNTU_14_IMAGE: "trusty" -OPENSTACK_UBUNTU_16_IMAGE: "xenial" -OPENSTACK_CENTOS_7_IMAGE: "centos-7" - -# ONAP config -# Do not change unless you know what you're doing -DMAAP_TOPIC: "AUTO" -DEMO_ARTIFACTS_VERSION: "1.1.1" - - ######## # DCAE # ######## # Whether or not to deploy DCAE -# If set to false, all the parameters bellow can be left empty or removed +# If set to false, all the parameters below can be left empty or removed # If set to false, update ../dcaegen2/values.yaml disableDcae value to true, # this is to avoid deploying the DCAE deployments and services. DEPLOY_DCAE: "true" - -# Config -# Do not change unless you know what you're doing +# DCAE Config DCAE_DOCKER_VERSION: v1.1.1 DCAE_VM_BASE_NAME: "dcae" -DCAE_IP_ADDR: "10.0.4.1" -# Can be the same as OPENSTACK_KEYSTONE_URL/OPENSTACK_API_VERSION -DCAE_KEYSTONE_URL: "" +# ------------------------------------------------# +# OpenStack Config on which DCAE will be deployed # +# ------------------------------------------------# -# The private key needs to be in a specific format so it's formatted properly +# Whether to have DCAE deployed on the same OpenStack instance on which VNF will be deployed. +# (e.g. re-use the same config as defined above) +# If set to true, discard the next config block, else provide the values. +IS_SAME_OPENSTACK_AS_VNF: "false" + +# Fill in the values in below block only if IS_SAME_OPENSTACK_AS_VNF set to "false" +# --- +# Either v2.0 or v3 +DCAE_OS_API_VERSION: "" +DCAE_OS_KEYSTONE_URL: "" +DCAE_OS_USERNAME: "" +DCAE_OS_PASSWORD: "" +DCAE_OS_TENANT_NAME: "" +DCAE_OS_TENANT_ID: "" +DCAE_OS_REGION: "" +# --- + +# We need to provide the config of the public network here, because the DCAE VMs will be +# assigned a floating IP on this network so one can access them, to debug for instance. +# The ID of the public network. +DCAE_OS_PUBLIC_NET_ID: "" +# The name of the public network. +DCAE_OS_PUBLIC_NET_NAME: "" +# This is the private network that will be used by DCAE VMs. The network will be created during the DCAE boostrap process, +# and will the subnet created will use this CIDR. (/28 provides 16 IPs, DCAE requires 15.) +DCAE_OS_OAM_NETWORK_CIDR: "10.99.0.0/28" +# This will be the private ip of the DCAE boostrap VM. This VM is responsible for spinning up the whole DCAE stack (14 VMs total) +DCAE_IP_ADDR: "10.99.0.2" + +# The flavors' name to be used by DCAE VMs +DCAE_OS_FLAVOR_SMALL: "" +DCAE_OS_FLAVOR_MEDIUM: "" +DCAE_OS_FLAVOR_LARGE: "" +# The images' name to be used by DCAE VMs +DCAE_OS_UBUNTU_14_IMAGE: "" +DCAE_OS_UBUNTU_16_IMAGE: "" +DCAE_OS_CENTOS_7_IMAGE: "" + +# This is the keypair that will be created in OpenStack, and that one can use to access DCAE VMs using ssh. +# The private key needs to be in a specific format so at the end of the process, it's formatted properly # when ending up in the DCAE HEAT stack. The best way is to do the following: # - copy paste your key # - surround it with quote # - add \n at the end of each line # - escape the result using https://www.freeformatter.com/java-dotnet-escape.html#ad-output -OPENSTACK_KEY_NAME: "onap_key" -OPENSTACK_PUB_KEY: "" -OPENSTACK_PRIVATE_KEY: "" +DCAE_OS_KEY_NAME: "onap_key" +DCAE_OS_PUB_KEY: "" +DCAE_OS_PRIVATE_KEY: "" - -# This settings allows one to configure the /etc/resolv.conf nameserver resolution for all the DCAE VMs. +# This below settings allows one to configure the /etc/resolv.conf nameserver resolution for all the DCAE VMs. # - -# In the HEAT setup, it's meant to be a list, as the HEAT setup deploys a DNS Server VM in addition to DNS Designate +# In the HEAT setup, it's meant to be a DNS list, as the HEAT setup deploys a DNS Server VM in addition to DNS Designate # and this DNS Server is setup to forward request to the DNS Designate backend when it cannot resolve, hence the # DNS_FORWARDER config here. The DCAE Boostrap requires both inputs, even though they are now similar, we have to pass # them. @@ -84,23 +128,32 @@ OPENSTACK_PRIVATE_KEY: "" # ATTENTION: Assumption is made the DNS Designate backend is configure to forward request to a public DNS (e.g. 8.8.8.8) # - # Put the IP of the DNS Designate backend (e.g. the OpenStack IP supporting DNS Designate) -DNS_LIST : "" +DNS_IP : "" DNS_FORWARDER: "" -# Do not change - Public DNS - not used but required by the DCAE boostrap container +# Public DNS - not used but required by the DCAE boostrap container EXTERNAL_DNS: "8.8.8.8" -# Proxy DNS Designate is only supportted for windriver-multicloud adapter (limitation from DCAE) -# Set to true if you wish to use it (e.g. Integration lab) +# DNS domain for the DCAE VMs +DCAE_DOMAIN: "dcaeg2.onap.org" + +# Proxy DNS Designate. This means DCAE will run in an instance not support Designate, and Designate will be provided by another instance. +# Set to true if you wish to use it DNSAAS_PROXY_ENABLE: "false" +# Provide this only if DNSAAS_PROXY_ENABLE set to true. The IP has to be the IP of one of the K8S hosts. +# e.g. http://10.195.197.164/api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0 +DCAE_PROXIED_KEYSTONE_URL: "" + +# -----------------------------------------------------# +# OpenStack Config on which DNS Designate is supported # +# -----------------------------------------------------# + +# If this is the same OpenStack used for the VNF or DCAE, please re-enter the values here. -# Possibility to have DNS Designate installed in another OpenStack, if not, provide the same values -# as the OPENSTACK_* ones above. +DNSAAS_API_VERSION: "" DNSAAS_REGION: "" DNSAAS_KEYSTONE_URL: "" -DNSAAS_TENANT_NAME: "n" +DNSAAS_TENANT_ID: "" +DNSAAS_TENANT_NAME: "" DNSAAS_USERNAME: "" -DNSAAS_PASSWORD: "" - -# DNS domain for the DCAE VMs -DCAE_DOMAIN: "dcaeg2.onap.org" +DNSAAS_PASSWORD: ""
\ No newline at end of file |