Debian 10 - Ansible 2.10 AWX 17.0.1 安装,无需 Openshift 或 Kubernetes

问题描述

我目前正在尝试在 debian10 虚拟机上安装 AWX。 我遵循了很多教程,总是说同样的话,但我无法安装 AWX。 17.0.1 版本似乎只安装在 Openshift 或 Kubernetes 集群上。 在我这边,我只希望它在本地 docker 上运行(我安装了先决条件:docker-ce、docker-compose 通过 pip3、ansible 2.10 with community-docker collection,...)

当通过 ansible-playbook -i inventory install.yml 启动安装时,它会跳过所有 kubernetes 步骤并像这样完成:

*TASK [kubernetes : update django super user password] ***************************************************************************************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Create the default organization if it is needed.] ************************************************************************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Delete management pod] ***************************************************************************************************************************************************************************************************
skipping: [localhost]
TASK [kubernetes : Scale up deployment] *****************************************************************************************************************************************************************************************************
skipping: [localhost]
PLAY RECAP **********************************************************************************************************************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    Failed=0    skipped=49   rescued=0    ignored=0*

我在文档中看到了这个东西:

Choose a deployment platform

We currently support running AWX as a containerized application using Docker images deployed to either an OpenShift cluster or a Kubernetes cluster. The remainder of this document will walk you through the process of building the images,and deploying them to either platform.

The installer directory contains an inventory file,and a playbook,install.yml. You'll begin by setting variables in the inventory file according to the platform you wish to use,and then you'll start the image build and deployment process by running the playbook.

In the sections below,you'll find deployment details and instructions for each platform:

    OpenShift
    Kubernetes

这是否意味着我们不能再使用 ansible 在本地 docker 上安装它? 感谢帮助


[ 25/02 编辑 ] 我更深入地研究了这个问题,发现了一些奇怪的东西。 我通过 git clone (git clone https://github.com/ansible/awx.git) 获得了代码,这是我的 install.yml 文件内容

---
- name: Build and deploy AWX
  hosts: all
  roles:
    - {role: check_vars}
    - {role: kubernetes,when: "openshift_host is defined or kubernetes_context is defined"}

没有其他与 local_docker 相关的内容

但是当我直接查看 github 上最后一个版本的源代码时,我看到的是 install.yml :

---
- name: Build and deploy AWX
  hosts: all
  roles:
    - {role: check_vars}
    - {role: image_build,when: "dockerhub_base is not defined"}
    - {role: image_push,when: "docker_registry is defined and dockerhub_base is not defined"}
    - {role: kubernetes,when: "openshift_host is defined or kubernetes_context is defined"}
    - {role: local_docker,when: "openshift_host is not defined and kubernetes_context is not defined"}

所以我知道为什么 awx 没有安装,但我不知道为什么我的 git clone 没有检索到“好的”代码

解决方法

随着最新的提交,基于 docker-compose 的环境设置文档已移至 https://github.com/ansible/awx/tree/devel/tools/docker-compose

或者查看发布页面。 https://github.com/ansible/awx/releases 发布 17.0.1 静态容器 local_docker 部署。