Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add performance tuning and reporting in Ansible config #166

Merged
merged 3 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/actions/provision/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ runs:
source ./ci.env
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
ansible-playbook stackhpc.azimuth_ops.provision -e @extra-vars.yml
env:
ANSIBLE_CALLBACKS_ENABLED: ansible.posix.profile_tasks
3 changes: 2 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ runs:
ansible_var() {
ANSIBLE_LOAD_CALLBACK_PLUGINS=true \
ANSIBLE_STDOUT_CALLBACK=json \
ANSIBLE_JSON_INDENT=0 \
ansible -m debug -a "var=$1" -e @extra-vars.yml all | \
jq -r ".plays[0].tasks[0].hosts.localhost.$1"
jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1"
}

EXTNET_ID="$(ansible_var infra_external_network_id)"
Expand Down
6 changes: 6 additions & 0 deletions .github/environments/arcus-ha/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
inventory = ../../../environments/base/inventory,../../../environments/ha/inventory,../../../environments/demo/inventory,../common/inventory,../arcus/inventory,./inventory
roles_path = ../../../.ansible/roles
collections_path = ../../../.ansible/collections
stdout_callback = yaml
bin_ansible_callbacks = True
callbacks_enabled = ansible.posix.profile_tasks

# Disable host key checking as hosts are dynamically replaced
host_key_checking = False

[ssh_connection]
pipelining = True
ssh_extra_args = -o ControlPersist=1h
retries = 3
6 changes: 6 additions & 0 deletions .github/environments/arcus/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
inventory = ../../../environments/base/inventory,../../../environments/singlenode/inventory,../../../environments/demo/inventory,../common/inventory,./inventory
roles_path = ../../../.ansible/roles
collections_path = ../../../.ansible/collections
stdout_callback = yaml
bin_ansible_callbacks = True
callbacks_enabled = ansible.posix.profile_tasks

# Disable host key checking as hosts are dynamically replaced
host_key_checking = False

[ssh_connection]
pipelining = True
ssh_extra_args = -o ControlPersist=1h
retries = 3
6 changes: 6 additions & 0 deletions .github/environments/leafcloud-ha/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
inventory = ../../../environments/base/inventory,../../../environments/ha/inventory,../../../environments/demo/inventory,../common/inventory,../leafcloud/inventory,./inventory
roles_path = ../../../.ansible/roles
collections_path = ../../../.ansible/collections
stdout_callback = yaml
bin_ansible_callbacks = True
callbacks_enabled = ansible.posix.profile_tasks

# Disable host key checking as hosts are dynamically replaced
host_key_checking = False

[ssh_connection]
pipelining = True
ssh_extra_args = -o ControlPersist=1h
retries = 3
6 changes: 6 additions & 0 deletions .github/environments/leafcloud/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
inventory = ../../../environments/base/inventory,../../../environments/singlenode/inventory,../../../environments/demo/inventory,../common/inventory,./inventory
roles_path = ../../../.ansible/roles
collections_path = ../../../.ansible/collections
stdout_callback = yaml
bin_ansible_callbacks = True
callbacks_enabled = ansible.posix.profile_tasks

# Disable host key checking as hosts are dynamically replaced
host_key_checking = False

[ssh_connection]
pipelining = True
ssh_extra_args = -o ControlPersist=1h
retries = 3
3 changes: 2 additions & 1 deletion bin/create-debug-bundle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ fi
ansible_variable() {
ANSIBLE_LOAD_CALLBACK_PLUGINS=true \
ANSIBLE_STDOUT_CALLBACK=json \
ANSIBLE_JSON_INDENT=0 \
ansible -m debug -a "var=$1" all | \
jq -r ".plays[0].tasks[0].hosts.localhost.$1"
jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1"
}


Expand Down
3 changes: 2 additions & 1 deletion bin/port-forward
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ fi
ansible_variable() {
ANSIBLE_LOAD_CALLBACK_PLUGINS=true \
ANSIBLE_STDOUT_CALLBACK=json \
ANSIBLE_JSON_INDENT=0 \
ansible -m debug -a "var=$1" all | \
jq -r ".plays[0].tasks[0].hosts.localhost.$1"
jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1"
}


Expand Down
3 changes: 2 additions & 1 deletion bin/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ fi
ansible_variable() {
ANSIBLE_LOAD_CALLBACK_PLUGINS=true \
ANSIBLE_STDOUT_CALLBACK=json \
ANSIBLE_JSON_INDENT=0 \
ansible -m debug -a "var=$1" all | \
jq -r ".plays[0].tasks[0].hosts.localhost.$1"
jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1"
}


Expand Down
3 changes: 2 additions & 1 deletion bin/seed-ssh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ fi
ansible_variable() {
ANSIBLE_LOAD_CALLBACK_PLUGINS=true \
ANSIBLE_STDOUT_CALLBACK=json \
ANSIBLE_JSON_INDENT=0 \
ansible -m debug -a "var=$1" all | \
jq -r ".plays[0].tasks[0].hosts.localhost.$1"
jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1"
}


Expand Down
3 changes: 2 additions & 1 deletion bin/tilt-up
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ fi
ansible_variable() {
ANSIBLE_LOAD_CALLBACK_PLUGINS=true \
ANSIBLE_STDOUT_CALLBACK=json \
ANSIBLE_JSON_INDENT=0 \
ansible -m debug -a "var=$1" all | \
jq -r ".plays[0].tasks[0].hosts.localhost.$1"
jq -r -R "fromjson? | .plays[0].tasks[0].hosts.localhost.$1"
}


Expand Down
8 changes: 8 additions & 0 deletions environments/capi-mgmt-example/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
inventory = ../base/inventory,../ha/inventory,../capi-mgmt/inventory,./inventory
roles_path = ../../.ansible/roles
collections_path = ../../.ansible/collections
stdout_callback = yaml
bin_ansible_callbacks = True
callbacks_enabled = ansible.posix.profile_tasks

# Disable host key checking as hosts are dynamically replaced
host_key_checking = False

[ssh_connection]
pipelining = True
ssh_extra_args = -o ControlPersist=1h
retries = 3
9 changes: 9 additions & 0 deletions environments/demo/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@
inventory = ../base/inventory,../singlenode/inventory,./inventory
roles_path = ../../.ansible/roles
collections_path = ../../.ansible/collections
stdout_callback = yaml
bin_ansible_callbacks = True
callbacks_enabled = ansible.posix.profile_tasks

# Disable host key checking as hosts are dynamically replaced
host_key_checking = False

[ssh_connection]
pipelining = True
ssh_extra_args = -o ControlPersist=1h
retries = 3
8 changes: 8 additions & 0 deletions environments/example/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
inventory = ../base/inventory,../ha/inventory,./inventory
roles_path = ../../.ansible/roles
collections_path = ../../.ansible/collections
stdout_callback = yaml
bin_ansible_callbacks = True
callbacks_enabled = ansible.posix.profile_tasks

# Disable host key checking as hosts are dynamically replaced
host_key_checking = False

[ssh_connection]
pipelining = True
ssh_extra_args = -o ControlPersist=1h
retries = 3
Loading