Add config for ATT TLAB
Change-Id: I31387cbb17db19cd602cc9d4da59a55223996583
Issue-ID: INT-414
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
diff --git a/deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test-openrc b/deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test-openrc
new file mode 100644
index 0000000..564bb86
--- /dev/null
+++ b/deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test-openrc
@@ -0,0 +1,9 @@
+export OS_PROJECT_ID=76b1938dd3b9471fa1ed413a1b212a96
+export OS_PROJECT_NAME=ETE-HEAT-Test
+export OS_USER_DOMAIN_NAME=Default
+#export OS_USERNAME=username
+#export OS_PASSWORD=password
+export OS_AUTH_URL=https://bdc1tlab01.research.att.com:5000/v3
+export OS_IDENTITY_API_VERSION=3
+export OS_REGION_NAME=RegionOne
+export OS_INTERFACE=public
diff --git a/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test-openrc b/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test-openrc
new file mode 100644
index 0000000..48457eb
--- /dev/null
+++ b/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test-openrc
@@ -0,0 +1,9 @@
+export OS_PROJECT_ID=b4062c7fbf9646b8a2bcb71c46695ff3
+export OS_PROJECT_NAME=ETE-OOM-Test
+export OS_USER_DOMAIN_NAME=Default
+#export OS_USERNAME=username
+#export OS_PASSWORD=password
+export OS_AUTH_URL=https://bdc1tlab01.research.att.com:5000/v3
+export OS_IDENTITY_API_VERSION=3
+export OS_REGION_NAME=RegionOne
+export OS_INTERFACE=public
diff --git a/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test.env b/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test.env
new file mode 100644
index 0000000..f56c25b
--- /dev/null
+++ b/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test.env
@@ -0,0 +1,33 @@
+parameters:
+
+ keystone_url: https://bdc1tlab01.research.att.com:5000/v3
+ openstack_tenant_id: b4062c7fbf9646b8a2bcb71c46695ff3
+ openstack_tenant_name: ETE-OOM-Test
+ openstack_username: ${OS_USERNAME}
+ openstack_api_key: ${OS_PASSWORD}
+
+ ubuntu_1404_image: "Ubuntu 14.04 LTS Generic"
+ ubuntu_1604_image: "Ubuntu 16.04 LTS Generic"
+ centos_7_image: "CentOS 7 Generic"
+
+ apt_proxy: ""
+ docker_proxy: nexus3.onap.org:10001
+
+ rancher_vm_flavor: m1.small
+ k8s_vm_flavor: m1.xlarge
+
+ public_net_id: fbe8fd92-6636-4e63-ab28-bb6a5b0888a9
+ public_net_name: admin-vpn-floating
+
+ oam_network_cidr: 10.0.0.0/16
+ dns_forwarder: 8.8.8.8
+ external_dns: 8.8.8.8
+
+ dnsaas_proxy_enable: "false"
+ dnsaas_proxied_keystone_url_path: "https://bdc1tlab01.research.att.com:5000/v3"
+ dnsaas_keystone_url: https://bdc1tlab01.research.att.com:5000/v3
+ dnsaas_region: RegionOne
+ dnsaas_tenant_id: b4062c7fbf9646b8a2bcb71c46695ff3
+ dnsaas_tenant_name: ETE-OOM-Test
+ dnsaas_username: ${OS_USERNAME}
+ dnsaas_password: ${OS_PASSWORD}
diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
index 216a187..9118c8e 100644
--- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
@@ -5,15 +5,19 @@
echo "__rancher_ip_addr__" > /opt/config/rancher_ip_addr.txt
echo `hostname -I` `hostname` >> /etc/hosts
mkdir -p /etc/docker
-cat > /etc/docker/daemon.json <<EOF
+if [ ! -z "__docker_proxy__" ]; then
+ cat > /etc/docker/daemon.json <<EOF
{
"insecure-registries" : ["__docker_proxy__"]
}
EOF
-cat > /etc/apt/apt.conf.d/30proxy<<EOF
+fi
+if [ ! -z "__apt_proxy__" ]; then
+ cat > /etc/apt/apt.conf.d/30proxy<<EOF
Acquire::http { Proxy "http://__apt_proxy__"; };
Acquire::https::Proxy "DIRECT";
EOF
+fi
apt-get -y update
apt-get -y install linux-image-extra-$(uname -r) jq
diff --git a/deployment/heat/onap-oom/onap-oom.yaml b/deployment/heat/onap-oom/onap-oom.yaml
index 3675bd9..e54a7b0 100644
--- a/deployment/heat/onap-oom/onap-oom.yaml
+++ b/deployment/heat/onap-oom/onap-oom.yaml
@@ -140,6 +140,18 @@
router_id: { get_resource: router }
subnet_id: { get_resource: oam_subnet }
+ rancher_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_network }
+ fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
+
+ rancher_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: rancher_private_port }
+
rancher_vm:
type: OS::Nova::Server
properties:
@@ -148,7 +160,7 @@
flavor: { get_param: rancher_vm_flavor }
key_name: onap_key
networks:
- - network: { get_param: public_net_id }
+ - port: { get_resource: rancher_private_port }
user_data_format: RAW
user_data:
str_replace:
diff --git a/deployment/heat/onap-oom/scripts/deploy.sh b/deployment/heat/onap-oom/scripts/deploy.sh
index 961a8ba..fb5bd03 100755
--- a/deployment/heat/onap-oom/scripts/deploy.sh
+++ b/deployment/heat/onap-oom/scripts/deploy.sh
@@ -14,8 +14,8 @@
$WORKSPACE/test/ete/scripts/teardown-onap.sh
cd $WORKSPACE/deployment/heat/onap-oom
- openstack stack create -t ./onap-oom.yaml -e $ENV_FILE onap-oom
- openstack stack output show onap-oom k8s_vm_ip
+ envsubst < $ENV_FILE > $ENV_FILE~
+ openstack stack create -t ./onap-oom.yaml -e $ENV_FILE~ onap-oom
for i in $(seq 1 10); do
sleep 10