ARA记录Ansible
项目描述
ARA记录Ansible
ARA记录Ansible,使其更容易理解和调试。
它是一个以简单性为重点的另一个递归缩写。
关于ara
ara通过记录ansible
和ansible-playbook
命令提供Ansible报告,无论它们如何和在哪里运行
- 来自大多数Linux发行版,甚至在Mac OS上(只要
python >= 3.8
可用) - 来自运行Ansible的工具,如ansible-(pull|test|runner|navigator)、AWX & Automation Controller (Tower)、Molecule和Semaphore
- 从终端、脚本或手动
- 从笔记本电脑、台式机、服务器、虚拟机、容器或执行环境
- 来自CI/CD平台,如Jenkins、Rundeck和Zuul
- 来自GitHub、GitLab、Gitea & Forgejo等git forge
记录的结果可通过包含的CLI、REST API以及自托管、本地优先的Web报告界面访问。
https://github.com/ansible-community/ara/assets/1291204/4fbdf5f7-509c-46ea-beb0-726b43e1b985
如何工作
ARA将Ansible结果记录到SQLite、MySQL和PostgreSQL数据库中,使用标准的回调插件。
此插件在Ansible运行时收集数据并将其发送到Django REST API服务器
要求
- 任何最近版本的Linux发行版或macOS,且python版本需大于等于3.8
- 必须安装包含Ansible插件的ara包,且与Ansible本身使用相同的Python解释器
入门指南
对于生产使用,请考虑了解最佳实践、启用认证以及忽略不需要记录的内容。
在没有API服务器的情况下记录playbook
ara默认将数据记录到本地sqlite数据库,并且不需要持久化服务器
# Install ansible (or ansible-core) with ara (including API server dependencies)
python3 -m pip install --user ansible "ara[server]"
# Configure Ansible to enable ara
export ANSIBLE_CALLBACK_PLUGINS="$(python3 -m ara.setup.callback_plugins)"
# Run an Ansible playbook as usual
ansible-playbook playbook.yml
# Check out the CLI
ara playbook list
ara host list
# or the UI at http://127.0.0.1:8000
ara-manage runserver
在有API服务器的情况下记录playbook
服务器包括REST API和Web报告界面。
考虑运行一个来聚合来自不同工具、作业或服务器的playbook运行,并在单个仪表板中共享。
使用ara_api角色或使用项目在DockerHub和quay.io上发布的容器镜像开始使用。
# Create a directory for a volume to store settings and a sqlite database
mkdir -p ~/.ara/server
# Start an API server with docker from the image on DockerHub:
docker run --name api-server --detach --tty \
--volume ~/.ara/server:/opt/ara -p 8000:8000 \
docker.io/recordsansible/ara-api:latest
# or with podman from the image on quay.io:
podman run --name api-server --detach --tty \
--volume ~/.ara/server:/opt/ara -p 8000:8000 \
quay.io/recordsansible/ara-api:latest
一旦服务器启动,ara必须安装并配置为向其发送数据
# Install ansible (or ansible-core) with ara (excluding API server dependencies)
python3 -m pip install --user ansible ara
# Configure Ansible to enable ara
export ANSIBLE_CALLBACK_PLUGINS="$(python3 -m ara.setup.callback_plugins)"
# Set up the ara callback to know where the API server is located
export ARA_API_CLIENT="http"
export ARA_API_SERVER="http://127.0.0.1:8000"
# Run an Ansible playbook as usual
ansible-playbook playbook.yml
# Check out the CLI
ara playbook list
ara host list
# Or browse http://127.0.0.1:8000 (running from the container)
现场演示
一个现场演示已经部署了来自Ansible Galaxy的ara Ansible集合。
它可在https://demo.recordsansible.org访问。
文档和更新日志
关于安装、配置、运行和使用ara的文档可在ara.readthedocs.io找到。
通过阅读故障排除指南,可以解决常见问题。
社区和获取帮助
- 错误、问题和改进:https://github.com/ansible-community/ara/issues
- IRC:#ara在Libera.chat
- Matrix:通过#ara:libera.chat从IRC桥接
- Slack:通过IRC桥接至https://arecordsansible.slack.com
- 网站和博客:https://ara.recordsansible.org
Twitter:https://twitter.com/recordsansible- Mastodon:https://fosstodon.org/@ara
贡献
欢迎并感谢对项目的贡献!
从贡献者文档开始。
作者
项目中的代码贡献可以在git日志或GitHub上查看。
ara鹦鹉标志由Jason E. Rist设计并贡献。
版权
Copyright (c) 2023 The ARA Records Ansible authors
ARA Records Ansible is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ARA Records Ansible is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ARA Records Ansible. If not, see <https://gnu.ac.cn/licenses/>.
项目详情
下载文件
下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源分发
构建分发
ara-1.7.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 16d4f5cee550c23efda83d3e1fa9b48a67af3db37741c14a9e99dc4c2cefc7c8 |
|
MD5 | e0711d2f21f62fbc64cf83d6e3e6cde5 |
|
BLAKE2b-256 | 32c26311b6b9d2a4958cd5ec03160a579f6503dd85b47a76899d9b2aeca508c8 |
ara-1.7.2-py2.py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 18f0e98c2d8d0913e5a3df6cd166b7c0a856611ce675ec494bfbb957f78f264f |
|
MD5 | c3b952852eeb9c3eb3bc42cb29da5669 |
|
BLAKE2b-256 | 2e37111b1b55cb5c81de0cae15b6c8fdea9aedf3eeb21fb880823b7b89f4bbf3 |