Gate: Update heat templates and enable cinder in ceph dev pipeline

This PS updates the heat templates, reducing the size of the
launched vm. In addition cinder is enabled in the ceph dev
pipeline, this is possible due to the resources no longer
consumed by the test vm.

Change-Id: I9efe6fe643c636b660dd54b60dfe7c8785d7fec2
This commit is contained in:
Pete Birley 2018-03-09 05:00:36 +00:00
parent 02d2367fcf
commit a9bd125f69
6 changed files with 101 additions and 53 deletions

View File

@ -42,7 +42,6 @@ openstack stack create --wait \
export OSH_EXT_NET_NAME="public"
export OSH_VM_FLAVOR="m1.tiny"
export OSH_VM_KEY_STACK="heat-vm-key"
export OSH_PRIVATE_SUBNET="10.0.0.0/24"
@ -60,7 +59,6 @@ chmod 600 ${HOME}/.ssh/osh_key
openstack stack create --wait \
--parameter public_net=${OSH_EXT_NET_NAME} \
--parameter image="${IMAGE_NAME}" \
--parameter flavor=${OSH_VM_FLAVOR} \
--parameter ssh_key=${OSH_VM_KEY_STACK} \
--parameter cidr=${OSH_PRIVATE_SUBNET} \
-t ./tools/gate/files/heat-basic-vm-deployment.yaml \

View File

@ -4,15 +4,19 @@ parameters:
baremetal_net:
type: string
default: baremetal
baremetal_subnet:
type: string
default: baremetal
image:
type: string
default: Cirros 0.3.5 64-bit
flavor:
type: string
default: baremetal
ssh_key:
type: string
default: heat-vm-key
@ -21,21 +25,32 @@ resources:
server:
type: OS::Nova::Server
properties:
image: {get_param: image}
flavor: {get_param: flavor}
key_name: {get_param: ssh_key}
image:
get_param: image
flavor:
get_param: flavor
key_name:
get_param: ssh_key
networks:
- port: { get_resource: server_port }
- port:
get_resource: server_port
user_data_format: RAW
server_port:
type: OS::Neutron::Port
properties:
network: {get_param: baremetal_net}
network:
get_param: baremetal_net
fixed_ips:
- subnet: { get_param: baremetal_subnet }
- subnet:
get_param: baremetal_subnet
port_security_enabled: false
outputs:
ip:
value: {get_attr: [server_port, fixed_ips, 0, ip_address]}
value:
get_attr:
- server_port
- fixed_ips
- 0
- ip_address

View File

@ -1,44 +1,58 @@
heat_template_version: 2016-10-14
heat_template_version: '2016-10-14'
parameters:
public_net:
type: string
default: public
image:
type: string
default: Cirros 0.3.5 64-bit
flavor:
type: string
default: m1.tiny
ssh_key:
type: string
default: heat-vm-key
cidr:
type: string
default: 10.11.11.0/24
resources:
flavor:
type: OS::Nova::Flavor
properties:
disk: 1
ram: 64
vcpus: 1
server:
type: OS::Nova::Server
properties:
image: {get_param: image}
flavor: {get_param: flavor}
key_name: {get_param: ssh_key}
image:
get_param: image
flavor:
get_resource: flavor
key_name:
get_param: ssh_key
networks:
- port: { get_resource: server_port }
- port:
get_resource: server_port
user_data_format: RAW
router:
type: OS::Neutron::Router
properties:
external_gateway_info:
network: {get_param: public_net}
network:
get_param: public_net
router_interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: router }
subnet_id: { get_resource: private_subnet }
router_id:
get_resource: router
subnet_id:
get_resource: private_subnet
private_net:
type: OS::Neutron::Net
@ -46,8 +60,10 @@ resources:
private_subnet:
type: OS::Neutron::Subnet
properties:
network: { get_resource: private_net }
cidr: {get_param: cidr}
network:
get_resource: private_net
cidr:
get_param: cidr
dns_nameservers:
- 8.8.8.8
- 8.8.4.4
@ -56,31 +72,37 @@ resources:
type: OS::Neutron::SecurityGroup
properties:
name: default_port_security_group
description: >
Default security group assigned to port.
rules: [
{remote_ip_prefix: 0.0.0.0/0,
protocol: tcp,
port_range_min: 22,
port_range_max: 22},
{remote_ip_prefix: 0.0.0.0/0,
protocol: icmp}]
description: 'Default security group assigned to port.'
rules:
- remote_ip_prefix: 0.0.0.0/0
protocol: tcp
port_range_min: 22
port_range_max: 22
- remote_ip_prefix: 0.0.0.0/0
protocol: icmp
server_port:
type: OS::Neutron::Port
properties:
network: {get_resource: private_net}
network:
get_resource: private_net
fixed_ips:
- subnet: { get_resource: private_subnet }
- subnet:
get_resource: private_subnet
security_groups:
- { get_resource: port_security_group }
- get_resource: port_security_group
server_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network: {get_param: public_net}
port_id: { get_resource: server_port }
floating_network:
get_param: public_net
port_id:
get_resource: server_port
outputs:
floating_ip:
value: {get_attr: [server_floating_ip, floating_ip_address]}
value:
get_attr:
- server_floating_ip
- floating_ip_address

View File

@ -25,18 +25,24 @@ resources:
public_net:
type: OS::Neutron::ProviderNet
properties:
name: {get_param: network_name}
name:
get_param: network_name
router_external: true
physical_network: {get_param: physical_network_name}
physical_network:
get_param: physical_network_name
network_type: flat
private_subnet:
type: OS::Neutron::Subnet
properties:
name: {get_param: subnet_name}
network: { get_resource: public_net }
cidr: {get_param: subnet_cidr}
gateway_ip: {get_param: subnet_gateway}
name:
get_param: subnet_name
network:
get_resource: public_net
cidr:
get_param: subnet_cidr
gateway_ip:
get_param: subnet_gateway
enable_dhcp: false
dns_nameservers:
- 10.96.0.10

View File

@ -7,7 +7,8 @@ parameters:
subnet_pool_prefixes:
type: comma_delimited_list
default: ["10.0.0.0/8"]
default:
- 10.0.0.0/8
subnet_pool_default_prefix_length:
type: number
@ -17,8 +18,11 @@ resources:
public_net:
type: OS::Neutron::SubnetPool
properties:
name: {get_param: subnet_pool_name}
name:
get_param: subnet_pool_name
shared: true
is_default: true
default_prefixlen: {get_param: subnet_pool_default_prefix_length}
prefixes: {get_param: subnet_pool_prefixes}
default_prefixlen:
get_param: subnet_pool_default_prefix_length
prefixes:
get_param: subnet_pool_prefixes

View File

@ -137,12 +137,15 @@
OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
args:
chdir: "{{ zuul.project.src_dir }}"
# - name: Deploy Cinder
# shell: |
# set -xe;
# ./tools/deployment/developer/ceph/130-cinder.sh
# args:
# chdir: "{{ zuul.project.src_dir }}"
- name: Deploy Cinder
shell: |
set -xe;
./tools/deployment/developer/ceph/130-cinder.sh
environment:
OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
args:
chdir: "{{ zuul.project.src_dir }}"
- name: Deploy OpenvSwitch
when: osh_neutron_backend == 'openvswitch'
shell: |