From: Vladimir Khlyunev Date: Wed, 17 Apr 2019 12:32:18 +0000 (+0400) Subject: Make heat-templates standalone X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F81%2F41081%2F4;p=tools%2Fsustaining.git Make heat-templates standalone Change-Id: I2f81311a2499cb97a78cf7dd1b5e025a9ceef4cf --- diff --git a/maintenance-ci/common/data/jenkins-slave.yml b/maintenance-ci/common/data/jenkins-slave.yml index 4843112..df56b02 100644 --- a/maintenance-ci/common/data/jenkins-slave.yml +++ b/maintenance-ci/common/data/jenkins-slave.yml @@ -6,22 +6,22 @@ parameters: type: string description: Name of keypair to assign to servers default: maintenance-ci-public-key + constraints: + - custom_constraint: nova.keypair + description: Must name a public key (pair) known to Nova image: type: string description: Name of image to use for servers default: maintenance-ci-base-image + constraints: + - custom_constraint: glance.image + description: Must identify an image known to Glance flavor: type: string description: Flavor to use for servers - private_net: - type: string - description: > - ID or name of public network for which floating IP addresses will be allocated - default: maintenance-ci-network - private_subnet: - type: string - default: maintenance-ci-subnet - description: Id of the private sub network for the compute server + constraints: + - custom_constraint: nova.flavor + description: Must be a flavor known to Nova public_net: type: string default: public @@ -32,7 +32,6 @@ parameters: description: List of labels for jenkins swarm agent separated by whitespace resources: - wait_condition: type: OS::Heat::WaitCondition properties: @@ -43,14 +42,56 @@ resources: wait_handle: type: OS::Heat::WaitConditionHandle + private_net: + type: OS::Neutron::Net + + private_subnet: + type: OS::Neutron::Subnet + properties: + network_id: { get_resource: private_net } + cidr: 10.10.0.0/24 + dns_nameservers: + - 172.18.176.6 + - 172.18.208.44 + + 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 } + + security_group: + type: OS::Neutron::SecurityGroup + properties: + rules: [ + {direction: ingress, + remote_ip_prefix: 0.0.0.0/0, + protocol: tcp, + port_range_min: 1, + port_range_max: 65535}, + {direction: ingress, + 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, + direction: ingress}] + public_port: type: OS::Neutron::Port properties: - network_id: { get_param: private_net } + network_id: { get_resource: private_net } fixed_ips: - - subnet_id: { get_param: private_subnet } + - subnet_id: { get_resource: private_subnet } security_groups: - - dc56d304-e75e-437a-8ef5-656f9bfcd2a0 + - { get_resource: security_group } floating_ip: type: OS::Neutron::FloatingIP diff --git a/maintenance-ci/common/data/mos-dev-slave.yml b/maintenance-ci/common/data/mos-dev-slave.yml index e08c778..3f044b8 100644 --- a/maintenance-ci/common/data/mos-dev-slave.yml +++ b/maintenance-ci/common/data/mos-dev-slave.yml @@ -6,22 +6,22 @@ parameters: type: string description: Name of keypair to assign to servers default: maintenance-ci-public-key + constraints: + - custom_constraint: nova.keypair + description: Must name a public key (pair) known to Nova image: type: string description: Name of image to use for servers default: maintenance-ci-mos-image + constraints: + - custom_constraint: glance.image + description: Must identify an image known to Glance flavor: type: string description: Flavor to use for servers - private_net: - type: string - description: > - ID or name of public network for which floating IP addresses will be allocated - default: maintenance-ci-network - private_subnet: - type: string - default: maintenance-ci-subnet - description: Id of the private sub network for the compute server + constraints: + - custom_constraint: nova.flavor + description: Must be a flavor known to Nova public_net: type: string default: public @@ -32,7 +32,6 @@ parameters: description: List of labels for jenkins swarm agent separated by whitespace resources: - wait_condition: type: OS::Heat::WaitCondition properties: @@ -43,14 +42,56 @@ resources: wait_handle: type: OS::Heat::WaitConditionHandle + private_net: + type: OS::Neutron::Net + + private_subnet: + type: OS::Neutron::Subnet + properties: + network_id: { get_resource: private_net } + cidr: 10.10.0.0/24 + dns_nameservers: + - 172.18.176.6 + - 172.18.208.44 + + 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 } + + security_group: + type: OS::Neutron::SecurityGroup + properties: + rules: [ + {direction: ingress, + remote_ip_prefix: 0.0.0.0/0, + protocol: tcp, + port_range_min: 1, + port_range_max: 65535}, + {direction: ingress, + 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, + direction: ingress}] + public_port: type: OS::Neutron::Port properties: - network_id: { get_param: private_net } + network_id: { get_resource: private_net } fixed_ips: - - subnet_id: { get_param: private_subnet } + - subnet_id: { get_resource: private_subnet } security_groups: - - dc56d304-e75e-437a-8ef5-656f9bfcd2a0 + - { get_resource: security_group } floating_ip: type: OS::Neutron::FloatingIP diff --git a/maintenance-ci/common/data/mos-slave.yml b/maintenance-ci/common/data/mos-slave.yml index 4bc88f8..d5884fa 100644 --- a/maintenance-ci/common/data/mos-slave.yml +++ b/maintenance-ci/common/data/mos-slave.yml @@ -6,22 +6,22 @@ parameters: type: string description: Name of keypair to assign to servers default: maintenance-ci-public-key + constraints: + - custom_constraint: nova.keypair + description: Must name a public key (pair) known to Nova image: type: string description: Name of image to use for servers default: maintenance-ci-mos-image + constraints: + - custom_constraint: glance.image + description: Must identify an image known to Glance flavor: type: string description: Flavor to use for servers - private_net: - type: string - description: > - ID or name of public network for which floating IP addresses will be allocated - default: maintenance-ci-network - private_subnet: - type: string - default: maintenance-ci-subnet - description: Id of the private sub network for the compute server + constraints: + - custom_constraint: nova.flavor + description: Must be a flavor known to Nova public_net: type: string default: public @@ -32,7 +32,6 @@ parameters: description: List of labels for jenkins swarm agent separated by whitespace resources: - wait_condition: type: OS::Heat::WaitCondition properties: @@ -43,14 +42,56 @@ resources: wait_handle: type: OS::Heat::WaitConditionHandle + private_net: + type: OS::Neutron::Net + + private_subnet: + type: OS::Neutron::Subnet + properties: + network_id: { get_resource: private_net } + cidr: 10.10.0.0/24 + dns_nameservers: + - 172.18.176.6 + - 172.18.208.44 + + 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 } + + security_group: + type: OS::Neutron::SecurityGroup + properties: + rules: [ + {direction: ingress, + remote_ip_prefix: 0.0.0.0/0, + protocol: tcp, + port_range_min: 1, + port_range_max: 65535}, + {direction: ingress, + 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, + direction: ingress}] + public_port: type: OS::Neutron::Port properties: - network_id: { get_param: private_net } + network_id: { get_resource: private_net } fixed_ips: - - subnet_id: { get_param: private_subnet } + - subnet_id: { get_resource: private_subnet } security_groups: - - dc56d304-e75e-437a-8ef5-656f9bfcd2a0 + - { get_resource: security_group } floating_ip: type: OS::Neutron::FloatingIP