Giter VIP home page Giter VIP logo

ansible_ui's Introduction

About

该平台为ansible系统的web程序

Function

  • 按照项目来组织布局,更为直观,上手简单
  • 提供简单易懂的资产管理界面
  • 提供用户密钥管理功能
  • 提供yml文件界面管理功能
  • 提供任务部署功能
  • 提供文件传输功能
  • 提供命令执行功能
  • 提供预约执行功能
  • 提供模板功能
  • 提供log功能
  • 提供邮件通知功能
  • 基于celery队列进行任务分发,便于扩展

Requirements

  • pip
  • virtualenv
  • mysql-server,mysql-devel
  • openldap-devel

Install

  • 系统为CentOS6.5

  • 添加系统用户

      useradd ansible
      su - ansible
    
  • 配置virtualenv环境

      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
    
  • 配置ldap、数据库和邮件信息

      cd desktop/core/internal
      vim settings_local.py 
      # 修改 LDAP Datebase Mail 配置
      如果需要使用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
    

Run

  • 直接运行

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

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

Demo

Problem

  • 已知问题:在单核CPU服务器上任务无法运行(在调用pexpect时会报“ValueError: I/O operation on closed file”错误,类似这个问题,如果要在单核CPU服务器上运行,请将pexpect降为2.4版本

ansible_ui's People

Contributors

alaxli avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.