diff options
-rw-r--r-- | boot/dcae_install.sh | 44 | ||||
-rw-r--r-- | heat/OpenECOMP/onap_openstack_RC.env | 11 | ||||
-rw-r--r-- | heat/OpenECOMP/onap_openstack_RC.yaml | 56 | ||||
-rw-r--r-- | heat/OpenECOMP/onap_rackspace_RC.env | 14 | ||||
-rw-r--r-- | heat/OpenECOMP/onap_rackspace_RC.yaml | 73 |
5 files changed, 164 insertions, 34 deletions
diff --git a/boot/dcae_install.sh b/boot/dcae_install.sh index 933fb2c6..74336817 100644 --- a/boot/dcae_install.sh +++ b/boot/dcae_install.sh @@ -7,6 +7,8 @@ DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt) +BASE=$(cat /opt/config/dcae_base_environment.txt) +PUBLIC_NET_ID=$(cat /opt/config/public_net_id.txt) ZONE=$(cat /opt/config/dcae_zone.txt) STATE=$(cat /opt/config/dcae_state.txt) HORIZON_URL=$(cat /opt/config/horizon_url.txt) @@ -14,6 +16,7 @@ OPENSTACK_USER=$(cat /opt/config/openstack_user.txt) OPENSTACK_PASSWORD=$(cat /opt/config/openstack_password.txt) OPENSTACK_KEYNAME=$(cat /opt/config/key_name.txt)"_"$(cat /opt/config/rand_str.txt)"_dcae" OPENSTACK_PUBKEY=$(cat /opt/config/pub_key.txt) +OPENSTACK_AUTH_METHOD=$(cat /opt/config/openstack_auth_method.txt) KEYSTONE_URL=$(cat /opt/config/keystone_url.txt) OPENSTACK_TENANT_ID=$(cat /opt/config/tenant_id.txt) OPENSTACK_TENANT_NAME=OPEN-ECOMP @@ -27,16 +30,25 @@ NEXUS_URL_SNAPSHOTS=$(cat /opt/config/nexus_url_snapshots.txt) DOCKER_REGISTRY=$(cat /opt/config/nexus_docker_repo.txt) DCAE_CODE_VERSION=$(cat /opt/config/dcae_code_version.txt) -DCAE_COLL_FLOAT_IP=$(cat /opt/config/dcae_coll_float_ip.txt) -DCAE_DB_FLOAT_IP=$(cat /opt/config/dcae_db_float_ip.txt) -DCAE_HDP1_FLOAT_IP=$(cat /opt/config/dcae_hdp1_float_ip.txt) -DCAE_HDP2_FLOAT_IP=$(cat /opt/config/dcae_hdp2_float_ip.txt) -DCAE_HDP3_FLOAT_IP=$(cat /opt/config/dcae_hdp3_float_ip.txt) +DCAE_IP_ADDR=$(cat /opt/config/dcae_ip_addr.txt) +DCAE_COLL_IP_ADDR=$(cat /opt/config/dcae_coll_ip_addr.txt) +DCAE_DB_IP_ADDR=$(cat /opt/config/dcae_db_ip_addr.txt) +DCAE_HDP1_IP_ADDR=$(cat /opt/config/dcae_hdp1_ip_addr.txt) +DCAE_HDP2_IP_ADDR=$(cat /opt/config/dcae_hdp2_ip_addr.txt) +DCAE_HDP3_IP_ADDR=$(cat /opt/config/dcae_hdp3_ip_addr.txt) -# Add host name to /etc/host to avoid warnings in openstack images if [[ $CLOUD_ENV == "openstack" ]] then + # Add host name to /etc/host to avoid warnings in openstack images echo 127.0.0.1 $(hostname) >> /etc/hosts + + # Read floating IP mapping + DCAE_FLOAT_IP_ADDR=$(cat /opt/config/dcae_float_ip.txt) + DCAE_COLL_FLOAT_IP=$(cat /opt/config/dcae_coll_float_ip.txt) + DCAE_DB_FLOAT_IP=$(cat /opt/config/dcae_db_float_ip.txt) + DCAE_HDP1_FLOAT_IP=$(cat /opt/config/dcae_hdp1_float_ip.txt) + DCAE_HDP2_FLOAT_IP=$(cat /opt/config/dcae_hdp2_float_ip.txt) + DCAE_HDP3_FLOAT_IP=$(cat /opt/config/dcae_hdp3_float_ip.txt) fi # Download dependencies @@ -70,10 +82,11 @@ resolvconf -u cd /opt git clone -b $GERRIT_BRANCH --single-branch http://gerrit.onap.org/r/dcae/demo/startup/controller.git dcae-startup-vm-controller -# Build a configuration file for the DCAE Controller +# Build a configuration file for the DCAE Controller. The floating IP block is used in OpenStack only and is empty for other environments cd /opt/dcae-startup-vm-controller mkdir -p /opt/app/dcae-controller cat > /opt/app/dcae-controller/config.yaml << EOF_CONFIG +BASE: $BASE ZONE: $ZONE STATE: $STATE DCAE-VERSION: $DCAE_CODE_VERSION @@ -85,6 +98,7 @@ OPENSTACK-REGION: $OPENSTACK_REGION OPENSTACK-PRIVATE-NETWORK: $OPENSTACK_PRIVATE_NETWORK OPENSTACK-USER: $OPENSTACK_USER OPENSTACK-PASSWORD: $OPENSTACK_PASSWORD +OPENSTACK-AUTH-METHOD: $OPENSTACK_AUTH_METHOD OPENSTACK-KEYNAME: $OPENSTACK_KEYNAME OPENSTACK-PUBKEY: $OPENSTACK_PUBKEY @@ -97,6 +111,22 @@ NEXUS-RAWURL: $NEXUS_REPO DOCKER-REGISTRY: $DOCKER_REGISTRY GIT-MR-REPO: http://gerrit.onap.org/r/dcae/demo/startup/message-router.git + +public_net_id: $PUBLIC_NET_ID +dcae_ip_addr: $DCAE_IP_ADDR +dcae_pstg00_ip_addr: $DCAE_DB_IP_ADDR +dcae_coll00_ip_addr: $DCAE_COLL_IP_ADDR +dcae_cdap00_ip_addr: $DCAE_HDP1_IP_ADDR +dcae_cdap01_ip_addr: $DCAE_HDP2_IP_ADDR +dcae_cdap02_ip_addr: $DCAE_HDP3_IP_ADDR + +dcae_float_ip_addr: $DCAE_FLOAT_IP_ADDR +dcae_pstg00_float_ip_addr: $DCAE_DB_FLOAT_IP +dcae_coll00_float_ip_addr: $DCAE_COLL_FLOAT_IP +dcae_cdap00_float_ip_addr: $DCAE_HDP1_FLOAT_IP +dcae_cdap01_float_ip_addr: $DCAE_HDP2_FLOAT_IP +dcae_cdap02_float_ip_addr: $DCAE_HDP3_FLOAT_IP + EOF_CONFIG # Run docker containers diff --git a/heat/OpenECOMP/onap_openstack_RC.env b/heat/OpenECOMP/onap_openstack_RC.env index 7857b31e..5a14e877 100644 --- a/heat/OpenECOMP/onap_openstack_RC.env +++ b/heat/OpenECOMP/onap_openstack_RC.env @@ -48,6 +48,8 @@ parameters: openstack_api_key: PUT YOUR OPENSTACK PASSWORD HERE + openstack_auth_method: password + horizon_url: PUT THE HORIZON URL HERE keystone_url: PUT THE KEYSTONE URL HERE @@ -90,6 +92,11 @@ parameters: aai_ip_addr: 10.0.1.1 appc_ip_addr: 10.0.2.1 dcae_ip_addr: 10.0.4.1 + dcae_coll_ip_addr: 10.0.4.102 + dcae_db_ip_addr: 10.0.4.101 + dcae_hdp1_ip_addr: 10.0.4.103 + dcae_hdp2_ip_addr: 10.0.4.104 + dcae_hdp3_ip_addr: 10.0.4.105 dns_ip_addr: 10.0.100.1 mso_ip_addr: 10.0.5.1 mr_ip_addr: 10.0.11.1 @@ -106,11 +113,13 @@ parameters: # # ########################### + dcae_base_environment: 2-NIC + dcae_zone: ZONE dcae_state: STATE - nexus_repo_root: https://nexus.onap.org + nexus_repo_root: https://nexus.onap.org nexus_url_snapshot: https://nexus.onap.org/content/repositories/snapshots diff --git a/heat/OpenECOMP/onap_openstack_RC.yaml b/heat/OpenECOMP/onap_openstack_RC.yaml index 6a296d22..cf1c8645 100644 --- a/heat/OpenECOMP/onap_openstack_RC.yaml +++ b/heat/OpenECOMP/onap_openstack_RC.yaml @@ -87,7 +87,7 @@ parameters: dmaap_topic: type: string - description: DmaaP Topic name + description: DMaaP Topic name openstack_tenant_id: type: string @@ -97,6 +97,10 @@ parameters: type: string description: Openstack username + openstack_auth_method: + type: string + description: Openstack authentication method (password VS. api-key) + openstack_api_key: type: string description: Openstack API Key @@ -126,7 +130,7 @@ parameters: ### Floating IP addresses ### aai_float_ip: type: string - description: A&AI Floating IP Address + description: AAI Floating IP Address appc_float_ip: type: string @@ -199,7 +203,7 @@ parameters: aai_ip_addr: type: string - description: A&AI IP Address + description: AAI IP Address appc_ip_addr: type: string @@ -208,6 +212,26 @@ parameters: dcae_ip_addr: type: string description: DCAE IP Address + + dcae_coll_ip_addr: + type: string + description: DCAE Collector IP Address + + dcae_db_ip_addr: + type: string + description: DCAE Database IP Address + + dcae_hdp1_ip_addr: + type: string + description: Hadoop VM1 IP Address + + dcae_hdp2_ip_addr: + type: string + description: Hadoop VM2 IP Address + + dcae_hdp3_ip_addr: + type: string + description: Hadoop VM3 IP Address dns_ip_addr: type: string @@ -251,7 +275,11 @@ parameters: # Parameters used by DCAE # # # ########################### - + + dcae_base_environment: + type: string + description: DCAE Base Environment configuration (RACKSPACE/2-NIC/...) + dcae_zone: type: string description: DCAE Zone to use in VM names created by DCAE controller @@ -1000,6 +1028,7 @@ resources: __openstack_private_network_name__: { get_attr: [oam_ecomp, name] } __openstack_user__: { get_param: openstack_username } __openstack_password__: { get_param: openstack_api_key } + __openstack_auth_method__: { get_param: openstack_auth_method } __key_name__: { get_param: key_name } __rand_str__: { get_resource: random-str } __pub_key__: { get_param: pub_key } @@ -1011,6 +1040,15 @@ resources: __gerrit_branch__: { get_param: gerrit_branch } __dcae_code_version__: { get_param: dcae_code_version } __cloud_env__: { get_param: cloud_env } + __public_net_id__: { get_param: public_net_id } + __dcae_base_environment__: { get_param: dcae_base_environment } + __dcae_ip_addr__: { get_param: dcae_ip_addr } + __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr } + __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr } + __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr } + __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr } + __dcae_hdp3_ip_addr__: { get_param: dcae_hdp2_ip_addr } + __dcae_float_ip__: { get_param: dcae_float_ip } __dcae_coll_float_ip__: { get_param: dcae_coll_float_ip } __dcae_db_float_ip__: { get_param: dcae_db_float_ip } __dcae_hdp1_float_ip__: { get_param: dcae_hdp1_float_ip } @@ -1037,6 +1075,7 @@ resources: echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt echo "__openstack_user__" > /opt/config/openstack_user.txt echo "__openstack_password__" > /opt/config/openstack_password.txt + echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt echo "__key_name__" > /opt/config/key_name.txt echo "__rand_str__" > /opt/config/rand_str.txt echo "__pub_key__" > /opt/config/pub_key.txt @@ -1045,7 +1084,16 @@ resources: echo "__horizon_url__" > /opt/config/horizon_url.txt echo "__keystone_url__" > /opt/config/keystone_url.txt echo "__cloud_env__" > /opt/config/cloud_env.txt + echo "__public_net_id__" > /opt/config/public_net_id.txt + echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt + echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt + echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt + echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt + echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt + echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt + echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt + echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt echo "__dcae_coll_float_ip__" > /opt/config/dcae_coll_float_ip.txt echo "__dcae_db_float_ip__" > /opt/config/dcae_db_float_ip.txt echo "__dcae_hdp1_float_ip__" > /opt/config/dcae_hdp1_float_ip.txt diff --git a/heat/OpenECOMP/onap_rackspace_RC.env b/heat/OpenECOMP/onap_rackspace_RC.env index 87cef33e..3a148ac9 100644 --- a/heat/OpenECOMP/onap_rackspace_RC.env +++ b/heat/OpenECOMP/onap_rackspace_RC.env @@ -24,6 +24,8 @@ parameters: openstack_password: INSERT YOUR PASSWORD HERE + openstack_auth_method: api-key + dmaap_topic: AUTO artifacts_version: 1.1.0-SNAPSHOT @@ -37,6 +39,8 @@ parameters: # Parameters for DCAE instantiation + dcae_base_environment: 2-NIC + dcae_zone: iad4 dcae_state: vi @@ -50,3 +54,13 @@ parameters: gitlab_branch: master dcae_code_version: 1.0.0 + + + # IP Address of DCAE VMs + + dcae_ip_addr: 10.0.4.1 + dcae_coll_ip_addr: 10.0.4.102 + dcae_db_ip_addr: 10.0.4.101 + dcae_hdp1_ip_addr: 10.0.4.103 + dcae_hdp2_ip_addr: 10.0.4.104 + dcae_hdp3_ip_addr: 10.0.4.105
\ No newline at end of file diff --git a/heat/OpenECOMP/onap_rackspace_RC.yaml b/heat/OpenECOMP/onap_rackspace_RC.yaml index 317023e1..9dd8c19b 100644 --- a/heat/OpenECOMP/onap_rackspace_RC.yaml +++ b/heat/OpenECOMP/onap_rackspace_RC.yaml @@ -7,77 +7,66 @@ parameters: # Generic parameters used across all ONAP components public_net_id: type: string - label: Public network name or ID description: Public network that enables remote connection to the compute instance key_name: type: string - label: Key pair name description: Public/Private key pair name pub_key: type: string - label: Public key description: Public key or SSL certificate to be installed on the compute instance nexus_repo: type: string - label: Nexus Repository description: Complete URL for the Nexus repository. nexus_docker_repo: type: string - label: Nexus Docker Images Repository description: Complete URL for the Nexus repository for docker images. nexus_username: type: string - label: Nexus Repository Username description: Nexus Repository username nexus_password: type: string - label: Nexus Repository Password description: Nexus Repository Password openstack_tenant_id: type: string - label: Rackspace tenant ID description: Rackspace tenant ID openstack_username: type: string - label: Rackspace username description: Rackspace username openstack_api_key: type: string - label: Rackspace API Key description: Rackspace API Key openstack_password: type: string - label: Rackspace Password description: Rackspace Password + openstack_auth_method: + type: string + description: Openstack authentication method (password VS. api-key) + dmaap_topic: type: string - label: DmaaP Topic - description: DmaaP Topic that MSO and A&AI listen to + description: DMaaP topic name artifacts_version: type: string - label: Artifacts Version description: Artifacts version of ONAP components docker_version: type: string - label: Docker Version description: Docker version of ONAP docker images gerrit_branch: type: string - label: Gerrit code branch description: Gerrit branch where to download the code from cloud_env: @@ -86,40 +75,62 @@ parameters: # Parameters for DCAE instantiation + dcae_base_environment: + type: string + description: DCAE Base Environment configuration (RACKSPACE/2-NIC/...) + dcae_zone: type: string - label: DCAE Zone description: DCAE Zone to use in VM names created by DCAE controller dcae_state: type: string - label: DCAE State description: DCAE State to use in VM names created by DCAE controller nexus_repo_root: type: string - label: Root URL of nexus repository description: Root URL of nexus repository nexus_url_snapshot: type: string - label: Snapshot of Maven repository for DCAE deployment description: Snapshot of Maven repository openstack_region: type: string - label: Rackspace Region description: Rackspace region where the DCAE controller will spin the VMs gitlab_branch: type: string - label: Branch of the Gitlab repository description: Branch of the Gitlab repository dcae_code_version: type: string description: DCAE Code Version Number + dcae_ip_addr: + type: string + description: DCAE IP Address + + dcae_coll_ip_addr: + type: string + description: DCAE Collector IP Address + + dcae_db_ip_addr: + type: string + description: DCAE Database IP Address + + dcae_hdp1_ip_addr: + type: string + description: Hadoop VM1 IP Address + + dcae_hdp2_ip_addr: + type: string + description: Hadoop VM2 IP Address + + dcae_hdp3_ip_addr: + type: string + description: Hadoop VM3 IP Address + resources: random-str: @@ -707,6 +718,7 @@ resources: __openstack_private_network_name__: { get_attr: [oam_ecomp, name] } __openstack_user__: { get_param: openstack_username } __openstack_password__: { get_param: openstack_api_key } + __openstack_auth_method__: { get_param: openstack_auth_method } __key_name__: { get_param: key_name } __rand_str__: { get_resource: random-str } __pub_key__: { get_param: pub_key } @@ -716,6 +728,14 @@ resources: __gerrit_branch__: { get_param: gerrit_branch } __cloud_env__: { get_param: cloud_env } __dcae_code_version__: { get_param: dcae_code_version } + __public_net_id__: { get_param: public_net_id } + __dcae_base_environment__: { get_param: dcae_base_environment } + __dcae_ip_addr__: { get_param: dcae_ip_addr } + __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr } + __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr } + __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr } + __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr } + __dcae_hdp3_ip_addr__: { get_param: dcae_hdp2_ip_addr } template: | #!/bin/bash @@ -737,6 +757,7 @@ resources: echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt echo "__openstack_user__" > /opt/config/openstack_user.txt echo "__openstack_password__" > /opt/config/openstack_password.txt + echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt echo "__key_name__" > /opt/config/key_name.txt echo "__rand_str__" > /opt/config/rand_str.txt echo "__pub_key__" > /opt/config/pub_key.txt @@ -746,6 +767,14 @@ resources: echo "https://identity.api.rackspacecloud.com/v2.0" > /opt/config/keystone_url.txt echo "__cloud_env__" > /opt/config/cloud_env.txt echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt + echo "__public_net_id__" > /opt/config/public_net_id.txt + echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt + echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt + echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt + echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt + echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt + echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt + echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt # Download and run install script curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh |