prakhar1985
2020-02-27 b42a425d16300b6541eac1c86881147582b4769e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
################################################################################
### OSP Environment variables
################################################################################
 
 
cloud_provider: osp                               
install_student_user: false
 
 
ansible_user: cloud-user
remote_user: cloud-user
 
osp_cluster_dns_zone: red.osp.opentlc.com
osp_cluster_dns_server: ddns01.opentlc.com
use_dynamic_dns: true
osp_project_create: true
student_name: student
admin_user: opentlc-mgr
 
 
bastion_instance_type: 2c2g30d
server_instance_type: 2c2g30d
tower_instance_type: 2c4g30d
 
_image: rhel-server-7.7-update-2 
bastion_instance_image: "{{ _image }}"
server_instance_image: "{{ _image }}"
tower_instance_image: "{{ _image }}"
 
tower_instance_count: 1
server_instance_count: 2
 
rootfs_size_bastion: 50
 
security_groups:
  - name: TowerSG
    rules:
      - name: TowerHTTPSPorts
        description: "HTTPS Public"
        from_port: 443
        to_port: 443
        protocol: tcp
        cidr: "0.0.0.0/0"
        rule_type: Ingress
      - name: TowerHTTPPorts
        description: "HTTP Public"
        from_port: 80 
        to_port: 80
        protocol: tcp
        cidr: "0.0.0.0/0"
        rule_type: Ingress
      - name: BastionUDPPorts
        description: "Only from bastion"
        from_port: 1
        to_port: 65535
        protocol: udp
        from_group: DefaultSG
        rule_type: Ingress
      - name: BastionTCPPorts
        description: "Only from bastion"
        from_port: 1
        to_port: 65535
        protocol: tcp
        from_group: DefaultSG
        rule_type: Ingress
 
 
# Environment Instances
 
instances:
  - name: bastion
    count: 1
    unique: true
    public_dns: true
    dns_loadbalancer: true
    floating_ip: true
    image_id: "{{ bastion_instance_image }}"
    flavor:
      osp: "{{bastion_instance_type}}"
    tags:
      - key: "AnsibleGroup"
        value: "bastions"
      - key: "ostype"
        value: "linux"
      - key: "instance_filter"
        value: "{{ env_type }}-{{ email }}"
    rootfs_size: "{{ rootfs_size_bastion }}"
    security_groups:
      - BastionSG
      - DefaultSG
 
  - name: "tower"
    count: "{{tower_instance_count}}"
    public_dns: true
    dns_loadbalancer: true
    floating_ip: true
    image_id: "{{ tower_instance_image }}"
    flavor:
      osp: "{{tower_instance_type}}"
    tags:
      - key: "AnsibleGroup"
        value: "towers"
      - key: "ostype"
        value: "linux"
      - key: "instance_filter"
        value: "{{ env_type }}-{{ email }}"
    security_groups:
      - TowerSG
      - DefaultSG
 
  - name: "server"
    count: "{{server_instance_count}}"
    public_dns: false
    floating_ip: false
    image_id: "{{ server_instance_image }}"
    flavor:
      osp: "{{server_instance_type}}"
    tags:
      - key: "AnsibleGroup"
        value: "servers"
      - key: "ostype"
        value: "rhel"
      - key: "instance_filter"
        value: "{{ env_type }}-{{ email }}"
    key_name: "{{key_name}}"
    security_groups:
      - DefaultSG