Skip to main content

snaplayer

snaplayer is a minimalist python command line tool for easily list and capture your Softlayer virtual servers into corresponding images with no effort whatsoever.

Quick start

# First of all, you need to install
pip3 install snaplayer

# Create a criteria configuration file
cat << EOF > my_config.yml
hourly: false
tags:
    - cool
    - cooler
domain: cool.io
EOF


# It's best to list your instances first
snaplayer --list my_config.yml

# Capture your instances into images!
snaplayer --capture my_config.yml

Requirements

Installation

Installation of snaplayer can be made directly from source, via pip or easy_install, whichever you prefer.

Option # 1: pip

$ pip install snaplayer

Option # 2: from source

$ git clone git@github.com:axltxl/snaplayer.git
$ cd snaplayer
$ python3 setup.py install

Option # 3: easy_install

$ easy_install snaplayer

From this point you can edit your configuration file

$ vi /etc/snaplayer/snaplayer.yaml

Basic Usage

Normal execution

$ snaplayer --capture /path/to/my/custom/snaplayer.yaml

List instances

$ snaplayer --list /path/to/my/custom/snaplayer.yaml

Quiet output

$ snaplayer -q

Dry run

$ snaplayer -d

Configuration file

snaplayer lists and tells Softlayer to capture images based on criteria information extracted from a ‘criteria file’ which is no more than a dead-simple YAML file with a handful key-value pairs, like so:

---
# Example criteria YAML file
domain: mydomain.com
tags: [mydomain, production]
hourly: false
monthly: true
cpus: 2

Configuration options are correspondent to those of SoftLayer.vs.list_instances

Options

snaplayer [options] (--list | --capture) <config_file>
  • --capture Capture instances and create images from them

  • --list List instances only

  • --version show version number and exit

  • --list only list matching instances and exit

  • -h | --help show a help message and exit

  • -d | --dry-run don’t actually do anything

  • -q | --quiet quiet output

  • --ll | --log-level=[num] set logging output level

  • -l LOG_FILE | --log-file LOG_FILE set log file

Contributing

There are many ways in which you can contribute to snaplayer. Code patches are just one thing amongst others that you can submit to help the project. We also welcome feedback, bug reports, feature requests, documentation improvements, advertisement and testing.

Feedback contributions

This is by far the easiest way to contribute something. If you’re using snaplayer for your own benefit, don’t hesitate sharing. Feel free to submit issues and enhancement requests.

Code contributions

Code contributions (patches, new features) are the most obvious way to help with the project’s development. Since this is so common we ask you to follow our workflow to most efficiently work with us. For code contributions, we follow the “fork-and-pull” Git workflow.

1. Fork, then clone your repo on GitHub

git clone git@github.com:your-username/snaplayer.git
git add origin upstream https://github.com/axltxl/snaplayer.git

If you already forked the repo, then be sure to merge the most recent changes from “upstream” before making a pull request.

git pull upstream

2. Create a new feature branch in your local repo

git checkout -b my_feature_branch

3. Make your changes, then make sure the tests passes

pyvenv snaplayer-pyve && source snaplayer-pyve/bin/activate
python3 setup.py test

4. Commit your changes once done

git commit -a -m "My commit message"
git push origin my_feature_branch
  1. Submit a pull request with your feature branch containing your changes.

Metadata

Release files for snaplayer 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snaplayer 0.1.1
File Size Uploaded Provenance Actions
snaplayer-0.1.1.tar.gz 9.4 kB Without provenance Details for snaplayer-0.1.1.tar.gz

Release files / snaplayer-0.1.1.tar.gz

Download URL snaplayer-0.1.1.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1c76719909b93655bfdb7403132def8e75318563bcd913e4b39a18077811cdc2
BLAKE2b-256 checksum
How to use checksums
16629aae9723a3319c91fba50d3bcff41cc12b32029b3c0bdf6c60ef977fe0d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for snaplayer 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page