File tree Expand file tree Collapse file tree 8 files changed +44
-7
lines changed
terraform/modules/networking Expand file tree Collapse file tree 8 files changed +44
-7
lines changed Original file line number Diff line number Diff line change 11---
22- name : Configure load balancer
3- hosts : loadbalancer
3+ hosts : haproxy
44 roles :
5- - role : loadbalancer
5+ - role : haproxy
66 tags :
7- - loadbalancer
7+ - haproxy
88
99- name : Configure ChatOps
1010 hosts : chatops
1313 tags :
1414 - chatops
1515
16+ - name : Configure CAdvisor
17+ hosts : chatops
18+ remote_user : ubuntu
19+ roles :
20+ - role : cadvisor
21+ tags :
22+ - cadvisor
23+
1624- name : Set up systemd exporters
1725 hosts : all
1826 roles :
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Install docker
3+ become : true
4+ ansible.builtin.apt :
5+ name : docker.io
6+ update_cache : true
7+
8+ - name : Add ubuntu to docker group
9+ become : true
10+ ansible.builtin.user :
11+ name : ubuntu
12+ groups : docker
13+ append : true
14+
15+ - name : Reset ssh connection to allow user changes to affect ansible user
16+ ansible.builtin.meta : reset_connection
17+
18+ - name : Start CAsvisor container
19+ community.docker.docker_container :
20+ image : gcr.io/cadvisor/cadvisor
21+ name : cadvisor
22+ pull : always
23+ state : started
24+ ports :
25+ - " 8080:8080"
26+ volumes :
27+ - /var/run:/var/run:rw
28+ - /sys:/sys:ro
29+ - /var/lib/docker/:/var/lib/docker:ro
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 88{{ ip }}
99{% endfor %}
1010
11- [loadbalancer ]
11+ [haproxy ]
1212{{ terraform_floating_ip }} ansible_user=ubuntu
1313
1414[prometheus]
Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ resource "openstack_networking_secgroup_rule_v2" "chatops" {
6565 security_group_id = openstack_networking_secgroup_v2. chatops . id
6666}
6767
68- resource "openstack_networking_secgroup_rule_v2" "docker_metrics " {
68+ resource "openstack_networking_secgroup_rule_v2" "cadvisor " {
6969 direction = " ingress"
7070 ethertype = " IPv4"
7171 protocol = " tcp"
72- port_range_min = 9323
73- port_range_max = 9323
72+ port_range_min = 8080
73+ port_range_max = 8080
7474 remote_ip_prefix = " 192.168.100.0/22"
7575 security_group_id = openstack_networking_secgroup_v2. chatops . id
7676}
You can’t perform that action at this time.
0 commit comments