gentle - Help you quickly deploy code to the test environment
=================================
:Version: 0.1
:Download: http://pypi.python.org/pypi/gentle
:Source: http://github.com/dongweiming/gentle
: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
environment:
- 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
Install
=====
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 ``http://sourceforge.net/projects/sshpass`` 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
or::
$git clone https://github.com/dongweiming/gentle
$cd gentle
$sudo python setup.py 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
gateway:
gatewaypassword:
rsync:
lpath: $ROOT
rpath: /root
services:
nginx:
command: /etc/init.d/nginx restart
lpath: $ROOT/nginx.conf
priority: 3
rpath: /etc/nginx/nginx.conf
sudo: true
user: root
supervisor:
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
~~~~~~~~~~~
:host:
environment server, can use `user@host:port`, or `host`, or `host:port`
:password:
account's password.
:gateway:
Gateway server(Jump server) use `user@host:port`, or `host`, or `host:port`
:gatewaypassword:
Gateway server's password
:rsync:
which dir that you want to sync.
:services:
which services that you want to restart.
:username:
which account to use.
:lpath:
local path, you can use *$ROOT$* for current directory.
:rpath:
remote path.
:command:
How to restart service's command.
:priority:
It for restart's order, it's bigger, and restart earlier.
:sudo:
A bool for tell gentle use sudo or not.
:user:
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/rs:
Rsync your local dir to remote.
:restart/rt:
Restart your services.
:pubish/p:
Publish your app, It equal *rsync* + *restart*.
:showconf/show:
Show gentle settings.
:setconf/set:
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=8.8.8.8:12345
- gt s:key=rsync.rpath,value=/root
dot is the separator.
Enjoy it
=======
Metadata
Release files for Gentle 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| Gentle-0.1.tar.gz | 9.0 kB | Without provenance | Details |
Release files / Gentle-0.1.tar.gz
| Download URL | Gentle-0.1.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c44477c31713c96fde52df8634e6d24bf266f9f11fa80df3b3e07ea43d5460d0
|
|
BLAKE2b-256 checksum How to use checksums |
9f4d0392ecd26f92c045c922d27d515bfb1c5b3db324f020858e05c2cdb79be0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Gentle 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.