Leif160519的blog Leif160519的blog

——————

目录
ubuntu安装ansible图形界面awx
/    

ubuntu安装ansible图形界面awx

一、准备条件

官方要求

1.1 软件

  • docker
  • ansible 2.8+
  • openshift
  • python 3.6+
  • git 1.8.4+

1.2 硬件

  • 至少4G内存
  • 至少2核心CPU
  • 至少20GB可用磁盘空间
  • 运行Docker,openshift或者k8s

二、安装

  • 安装docker
$ apt-get -y install docker.io
  • 安装openshift

github-release

# 下载openshift客户端
$ wget --no-check-certificate https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz 
# 解压
$ tar -zxvf openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
$ cd openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit
$ cp oc /usr/bin
  • 安装ansible
$ apt-get -y install ansible
  • 安装Python3
$ apt-get -y install python3
  • 安装pip3
apt-get -y install python3-pip
# pip3安装docker和docker-compose模块
pip3 install docker 
pip3 install docker-compose
# 若ansible版本没有2.8,则使用pip3进行升级
pip3 install --upgrade ansible
# 下载安装包
$ wget --no-check-certificate https://github.com/ansible/awx/archive/13.0.0.zip
# 解压
$ unzip awx-13.0.0.zip
$ cd awx-13.0.0/installer
# 使用ansible-play安装awx
$ ansible-playbook -i inventory install.yml -e openshift_password=developer  -e docker_registry_password=$(oc whoami -t)

注意:若安装过程中提示有任何关于docker模块的错误,请使用以下命令之后再重新安装

# 卸载docker,docker-py,docke-compose模块
pip3 uninstall docker docker-py dcker-compose
# 重新安装
ansible-playbook -i inventory install.yml -e openshift_password=developer  -e docker_registry_password=$(oc whoami -t)

若在创建项目的过程中需要使用本地ansible目录时,请在inventory文件中开启project_data_dir选项,默认项目目录为/var/lib/awx/projects

image.png

安装过程:
image.png

由于awx默认占用80端口,故操作前确保80端口未被占用.

查看容器状态:
image.png

默认用户名:admin ,密码:password
image.png

image.png

安装完成!

三、参考资料


“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill

标  题ubuntu安装ansible图形界面awx
作  者Leif160519
出  处https://github.icu/articles/2020/07/09/1594258874111.html
关于博主:坐标南京,运维工程师,如有问题探讨可以直接下方留言。
声援博主:如果您觉得文章对您有帮助,可以评论、订阅、收藏。您的鼓励是博主的最大动力!