Repository navigation
feat: add Fleet AO smoke service demo #403
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
146bdf5
feat: add Fleet AO smoke service demo
hammer-redhat 9f1ec34
Merge branch 'ansible:main' into aap-demo-content
hammer-redhat 14e7239
Add Fleet smoke service job template
hammer-redhat 35e8dd7
Require explicit Fleet smoke host selection
hammer-redhat b663329
Fix Fleet smoke playbook lint
hammer-redhat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Fleet Automation Orchestrator smoke service | ||
|
|
||
| `fleet_ao_smoke.yml` provides the visible state change used by the | ||
| `aap-demo` Fleet and Automation Orchestrator integration. It starts | ||
| `aap-demo-fleet-smoke.service` on the selected Linux host, then verifies that | ||
| the unit is active. The transient service sleeps for five minutes and systemd | ||
| collects it afterwards. | ||
|
|
||
| Product Demos setup creates a generic job template. The `aap-demo` integration | ||
| separately provisions its Fleet-scoped template, inventory, and Automation | ||
| Orchestrator workflow. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Linux hosts with systemd and privilege to run `systemd-run`. | ||
| - For the generic template, hosts in **Ansible Product Demos Inventory** and SSH access through **APD Machine Credential**. | ||
|
|
||
| ## Survey prompts | ||
|
|
||
| | Prompt | Variable | Type | Required | | ||
| |--------|----------|------|----------| | ||
| | Server Name or Pattern | `_hosts` | text | Yes | | ||
|
|
||
| ## Job templates | ||
|
|
||
| | Template | Playbook | Description | | ||
| |----------|----------|-------------| | ||
| | LINUX ǀ Fleet AO Smoke Service | [`linux/fleet_ao_smoke.yml`](../fleet_ao_smoke.yml) | Starts and verifies the transient service on selected hosts | | ||
|
|
||
| The generic template requires a host pattern through its survey. Other job | ||
| templates must also provide `_hosts` to select their target hosts. | ||
|
|
||
| If a previous unit remains failed or uncollected, inspect it with | ||
| `systemctl status aap-demo-fleet-smoke.service` and clear the failed state with | ||
| `sudo systemctl reset-failed aap-demo-fleet-smoke.service` before retrying. If | ||
| the unit still exists, stop it with `sudo systemctl stop aap-demo-fleet-smoke.service`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| # A bounded, visible state change for the aap-demo Fleet/AO integration. | ||
| # The transient unit is collected by systemd after its five-minute sleep. | ||
| - name: Start a short-lived Fleet AO demo service | ||
| hosts: "{{ _hosts | default(omit) }}" | ||
| become: true | ||
| gather_facts: false | ||
|
|
||
| tasks: | ||
| - name: Check whether the transient demo service is already active | ||
| ansible.builtin.command: | ||
| cmd: systemctl is-active --quiet aap-demo-fleet-smoke.service | ||
| register: fleet_ao_service_state | ||
| changed_when: false | ||
| failed_when: false | ||
|
|
||
| - name: Run the temporary Fleet AO demo service | ||
| ansible.builtin.command: | ||
| cmd: >- | ||
| systemd-run --collect --unit=aap-demo-fleet-smoke /usr/bin/sleep 300 | ||
| when: fleet_ao_service_state.rc != 0 | ||
| changed_when: true | ||
|
chadmf marked this conversation as resolved.
Resolved
|
||
|
|
||
| - name: Verify transient Fleet AO demo service is active | ||
| ansible.builtin.command: | ||
| cmd: systemctl is-active --quiet aap-demo-fleet-smoke.service | ||
| changed_when: false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.