该平台为ansible的web程序
# yum install -y lokkit
# lokkit -p 80:tcp -p 8080:tcp -p 9001:tcp -p 22:tcp
# yum install -y python-devel openldap-devel gcc mysql-server mysql-devel epel-release
# yum install python-pip git
# mkdir ~/.pip
# vim ~/.pip/pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
# pip install virtualenv
# /etc/init.d/mysqld start
# chkconfig mysqld on
# mysql
mysql> create database ansible CHARACTER SET utf8;
mysql> grant all on ansible.* to ansibleuser@'localhost' identified by 'password';
mysql> flush privileges;
# cd /opt/
# git clone https://github.com/Firxiao/ansible_ui.git
# cd /opt/
# useradd ansible_ui
# chown ansible_ui. -R ansible_ui
# su - ansible_ui
$ virtualenv ansible_ui_env
$ source ansible_ui_env/bin/activate
$ pip install -r /opt/ansible_ui/requirements.txt
$ cp /opt/ansible_ui/ansible-conf/ansible.cfg ~/.ansible.cfg
$ vim /opt/ansible_ui/celery-conf/supervisord.conf
command = /home/ansible_ui/ansible_ui_env/bin/python /opt/ansible_ui/manage.py celeryd -B -l info
user = ansible_ui
$ supervisord -c /opt/ansible_ui/celery-conf/supervisord.conf
$ netstat -tupln|grep 9001 #验证celery是否运行
web 访问 http://ip:9001 默认用户名admin 密码password
$ vim /opt/ansible_ui/desktop/core/internal/settings_local.py #配置数据库信息及ansible-playbook命令的绝对路径
$ cd /opt/ansible_ui
$ python manage.py syncdb #最后根据提示添加admin用户
$ cd /opt/ansible_ui
$ python manage.py runserver 0.0.0.0:8080
web 访问 http://ip:8080 默认用户名密码为初始化数据库时所创建的用户