Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Gentle is a help you quickly submit code to the test environment tools.

Project description

gentle - Help you quickly deploy code to the test environment

:Version: 0.1
:Keywords: fabric, docopt, yaml, devops, python


What is a Gentle?

As a programmer, I thought There may be a step to deployed to the test

- Copy of your code to the test server, enter the username and password.
- Restart your test environment, such as nginx, superviosr.
- Local to see results, repeat 1-2

It is a waste of time...

Gentle can help you automated do that. The development process is:

- Switch to the directory you want to develop
- Initialization gentle:

- configure the directory you want to sync (use rsync)
- set the test environment server ip, port, username and password
- configure every time you want to update the code in the service restart

- You only need coding and following this command::

$gt publish

If You are more lazyer, you can use::

$gt p

That's all

First You must install `sshpass`, IN fabric rsync_project need input
password again. I use sshpass automation of this process

In ubuntu direct use apt-get/aptitude::

$sudo apt-get install sshpass

Other platform, Go ```` donwload
the lastest verison, then type the following command::

$tar zxvf sshpass-1.05.tar.gz && cd sshpass-1.05
$./configure && make && sudo make install

Then install `gentle`, You only use::

$sudo pip install gentle


$git clone
$cd gentle
$sudo python install

Get Started

- **gt**

After you install, you can use `gt` , Similar `fab` but very different.

- **init**

When you start to use gentle for the current directory. You first init it::

$cd /Your/app/directory
$gt init

It can add a file with name *.gentle.yaml' to this directory.

- **show**

when complete initialization, you can show settings for default::

$cat .gentle.yaml
host: localhost:22
password: 123456
lpath: $ROOT
rpath: /root
command: /etc/init.d/nginx restart
lpath: $ROOT/nginx.conf
priority: 3
rpath: /etc/nginx/nginx.conf
sudo: true
user: root
command: supervisorctl -c /etc/supervisor/supervisord.conf restart all
lpath: $ROOT/supervisord.conf
priority: 2
rpath: /etc/supervisor/supervisord.conf
sudo: true
user: root
username: root

Parameter Description

environment server, can use `user@host:port`, or `host`, or `host:port`

account's password.

Gateway server(Jump server) use `user@host:port`, or `host`, or `host:port`

Gateway server's password

which dir that you want to sync.

which services that you want to restart.

which account to use.

local path, you can use *$ROOT$* for current directory.

remote path.

How to restart service's command.

It for restart's order, it's bigger, and restart earlier.

A bool for tell gentle use sudo or not.

When use sudo which account to use. default it's username's value.

- **list help**

You can use::

$gt -h

- **list commands**

You can type the following command to show available commands::

$gt -l

- **output type**

Gnetle is use fabric default output type. you can find available type which::

$gt -h

You can assign it::

$gt --show=debug,user rs # Only show debug,user type
$gt --hide=warning rs #Hide status,aborts,warnings three types
$gt --show debug rs --only #Only show debug type

Command Description

Rsync your local dir to remote.

Restart your services.

Publish your app, It equal *rsync* + *restart*.

Show gentle settings.

Set gentle conf. You can directly edit. Gentle.yaml file, you can also choose this command::

- gt set:key=services.nginx.rpath,value=/root
- gt s:key=host,value=
- gt s:key=rsync.rpath,value=/root

dot is the separator.

Enjoy it

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
Gentle-0.1.tar.gz (9.0 kB) Copy SHA256 hash SHA256 Source None Dec 4, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page