Skip to content

Commit

Permalink
UPI: add a router to cluster network
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilio Garcia committed Dec 4, 2019
1 parent 79dae77 commit 0fc3120
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions upi/openstack/01_network.yaml
Expand Up @@ -21,3 +21,10 @@
cidr: "{{ os_subnet_range }}"
allocation_pool_start: "{{ os_subnet_range | next_nth_usable(10) }}"
allocation_pool_end: "{{ os_subnet_range | ipaddr('last_usable') }}"

- name: 'Create external router'
os_router:
name: "{{ os_router }}"
network: "{{ os_external_network }}"
interfaces:
- "{{ cluster_subnet }}"
4 changes: 4 additions & 0 deletions upi/openstack/down-01_network.yaml
Expand Up @@ -6,6 +6,10 @@
- hosts: all

tasks:
- name: 'Remove the cluster router'
os_router:
name: "{{ os_router }}"
state: absent
- name: 'Remove the cluster network'
os_network:
name: "{{ os_network }}"
Expand Down
5 changes: 5 additions & 0 deletions upi/openstack/inventory.yaml
Expand Up @@ -9,6 +9,7 @@ all:
os_cluster_name: 'openshift'
os_flavor_master: 'm1.xlarge'
os_image_rhcos: 'rhcos'
os_external_network: 'external'

# Computed values

Expand All @@ -22,6 +23,10 @@ all:
# OpenShift cluster.
os_network: "{{ os_infra_id }}-network"

# os_router is the name of the router that connects the os_network to your
# cluster's external network (os_external_network)
os_router: "{{ os_infra_id }}-router"

# os_sg_* are the names of the security groups that will be assigned to
# the respective nodes.
os_sg_master: "{{ os_infra_id }}-master"
Expand Down

0 comments on commit 0fc3120

Please sign in to comment.