Ansible-Tower3.5安装

IT
IT
IT
335
文章
1
评论
2020年5月20日19:02:40 评论 1,497 3690字阅读12分18秒

Ansible Tower架构

Ansible-Tower3.5安装

Ansible本质上是一个进行了封装的Shell。优点在于它是去中心化的工具,可以直接通过ssh管理远程主机,实现无Agent的部署(ssh+python环境已经原生集成在Linux中)。

Ansible的缺点也在于其去中心化的特点,​​本身不支持高可用和分布式架构,无法实现Server-Proxy-Client的架构。在比较复杂或者多区域的网络区域中,无法实现统一的集中式管理(如多个ansible管理端的配置同步),也没有前端UI,对ansible的技能要求比较高。

Redhat提供为Ansible提供了一个前端UI,Ansible Tower。使用它可以免费管理10台以内的主机。

Ansible Tower提供了通过WEB端管理其他主机的方式。本身也支持Cluster群集方式(需要在每个节点上都安装ansible和ansible tower),通过修改配置文件来实现多个Ansible Tower组成一个或者多个群集。

Ansible Tower是目前唯一(除了自研发方式外)能够实现底层Ansible高可用、水平扩展的解决方案。Ansible Tower的功能比较简单,群集配置逻辑(Instance Group分组)通过配置文件实现,没有一个前端维护的界面。因此每次重新配置逻辑都需要在更新配置文件后重跑ansible tower的setup文件。​​​​

安装

配置要求

  • A currently supported version of Mozilla Firefox or Google Chrome

    • Other HTML5 compliant web browsers may work but are not fully tested or supported.
  • 2 CPUs minimum for Tower installations. Refer to the capacity algorithm section of the Ansible Tower User Guide for determining the CPU capacity required for the number of forks in your particular configuration.

  • 4 GB RAM minimum for Tower installations

    • 4 GB RAM (minimum and recommended for Vagrant trial installations)
    • 4 GB RAM (minimum for external standalone Postgres databases)
    • For specific RAM needs, refer to the capacity algorithm section of the Ansible Tower User Guide for determining capacity required based on the number of forks in your particular configuration
  • 20 GB of dedicated hard disk space for Tower service nodes

    • 10 GB of the 20 GB requirement must be dedicated to /var/, where Tower stores its files and working directories
    • The storage volume should be rated for a minimum baseline of 750 IOPS.
  • 20 GB of dedicated hard disk space for nodes containing a database (150 GB+ recommended)

    • The storage volume should be rated for a high baseline IOPS (1000 or more.)
    • All Tower data is stored in the database. Database storage increases with the number of hosts managed, number of jobs run, number of facts stored in the fact cache, and number of tasks in any individual job. For example, a playbook run every hour (24 times a day) across 250, hosts, with 20 tasks will store over 800000 events in the database every week.
    • If not enough space is reserved in the database, old job runs and facts will need cleaned on a regular basis. Refer to Management Jobs in the Ansible Tower Administration Guide for more information
  • 64-bit support required (kernel and runtime)

  • PostgreSQL version 9.6.X required to run Ansible Tower 3.2 and later

  • Ansible version 2.2 (at minimum) required to run Ansible Tower versions 3.2 and later

本次安装的服务器配置是:2核8G系统盘40GB

开始安装[vip]

安装基础组件(我是在云服务器安装,默认的防火墙都是关闭的,大家安装的时候关闭下防火墙)

[root@iZ2ze8ow1gy3uiub8glqqzZ ~]# yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget lrzsz zip unzip net-tools libselinux-python

下载安装包

[root@iZ2ze8ow1gy3uiub8glqqzZ ~]# wget https://releases.ansible.com/ansible-tower/setup-bundle/ansible-tower-setup-bundle-latest.el7.tar.gz

网盘下载地址:链接:https://pan.baidu.com/s/14rdThekqgY9RjPzqch9zwQ 密码:k7q7

解压

[root@iZ2ze8ow1gy3uiub8glqqzZ ~]# tar zxvf ansible-tower-setup-bundle-latest.el7.tar.gz

移动到指定文件下

[root@iZ2ze8ow1gy3uiub8glqqzZ ~]# mv ansible-tower-setup-bundle-3.5.3-1.el7 /usr/local/ansible-tower

修改配置文件

[root@iZ2ze8ow1gy3uiub8glqqzZ ~]# cd /usr/local/ansible-tower
[root@iZ2ze8ow1gy3uiub8glqqzZ ansible-tower]# vim inventory

[tower]
localhost ansible_connection=local

[database]

[all:vars]
admin_password='bbs.centoscn.vip'

pg_host=''
pg_port=''

pg_database='awx'
pg_username='awx'
pg_password='bbs.centoscn.vip'

rabbitmq_username=tower
rabbitmq_password='bbs.centoscn.vip'
rabbitmq_cookie=cookiemonster

# Isolated Tower nodes automatically generate an RSA key for authentication;
# To disable this behavior, set this value to false
# isolated_key_generation=true

开始安装,大概十分钟左右

[root@iZ2ze8ow1gy3uiub8glqqzZ ansible-tower]# ./setup.sh

The setup process completed successfully.
Setup log saved to /var/log/tower/setup-2019-09-28-13:55:39.log

登录web

访问本机IP即可

https://10.0.0.94/

Ansible-Tower3.5安装

 

登录账号:admin  登录密码:bbs.centoscn.vip

Ansible-Tower3.5安装

这个授权自己去官方申请,或者使用博主提供到授权。

授权网盘地址 链接:https://pan.baidu.com/s/1wWhiVkujjX6XKVvYuxrMng 密码:lakb

Ansible-Tower3.5安装

Ansible-Tower3.5安装

查看授权信息

https://10.0.0.94/#/license

Ansible-Tower3.5安装

默认的只授权10台,需要破解的查看博主破解文档。[/vip]

继续阅读
  • 我的QQ
  • QQ扫一扫
  • weinxin
  • 我的头条
  • 头条扫一扫
  • weinxin
IT
  • 本文由 发表于 2020年5月20日19:02:40
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
Ansible-Tower使用文档 Ansible

Ansible-Tower使用文档

导航栏介绍 # viewes Dashboard 仪表盘展示信息的 Jobs 跑过的任务记录 Schedules 计划任务 My View 查看用户的工作模版,和任务记录 # resources Te...
Ansible-Tower3.5破解 Ansible

Ansible-Tower3.5破解

Ansible-Tower不破解只能使用10台机器 需要注意:发现最新版本或者高版本的ansible-tower没有__init__.py文件,需要对__init__.pyc进行反编译,然后进行HOS...