File tree Expand file tree Collapse file tree 9 files changed +129
-0
lines changed
docs/operations/chameleon-tools
roles/chameleon_periodic_inspector
site-config.example/inventory Expand file tree Collapse file tree 9 files changed +129
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Periodic Inspector
2
+
3
+ The periodic inspector can be run at sites to inspect the hardware
4
+ characteristics of individual nodes.
5
+
6
+ The periodic inspector tool is bundled into the site tools Docker
7
+ image.
8
+
9
+ A systemd timer is configured to run the inspector once a day.
10
+
11
+ ## Configuration and Execution
12
+
13
+ The site tools containing the periodic inspector are installed onto the
14
+ ` control ` node in the site configuration Ansible inventory. The configuration
15
+ steps are included in the ` post-deploy ` . You can also manually configure and
16
+ run the image tools by executing the ` chameleon_periodic_inspector ` playbook.
17
+
18
+ ``` shell
19
+ cc-ansible --playbook playbooks/chameleon_periodic_inspector.yml
20
+ ```
21
+
22
+ The playbook will pull the latest ` chameleon_periodic_inspector ` Docker image
23
+ to run the tool.
Original file line number Diff line number Diff line change
1
+ ---
2
+ - hosts : chameleon-periodic-inspector
3
+ roles :
4
+ - chameleon_periodic_inspector
Original file line number Diff line number Diff line change 14
14
- hosts : chameleon-image-tools
15
15
roles : [chameleon_image_tools]
16
16
17
+ - hosts : chameleon-periodic-inspector
18
+ roles : [chameleon_periodic_inspector]
19
+
17
20
- hosts : deployment
18
21
roles :
19
22
- role : chameleon_mariadb
Original file line number Diff line number Diff line change
1
+ ---
2
+ chameleon_resource_discovery_docker_image : ghcr.io/chameleoncloud/chameleon_site_tools:sha-384af41
3
+ chameleon_resource_discovery_config_dir : /etc/hammers
4
+
5
+ chameleon_resource_discovery_parallel : 5
6
+ chameleon_resource_discovery_limit : 5
7
+ chameleon_resource_discovery_provide_manageable : true
8
+ chameleon_resource_discovery_reinspect_failed : true
9
+ chameleon_resource_discovery_expire_days : 7
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Pull Docker image
3
+ become : True
4
+ docker_image :
5
+ source : pull
6
+ name : " {{ chameleon_resource_discovery_docker_image }}"
7
+ force_source : yes
8
+
9
+ - name : Ensure config directory exists
10
+ become : yes
11
+ file :
12
+ path : " {{ chameleon_resource_discovery_config_dir }}"
13
+ state : directory
14
+
15
+ - name : Template envvars file
16
+ become : yes
17
+ template :
18
+ src : envvars.j2
19
+ dest : " {{ chameleon_resource_discovery_config_dir }}/envvars"
20
+ mode : ' 0600'
21
+ owner : ' root'
22
+ group : ' root'
23
+
24
+ - name : Deploy periodic-inspector service unit
25
+ become : yes
26
+ template :
27
+ src : periodic-inspector.service.j2
28
+ dest : /etc/systemd/system/periodic-inspector.service
29
+ mode : ' 0644'
30
+
31
+ - name : Deploy periodic-inspector timer unit
32
+ become : yes
33
+ template :
34
+ src : periodic-inspector.timer.j2
35
+ dest : /etc/systemd/system/periodic-inspector.timer
36
+ mode : ' 0644'
37
+
38
+ - name : Reload systemd
39
+ become : yes
40
+ systemd :
41
+ daemon_reload : yes
42
+
43
+ - name : Enable and start periodic-inspector.timer
44
+ become : yes
45
+ systemd :
46
+ name : periodic-inspector.timer
47
+ enabled : yes
48
+ state : started
Original file line number Diff line number Diff line change
1
+ OS_AUTH_URL='{{ keystone_public_url }}'
2
+ OS_AUTH_PLUGIN='password'
3
+ OS_IDENTITY_API_VERSION='3'
4
+ OS_USER_DOMAIN_NAME='Default'
5
+ OS_USERNAME='{{ keystone_admin_user }}'
6
+ OS_PASSWORD='{{ keystone_admin_password }}'
7
+ OS_PROJECT_DOMAIN_NAME='Default'
8
+ OS_PROJECT_NAME='{{ keystone_admin_project }}'
9
+ OS_REGION_NAME='{{ openstack_region_name }}'
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description=Chameleon Periodic Inspector
3
+ After=docker.service
4
+ Requires=docker.service
5
+
6
+ [Service]
7
+ Type=oneshot
8
+ ExecStart=/usr/bin/docker run --rm --net=host \
9
+ --env-file {{ chameleon_resource_discovery_config_dir }}/envvars \
10
+ {{ chameleon_resource_discovery_docker_image }} \
11
+ periodic_inspector \
12
+ --parallel {{ chameleon_resource_discovery_parallel }} \
13
+ --limit {{ chameleon_resource_discovery_limit }} \
14
+ {% if chameleon_resource_discovery_provide_manageable %} --provide-manageable {% endif %} \
15
+ {% if chameleon_resource_discovery_reinspect_failed %} --reinspect-failed {% endif %} \
16
+ --expire-days {{ chameleon_resource_discovery_expire_days }} \
17
+ --cloud {{ cloud }}
18
+
19
+ [Install]
20
+ WantedBy=multi-user.target
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description=Run Chameleon Periodic Inspector daily
3
+
4
+ [Timer]
5
+ OnCalendar=daily
6
+ Persistent=true
7
+
8
+ [Install]
9
+ WantedBy=timers.target
Original file line number Diff line number Diff line change @@ -842,6 +842,10 @@ control
842
842
[chameleon-image-tools:children]
843
843
control
844
844
845
+ # Periodic Inspector
846
+ [chameleon-periodic-inspector:children]
847
+ control
848
+
845
849
# Development, fake baremetal hypervisor host using tenks
846
850
[fake-baremetal:children]
847
851
ironic
You can’t perform that action at this time.
0 commit comments