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

View File

@ -4,15 +4,19 @@ parameters:
baremetal_net: baremetal_net:
type: string type: string
default: baremetal default: baremetal
baremetal_subnet: baremetal_subnet:
type: string type: string
default: baremetal default: baremetal
image: image:
type: string type: string
default: Cirros 0.3.5 64-bit default: Cirros 0.3.5 64-bit
flavor: flavor:
type: string type: string
default: baremetal default: baremetal
ssh_key: ssh_key:
type: string type: string
default: heat-vm-key default: heat-vm-key
@ -21,21 +25,32 @@ resources:
server: server:
type: OS::Nova::Server type: OS::Nova::Server
properties: properties:
image: {get_param: image} image:
flavor: {get_param: flavor} get_param: image
key_name: {get_param: ssh_key} flavor:
get_param: flavor
key_name:
get_param: ssh_key
networks: networks:
- port: { get_resource: server_port } - port:
get_resource: server_port
user_data_format: RAW user_data_format: RAW
server_port: server_port:
type: OS::Neutron::Port type: OS::Neutron::Port
properties: properties:
network: {get_param: baremetal_net} network:
get_param: baremetal_net
fixed_ips: fixed_ips:
- subnet: { get_param: baremetal_subnet } - subnet:
get_param: baremetal_subnet
port_security_enabled: false port_security_enabled: false
outputs: outputs:
ip: 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: parameters:
public_net: public_net:
type: string type: string
default: public default: public
image: image:
type: string type: string
default: Cirros 0.3.5 64-bit default: Cirros 0.3.5 64-bit
flavor:
type: string
default: m1.tiny
ssh_key: ssh_key:
type: string type: string
default: heat-vm-key default: heat-vm-key
cidr: cidr:
type: string type: string
default: 10.11.11.0/24 default: 10.11.11.0/24
resources: resources:
flavor:
type: OS::Nova::Flavor
properties:
disk: 1
ram: 64
vcpus: 1
server: server:
type: OS::Nova::Server type: OS::Nova::Server
properties: properties:
image: {get_param: image} image:
flavor: {get_param: flavor} get_param: image
key_name: {get_param: ssh_key} flavor:
get_resource: flavor
key_name:
get_param: ssh_key
networks: networks:
- port: { get_resource: server_port } - port:
get_resource: server_port
user_data_format: RAW user_data_format: RAW
router: router:
type: OS::Neutron::Router type: OS::Neutron::Router
properties: properties:
external_gateway_info: external_gateway_info:
network: {get_param: public_net} network:
get_param: public_net
router_interface: router_interface:
type: OS::Neutron::RouterInterface type: OS::Neutron::RouterInterface
properties: properties:
router_id: { get_resource: router } router_id:
subnet_id: { get_resource: private_subnet } get_resource: router
subnet_id:
get_resource: private_subnet
private_net: private_net:
type: OS::Neutron::Net type: OS::Neutron::Net
@ -46,8 +60,10 @@ resources:
private_subnet: private_subnet:
type: OS::Neutron::Subnet type: OS::Neutron::Subnet
properties: properties:
network: { get_resource: private_net } network:
cidr: {get_param: cidr} get_resource: private_net
cidr:
get_param: cidr
dns_nameservers: dns_nameservers:
- 8.8.8.8 - 8.8.8.8
- 8.8.4.4 - 8.8.4.4
@ -56,31 +72,37 @@ resources:
type: OS::Neutron::SecurityGroup type: OS::Neutron::SecurityGroup
properties: properties:
name: default_port_security_group name: default_port_security_group
description: > description: 'Default security group assigned to port.'
Default security group assigned to port. rules:
rules: [ - remote_ip_prefix: 0.0.0.0/0
{remote_ip_prefix: 0.0.0.0/0, protocol: tcp
protocol: tcp, port_range_min: 22
port_range_min: 22, port_range_max: 22
port_range_max: 22}, - remote_ip_prefix: 0.0.0.0/0
{remote_ip_prefix: 0.0.0.0/0, protocol: icmp
protocol: icmp}]
server_port: server_port:
type: OS::Neutron::Port type: OS::Neutron::Port
properties: properties:
network: {get_resource: private_net} network:
get_resource: private_net
fixed_ips: fixed_ips:
- subnet: { get_resource: private_subnet } - subnet:
get_resource: private_subnet
security_groups: security_groups:
- { get_resource: port_security_group } - get_resource: port_security_group
server_floating_ip: server_floating_ip:
type: OS::Neutron::FloatingIP type: OS::Neutron::FloatingIP
properties: properties:
floating_network: {get_param: public_net} floating_network:
port_id: { get_resource: server_port } get_param: public_net
port_id:
get_resource: server_port
outputs: outputs:
floating_ip: 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: public_net:
type: OS::Neutron::ProviderNet type: OS::Neutron::ProviderNet
properties: properties:
name: {get_param: network_name} name:
get_param: network_name
router_external: true router_external: true
physical_network: {get_param: physical_network_name} physical_network:
get_param: physical_network_name
network_type: flat network_type: flat
private_subnet: private_subnet:
type: OS::Neutron::Subnet type: OS::Neutron::Subnet
properties: properties:
name: {get_param: subnet_name} name:
network: { get_resource: public_net } get_param: subnet_name
cidr: {get_param: subnet_cidr} network:
gateway_ip: {get_param: subnet_gateway} get_resource: public_net
cidr:
get_param: subnet_cidr
gateway_ip:
get_param: subnet_gateway
enable_dhcp: false enable_dhcp: false
dns_nameservers: dns_nameservers:
- 10.96.0.10 - 10.96.0.10

View File

@ -7,7 +7,8 @@ parameters:
subnet_pool_prefixes: subnet_pool_prefixes:
type: comma_delimited_list type: comma_delimited_list
default: ["10.0.0.0/8"] default:
- 10.0.0.0/8
subnet_pool_default_prefix_length: subnet_pool_default_prefix_length:
type: number type: number
@ -17,8 +18,11 @@ resources:
public_net: public_net:
type: OS::Neutron::SubnetPool type: OS::Neutron::SubnetPool
properties: properties:
name: {get_param: subnet_pool_name} name:
get_param: subnet_pool_name
shared: true shared: true
is_default: true is_default: true
default_prefixlen: {get_param: subnet_pool_default_prefix_length} default_prefixlen:
prefixes: {get_param: subnet_pool_prefixes} 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('') }}" OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
args: args:
chdir: "{{ zuul.project.src_dir }}" chdir: "{{ zuul.project.src_dir }}"
# - name: Deploy Cinder - name: Deploy Cinder
# shell: | shell: |
# set -xe; set -xe;
# ./tools/deployment/developer/ceph/130-cinder.sh ./tools/deployment/developer/ceph/130-cinder.sh
# args: environment:
# chdir: "{{ zuul.project.src_dir }}" 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 - name: Deploy OpenvSwitch
when: osh_neutron_backend == 'openvswitch' when: osh_neutron_backend == 'openvswitch'
shell: | shell: |