summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorYu Yang (Gabriel) <Gabriel.yuyang@huawei.com>2017-03-10 08:24:57 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-10 08:24:57 +0000
commit0300c5099b234fe02330c16ea06856dadf72fc8f (patch)
tree26f1b6245bba3f249051edcf50dfe9a4887075bc /utils
parentbd80bcfb59a948d47af4d970f2832e8079f5f0f0 (diff)
parentc5162f01bb54eab6b3c4056074e28e0080dc4d08 (diff)
Merge "Add liscense to file headers"
Diffstat (limited to 'utils')
-rw-r--r--utils/__init__.py8
-rw-r--r--utils/dashboard/dashboard.yaml9
-rwxr-xr-xutils/dev_env/deploy/create_libvirt_vm.sh237
-rw-r--r--utils/dev_env/deploy/libvirt_template.xml41
-rwxr-xr-xutils/dev_env/deploy/mac_generator.sh35
-rw-r--r--utils/dev_env/deploy/meta-data.template11
-rw-r--r--utils/dev_env/deploy/p-agent-user-data.template40
-rw-r--r--utils/dev_env/deploy/p-master-user-data.template39
-rw-r--r--utils/dev_env/deploy/user-data.template1
-rw-r--r--utils/dev_env/paras.conf20
-rw-r--r--utils/env_prepare/__init__.py8
-rw-r--r--utils/infra_setup/__init__.py8
-rw-r--r--utils/infra_setup/heat/__init__.py8
-rwxr-xr-xutils/infra_setup/heat/consts/__init__.py12
-rw-r--r--utils/infra_setup/heat/tests/data/generated_templates/experiment_1.yaml300
-rw-r--r--utils/infra_setup/heat/tests/data/generated_templates/experiment_2.yaml0
-rwxr-xr-xutils/infra_setup/heat/tests/data/generated_templates/rubbos_1-1-1_template.tmp311
-rwxr-xr-xutils/infra_setup/heat/tests/data/test_templates/test_template_1.yaml311
-rwxr-xr-xutils/infra_setup/heat/tests/generate_template_test.py83
-rwxr-xr-xutils/infra_setup/heat_template/rubbos_heat_template/rubbos_1-1-1_template.yaml300
-rwxr-xr-xutils/infra_setup/heat_template/rubbos_heat_template/rubbos_1-2-1_template.yaml321
-rw-r--r--utils/infra_setup/passwordless_SSH/__init__.py8
-rw-r--r--utils/infra_setup/runner/__init__.py8
23 files changed, 9 insertions, 2110 deletions
diff --git a/utils/__init__.py b/utils/__init__.py
index b124dfa9..e69de29b 100644
--- a/utils/__init__.py
+++ b/utils/__init__.py
@@ -1,8 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
diff --git a/utils/dashboard/dashboard.yaml b/utils/dashboard/dashboard.yaml
index 0668e370..016c6d8d 100644
--- a/utils/dashboard/dashboard.yaml
+++ b/utils/dashboard/dashboard.yaml
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
---
pod_name: REPLACE_NODE_NAME
diff --git a/utils/dev_env/deploy/create_libvirt_vm.sh b/utils/dev_env/deploy/create_libvirt_vm.sh
deleted file mode 100755
index 45ba2b8e..00000000
--- a/utils/dev_env/deploy/create_libvirt_vm.sh
+++ /dev/null
@@ -1,237 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-
-##############################################
-# Usage: ./deploy.sh paras_conf outout_dir
-##############################################
-SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)
-tool_dir=${0%/*}
-
-function print_usage()
-{
- echo "Usage: ./deploy.sh paras_conf output_dir"
-}
-
-## sanity check
-if [ ! -f $tool_dir/mac_generator.sh ] || \
- [ ! -f $tool_dir/libvirt_template.xml ] || \
- [ ! -f $tool_dir/meta-data.template ] || \
- [ ! -f $tool_dir/user-data.template ] || \
- [ ! -f $tool_dir/p-master-user-data.template ] || \
- [ ! -f $tool_dir/p-agent-user-data.template ]; then
- echo "Lack some necessary files for this tool!"
- echo "deploy.sh"
- echo "mac_generator.sh"
- echo "1 xml, and 4 template"
- exit 1
-fi
-
-## Check input
-if [ $# != 2 ]; then
- print_usage
- exit 1
-fi
-if [ ! -f $1 ]; then
- echo "Cannot find file: "$1
- exit 1
-fi
-if [ -d $2 ]; then
- echo "Ouput dir $2 exist!"
- exit 1
-fi
-
-## Assign parameters
-host_names=""
-puppet_enable="true"
-master_host=""
-vm_mem=
-vm_cpu_cores=
-image_url=
-image_name=
-ipaddr_start=
-trusted_ssh_pub_keys_file=
-while read line
-do
- line=(${line//=/ })
- case ${line[0]} in
- "host_names" )
- host_names=${line[1]}
- ;;
- "puppet_enable" )
- puppet_enable=${line[1]}
- ;;
- "master_host" )
- master_host=${line[1]}
- ;;
- "vm_mem" )
- vm_mem=${line[1]}
- ;;
- "vm_cpu_cores" )
- vm_cpu_cores=${line[1]}
- ;;
- "image_url" )
- image_url=${line[1]}
- ;;
- "image_name" )
- image_name=${line[1]}
- ;;
- "ipaddr_start" )
- ipaddr_start=${line[1]}
- ;;
- "trusted_ssh_pub_keys_file" )
- trusted_ssh_pub_keys_file=${line[1]}
- ;;
- esac
-done < $1
-
-echo "puppet_enable="$puppet_enable
-
-# Check parameters in conf file
-if [ $puppet_enable == "true" ] ; then
- if [ ${#master_host} == 0 ];then
- echo "Should specify master_host!"
- exit 1
- else
- result=$(echo ${host_names} | grep "${master_host}")
- if [ ${result} == "" ]; then
- echo "Specified master_host is invalid!"
- exit 1
- fi
- fi
-fi
-
-# Define and Prepare needed data
-mac_arr=
-hostname_arr=(${host_names//,/ })
-virt_num=${#hostname_arr[@]}
-ip_arr=()
-replaced_hosts=""
-replaced_ssh_keys=""
-output_dir=$2
-work_dir=
-host_vm_dir=
-cache_dir=
-function init(){
- # Generate mac address
- local mac_generator=${tool_dir}/mac_generator.sh
- chmod +x $mac_generator
- mac_str=$($mac_generator $virt_num)
- mac_arr=($mac_str)
-
- # Generate hosts info
- local ip=""
- i=0
- for host in "${hostname_arr[@]}"; do
- ip=${ipaddr_prefix}$((i+$ipaddr_idx))
- ip_arr+=($ip)
- # Note the format, especially the space
- replaced_hosts=${replaced_hosts}" "${ip}" "${host}"\n"
- let i=i+1
- done
-
- # Generate ssh public keys
- echo "## trusted_ssh_pub_keys_file --> "${trusted_ssh_pub_keys_file}
- if [ ${trusted_ssh_pub_keys_file} != "" ] && [ -f ${trusted_ssh_pub_keys_file} ]; then
- while read line
- do
- # Note the format, especially space
- replaced_ssh_keys=${replaced_ssh_keys}" - "${line}"\n"
- done < ${trusted_ssh_pub_keys_file}
- # delete last "\n" in replaced_ssh_keysi
- replaced_ssh_keys=${replaced_ssh_keys%\\n}
- fi
-
- # Prepare needed folder and files
- if [ ${output_dir:0-1} == "/" ]; then
- output_dir=${output_dir%/*}
- fi
- output_file=$output_dir/hosts.info
- mkdir -p $output_dir
- touch $output_file
- echo "## Output host_info file --> "$output_file
-
- work_dir=$output_dir/work
- host_vm_dir=$work_dir/vm
- cache_dir=$work_dir/cache
- mkdir -p $work_dir
- mkdir -p $host_vm_dir
- mkdir -p $cache_dir
-
- # Cache img file
- echo "## Cache img file"
- curl --connect-timeout 10 -o ${cache_dir}/$image_name $image_url
-}
-
-# Bring up instances/vms
-sub_ip_arr=(${ipaddr_start//./ })
-ipaddr_prefix=${sub_ip_arr[0]}"."${sub_ip_arr[1]}"."${sub_ip_arr[2]}"."
-ipaddr_idx=${sub_ip_arr[3]}
-function bring_up() {
- i=0
- while (($i < $virt_num))
- do
- echo "Bring up a vm, hostname: ${hostname_arr[$i]}, ip: ${ip_arr[$i]}, mac: ${mac_arr[$i]}"
- vm_dir=$host_vm_dir/${hostname_arr[$i]}
- mkdir -p $vm_dir
- cp ${cache_dir}/$image_name $vm_dir
-
- sed -e "s/REPLACE_IPADDR/${ip_arr[$i]}/g" \
- -e "s/REPLACE_GATEWAY/${ipaddr_prefix}1/g" \
- -e "s/REPLACE_HOSTNAME/${hostname_arr[$i]}/g" \
- ${tool_dir}/meta-data.template > ${cache_dir}/meta-data
-
- if [ ${puppet_enable} == "true" ]; then
- # Use puppet user data
- echo "hostname: "${hostname_arr[$i]}
- if [ ${hostname_arr[$i]} == ${master_host} ]; then
- cp ${tool_dir}/p-master-user-data.template ${cache_dir}/user-data.template
- else
- cp ${tool_dir}/p-agent-user-data.template ${cache_dir}/user-data.templatate
- fi
- sed -e "s#REPLACED_TRUSTED_PUB_SSH_KEYS#${replaced_ssh_keys}#g" \
- -e "s#REPLACED_HOSTS_INFO#${replaced_hosts}#g" \
- -e "s/REPLACED_PUPPET_MASTER_SERVER/${master_host}/g" \
- ${cache_dir}/user-data.template > ${cache_dir}/user-data
- else
- # Use common user data
- echo "## Use common user-data.template"
- cp ${tool_dir}/user-data.template ${cache_dir}/user-data
- fi
-
- genisoimage -output seed.iso -volid cidata -joliet -rock ${cache_dir}/user-data ${cache_dir}/meta-data
- mv seed.iso ${vm_dir}/
- # Create vm xml
- sed -e "s/REPLACE_MEM/$vm_mem/g" \
- -e "s/REPLACE_CPU/$vm_cpu_cores/g" \
- -e "s/REPLACE_NAME/${hostname_arr[$i]}/g" \
- -e "s#REPLACE_IMAGE#$vm_dir/disk.img#g" \
- -e "s#REPLACE_SEED_IMAGE#$vm_dir/seed.iso#g" \
- -e "s/REPLACE_MAC_ADDR/${mac_arr[$i]}/g" \
- ${tool_dir}/libvirt_template.xml > ${vm_dir}/libvirt.xml
-
- echo "${ip_arr[$i]} ${hostname_arr[$i]}" >> $output_file
-
- echo "Will define xml from:"${vm_dir}"/libvirt.xml"
- echo "start: "${hostname_arr[$i]}
- sudo virsh define ${vm_dir}/libvirt.xml
- sudo virsh start ${hostname_arr[$i]}
- let i=i+1
- rm -rf ${cache_dir}/meta-data ${cache_dir}/user-data
- done
-}
-
-function clean(){
- rm -rf ${cache_dir}
-}
-
-init
-bring_up
-clean
diff --git a/utils/dev_env/deploy/libvirt_template.xml b/utils/dev_env/deploy/libvirt_template.xml
deleted file mode 100644
index eddeff00..00000000
--- a/utils/dev_env/deploy/libvirt_template.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<domain type='kvm'>
- <name>REPLACE_NAME</name>
- <memory unit='MiB'>REPLACE_MEM</memory>
- <currentMemory unit='MiB'>REPLACE_MEM</currentMemory>
- <vcpu placement='static'>REPLACE_CPU</vcpu>
- <os>
- <type arch='x86_64'>hvm</type>
- <boot dev='hd'/>
- </os>
- <features>
- <acpi/><apic/><pae/>
- </features>
- <clock offset="utc"/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>restart</on_crash>
- <devices>
- <disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
- <source file='REPLACE_IMAGE'/>
- <target dev='vda' bus='virtio'/>
- </disk>
- <disk type='file' device='cdrom'>
- <driver name='qemu'/>
- <source file='REPLACE_SEED_IMAGE'/>
- <target dev='hdb'/>
- <readonly/>
- </disk>
- <interface type='network'>
- <source network='default'/>
- <mac address='REPLACE_MAC_ADDR'/>
- <model type='virtio'/>
- </interface>
- <input type='tablet' bus='usb'/>
- <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
- <console type='pty'/>
- <video>
- <model type='cirrus'/>
- </video>
- </devices>
-</domain>
diff --git a/utils/dev_env/deploy/mac_generator.sh b/utils/dev_env/deploy/mac_generator.sh
deleted file mode 100755
index f8bc5e08..00000000
--- a/utils/dev_env/deploy/mac_generator.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-
-## This script is used in 'create_libvirt_vm.sh'
-function mac_address_part() {
- hex_number=$(printf '%02x' $RANDOM)
- number_length=${#hex_number}
- number_start=$(expr $number_length - 2)
- echo ${hex_number:$number_start:2}
-}
-
-function mac_address() {
- echo "00:00:$(mac_address_part):$(mac_address_part):$(mac_address_part):$(mac_address_part)"
-}
-
-machines=''
-for i in `seq $1`; do
- mac=$(mac_address)
-
- if [[ -z $machines ]]; then
- machines="${mac}"
- else
- machines="${machines} ${mac}"
- fi
-done
-
-echo ${machines}
diff --git a/utils/dev_env/deploy/meta-data.template b/utils/dev_env/deploy/meta-data.template
deleted file mode 100644
index 43db6597..00000000
--- a/utils/dev_env/deploy/meta-data.template
+++ /dev/null
@@ -1,11 +0,0 @@
-instance-id: iid-abcdeff
-network-interfaces: |
- # The primary network interface
- auto eth0
- iface eth0 inet static
- address REPLACE_IPADDR
- netmask 255.255.255.0
- gateway REPLACE_GATEWAY
- dns-nameservers 8.8.8.8
-local-hostname: REPLACE_HOSTNAME
-
diff --git a/utils/dev_env/deploy/p-agent-user-data.template b/utils/dev_env/deploy/p-agent-user-data.template
deleted file mode 100644
index 3d778f1a..00000000
--- a/utils/dev_env/deploy/p-agent-user-data.template
+++ /dev/null
@@ -1,40 +0,0 @@
-#cloud-config
-
-users:
- - name: ubuntu
- ssh-authorized-keys:
-REPLACED_TRUSTED_PUB_SSH_KEYS
- - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwmx8/86Vc1yqqplMPkm/w6wB2r5Yl6CjON85Ko5SzPEpnysJwO5ygbMClQTbzCUztIpFeO8D6xdWlhPmhMEJIWtRh+Dx0swB+ByMraGTP92xxKo2ukWzYI6eu25LmJX+a1lmVPmewQq+6dPzIwgCZvwD8UVe5L+d0EP2rb3iniQVoBzksUmhL3N6jp2Lgpscfi1yXFgjFdLpDsCcFcM+Q6wQUC2+qGBYa5RxqercWzISSbvAsYwC7UepmjFpcj3W/WX2QcOCDIlAzeURvC8PbOdzCtgeMhuhH2499BcIUSzPMpjzvpRiHr5SeF/zrPeW+2Ei1MfHi1qrBCxS8JBqt bottlenecks@bottlenecks.opnfv.org
- sudo: ['ALL=(ALL) NOPASSWD:ALL']
- groups: sudo
- shell: /bin/bash
-
-runcmd:
- - restart ssh
- - wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
- - sudo dpkg -i puppetlabs-release-trusty.deb
- - sudo apt-get update
- - sudo apt-get -y install puppet
- - sed -i '/^factpath/a basemodulepath=\/etc\/puppet\/modules' /etc/puppet/puppet.conf
- - sed -i '/^factpath/a server=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf
- - sed -i '/^factpath/a runinterval=1d' /etc/puppet/puppet.conf
- - sed -i '/^templatedir/d' /etc/puppet/puppet.conf
- - sed -i 's/START=no/START=yes/g' /etc/default/puppet
-
-write_files:
- - path: /etc/hosts
- content: |
- 127.0.0.1 localhost
-
- # The following lines are desirable for IPv6 capable hosts
- ::1 ip6-localhost ip6-loopback
- fe00::0 ip6-localnet
- ff00::0 ip6-mcastprefix
- ff02::1 ip6-allnodes
- ff02::2 ip6-allrouters
- ff02::3 ip6-allhosts
-
- # hosts info for all vms
-REPLACED_HOSTS_INFO
-
-final_message: "The system with puppet is finally up, after $UPTIME seconds."
diff --git a/utils/dev_env/deploy/p-master-user-data.template b/utils/dev_env/deploy/p-master-user-data.template
deleted file mode 100644
index 446c9698..00000000
--- a/utils/dev_env/deploy/p-master-user-data.template
+++ /dev/null
@@ -1,39 +0,0 @@
-#cloud-config
-
-users:
- - name: ubuntu
- ssh-authorized-keys:
-REPLACED_TRUSTED_PUB_SSH_KEYS
- - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwmx8/86Vc1yqqplMPkm/w6wB2r5Yl6CjON85Ko5SzPEpnysJwO5ygbMClQTbzCUztIpFeO8D6xdWlhPmhMEJIWtRh+Dx0swB+ByMraGTP92xxKo2ukWzYI6eu25LmJX+a1lmVPmewQq+6dPzIwgCZvwD8UVe5L+d0EP2rb3iniQVoBzksUmhL3N6jp2Lgpscfi1yXFgjFdLpDsCcFcM+Q6wQUC2+qGBYa5RxqercWzISSbvAsYwC7UepmjFpcj3W/WX2QcOCDIlAzeURvC8PbOdzCtgeMhuhH2499BcIUSzPMpjzvpRiHr5SeF/zrPeW+2Ei1MfHi1qrBCxS8JBqt bottlenecks@bottlenecks.opnfv.org
- sudo: ['ALL=(ALL) NOPASSWD:ALL']
- groups: sudo
- shell: /bin/bash
-
-runcmd:
- - restart ssh
- - wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
- - sudo dpkg -i puppetlabs-release-trusty.deb
- - sudo apt-get update
- - sudo apt-get -y install puppetserver
- - sed -i '/^factpath/a basemodulepath=\/etc\/puppet\/modules' /etc/puppet/puppet.conf
- - sed -i '/^factpath/a server=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf
- - sed -i '/^factpath/a runinterval=1d' /etc/puppet/puppet.conf
- - sed -i '/^templatedir/d' /etc/puppet/puppet.conf
-
-write_files:
- - path: /etc/hosts
- content: |
- 127.0.0.1 localhost
-
- # The following lines are desirable for IPv6 capable hosts
- ::1 ip6-localhost ip6-loopback
- fe00::0 ip6-localnet
- ff00::0 ip6-mcastprefix
- ff02::1 ip6-allnodes
- ff02::2 ip6-allrouters
- ff02::3 ip6-allhosts
-
- # hosts info for all vms
-REPLACED_HOSTS_INFO
-
-final_message: "The system with puppet is finally up, after $UPTIME seconds."
diff --git a/utils/dev_env/deploy/user-data.template b/utils/dev_env/deploy/user-data.template
deleted file mode 100644
index 8692cde1..00000000
--- a/utils/dev_env/deploy/user-data.template
+++ /dev/null
@@ -1 +0,0 @@
-#cloud-config
diff --git a/utils/dev_env/paras.conf b/utils/dev_env/paras.conf
deleted file mode 100644
index 1ebf104a..00000000
--- a/utils/dev_env/paras.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-
-## This is a sample configuration file, as one input parameter for 'create_libvirt_vm.sh'
-host_names=test-master,test-agent
-puppet_enable=true
-master_host=test-master
-vm_mem=4096
-vm_cpu_cores=4
-image_url=file:///home/ubuntu/trusty-server-cloudimg-amd64-btnks.img
-image_name=disk.img
-ipaddr_start=192.168.122.201
-trusted_ssh_pub_keys_file=/home/ubuntu/trusted_ssh_pub_keys
diff --git a/utils/env_prepare/__init__.py b/utils/env_prepare/__init__.py
index b124dfa9..e69de29b 100644
--- a/utils/env_prepare/__init__.py
+++ b/utils/env_prepare/__init__.py
@@ -1,8 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
diff --git a/utils/infra_setup/__init__.py b/utils/infra_setup/__init__.py
index b124dfa9..e69de29b 100644
--- a/utils/infra_setup/__init__.py
+++ b/utils/infra_setup/__init__.py
@@ -1,8 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
diff --git a/utils/infra_setup/heat/__init__.py b/utils/infra_setup/heat/__init__.py
index 6dbd8d79..e69de29b 100644
--- a/utils/infra_setup/heat/__init__.py
+++ b/utils/infra_setup/heat/__init__.py
@@ -1,8 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
diff --git a/utils/infra_setup/heat/consts/__init__.py b/utils/infra_setup/heat/consts/__init__.py
index 0854776c..e69de29b 100755
--- a/utils/infra_setup/heat/consts/__init__.py
+++ b/utils/infra_setup/heat/consts/__init__.py
@@ -1,12 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-"""
-Constants
-"""
diff --git a/utils/infra_setup/heat/tests/data/generated_templates/experiment_1.yaml b/utils/infra_setup/heat/tests/data/generated_templates/experiment_1.yaml
deleted file mode 100644
index 53600443..00000000
--- a/utils/infra_setup/heat/tests/data/generated_templates/experiment_1.yaml
+++ /dev/null
@@ -1,300 +0,0 @@
-heat_template_version: 2013-05-23
-
-description: >
- HOT template to create a new neutron network plus a router to the public
- network, and for deploying nine servers into the new network. The template also
- assigns floating IP addresses to rubbos_control server so it is routable from the
- public network.
-parameters:
- key_name:
- type: string
- description: Name of keypair to assign to servers
- default: bottlenecks-key
- image:
- type: string
- description: Name of image to use for servers
- default: bottlenecks-trusty-server
- flavor:
- type: string
- description: Flavor to use for servers
- default: bottlenecks-flavor
- public_net:
- type: string
- description: >
- ID or name of public network for which floating IP addresses will be allocated
- default: net04_ext
- private_net_name:
- type: string
- description: Name of private network to be created
- default: bottlenecks-private
- private_net_cidr:
- type: string
- description: Private network address (CIDR notation)
- default: "10.0.10.0/24"
- private_net_gateway:
- type: string
- description: Private network gateway address
- default: "10.0.10.1"
- private_net_pool_start:
- type: string
- description: Start of private network IP address allocation pool
- default: "10.0.10.2"
- private_net_pool_end:
- type: string
- description: End of private network IP address allocation pool
- default: "10.0.10.199"
-
-resources:
- private_net:
- type: OS::Neutron::Net
- properties:
- name: { get_param: private_net_name }
-
- private_subnet:
- type: OS::Neutron::Subnet
- properties:
- network_id: { get_resource: private_net }
- cidr: { get_param: private_net_cidr }
- gateway_ip: { get_param: private_net_gateway }
- allocation_pools:
- - start: { get_param: private_net_pool_start }
- end: { get_param: private_net_pool_end }
-
- router:
- type: OS::Neutron::Router
- properties:
- external_gateway_info:
- network: { get_param: public_net }
-
- router_interface:
- type: OS::Neutron::RouterInterface
- properties:
- router_id: { get_resource: router }
- subnet_id: { get_resource: private_subnet }
-
- rubbos_control:
- type: OS::Nova::Server
- properties:
- name: rubbos_control
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_control_port }
- admin_user: ubuntu
-
- rubbos_control_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_control_floating_ip:
- type: OS::Neutron::FloatingIP
- properties:
- floating_network: { get_param: public_net }
- port_id: { get_resource: rubbos_control_port }
-
- rubbos_httpd:
- type: OS::Nova::Server
- properties:
- name: rubbos_httpd
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_httpd_port }
- admin_user: ubuntu
-
- rubbos_httpd_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_mysql1:
- type: OS::Nova::Server
- properties:
- name: rubbos_mysql1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_mysql1_port }
- admin_user: ubuntu
-
- rubbos_mysql1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_tomcat1:
- type: OS::Nova::Server
- properties:
- name: rubbos_tomcat1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_tomcat1_port }
- admin_user: ubuntu
-
- rubbos_tomcat1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client1:
- type: OS::Nova::Server
- properties:
- name: rubbos_client1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client1_port }
- admin_user: ubuntu
-
- rubbos_client1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client2:
- type: OS::Nova::Server
- properties:
- name: rubbos_client2
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client2_port }
- admin_user: ubuntu
-
- rubbos_client2_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client3:
- type: OS::Nova::Server
- properties:
- name: rubbos_client3
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client3_port }
- admin_user: ubuntu
-
- rubbos_client3_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client4:
- type: OS::Nova::Server
- properties:
- name: rubbos_client4
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client4_port }
- admin_user: ubuntu
-
- rubbos_client4_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_benchmark:
- type: OS::Nova::Server
- properties:
- name: rubbos_benchmark
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_benchmark_port }
- admin_user: ubuntu
-
- rubbos_benchmark_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- server_security_group:
- type: OS::Neutron::SecurityGroup
- properties:
- description: Rubbos group for servers access.
- name: rubbos-security-group
- rules: [
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: tcp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: udp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: icmp}]
-
-outputs:
- rubbos_control_private_ip:
- description: IP address of rubbos_control in private network
- value: { get_attr: [ rubbos_control, first_address ] }
- rubbos_control_public_ip:
- description: Floating IP address of rubbos_control in public network
- value: { get_attr: [ rubbos_control_floating_ip, floating_ip_address ] }
- rubbos_httpd_private_ip:
- description: IP address of rubbos_httpd in private network
- value: { get_attr: [ rubbos_httpd, first_address ] }
- rubbos_mysql1_private_ip:
- description: IP address of rubbos_mysql1 in private network
- value: { get_attr: [ rubbos_mysql1, first_address ] }
- rubbos_tomcat1_private_ip:
- description: IP address of rubbos_tomcat1 in private network
- value: { get_attr: [ rubbos_tomcat1, first_address ] }
- rubbos_client1_private_ip:
- description: IP address of rubbos_client1 in private network
- value: { get_attr: [ rubbos_client1, first_address ] }
- rubbos_client2_private_ip:
- description: IP address of rubbos_client2 in private network
- value: { get_attr: [ rubbos_client2, first_address ] }
- rubbos_client3_private_ip:
- description: IP address of rubbos_client3 in private network
- value: { get_attr: [ rubbos_client3, first_address ] }
- rubbos_client4_private_ip:
- description: IP address of rubbos_client4 in private network
- value: { get_attr: [ rubbos_client4, first_address ] }
- rubbos_benchmark_private_ip:
- description: IP address of rubbos_benchmark in private network
- value: { get_attr: [ rubbos_benchmark, first_address ] }
-
diff --git a/utils/infra_setup/heat/tests/data/generated_templates/experiment_2.yaml b/utils/infra_setup/heat/tests/data/generated_templates/experiment_2.yaml
deleted file mode 100644
index e69de29b..00000000
--- a/utils/infra_setup/heat/tests/data/generated_templates/experiment_2.yaml
+++ /dev/null
diff --git a/utils/infra_setup/heat/tests/data/generated_templates/rubbos_1-1-1_template.tmp b/utils/infra_setup/heat/tests/data/generated_templates/rubbos_1-1-1_template.tmp
deleted file mode 100755
index 0f417dd3..00000000
--- a/utils/infra_setup/heat/tests/data/generated_templates/rubbos_1-1-1_template.tmp
+++ /dev/null
@@ -1,311 +0,0 @@
-heat_template_version: 2013-05-23
-
-description: >
- HOT template to create a new neutron network plus a router to the public
- network, and for deploying nine servers into the new network. The template also
- assigns floating IP addresses to rubbos_control server so it is routable from the
- public network.
-parameters:
- key_name:
- type: string
- description: Name of keypair to assign to servers
- default: bottlenecks-key
- image:
- type: string
- description: Name of image to use for servers
- default: bottlenecks-trusty-server
- flavor:
- type: string
- description: Flavor to use for servers
- default: bottlenecks-flavor
- public_net:
- type: string
- description: >
- ID or name of public network for which floating IP addresses will be allocated
- default: net04_ext
- private_net_name:
- type: string
- description: Name of private network to be created
- default: bottlenecks-private
- private_net_cidr:
- type: string
- description: Private network address (CIDR notation)
- default: "10.0.10.0/24"
- private_net_gateway:
- type: string
- description: Private network gateway address
- default: "10.0.10.1"
- private_net_pool_start:
- type: string
- description: Start of private network IP address allocation pool
- default: "10.0.10.2"
- private_net_pool_end:
- type: string
- description: End of private network IP address allocation pool
- default: "10.0.10.199"
-
-resources:
- private_net:
- type: OS::Neutron::Net
- properties:
- name: { get_param: private_net_name }
-
- private_subnet:
- type: OS::Neutron::Subnet
- properties:
- network_id: { get_resource: private_net }
- cidr: { get_param: private_net_cidr }
- gateway_ip: { get_param: private_net_gateway }
- allocation_pools:
- - start: { get_param: private_net_pool_start }
- end: { get_param: private_net_pool_end }
-
- router:
- type: OS::Neutron::Router
- properties:
- external_gateway_info:
- network: { get_param: public_net }
-
- router_interface:
- type: OS::Neutron::RouterInterface
- properties:
- router_id: { get_resource: router }
- subnet_id: { get_resource: private_subnet }
-
- rubbos_control:
- type: OS::Nova::Server
- properties:
- name: rubbos_control
- image: { get_param: image }
- flavor: #flavor
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_control_port }
- admin_user: ubuntu
-
- rubbos_control_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_control_floating_ip:
- type: OS::Neutron::FloatingIP
- properties:
- floating_network: { get_param: public_net }
- port_id: { get_resource: rubbos_control_port }
-
- rubbos_httpd:
- type: OS::Nova::Server
- properties:
- name: rubbos_httpd
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_httpd_port }
- admin_user: ubuntu
-
- rubbos_httpd_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_mysql1:
- type: OS::Nova::Server
- properties:
- name: rubbos_mysql1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_mysql1_port }
- admin_user: ubuntu
-
- rubbos_mysql1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_tomcat1:
- type: OS::Nova::Server
- properties:
- name: rubbos_tomcat1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_tomcat1_port }
- admin_user: ubuntu
-
- rubbos_tomcat1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client1:
- type: OS::Nova::Server
- properties:
- name: rubbos_client1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client1_port }
- admin_user: ubuntu
-
- rubbos_client1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client2:
- type: OS::Nova::Server
- properties:
- name: rubbos_client2
- image: #image
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client2_port }
- admin_user: ubuntu
-
- rubbos_client2_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client3:
- type: OS::Nova::Server
- properties:
- name: rubbos_client3
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client3_port }
- admin_user: ubuntu
-
- rubbos_client3_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client4:
- type: OS::Nova::Server
- properties:
- name: rubbos_client4
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client4_port }
- admin_user: ubuntu
-
- rubbos_client4_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- #rubbos_client5:
- type: OS::Nova::Server
- properties:
- name: rubbos_client4
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client4_port }
- admin_user: ubuntu
-
- rubbos_benchmark:
- type: OS::Nova::Server
- properties:
- name: rubbos_benchmark
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_benchmark_port }
- admin_user: ubuntu
-
- rubbos_benchmark_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- server_security_group:
- type: OS::Neutron::SecurityGroup
- properties:
- description: Rubbos group for servers access.
- name: rubbos-security-group
- rules: [
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: tcp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: udp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: icmp}]
-
-outputs:
- rubbos_control_private_ip:
- description: IP address of rubbos_control in private network
- value: { get_attr: [ rubbos_control, first_address ] }
- rubbos_control_public_ip:
- description: Floating IP address of rubbos_control in public network
- value: { get_attr: [ rubbos_control_floating_ip, floating_ip_address ] }
- rubbos_httpd_private_ip:
- description: IP address of rubbos_httpd in private network
- value: { get_attr: [ rubbos_httpd, first_address ] }
- rubbos_mysql1_private_ip:
- description: IP address of rubbos_mysql1 in private network
- value: { get_attr: [ rubbos_mysql1, first_address ] }
- rubbos_tomcat1_private_ip:
- description: IP address of rubbos_tomcat1 in private network
- value: { get_attr: [ rubbos_tomcat1, first_address ] }
- rubbos_client1_private_ip:
- description: IP address of rubbos_client1 in private network
- value: { get_attr: [ rubbos_client1, first_address ] }
- rubbos_client2_private_ip:
- description: IP address of rubbos_client2 in private network
- value: { get_attr: [ rubbos_client2, first_address ] }
- rubbos_client3_private_ip:
- description: IP address of rubbos_client3 in private network
- value: { get_attr: [ rubbos_client3, first_address ] }
- rubbos_client4_private_ip:
- description: IP address of rubbos_client4 in private network
- value: { get_attr: [ rubbos_client4, first_address ] }
- rubbos_benchmark_private_ip:
- description: IP address of rubbos_benchmark in private network
- value: { get_attr: [ rubbos_benchmark, first_address ] }
-
diff --git a/utils/infra_setup/heat/tests/data/test_templates/test_template_1.yaml b/utils/infra_setup/heat/tests/data/test_templates/test_template_1.yaml
deleted file mode 100755
index ca347e0a..00000000
--- a/utils/infra_setup/heat/tests/data/test_templates/test_template_1.yaml
+++ /dev/null
@@ -1,311 +0,0 @@
-heat_template_version: 2013-05-23
-
-description: >
- HOT template to create a new neutron network plus a router to the public
- network, and for deploying nine servers into the new network. The template also
- assigns floating IP addresses to rubbos_control server so it is routable from the
- public network.
-parameters:
- key_name:
- type: string
- description: Name of keypair to assign to servers
- default: bottlenecks-key
- image:
- type: string
- description: Name of image to use for servers
- default: bottlenecks-trusty-server
- flavor:
- type: string
- description: Flavor to use for servers
- default: bottlenecks-flavor
- public_net:
- type: string
- description: >
- ID or name of public network for which floating IP addresses will be allocated
- default: net04_ext
- private_net_name:
- type: string
- description: Name of private network to be created
- default: bottlenecks-private
- private_net_cidr:
- type: string
- description: Private network address (CIDR notation)
- default: "10.0.10.0/24"
- private_net_gateway:
- type: string
- description: Private network gateway address
- default: "10.0.10.1"
- private_net_pool_start:
- type: string
- description: Start of private network IP address allocation pool
- default: "10.0.10.2"
- private_net_pool_end:
- type: string
- description: End of private network IP address allocation pool
- default: "10.0.10.199"
-
-resources:
- private_net:
- type: OS::Neutron::Net
- properties:
- name: { get_param: private_net_name }
-
- private_subnet:
- type: OS::Neutron::Subnet
- properties:
- network_id: { get_resource: private_net }
- cidr: { get_param: private_net_cidr }
- gateway_ip: { get_param: private_net_gateway }
- allocation_pools:
- - start: { get_param: private_net_pool_start }
- end: { get_param: private_net_pool_end }
-
- router:
- type: OS::Neutron::Router
- properties:
- external_gateway_info:
- network: { get_param: public_net }
-
- router_interface:
- type: OS::Neutron::RouterInterface
- properties:
- router_id: { get_resource: router }
- subnet_id: { get_resource: private_subnet }
-
- rubbos_control:
- type: OS::Nova::Server
- properties:
- name: rubbos_control
- image: { get_param: image }
- flavor: medium
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_control_port }
- admin_user: ubuntu
-
- rubbos_control_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_control_floating_ip:
- type: OS::Neutron::FloatingIP
- properties:
- floating_network: { get_param: public_net }
- port_id: { get_resource: rubbos_control_port }
-
- rubbos_httpd:
- type: OS::Nova::Server
- properties:
- name: rubbos_httpd
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_httpd_port }
- admin_user: ubuntu
-
- rubbos_httpd_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_mysql1:
- type: OS::Nova::Server
- properties:
- name: rubbos_mysql1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_mysql1_port }
- admin_user: ubuntu
-
- rubbos_mysql1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_tomcat1:
- type: OS::Nova::Server
- properties:
- name: rubbos_tomcat1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_tomcat1_port }
- admin_user: ubuntu
-
- rubbos_tomcat1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client1:
- type: OS::Nova::Server
- properties:
- name: rubbos_client1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client1_port }
- admin_user: ubuntu
-
- rubbos_client1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client2:
- type: OS::Nova::Server
- properties:
- name: rubbos_client2
- image: #image
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client2_port }
- admin_user: ubuntu
-
- rubbos_client2_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client3:
- type: OS::Nova::Server
- properties:
- name: rubbos_client3
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client3_port }
- admin_user: ubuntu
-
- rubbos_client3_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client4:
- type: OS::Nova::Server
- properties:
- name: rubbos_client4
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client4_port }
- admin_user: ubuntu
-
- rubbos_client4_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- #rubbos_client5:
- type: OS::Nova::Server
- properties:
- name: rubbos_client4
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client4_port }
- admin_user: ubuntu
-
- rubbos_benchmark:
- type: OS::Nova::Server
- properties:
- name: rubbos_benchmark
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_benchmark_port }
- admin_user: ubuntu
-
- rubbos_benchmark_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- server_security_group:
- type: OS::Neutron::SecurityGroup
- properties:
- description: Rubbos group for servers access.
- name: rubbos-security-group
- rules: [
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: tcp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: udp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: icmp}]
-
-outputs:
- rubbos_control_private_ip:
- description: IP address of rubbos_control in private network
- value: { get_attr: [ rubbos_control, first_address ] }
- rubbos_control_public_ip:
- description: Floating IP address of rubbos_control in public network
- value: { get_attr: [ rubbos_control_floating_ip, floating_ip_address ] }
- rubbos_httpd_private_ip:
- description: IP address of rubbos_httpd in private network
- value: { get_attr: [ rubbos_httpd, first_address ] }
- rubbos_mysql1_private_ip:
- description: IP address of rubbos_mysql1 in private network
- value: { get_attr: [ rubbos_mysql1, first_address ] }
- rubbos_tomcat1_private_ip:
- description: IP address of rubbos_tomcat1 in private network
- value: { get_attr: [ rubbos_tomcat1, first_address ] }
- rubbos_client1_private_ip:
- description: IP address of rubbos_client1 in private network
- value: { get_attr: [ rubbos_client1, first_address ] }
- rubbos_client2_private_ip:
- description: IP address of rubbos_client2 in private network
- value: { get_attr: [ rubbos_client2, first_address ] }
- rubbos_client3_private_ip:
- description: IP address of rubbos_client3 in private network
- value: { get_attr: [ rubbos_client3, first_address ] }
- rubbos_client4_private_ip:
- description: IP address of rubbos_client4 in private network
- value: { get_attr: [ rubbos_client4, first_address ] }
- rubbos_benchmark_private_ip:
- description: IP address of rubbos_benchmark in private network
- value: { get_attr: [ rubbos_benchmark, first_address ] }
-
diff --git a/utils/infra_setup/heat/tests/generate_template_test.py b/utils/infra_setup/heat/tests/generate_template_test.py
deleted file mode 100755
index 374ca30e..00000000
--- a/utils/infra_setup/heat/tests/generate_template_test.py
+++ /dev/null
@@ -1,83 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-import template
-import common
-import os
-import unittest
-import mock
-
-import sys
-sys.path.append("..")
-
-
-def reset_common():
- common.LOG = None
- common.CONF_FILE = None
- common.DEPLOYMENT_UNIT = None
- common.ITERATIONS = None
- common.BASE_DIR = None
- common.TEMPLATE_DIR = None
- common.TEMPLATE_NAME = None
- common.TEMPLATE_EXTENSION = None
-
-
-class TestGeneratesTemplate(unittest.TestCase):
-
- def setUp(self):
- self.deployment_configuration = {
- 'flavor': ['medium']
- }
- self.template_name = 'rubbos_1-1-1_template.tmp'
- # common.init()
-
- def tearDown(self):
- reset_common()
-
- @mock.patch('common.LOG')
- @mock.patch('common.get_template_dir')
- def test_generates_template_for_success(self, mock_template_dir,
- mock_log):
- tmp_generated_templates_dir = '/data/generated_templates/'
- generated_templates_dir = "{}{}".format(
- os.getcwd(), tmp_generated_templates_dir)
- mock_template_dir.return_value = generated_templates_dir
- tmp_test_templates = '/data/test_templates/'
- test_templates = "{}{}".format(os.getcwd(), tmp_test_templates)
- template.generates_templates(self.template_name,
- self.deployment_configuration)
- for dirname, dirnames, filenames in os.walk(test_templates):
- for filename in filenames:
- with open(test_templates + filename) as test:
- with open(generated_templates_dir + filename) as generated:
- self.assertListEqual(test.readlines(),
- generated.readlines())
-
- t_name = '/data/generated_templates/rubbos_1-1-1_template.tmp'
- self.template_name = "{}{}".format(os.getcwd(), t_name)
- template.generates_templates(self.template_name,
- self.deployment_configuration)
- for dirname, dirnames, filenames in os.walk(test_templates):
- for filename in filenames:
- with open(test_templates + filename) as test:
- with open(generated_templates_dir + filename) as generated:
- self.assertListEqual(test.readlines(),
- generated.readlines())
-
- @mock.patch('common.get_template_dir')
- def test_get_all_heat_templates_for_success(self, template_dir):
- tmp_generated_templates = '/data/generated_templates/'
- generated_templates = "{}{}".format(
- os.getcwd(), tmp_generated_templates)
- template_dir.return_value = generated_templates
- extension = '.yaml'
- expected = ['test_template_1.yaml']
- result = template.get_all_heat_templates(generated_templates,
- extension)
- self.assertListEqual(expected, result)
diff --git a/utils/infra_setup/heat_template/rubbos_heat_template/rubbos_1-1-1_template.yaml b/utils/infra_setup/heat_template/rubbos_heat_template/rubbos_1-1-1_template.yaml
deleted file mode 100755
index 53600443..00000000
--- a/utils/infra_setup/heat_template/rubbos_heat_template/rubbos_1-1-1_template.yaml
+++ /dev/null
@@ -1,300 +0,0 @@
-heat_template_version: 2013-05-23
-
-description: >
- HOT template to create a new neutron network plus a router to the public
- network, and for deploying nine servers into the new network. The template also
- assigns floating IP addresses to rubbos_control server so it is routable from the
- public network.
-parameters:
- key_name:
- type: string
- description: Name of keypair to assign to servers
- default: bottlenecks-key
- image:
- type: string
- description: Name of image to use for servers
- default: bottlenecks-trusty-server
- flavor:
- type: string
- description: Flavor to use for servers
- default: bottlenecks-flavor
- public_net:
- type: string
- description: >
- ID or name of public network for which floating IP addresses will be allocated
- default: net04_ext
- private_net_name:
- type: string
- description: Name of private network to be created
- default: bottlenecks-private
- private_net_cidr:
- type: string
- description: Private network address (CIDR notation)
- default: "10.0.10.0/24"
- private_net_gateway:
- type: string
- description: Private network gateway address
- default: "10.0.10.1"
- private_net_pool_start:
- type: string
- description: Start of private network IP address allocation pool
- default: "10.0.10.2"
- private_net_pool_end:
- type: string
- description: End of private network IP address allocation pool
- default: "10.0.10.199"
-
-resources:
- private_net:
- type: OS::Neutron::Net
- properties:
- name: { get_param: private_net_name }
-
- private_subnet:
- type: OS::Neutron::Subnet
- properties:
- network_id: { get_resource: private_net }
- cidr: { get_param: private_net_cidr }
- gateway_ip: { get_param: private_net_gateway }
- allocation_pools:
- - start: { get_param: private_net_pool_start }
- end: { get_param: private_net_pool_end }
-
- router:
- type: OS::Neutron::Router
- properties:
- external_gateway_info:
- network: { get_param: public_net }
-
- router_interface:
- type: OS::Neutron::RouterInterface
- properties:
- router_id: { get_resource: router }
- subnet_id: { get_resource: private_subnet }
-
- rubbos_control:
- type: OS::Nova::Server
- properties:
- name: rubbos_control
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_control_port }
- admin_user: ubuntu
-
- rubbos_control_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_control_floating_ip:
- type: OS::Neutron::FloatingIP
- properties:
- floating_network: { get_param: public_net }
- port_id: { get_resource: rubbos_control_port }
-
- rubbos_httpd:
- type: OS::Nova::Server
- properties:
- name: rubbos_httpd
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_httpd_port }
- admin_user: ubuntu
-
- rubbos_httpd_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_mysql1:
- type: OS::Nova::Server
- properties:
- name: rubbos_mysql1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_mysql1_port }
- admin_user: ubuntu
-
- rubbos_mysql1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_tomcat1:
- type: OS::Nova::Server
- properties:
- name: rubbos_tomcat1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_tomcat1_port }
- admin_user: ubuntu
-
- rubbos_tomcat1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client1:
- type: OS::Nova::Server
- properties:
- name: rubbos_client1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client1_port }
- admin_user: ubuntu
-
- rubbos_client1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client2:
- type: OS::Nova::Server
- properties:
- name: rubbos_client2
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client2_port }
- admin_user: ubuntu
-
- rubbos_client2_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client3:
- type: OS::Nova::Server
- properties:
- name: rubbos_client3
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client3_port }
- admin_user: ubuntu
-
- rubbos_client3_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client4:
- type: OS::Nova::Server
- properties:
- name: rubbos_client4
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client4_port }
- admin_user: ubuntu
-
- rubbos_client4_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_benchmark:
- type: OS::Nova::Server
- properties:
- name: rubbos_benchmark
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_benchmark_port }
- admin_user: ubuntu
-
- rubbos_benchmark_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- server_security_group:
- type: OS::Neutron::SecurityGroup
- properties:
- description: Rubbos group for servers access.
- name: rubbos-security-group
- rules: [
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: tcp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: udp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: icmp}]
-
-outputs:
- rubbos_control_private_ip:
- description: IP address of rubbos_control in private network
- value: { get_attr: [ rubbos_control, first_address ] }
- rubbos_control_public_ip:
- description: Floating IP address of rubbos_control in public network
- value: { get_attr: [ rubbos_control_floating_ip, floating_ip_address ] }
- rubbos_httpd_private_ip:
- description: IP address of rubbos_httpd in private network
- value: { get_attr: [ rubbos_httpd, first_address ] }
- rubbos_mysql1_private_ip:
- description: IP address of rubbos_mysql1 in private network
- value: { get_attr: [ rubbos_mysql1, first_address ] }
- rubbos_tomcat1_private_ip:
- description: IP address of rubbos_tomcat1 in private network
- value: { get_attr: [ rubbos_tomcat1, first_address ] }
- rubbos_client1_private_ip:
- description: IP address of rubbos_client1 in private network
- value: { get_attr: [ rubbos_client1, first_address ] }
- rubbos_client2_private_ip:
- description: IP address of rubbos_client2 in private network
- value: { get_attr: [ rubbos_client2, first_address ] }
- rubbos_client3_private_ip:
- description: IP address of rubbos_client3 in private network
- value: { get_attr: [ rubbos_client3, first_address ] }
- rubbos_client4_private_ip:
- description: IP address of rubbos_client4 in private network
- value: { get_attr: [ rubbos_client4, first_address ] }
- rubbos_benchmark_private_ip:
- description: IP address of rubbos_benchmark in private network
- value: { get_attr: [ rubbos_benchmark, first_address ] }
-
diff --git a/utils/infra_setup/heat_template/rubbos_heat_template/rubbos_1-2-1_template.yaml b/utils/infra_setup/heat_template/rubbos_heat_template/rubbos_1-2-1_template.yaml
deleted file mode 100755
index d76a08cd..00000000
--- a/utils/infra_setup/heat_template/rubbos_heat_template/rubbos_1-2-1_template.yaml
+++ /dev/null
@@ -1,321 +0,0 @@
-heat_template_version: 2013-05-23
-
-description: >
- HOT template to create a new neutron network plus a router to the public
- network, and for deploying nine servers into the new network. The template also
- assigns floating IP addresses to rubbos_control server so it is routable from the
- public network.
-parameters:
- key_name:
- type: string
- description: Name of keypair to assign to servers
- default: bottlenecks-key
- image:
- type: string
- description: Name of image to use for servers
- default: bottlenecks-trusty-server
- flavor:
- type: string
- description: Flavor to use for servers
- default: bottlenecks-flavor
- public_net:
- type: string
- description: >
- ID or name of public network for which floating IP addresses will be allocated
- default: net04_ext
- private_net_name:
- type: string
- description: Name of private network to be created
- default: bottlenecks-private
- private_net_cidr:
- type: string
- description: Private network address (CIDR notation)
- default: "10.0.10.0/24"
- private_net_gateway:
- type: string
- description: Private network gateway address
- default: "10.0.10.1"
- private_net_pool_start:
- type: string
- description: Start of private network IP address allocation pool
- default: "10.0.10.2"
- private_net_pool_end:
- type: string
- description: End of private network IP address allocation pool
- default: "10.0.10.199"
-
-resources:
- private_net:
- type: OS::Neutron::Net
- properties:
- name: { get_param: private_net_name }
-
- private_subnet:
- type: OS::Neutron::Subnet
- properties:
- network_id: { get_resource: private_net }
- cidr: { get_param: private_net_cidr }
- gateway_ip: { get_param: private_net_gateway }
- allocation_pools:
- - start: { get_param: private_net_pool_start }
- end: { get_param: private_net_pool_end }
-
- router:
- type: OS::Neutron::Router
- properties:
- external_gateway_info:
- network: { get_param: public_net }
-
- router_interface:
- type: OS::Neutron::RouterInterface
- properties:
- router_id: { get_resource: router }
- subnet_id: { get_resource: private_subnet }
-
- rubbos_control:
- type: OS::Nova::Server
- properties:
- name: rubbos_control
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_control_port }
- admin_user: ubuntu
-
- rubbos_control_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_control_floating_ip:
- type: OS::Neutron::FloatingIP
- properties:
- floating_network: { get_param: public_net }
- port_id: { get_resource: rubbos_control_port }
-
- rubbos_httpd:
- type: OS::Nova::Server
- properties:
- name: rubbos_httpd
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_httpd_port }
- admin_user: ubuntu
-
- rubbos_httpd_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_mysql1:
- type: OS::Nova::Server
- properties:
- name: rubbos_mysql1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_mysql1_port }
- admin_user: ubuntu
-
- rubbos_mysql1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_tomcat1:
- type: OS::Nova::Server
- properties:
- name: rubbos_tomcat1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_tomcat1_port }
- admin_user: ubuntu
-
- rubbos_tomcat1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_tomcat2:
- type: OS::Nova::Server
- properties:
- name: rubbos_tomcat2
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_tomcat2_port }
- admin_user: ubuntu
-
- rubbos_tomcat2_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client1:
- type: OS::Nova::Server
- properties:
- name: rubbos_client1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client1_port }
- admin_user: ubuntu
-
- rubbos_client1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client2:
- type: OS::Nova::Server
- properties:
- name: rubbos_client2
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client2_port }
- admin_user: ubuntu
-
- rubbos_client2_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client3:
- type: OS::Nova::Server
- properties:
- name: rubbos_client3
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client3_port }
- admin_user: ubuntu
-
- rubbos_client3_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_client4:
- type: OS::Nova::Server
- properties:
- name: rubbos_client4
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_client4_port }
- admin_user: ubuntu
-
- rubbos_client4_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- rubbos_benchmark:
- type: OS::Nova::Server
- properties:
- name: rubbos_benchmark
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: rubbos_benchmark_port }
- admin_user: ubuntu
-
- rubbos_benchmark_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_resource: private_net }
- fixed_ips:
- - subnet_id: { get_resource: private_subnet }
- security_groups: [{ get_resource: server_security_group }]
-
- server_security_group:
- type: OS::Neutron::SecurityGroup
- properties:
- description: Rubbos group for servers access.
- name: rubbos-security-group
- rules: [
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: tcp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: udp,
- port_range_min: 1,
- port_range_max: 65535},
- {remote_ip_prefix: 0.0.0.0/0,
- protocol: icmp}]
-
-outputs:
- rubbos_control_private_ip:
- description: IP address of rubbos_control in private network
- value: { get_attr: [ rubbos_control, first_address ] }
- rubbos_control_public_ip:
- description: Floating IP address of rubbos_control in public network
- value: { get_attr: [ rubbos_control_floating_ip, floating_ip_address ] }
- rubbos_httpd_private_ip:
- description: IP address of rubbos_httpd in private network
- value: { get_attr: [ rubbos_httpd, first_address ] }
- rubbos_mysql1_private_ip:
- description: IP address of rubbos_mysql1 in private network
- value: { get_attr: [ rubbos_mysql1, first_address ] }
- rubbos_tomcat1_private_ip:
- description: IP address of rubbos_tomcat1 in private network
- value: { get_attr: [ rubbos_tomcat1, first_address ] }
- rubbos_tomcat2_private_ip:
- description: IP address of rubbos_tomcat2 in private network
- value: { get_attr: [ rubbos_tomcat2, first_address ] }
- rubbos_client1_private_ip:
- description: IP address of rubbos_client1 in private network
- value: { get_attr: [ rubbos_client1, first_address ] }
- rubbos_client2_private_ip:
- description: IP address of rubbos_client2 in private network
- value: { get_attr: [ rubbos_client2, first_address ] }
- rubbos_client3_private_ip:
- description: IP address of rubbos_client3 in private network
- value: { get_attr: [ rubbos_client3, first_address ] }
- rubbos_client4_private_ip:
- description: IP address of rubbos_client4 in private network
- value: { get_attr: [ rubbos_client4, first_address ] }
- rubbos_benchmark_private_ip:
- description: IP address of rubbos_benchmark in private network
- value: { get_attr: [ rubbos_benchmark, first_address ] }
diff --git a/utils/infra_setup/passwordless_SSH/__init__.py b/utils/infra_setup/passwordless_SSH/__init__.py
index b124dfa9..e69de29b 100644
--- a/utils/infra_setup/passwordless_SSH/__init__.py
+++ b/utils/infra_setup/passwordless_SSH/__init__.py
@@ -1,8 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
diff --git a/utils/infra_setup/runner/__init__.py b/utils/infra_setup/runner/__init__.py
index b124dfa9..e69de29b 100644
--- a/utils/infra_setup/runner/__init__.py
+++ b/utils/infra_setup/runner/__init__.py
@@ -1,8 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################