Releases: pyinfra-dev/pyinfra
Releases · pyinfra-dev/pyinfra
pyinfra v0.4
Changes in 0.4:
- Major change: entirely new, streamlined CLI. Legacy support will remain for the next few releases. Usage is now:
# Run one or more deploys against the inventory
pyinfra INVENTORY deploy_web.py [deploy_db.py]...
# Run a single operation against the inventory
pyinfra INVENTORY server.user pyinfra,home=/home/pyinfra
# Execute an arbitrary command on the inventory
pyinfra INVENTORY exec -- echo "hello world"
# Run one or more facts on the inventory
pyinfra INVENTORY fact linux_distribution [users]...- Major addition: new
connectorsmodule that means hosts are no longer limited to SSH targets. Hostnames prefixed in@define which non-SSH connector to use. There is a newlocalconnector for executing directly on the local machine, use hostname@local, eg:
pyinfra @local fact arch- Major addition: add
@deploywrapper for pyinfra related modules (eg pyinfra-openstack) to wrap a deploy (collection of operations) under one function, eg:
from pyinfra.api import deploy
@deploy('Install Openstack controller')
def install_openstack_controller(state, host):
apt.packages(
state, host,
{'Install openstack-client'},
['openstack-client'],
)
...- Add SSH module to execute SSH from others hosts:
ssh.keyscan,ssh.command,ssh.upload,ssh.download - Add vzctl module to manage OpenVZ containers:
vzctl.create,vzctl.stop,vzctl.start,vzctl.restart,vzctl.delete,vzctl.set - Add
on_successandon_errorcallbacks to all operations (args =(state, host, op_hash)) - Add
server.script_templateoperation - Add global
hostskwarg to all operations, working likelocal.include's - Add
cache_timekwarg toapt.updateoperation - Add
Inventory.get_groupandInventory.get_host - Inventory
__len__now (correctly) looks at active hosts, rather than all - Add
Inventory.len_all_hoststo replace above bug/qwirk - Add progress spinner and % indicator to CLI
- Replace
docopt/termcolorwithclick - Moved
pyinfra.clitopyinfra_cli(internal breaking) - Switch to setuptools
entry_pointsinstead of distutils scripts - Expand Travis.ci testing to Python 3.6 and 3.7 nightly
- Remove unused kwargs (
sudo,sudo_user,su_user) frompyinfra.api.facts.get_facts
pyinfra v0.3
pyinfra manages the state of one or more servers. It can be used for app/service deployment, config management and ad-hoc command execution. Deploys are asynchronous, highly performant and can target thousands of hosts in parallel. The inventory of servers and deploy state are written in Python, allowing for near-infinite extendability.
Changes in v0.3:
- Add
init.serviceoperation - Add
config.MIN_PYINFRA_VERSION - Add
daemon_reloadtoinit.systemd - Add
pippath topip.packages(@hoh) - Add
virtualenv_kwargstopip.packages - Add
socketfact - Display meta and results in groups
- Fact arguments now parsed with jinja2 like operation args
- Use full dates in
file,directoryandlinkfacts - Improve
--runcheck between operation and/or shell - Improve tests with facts that have multiple arguments
- Fix how
pip.packageshandles pip path - Fix
yum.rpmwhen downloading already installed rpm's - Fix
usersfact with users that have no home directory - Fix command overrides with dict objects (
git.repo) - Removed compatability for deprecated changes in v0.2
pyinfra v0.2.2
v0.2.2
pyinfra v0.2.1
v0.2.1
pyinfra v0.2
pyinfra automates service deployment. It does this by diff-ing the state of the server with the state defined in the deploy script. Deploys are asyncronous and highly performant. The inventory & deploy are managed with pure Python, allowing for near-infinite extendability.
New stuff:
- Add LXD facts/module
- Add iptables facts/module
- Support usernames with non-standard characters (_, capitals, etc)
- Add global
get_ptykwarg for all operations to work with certain dodgy programs - Add
--fail-percentCLI arg - Add
excludekwarg tofiles.sync - Enable
--limitCLI arg to be multiple, comma separated, hostnames - Add
no_recommendskwarg toapt.packagesoperation - Make local imports work like calling
pythonby adding.tosys.pathin CLI - Add key/value release meta to
linux_distributionfact - Improve how the init module handles "unknown" services
- Add
forcekwarg toapt.packagesandapt.deband don't--force-yesby default
To-be-breaking changes (deprecated & will be removed in 0.3):
- Switch to lowercase inventory names (accessing
inventory.bsdwhere the group is defined asBSD = []is deprecated) - Rename
yum.upgrade->yum.update(yum.upgradedeprecated) - Deprecate
pip_virtualenv_packagesfact aspip_packageswill now accept an argument for the virtualenv - Deprecate
npm_local_packagesfact asnpm_packageswill accept an argument for the directory
Internal changes:
- Operations now
yield, rather than returning lists of commands
pyinfra v0.1.5
v0.1.5
pyinfra v0.1.4
v0.1.4
pyinfra v0.1.3
v0.1.3
pyinfra v0.1.2
v0.1.2
pyinfra v0.1.1
v0.1.1