puppet-openstack-integration/manifests/provision.pp
David Moreau-Simard 0d13153e54 Provision from pre-cached/pre-downloaded CirrOS image
In run_tests.sh we symlink a cached image to /tmp/openstack/tempest
or it is downloaded to that location using wget which is more reliable.

Let's use that instead.

Change-Id: I3777d9d035ceb31827b8df4264c2f7d213f50aea
2016-09-23 10:26:07 -04:00

57 lines
1.6 KiB
Puppet

# Deploy OpenStack resources needed to run Tempest
class openstack_integration::provision {
include ::openstack_integration::config
nova_flavor { 'm1.nano':
ensure => present,
id => '42',
ram => '128',
disk => '0',
vcpus => '1',
}
nova_flavor { 'm1.micro':
ensure => present,
id => '84',
ram => '128',
disk => '0',
vcpus => '1',
}
Keystone_user_role['admin@openstack'] -> Nova_flavor<||>
neutron_network { 'public':
tenant_name => 'openstack',
router_external => true,
provider_physical_network => 'external',
provider_network_type => 'flat',
}
Keystone_user_role['admin@openstack'] -> Neutron_network<||>
neutron_subnet { 'public-subnet':
cidr => '172.24.5.0/24',
ip_version => '4',
allocation_pools => ['start=172.24.5.10,end=172.24.5.200'],
gateway_ip => '172.24.5.1',
enable_dhcp => false,
network_name => 'public',
tenant_name => 'openstack',
}
glance_image { 'cirros':
ensure => present,
container_format => 'bare',
disk_format => 'qcow2',
is_public => 'yes',
source => '/tmp/openstack/tempest/cirros-0.3.4-x86_64-disk.img'
}
glance_image { 'cirros_alt':
ensure => present,
container_format => 'bare',
disk_format => 'qcow2',
is_public => 'yes',
source => '/tmp/openstack/tempest/cirros-0.3.4-x86_64-disk.img'
}
Keystone_user_role['admin@openstack'] -> Glance_image<||>
}