ansible_ui, ansible web ui,更简单和更好的布局

分享于 

4分钟阅读

GitHub

  繁體 雙語
ansible web ui, more simple and better layout
  • 源代码名称:ansible_ui
  • 源代码网址:http://www.github.com/alaxli/ansible_ui
  • ansible_ui源代码文档
  • ansible_ui源代码下载
  • Git URL:
    git://www.github.com/alaxli/ansible_ui.git
    Git Clone代码到本地:
    git clone http://www.github.com/alaxli/ansible_ui
    Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/alaxli/ansible_ui
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    
    函数 UserManual

    ansible_ui平台用户手册

    要求
    • 皮普
    • virtualenv
    • mysql服务器,mysql开发
    • openldap开发
    安装
    • 系统为centos6.5

    • 
       useradd ansible
      
      
       su - ansible
      
      
      
      
    • 
       virtualenv envansible
      
      
       source envansible/bin/active
      
      
      
      
    • 
       git clone https://github.com/alaxli/ansible_ui.git
      
      
      
      
    • 
       cd ansible-ui
      
      
       pip install -r requirements.txt
      
      
       pip install PIL --allow-external PIL --allow-unverified PIL
      
      
      
      
    • 
       cd desktop/core/internal
      
      
       vim settings_local.py 
      
      
       # 修改 LDAP Datebase Mail 和ansible_playbook命令位置(which ansible_playbook)配置
      
      
       如果需要使用ldap,还需要修改settings.py,去掉下面行的注释
      
      
       #'desktop.core.auth.backend.LdapBackend',
      
      
      
      
    • 
       create database ansible CHARACTER SET utf8;
      
      
       grant all on ansible.* to ansibleuser@'localhost' identified by '******';
      
      
      
      
    • 
       python manage.py schemamigration desktop.apps.account --init
      
      
       python manage.py schemamigration desktop.apps.ansible --init
      
      
       python manage.py syncdb
      
      
       python manage.py migrate ansible
      
      
       python manage.py migrate account
      
      
       python manage.py migrate kombu.transport.django
      
      
       python manage.py migrate djcelery
      
      
       python manage.py migrate guardian
      
      
      
      
    • 配置celery

      
       修改celery-conf/supervisord.conf
      
      
       [inet_http_server] #配置web管理supervisor
      
      
       [program:ansible_celeryd] #修改command中 virtualenv 和 ansible_ui home
      
      
      
      
    • 启动celery

      
       supervisord -c celery-conf/supervisord.conf
      
      
      
      
    • 配置ansible

      
       cp ansible-conf/ansible.cfg ~/.ansible.cfg
      
      
      
      
    • Vagrant + Ansible

      感谢,具体操作推荐阅读yunlzheng的,,,。

    运行
    • 
       python manage.py runserver ip:8000
      
      
      
      
    • apache + wsgi

      
       修改apache-conf/ansible.cfg : ansible_ui_dir,指向实际目录
      
      
       修改ansible.wsgi : yourvirtualenv 指向实际目录
      
      
       拷贝apache-conf/ansible.cfg 到apache配置目录下
      
      
       重启 httpd
      
      
      
      
    • Nginx + 最大值

      
       配置nginx: 参考nginx-conf/nginx_ansible.cfg 
      
      
       启动nginx
      
      
       修改ansible.wsgi : yourvirtualenv 指向实际目录
      
      
       修改ansible_uwsgi.ini : 修改相关配置
      
      
       启动 uwsgi: uwsgi --ini ansible_uwsgi.ini -d ansible.log
      
      
      
      
    演示问题

    WEB  Layout  ANSI  Ansible