updated nova_test.sh to include floating IP and security_groups, and controller.pp to support a change in the horizon module (more horizon services)
This commit is contained in:
@@ -5,26 +5,32 @@
|
||||
source /root/openrc
|
||||
|
||||
# get an image to test with
|
||||
#wget http://uec-images.ubuntu.com/releases/11.10/release/ubuntu-11.10-server-cloudimg-amd64-disk1.img
|
||||
|
||||
#wget http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img
|
||||
# import that image into glance
|
||||
#glance add name="Ubuntu 11.10 cloudimg amd64" is_public=true container_format=ovf disk_format=qcow2 < ubuntu-11.10-server-cloudimg-amd64-disk1.img
|
||||
|
||||
#IMAGE_ID=`glance index | grep 'Ubuntu 11.10 cloudimg amd64' | head -1 | awk -F' ' '{print $1}'`
|
||||
#glance add name="precise-amd64" is_public=true container_format=ovf disk_format=qcow2 < precise-server-cloudimg-amd64-disk1.img
|
||||
#IMAGE_ID=`glance index | grep 'precise-amd64' | head -1 | awk -F' ' '{print $1}'`
|
||||
|
||||
wget https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img
|
||||
|
||||
glance add name='cirros image' is_public=true container_format=bare disk_format=qcow2 < cirros-0.3.0-x86_64-disk.img
|
||||
|
||||
IMAGE_ID=`glance index | grep 'cirros image' | head -1 | awk -F' ' '{print $1}'`
|
||||
|
||||
# create a pub key
|
||||
ssh-keygen -f /tmp/id_rsa -t rsa -N ''
|
||||
nova keypair-add --pub_key /tmp/id_rsa.pub key1
|
||||
nova keypair-add --pub_key /tmp/id_rsa.pub key_cirros
|
||||
|
||||
nova boot --flavor 1 --image ${IMAGE_ID} --key_name key1 dans_vm
|
||||
nova secgroup-create cirros_test 'Cirros test security group'
|
||||
nova secgroup-add-rule cirros_test tcp 22 22 0.0.0.0/0
|
||||
nova secgroup-add-rule cirros_test tcp 80 80 0.0.0.0/0
|
||||
nova secgroup-add-rule cirros_test icmp -1 -1 0.0.0.0/0
|
||||
|
||||
nova show dans_vm
|
||||
floating_ip=`nova floating-ip-create | grep None | awk '{print $2}'`
|
||||
|
||||
nova boot --flavor 1 --security_groups cirros_test --image ${IMAGE_ID} --key_name key_cirros cirros_vm
|
||||
sleep 5
|
||||
nova show cirros_vm
|
||||
# wait for the server to boot
|
||||
sleep 20
|
||||
nova add-floating-ip precise_vm $floating_ip
|
||||
sleep 10
|
||||
ssh ubuntu@$floating_ip -i /tmp/id_rsa
|
||||
|
||||
# create ec2 credentials
|
||||
keystone ec2-credentials-create
|
||||
|
@@ -30,6 +30,11 @@
|
||||
# network settings. Optioal. Defaults to {}
|
||||
# [verbose] Rahter to log services at verbose.
|
||||
# [export_resources] Rather to export resources.
|
||||
# Horizon related config - assumes puppetlabs-horizon code
|
||||
# [cache_server_ip] local memcached instance ip
|
||||
# [cache_server_port] local memcached instance port
|
||||
# [swift] (bool) is swift installed
|
||||
# [quantum] (bool) is quqntum installed
|
||||
#
|
||||
class openstack::controller(
|
||||
# my address
|
||||
@@ -65,7 +70,14 @@ class openstack::controller(
|
||||
$network_config = {},
|
||||
# I do not think that this needs a bridge?
|
||||
$verbose = false,
|
||||
$export_resources = true
|
||||
$export_resources = true,
|
||||
$cache_server_ip = '127.0.0.1',
|
||||
$cache_server_port = '11211',
|
||||
$swift = false,
|
||||
$quantum = false,
|
||||
$app_mon = undef,
|
||||
$comp_mon = undef,
|
||||
$stor_mon = undef,
|
||||
) {
|
||||
|
||||
$glance_api_servers = "${internal_address}:9292"
|
||||
@@ -261,7 +273,15 @@ class openstack::controller(
|
||||
listen_ip => '127.0.0.1',
|
||||
}
|
||||
|
||||
class { 'horizon': }
|
||||
class { 'horizon':
|
||||
cache_server_ip => $cache_server_ip,
|
||||
cache_server_port => $cache_server_port,
|
||||
swift => $swift,
|
||||
quantum => $quantum,
|
||||
app_mon => $app_mon,
|
||||
comp_mon => $comp_mon,
|
||||
stor_mon => $stor_mon,
|
||||
}
|
||||
|
||||
|
||||
######## End Horizon #####
|
||||
|
Reference in New Issue
Block a user