Merge "Backport "Avoid usage of deprecated properties""

This commit is contained in:
Jenkins 2015-06-15 23:48:08 +00:00 committed by Gerrit Code Review
commit c9e5994497
7 changed files with 38 additions and 35 deletions

View File

@ -281,9 +281,6 @@ class BaseTemplateDefinition(TemplateDefinition):
self.add_parameter('ssh_key_name', self.add_parameter('ssh_key_name',
baymodel_attr='keypair_id', baymodel_attr='keypair_id',
required=True) required=True)
self.add_parameter('external_network_id',
baymodel_attr='external_network_id',
required=True)
self.add_parameter('server_image', self.add_parameter('server_image',
baymodel_attr='image_id') baymodel_attr='image_id')
@ -313,6 +310,9 @@ class AtomicK8sTemplateDefinition(BaseTemplateDefinition):
param_type=str) param_type=str)
self.add_parameter('docker_volume_size', self.add_parameter('docker_volume_size',
baymodel_attr='docker_volume_size') baymodel_attr='docker_volume_size')
self.add_parameter('external_network',
baymodel_attr='external_network_id',
required=True)
# TODO(yuanying): Add below lines if apiserver_port parameter # TODO(yuanying): Add below lines if apiserver_port parameter
# is supported # is supported
# self.add_parameter('apiserver_port', # self.add_parameter('apiserver_port',
@ -374,6 +374,9 @@ class AtomicSwarmTemplateDefinition(BaseTemplateDefinition):
param_type=str) param_type=str)
self.add_parameter('server_flavor', self.add_parameter('server_flavor',
baymodel_attr='flavor_id') baymodel_attr='flavor_id')
self.add_parameter('external_network_id',
baymodel_attr='external_network_id',
required=True)
self.add_output('swarm_manager', self.add_output('swarm_manager',
bay_attr='api_address') bay_attr='api_address')

View File

@ -36,7 +36,7 @@ your environment:
parameters: parameters:
ssh_key_name: lars ssh_key_name: lars
external_network_id: 028d70dd-67b8-4901-8bdd-0c62b06cce2d external_network: public
dns_nameserver: 192.168.200.1 dns_nameserver: 192.168.200.1
server_image: centos-7-atomic-20150101 server_image: centos-7-atomic-20150101
@ -47,7 +47,7 @@ And then create the stack, referencing that environment file:
You must provide values for: You must provide values for:
- `ssh_key_name` - `ssh_key_name`
- `external_network_id` - `external_network`
- `server_image` - `server_image`
## Interacting with Kubernetes ## Interacting with Kubernetes
@ -65,8 +65,8 @@ You can ssh into that server as the `minion` user:
And once logged in you can run `kubectl`, etc: And once logged in you can run `kubectl`, etc:
$ kubectl get minions $ kubectl get minions
NAME LABELS NAME LABELS STATUS
10.0.0.4 <none> 10.0.0.4 <none> Ready
You can log into your minions using the `minion` user as well. You You can log into your minions using the `minion` user as well. You
can get a list of minion addresses by running: can get a list of minion addresses by running:

View File

@ -14,7 +14,7 @@ parameters:
type: string type: string
description: name of ssh key to be provisioned on our server description: name of ssh key to be provisioned on our server
external_network_id: external_network:
type: string type: string
description: uuid of a network to use for floating ip addresses description: uuid of a network to use for floating ip addresses

View File

@ -14,9 +14,9 @@ parameters:
type: string type: string
description: name of ssh key to be provisioned on our server description: name of ssh key to be provisioned on our server
external_network_id: external_network:
type: string type: string
description: uuid of a network to use for floating ip addresses description: uuid/name of a network to use for floating ip addresses
# #
# OPTIONAL PARAMETERS # OPTIONAL PARAMETERS
@ -137,7 +137,7 @@ resources:
properties: properties:
external_gateway_info: external_gateway_info:
network: network:
get_param: external_network_id get_param: external_network
# attached fixed_subnet to our extrouter router. # attached fixed_subnet to our extrouter router.
extrouter_inside: extrouter_inside:
@ -145,7 +145,7 @@ resources:
properties: properties:
router_id: router_id:
get_resource: extrouter get_resource: extrouter
subnet_id: subnet:
get_resource: get_resource:
fixed_subnet fixed_subnet
@ -302,21 +302,21 @@ resources:
kube_master_eth0: kube_master_eth0:
type: "OS::Neutron::Port" type: "OS::Neutron::Port"
properties: properties:
network_id: network:
get_resource: fixed_network get_resource: fixed_network
security_groups: security_groups:
- get_resource: secgroup_base - get_resource: secgroup_base
- get_resource: secgroup_kubernetes - get_resource: secgroup_kubernetes
fixed_ips: fixed_ips:
- subnet_id: - subnet:
get_resource: fixed_subnet get_resource: fixed_subnet
replacement_policy: AUTO replacement_policy: AUTO
kube_master_floating: kube_master_floating:
type: "OS::Neutron::FloatingIP" type: "OS::Neutron::FloatingIP"
properties: properties:
floating_network_id: floating_network:
get_param: external_network_id get_param: external_network
port_id: port_id:
get_resource: kube_master_eth0 get_resource: kube_master_eth0
@ -333,10 +333,10 @@ resources:
ssh_key_name: {get_param: ssh_key_name} ssh_key_name: {get_param: ssh_key_name}
server_image: {get_param: server_image} server_image: {get_param: server_image}
minion_flavor: {get_param: minion_flavor} minion_flavor: {get_param: minion_flavor}
fixed_network_id: {get_resource: fixed_network} fixed_network: {get_resource: fixed_network}
fixed_subnet_id: {get_resource: fixed_subnet} fixed_subnet: {get_resource: fixed_subnet}
kube_master_ip: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]} kube_master_ip: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]}
external_network_id: {get_param: external_network_id} external_network: {get_param: external_network}
kube_allow_priv: {get_param: kube_allow_priv} kube_allow_priv: {get_param: kube_allow_priv}
docker_volume_size: {get_param: docker_volume_size} docker_volume_size: {get_param: docker_volume_size}
wait_condition_timeout: {get_param: wait_condition_timeout} wait_condition_timeout: {get_param: wait_condition_timeout}

View File

@ -22,9 +22,9 @@ parameters:
description: name of ssh key to be provisioned on our server description: name of ssh key to be provisioned on our server
default: lars default: lars
external_network_id: external_network:
type: string type: string
description: uuid of a network to use for floating ip addresses description: uuid/name of a network to use for floating ip addresses
kube_allow_priv: kube_allow_priv:
type: string type: string
@ -45,10 +45,10 @@ parameters:
kube_master_ip: kube_master_ip:
type: string type: string
description: IP address of the Kubernetes master server. description: IP address of the Kubernetes master server.
fixed_network_id: fixed_network:
type: string type: string
description: Network from which to allocate fixed addresses. description: Network from which to allocate fixed addresses.
fixed_subnet_id: fixed_subnet:
type: string type: string
description: Subnet from which to allocate fixed addresses. description: Subnet from which to allocate fixed addresses.
wait_condition_timeout: wait_condition_timeout:
@ -61,7 +61,7 @@ resources:
minion_wait_handle: minion_wait_handle:
type: OS::Heat::WaitConditionHandle type: OS::Heat::WaitConditionHandle
node_wait_condition: minion_wait_condition:
type: OS::Heat::WaitCondition type: OS::Heat::WaitCondition
depends_on: kube_minion depends_on: kube_minion
properties: properties:
@ -200,20 +200,20 @@ resources:
kube_minion_eth0: kube_minion_eth0:
type: "OS::Neutron::Port" type: "OS::Neutron::Port"
properties: properties:
network_id: network:
get_param: fixed_network_id get_param: fixed_network
security_groups: security_groups:
- get_resource: secgroup_all_open - get_resource: secgroup_all_open
fixed_ips: fixed_ips:
- subnet_id: - subnet:
get_param: fixed_subnet_id get_param: fixed_subnet
replacement_policy: AUTO replacement_policy: AUTO
kube_minion_floating: kube_minion_floating:
type: "OS::Neutron::FloatingIP" type: "OS::Neutron::FloatingIP"
properties: properties:
floating_network_id: floating_network:
get_param: external_network_id get_param: external_network
port_id: port_id:
get_resource: kube_minion_eth0 get_resource: kube_minion_eth0

View File

@ -22,7 +22,7 @@ parameters:
description: name of ssh key to be provisioned on our server description: name of ssh key to be provisioned on our server
default: testkey default: testkey
external_network_id: external_network:
type: string type: string
description: uuid of a network to use for floating ip addresses description: uuid of a network to use for floating ip addresses

View File

@ -98,7 +98,7 @@ class TestBayConductorWithK8s(base.TestCase):
} }
expected = { expected = {
'ssh_key_name': 'keypair_id', 'ssh_key_name': 'keypair_id',
'external_network_id': 'external_network_id', 'external_network': 'external_network_id',
'dns_nameserver': 'dns_nameserver', 'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id', 'server_image': 'image_id',
'minion_flavor': 'flavor_id', 'minion_flavor': 'flavor_id',
@ -135,7 +135,7 @@ class TestBayConductorWithK8s(base.TestCase):
expected = { expected = {
'ssh_key_name': 'keypair_id', 'ssh_key_name': 'keypair_id',
'external_network_id': 'external_network_id', 'external_network': 'external_network_id',
'dns_nameserver': 'dns_nameserver', 'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id', 'server_image': 'image_id',
'minion_flavor': 'flavor_id', 'minion_flavor': 'flavor_id',
@ -171,7 +171,7 @@ class TestBayConductorWithK8s(base.TestCase):
expected = { expected = {
'ssh_key_name': 'keypair_id', 'ssh_key_name': 'keypair_id',
'external_network_id': 'external_network_id', 'external_network': 'external_network_id',
'dns_nameserver': 'dns_nameserver', 'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id', 'server_image': 'image_id',
'minion_flavor': 'flavor_id', 'minion_flavor': 'flavor_id',
@ -249,7 +249,7 @@ class TestBayConductorWithK8s(base.TestCase):
expected = { expected = {
'ssh_key_name': 'keypair_id', 'ssh_key_name': 'keypair_id',
'external_network_id': 'external_network_id', 'external_network': 'external_network_id',
'dns_nameserver': 'dns_nameserver', 'dns_nameserver': 'dns_nameserver',
'server_image': 'image_id', 'server_image': 'image_id',
'master_flavor': 'master_flavor_id', 'master_flavor': 'master_flavor_id',