https://github.com/wenzel/salt-oneshot
A quick wrapper around SaltStack to quickly test and deploy a system configuration without having to set-up a Salt Master server.
https://github.com/wenzel/salt-oneshot
Last synced: about 1 month ago
JSON representation
A quick wrapper around SaltStack to quickly test and deploy a system configuration without having to set-up a Salt Master server.
- Host: GitHub
- URL: https://github.com/wenzel/salt-oneshot
- Owner: Wenzel
- License: gpl-2.0
- Created: 2015-07-28T15:35:09.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-04-26T23:17:31.000Z (about 10 years ago)
- Last Synced: 2025-01-02T05:13:11.346Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
salt-oneshot
============
This little project is just a bootstrap to easily try and deploy
a `SaltStack` configuration, without requiring to set up a salt master server.
Requirements
------------
- `Python >= 2.7`
- `virtualenv`
Setup
-----
git clone https://github.com/Wenzel/salt-oneshot
cd salt-oneshot
virtualenv venv
source venv/bin/activate
pip install docopt
./run.py --setup
Configure
---------
### Add your modules
- add your modules in the `salt` directory
- configure your pillars in the `pillar` directory
### Add a salt-formula
`salt-formulas` are ready to use salt modules maintained by the SaltStack community.
Since GitPython should have been installed in the virtualenv, you can make
use of `gitfs_remotes` to add some formulas in the `config/master`
configuration file, and let salt automatically download them :
gitfs_remotes:
- https://github.com/saltstack-formulas/openssh-formula
Apply
-----
To apply the configuration on your machine, just run :
./run.py localhost state.highstate
To apply it on a server :
./run.py example.com --user=foobar state.highstate
Usage
-----
"""
Usage:
run.py [options] -s
run.py [options] [...]
Options:
-s --setup Init salt submodule and install it into the current virtualenv
-u=USER --user=USER Connect to the host as USER (Only on remote host) [Default: root]
--pillar=PATH Set PATH as pillar root (Only on localhost)
--salt=PATH Set PATH as salt modules root (Only on localhost)
--config=PATH Set PATH as config directory
-v=LEVEL --verbosity=LEVEL Log verbosity (all | garbage | trace | debug | info | warning | error | critical | quiet) [Default: info]
-h --help Show this screen.
"""