Merge "Refactor k8s VM init script to use cloud-init"
diff --git a/deployment/heat/onap-oom/env/tlab/onap-oom.env b/deployment/heat/onap-oom/env/tlab/onap-oom.env
index 5ff2e5d..04fa44d 100644
--- a/deployment/heat/onap-oom/env/tlab/onap-oom.env
+++ b/deployment/heat/onap-oom/env/tlab/onap-oom.env
@@ -22,8 +22,8 @@
pullPolicy: IfNotPresent
robot:
flavor: large
- appcUsername: "admin"
- appcPassword: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+ appcUsername: "appc@appc.onap.org"
+ appcPassword: "demo123456!"
openStackKeyStoneUrl: "https://bdc1tlab01.research.att.com:5000"
openStackPublicNetId: "__oam_network_id__" # NOTE: for TLAB, openStackPublicNetId needs to be oam_network_id instead of public_net_id
openStackTenantId: "${OS_PROJECT_ID}"
@@ -51,7 +51,6 @@
replicaCount: 3
config:
enableClustering: true
- enableAAF: false
openStackType: "OpenStackProvider"
openStackName: "OpenStack"
openStackKeyStoneUrl: "https://bdc1tlab01.research.att.com:5000/v2.0"
@@ -59,8 +58,6 @@
openStackDomain: "${OS_USER_DOMAIN_NAME}"
openStackUserName: "${OS_USERNAME}"
openStackEncryptedPassword: "${OS_PASSWORD}"
- odlUser: admin
- odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
sdnc:
replicaCount: 3
config:
diff --git a/deployment/heat/onap-oom/env/windriver/onap-oom.env b/deployment/heat/onap-oom/env/windriver/onap-oom.env
index 300c80b..15819ff 100644
--- a/deployment/heat/onap-oom/env/windriver/onap-oom.env
+++ b/deployment/heat/onap-oom/env/windriver/onap-oom.env
@@ -22,8 +22,8 @@
pullPolicy: IfNotPresent
robot:
flavor: large
- appcUsername: "admin"
- appcPassword: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+ appcUsername: "appc@appc.onap.org"
+ appcPassword: "demo123456!"
openStackKeyStoneUrl: "http://10.12.25.2:5000"
openStackPublicNetId: "__public_net_id__"
openStackTenantId: "${OS_PROJECT_ID}"
@@ -52,7 +52,6 @@
replicaCount: 3
config:
enableClustering: true
- enableAAF: false
openStackType: "OpenStackProvider"
openStackName: "OpenStack"
openStackKeyStoneUrl: "http://10.12.25.2:5000/v2.0"
@@ -60,8 +59,6 @@
openStackDomain: "${OS_USER_DOMAIN_NAME}"
openStackUserName: "${OS_USERNAME}"
openStackEncryptedPassword: "${OS_PASSWORD}"
- odlUser: admin
- odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
sdnc:
replicaCount: 3
config:
diff --git a/test/vcpe/vcpecommon.py b/test/vcpe/vcpecommon.py
index 23d4a33..f5e1b30 100755
--- a/test/vcpe/vcpecommon.py
+++ b/test/vcpe/vcpecommon.py
@@ -19,17 +19,17 @@
external_net_prefix_len = 16
#############################################################################################
# set the openstack cloud access credentials here
- oom_mode = False
+ oom_mode = True
cloud = {
'--os-auth-url': 'http://10.12.25.2:5000',
'--os-username': 'kxi',
'--os-user-domain-id': 'default',
'--os-project-domain-id': 'default',
- '--os-tenant-id': '41d6d38489bd40b09ea8a6b6b852dcbd' if oom_mode else '1e097c6713e74fd7ac8e4295e605ee1e',
+ '--os-tenant-id': 'b8ad3842ab3642f7bf3fbe4e4d3b9f86' if oom_mode else '1e097c6713e74fd7ac8e4295e605ee1e',
'--os-region-name': 'RegionOne',
'--os-password': 'n3JhGMGuDzD8',
- '--os-project-domain-name': 'Integration-SB-00' if oom_mode else 'Integration-SB-07',
+ '--os-project-domain-name': 'Integration-SB-05' if oom_mode else 'Integration-SB-07',
'--os-identity-api-version': '3'
}
@@ -39,12 +39,8 @@
'public_net': 'external',
'public_net_id': '971040b2-7059-49dc-b220-4fab50cb2ad4'
}
-# for sb07
-# 'oam_onap_lAky',
-# for sb00
- #'oam_onap_net': 'oam_network_0qV7',
- #'oam_onap_subnet': 'oam_network_0qV7',
- # End: configurations that you must change for a new ONAP installation
+ sdnc_controller_pod = 'dev-sdnc-sdnc-0'
+
#############################################################################################
template_variable_symbol = '${'
@@ -72,7 +68,7 @@
self.logger.info('Initializing configuration')
# OOM: this is the address that the brg and bng will nat for config of brg - 10.0.0.x address of k8 host for sdnc
- self.sdnc_brg_bng_ip = '10.0.0.17'
+ self.sdnc_brg_bng_ip = self.get_pod_node_oam_ip(self.sdnc_controller_pod)[1]
# OOM: this is a k8 host external IP
self.oom_so_sdnc_aai_ip = '10.12.5.18'
# OOM: this is a k8 host external IP can be same as oom_so_sdnc_aai_ip
@@ -321,6 +317,17 @@
return str(ip)
return None
+ def get_pod_node_oam_ip(self, pod):
+ """
+ :Assuming kubectl is available
+ :param pod: pod name as a string, e.g. 'dev-sdnc-sdnc-0'
+ :return pod's node oam ip (10.0.0.0/16)
+ """
+ cmd = "kubectl -n onap describe pod {0} |grep Node:|cut -d'/' -f2".format(pod)
+ ret = commands.getstatusoutput(cmd)
+ self.logger.debug("cmd = %s, ret = %s", cmd, ret)
+ return ret
+
def get_vm_ip(self, keywords, net_addr=None, net_addr_len=None):
"""
:param keywords: list of keywords to search for vm, e.g. ['bng', 'gmux', 'brg']