{"id":15668852,"url":"https://github.com/alancoding/playbooks","last_synced_at":"2025-02-22T11:43:39.304Z","repository":{"id":144899768,"uuid":"429565238","full_name":"AlanCoding/playbooks","owner":"AlanCoding","description":"playbooks for debugging and messing with a live AAP controller cluster","archived":false,"fork":false,"pushed_at":"2024-03-24T02:32:25.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"devel","last_synced_at":"2025-01-03T05:38:43.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlanCoding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-18T20:08:16.000Z","updated_at":"2022-06-01T14:52:21.000Z","dependencies_parsed_at":"2024-10-23T13:10:04.069Z","dependency_job_id":null,"html_url":"https://github.com/AlanCoding/playbooks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanCoding%2Fplaybooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanCoding%2Fplaybooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanCoding%2Fplaybooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlanCoding%2Fplaybooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlanCoding","download_url":"https://codeload.github.com/AlanCoding/playbooks/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240170064,"owners_count":19759143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T14:20:18.936Z","updated_at":"2025-02-22T11:43:39.286Z","avatar_url":"https://github.com/AlanCoding.png","language":"Shell","readme":"### Live patches for AWX and AAP controller\n\nThis has Ansible content to help speed up modifying and testing live servers.\n\n#### Configuration of inventory file\n\nThese playbooks require a valid AAP inventory file.\nThis will have groups like `automationcontroller` and `execution_nodes`.\n\nIf using the docker-compose inventory file, there is an inventory script floating\naround which will build an inventory of this format from `docker ps -a` data.\n\nSpecifying the inventory file is going to get old, so this will pick up a symlink\nat the following location `awx_inventory.ini`. For example, to set this up:\n\n```\nln -s ~/repos/tower-qa/playbooks/inventory-docker.py awx_inventory.ini\n```\n\nYou can still specify a different inventory with `-i` if you need.\nAll the following commands will assume this is set up.\n\n#### Action - create a superuser\n\nBefore anything else, you will need a user. Fill in values at `vars/private_vars.yml`\n\n```yaml\nawx_username: admin\nawx_password: password\nawx_email: \"foo@invalid.com\"\n```\n\nPlaybook example:\n\n```\nansible-playbook prod_user.yml\n```\n\n#### Action - turn on debugging settings\n\nYou want to run a job and have the server preserve the job folders and work unit.\n\n```\nansible-playbook -e debug_state=present debug_on.yml\n```\n\nSwitch `debug_state=present` to absent to undo this.\n\nIn the development environment, this will modify the file on your _host_ machine\nat `tools/docker-compose/_sources/local_settings.py`, which is templated by\nthe docker-compose playbook. This is hard to track, so be warned.\n\n#### Action - replace receptor binary\n\nBefore you go changing anything, you probably want to print the current versions\nthat all of the nodes have installed.\n\n```\nansible-playbook --tags=version receptor_bin_swap.yml\n```\n\nTested on Fedora, go to receptor clone, check out the branch you need\n\n```\nsudo dnf install -y golang\nmake\n```\n\nThis should populate the receptor binary at the top-level of the receptor checkout.\nAssuming checkout is now at `~/repos/receptor/receptor` then\n\n```\nansible-playbook -e receptor_bin=~/repos/receptor/receptor receptor_bin_swap.yml\n```\n\nTODO: still need a playbook that will replace the `receptorctl` package.\n\n#### Action - replace the ansible-runner install\n\nThis follows a similar pattern to replacing receptor. First look at what is installed:\n\n```\nansible-playbook --tags=version runner_swap.yml\n```\n\nA typical pattern is that you would checkout ansible-runner from within\nyour awx directory and install it in-place.\nAssuming you are doing an in-place install with it at `\u003cawx\u003e/testing/ansible-runner`\n\n```\nansible-playbook -e new_package=file:///awx_devel/testing/ansible-runner runner_swap.yml\n```\n\nTo install from a git branch, it needs to be non-editable.\n\n```\nansible-playbook -e new_package=git+https://github.com/ansible/ansible-runner.git -e editable=false runner_swap.yml\n```\n\nThis will allow you to make changes to ansible-runner and have them take\neffect in multiple kinds of containers without re-installing.\n\n#### Action - pre-populate image cache with EE\n\nThis allows you to distribute an image to all the nodes in the cluster.\nDoing this will avoid a long delay before jobs start due to pulling the image.\nMost often, you will want to use this to distribute the control plane EE\nor the default EE for jobs / ad hoc commands / inventory updates.\n\nStart by assuring that you have the EE locally (or that it's not old).\n\n```\npodman pull quay.io/ansible/awx-ee:latest\n```\n\nCheck current images:\n\n```\nansible-playbook image_distribute.yml --tags=list\n```\n\nThen run the playbook:\n\n```\nansible-playbook image_distribute.yml\n```\n\nNow, if you run a job, it should start within a few seconds, without a minute\nor more of delay.\n\nIf you delete the `.tar` file (image archive) then this will trigger re-exporting the image.\nYou need this if you need to pick up a change in the awx-ee image, but it's\nmore common that you recycle the dev environment containers.\n\nUsing a 3 node cluster and re-exporting the image, this playbook takes about 1.5 minutes.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falancoding%2Fplaybooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falancoding%2Fplaybooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falancoding%2Fplaybooks/lists"}