Giter VIP home page Giter VIP logo

pydelo's Introduction

Pydelo - A Deploy Tool

这是一个Python语言编写的自动化上线部署系统,只需做很少的配置就可以立即使用。 系统将整个发布过程分成两个部分:checkout 和 deploy

  • checkout 此部分做代码的检出动作,并且在代码的检出前后可以分别做一些shell操作,如编译动作,配置文件修改等。
  • deploy 此部分做代码的发布动作,通过rsync将代码同步到远端机器的指定目录,在代码的同步前后也可以分别做一些shell操作,如相关服务的stop、start,某些清理工作等。

Requirements

  • Bash(git, rsync, ssh, sshpass)
  • MySQL
  • Python
  • Python site-package(flask, flask-sqlalchemy, pymysql, paramiko)

That's all.

Installation

apt-get install rsync sshpass
git clone [email protected]:meanstrong/pydelo.git
cd pydelo
pip install -r pip_requirements.txt # 建议使用virtualenv来部署
mysql -h localhost -u root -p pydelo < db-schema/db-schema.sql  # create database and tables
vi web/config.py # set up module config such as mysql connector
python init.py   # 添加默认用户、项目数据

python manage.py # start flask web app

Usage

1.Add project

image

2.New deploy

image

3.Deploy progress

image

4.Deploys

image

Discussing

Todo

  1. BUG:同一个git项目不能同时有两次部署,因为在部署时会对checkout代码进行reset&clean,这样会相互之间造成影响
  2. rc错误码完善
  3. 权限控制的更合理,对资源的访问权限需要更加细化
  4. API返回的结果中无须返回数据库中的所有字段,应该按需返回

pydelo's People

Contributors

meanstrong avatar cheneywong avatar

Watchers

axzh_code 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.