Skip to content

Commit 521a42d

Browse files
committed
vpc finished
1 parent be932c2 commit 521a42d

File tree

2 files changed

+33
-17
lines changed

2 files changed

+33
-17
lines changed

README.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ you would get if you were to do use the Installer-Provision Infrastructure
1313
quite a few tags that are critical to ensuring that you can take advantage of
1414
all cloud integration features in OpenShift 4.
1515

16-
To improve that exprience and to ensure the infrastructure provided by default
16+
To improve that experience and to ensure the infrastructure provided by default
1717
matches as closely as possible to what you would get if you used the IPI method
1818
of deployment, this repository includes modified versions of each of the
1919
CloudFormation templates to fix those issues.
@@ -23,11 +23,7 @@ You can find the templates here:
2323
| Template | Original | Modified |
2424
| ------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------- |
2525
| VPC | [original](playbooks/aws/cloudformation/vpc.original.yaml) | [modified](playbooks/aws/cloudformation/vpc.yaml) |
26-
| Network / Load Balancing | [original](playbooks/aws/cloudformation/network.original.yaml) | [modified](playbooks/aws/cloudformation/network.yaml) |
2726
| Security | [original](playbooks/aws/cloudformation/security.original.yaml) | [modified](playbooks/aws/cloudformation/security.yaml) |
28-
| Bootstrap | [original](playbooks/aws/cloudformation/bootstrap.original.yaml) | [modified](playbooks/aws/cloudformation/bootstrap.yaml) |
29-
| Control Plane | [original](playbooks/aws/cloudformation/control_plane.original.yaml) | [modified](playbooks/aws/cloudformation/control_plane.yaml) |
30-
| Worker | [original](playbooks/aws/cloudformation/worker.original.yaml) | [modified](playbooks/aws/cloudformation/worker.yaml) |
3127

3228
Also included is a playbook that ties each of the CloudFormation templates
3329
together by matching the outputs of CloudFormation stacks to parameters to
@@ -43,17 +39,11 @@ Example variable file:
4339
# Required Variables
4440
###############################################################################
4541

46-
cluster_name: test
47-
base_domain: example.com
48-
infrastructure_name: test-fgmdv
42+
cluster_name: example
43+
base_domain: redhat.com
44+
infrastructure_name: example
4945

5046
hosted_zone_name: "{{ base_domain }}"
51-
hosted_zone_id: Z05602532C4FRVJXEMAGM
52-
53-
rhcos_ami: ami-0f4ecf819275850dd
54-
55-
bootstrap_ignition_location: 's3://com-example-test-ignition/bootstrap.ign'
56-
ignition_ca: 'data:text/plain;charset=utf-8;base64,LS0tLS1CRUdJ...'
5747

5848
###############################################################################
5949
# Optional Variables
@@ -65,9 +55,6 @@ subnet_bits: 12
6555

6656
allowed_bootstrap_ssh_cidr: 0.0.0.0/0
6757

68-
auto_register_elb: "yes"
69-
70-
master_instance_type: m5.xlarge
7158
```
7259
7360
Execute the playbook:
@@ -76,5 +63,10 @@ Execute the playbook:
7663
ansible-playbook -e @vars/aws.yml playbooks/aws/playbook.yml -v
7764
```
7865

66+
Purge the Cloudformation stacks:
67+
68+
```bash
69+
ansible-playbook -e @vars/aws.yml playbooks/aws/purge-stack.yaml -v
70+
```
7971

8072
[1]: https://docs.openshift.com/container-platform/latest/installing/installing_aws/installing-aws-user-infra.html

playbooks/aws/purge-stack.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
3+
- hosts: localhost
4+
tasks:
5+
- name: Purge security components using CloudFormation
6+
cloudformation:
7+
stack_name: "{{ infrastructure_name }}-security"
8+
state: absent
9+
register: r_cf_security
10+
11+
- name: Debug output for security components creation
12+
debug:
13+
var: r_cf_security
14+
15+
- name: Purge VPC using CloudFormation
16+
cloudformation:
17+
stack_name: "{{ infrastructure_name }}-vpc"
18+
state: absent
19+
register: r_cf_vpc
20+
21+
- name: Debug output for VPC creation
22+
debug:
23+
var: r_cf_vpc
24+

0 commit comments

Comments
 (0)