aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test-openrc9
-rw-r--r--deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test.env33
-rw-r--r--deployment/heat/onap-oom/env/tlab/ETE-OOM-Test-openrc9
-rw-r--r--deployment/heat/onap-oom/env/tlab/ETE-OOM-Test.env33
-rw-r--r--deployment/heat/onap-oom/k8s_vm_entrypoint.sh8
-rw-r--r--deployment/heat/onap-oom/onap-oom.yaml50
-rw-r--r--deployment/heat/onap-oom/rancher_vm_entrypoint.sh8
-rwxr-xr-xdeployment/heat/onap-oom/scripts/deploy.sh4
-rwxr-xr-xtest/ete/scripts/teardown-onap.sh7
9 files changed, 149 insertions, 12 deletions
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 000000000..564bb8676
--- /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-HEAT-Test.env b/deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test.env
new file mode 100644
index 000000000..73cc1312b
--- /dev/null
+++ b/deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test.env
@@ -0,0 +1,33 @@
+parameters:
+
+ keystone_url: https://bdc1tlab01.research.att.com:5000
+ openstack_tenant_id: 76b1938dd3b9471fa1ed413a1b212a96
+ openstack_tenant_name: ETE-HEAT-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: "centos7"
+
+ apt_proxy: ""
+ docker_proxy: nexus3.onap.org:10001
+
+ rancher_vm_flavor: m1.small
+ k8s_vm_flavor: m2.xxlarge
+
+ public_net_id: fbe8fd92-6636-4e63-ab28-bb6a5b0888a9
+ public_net_name: admin-vpn-floating
+
+ oam_network_cidr: 10.0.0.0/16
+ dns_forwarder: 204.178.3.230
+ external_dns: 8.8.8.8
+
+ dnsaas_proxy_enable: "false"
+ dnsaas_proxied_keystone_url_path: "v3"
+ dnsaas_keystone_url: https://bdc1tlab01.research.att.com:5000
+ dnsaas_region: RegionOne
+ dnsaas_tenant_id: 76b1938dd3b9471fa1ed413a1b212a96
+ dnsaas_tenant_name: ETE-HEAT-Test
+ dnsaas_username: ${OS_USERNAME}
+ dnsaas_password: ${OS_PASSWORD}
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 000000000..48457ebb7
--- /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 000000000..614779d1d
--- /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
+ 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: "centos7"
+
+ apt_proxy: ""
+ docker_proxy: nexus3.onap.org:10001
+
+ rancher_vm_flavor: m1.small
+ k8s_vm_flavor: m2.xxlarge
+
+ public_net_id: fbe8fd92-6636-4e63-ab28-bb6a5b0888a9
+ public_net_name: admin-vpn-floating
+
+ oam_network_cidr: 10.0.0.0/16
+ dns_forwarder: 204.178.3.230
+ external_dns: 8.8.8.8
+
+ dnsaas_proxy_enable: "false"
+ dnsaas_proxied_keystone_url_path: "v3"
+ dnsaas_keystone_url: https://bdc1tlab01.research.att.com:5000
+ 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 216a187af..9118c8e24 100644
--- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
@@ -5,15 +5,19 @@ mkdir -p /opt/config
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 3675bd92e..760a9575d 100644
--- a/deployment/heat/onap-oom/onap-oom.yaml
+++ b/deployment/heat/onap-oom/onap-oom.yaml
@@ -106,6 +106,34 @@ resources:
properties:
length: 4
+ # ONAP security group
+ onap_sg:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ name:
+ str_replace:
+ template: base_rand
+ params:
+ base: onap_sg
+ rand: { get_resource: random-str }
+ description: security group used by ONAP
+ rules:
+ # All egress traffic
+ - direction: egress
+ ethertype: IPv4
+ - direction: egress
+ ethertype: IPv6
+ # ingress traffic
+ # ICMP
+ - protocol: icmp
+ - protocol: udp
+ port_range_min: 1
+ port_range_max: 65535
+ - protocol: tcp
+ port_range_min: 1
+ port_range_max: 65535
+
+
# ONAP management private network
oam_network:
type: OS::Neutron::Net
@@ -140,6 +168,20 @@ resources:
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 }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ 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 +190,7 @@ resources:
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:
@@ -163,6 +205,8 @@ resources:
properties:
network: { get_resource: oam_network }
fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
+ security_groups:
+ - { get_resource: onap_sg }
k8s_floating_ip:
type: OS::Neutron::FloatingIP
@@ -185,7 +229,7 @@ resources:
params:
__docker_proxy__: { get_param: docker_proxy }
__apt_proxy__: { get_param: apt_proxy }
- __rancher_ip_addr__: { get_attr: [rancher_vm, first_address] }
+ __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
__k8s_ip_addr__: { get_attr: [k8s_floating_ip, floating_ip_address] }
__openstack_tenant_id__: { get_param: openstack_tenant_id }
__openstack_tenant_name__: { get_param: openstack_tenant_name }
@@ -215,7 +259,7 @@ resources:
outputs:
rancher_vm_ip:
description: The IP address of the rancher instance
- value: { get_attr: [rancher_vm, first_address] }
+ value: { get_attr: [rancher_floating_ip, floating_ip_address] }
k8s_vm_ip:
description: The IP address of the k8s instance
diff --git a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
index da1955446..ac704f106 100644
--- a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
@@ -3,15 +3,19 @@ printenv
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 docker.io
usermod -aG docker ubuntu
diff --git a/deployment/heat/onap-oom/scripts/deploy.sh b/deployment/heat/onap-oom/scripts/deploy.sh
index 961a8ba2f..fb5bd03e9 100755
--- a/deployment/heat/onap-oom/scripts/deploy.sh
+++ b/deployment/heat/onap-oom/scripts/deploy.sh
@@ -14,8 +14,8 @@ for n in $(seq 1 5); do
$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
diff --git a/test/ete/scripts/teardown-onap.sh b/test/ete/scripts/teardown-onap.sh
index 60bfa638f..9b742e8fd 100755
--- a/test/ete/scripts/teardown-onap.sh
+++ b/test/ete/scripts/teardown-onap.sh
@@ -6,9 +6,10 @@ fi
source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh
+# skip use of multi-vim APIs for now
# delete all Proxy Designate DNS records; do this first since we rely on multi-vim for this
-$WORKSPACE/test/ete/scripts/dns-zones/delete-dns-zones.sh $OS_PROJECT_NAME
-sleep 1
+# $WORKSPACE/test/ete/scripts/dns-zones/delete-dns-zones.sh $OS_PROJECT_NAME
+# sleep 1
# delete all Desigate DNS zones
ZONES=$(openstack zone list -c "id" -f value)
@@ -39,7 +40,7 @@ openstack port delete $(openstack port list -f value -c ID)
openstack volume delete $(openstack volume list -f value -c ID)
# delete all except "default" security group
-SECURITY_GROUPS=$(openstack security group list -c Name -f value | grep -v default)
+SECURITY_GROUPS=$(openstack security group list -c ID -f value | grep -v default)
openstack security group delete $SECURITY_GROUPS
sleep 1