Create a single digital ocean droplet and provision it to run the docker engine over a simple cli
Project description
docker-droplet
Create a single digital ocean droplet and provision it to run the docker engine over a simple cli.
Status
Source | Shields |
---|---|
Project | |
Publishers | |
Downloads | |
Raised |
Motivation
Creating a single droplet provisioned to use docker should be quick. Ansible and Terraform are the appropriate tools but may take long to configure for a single droplet. This package provides a simple cli to streamline the use of these tools.
Installing
Install the package from pypi:
pip install docker-droplet
Alternatively, you can clone the repo:
git clone https://github.com/JoelLefkowitz/docker-droplet.git
Running the package
Usage:
docker-droplet up [options]
docker-droplet down [options]
To create a terraform configuration and run an ansible playbook to install docker:
docker-droplet up --droplet-name steve --ssh-key /home/.ssh/steve.pub --token 12345 --config-path /Workspace/config.tf
Where the terraform configuration path defaults to "./config.tf"
The droplet's name, ssh key path and digitalocean token will be synchronized with environment variables:
export TF_VAR_DOCKER_DROPLET_DROPLET_NAME=steve
export TF_VAR_DOCKER_DROPLET_SSH_KEY=/home/.ssh/steve.pub
export TF_VAR_DOCKER_DROPLET_TOKEN=12345
docker-droplet up
A domain and digital ocean project title can also be specified
docker-droplet up --domain example.com --project example
To remove the structure simply take it down:
docker-droplet down --token 12345 --config-path /Workspace/config.tf
Running tests
Tests are not included in the package build. Clone the repo to include all the source files.
python -m setup.py test
What is being tested
Unittests are used to test for appropriate behavior from:
- The template's loader
- The interface's argument validation
- The interface's path_validation
Docs
Docs are not included in the package build. Clone the repo to include all the source files.
Full documentation can be generated locally:
python setup.py docs
To view the generated docs visit ./build/sphinx/html/docker_droplet/docs/modules.html:
open -a "Google Chrome" ./build/sphinx/html/docker_droplet/docs/modules.html
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Bumpversion is used to version and tag changes. For example:
bumpversion patch
Releases are made on every major change.
Author
- Joel Lefkowitz - Initial work - JoelLefkowitz
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
None
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file docker-droplet-1.0.8.tar.gz
.
File metadata
- Download URL: docker-droplet-1.0.8.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.8.0 tqdm/4.41.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40c634cc18fd6006d9de4efe9d3869c5dbb95c796b9e8661bf62aaef6c666336 |
|
MD5 | b33ef412a4418ab21eb4331ec1c869ab |
|
BLAKE2b-256 | 94444c63b41e98f1167621b6ac245be8bee3767a07d9071caea0011d8611a55d |
File details
Details for the file docker_droplet-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: docker_droplet-1.0.8-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.8.0 tqdm/4.41.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f2c8d42406fb7685dd7ca4d8aec46d78f65ae06f70cdac15d288e3a81af9f22 |
|
MD5 | ac3bab2a0d8e28f724134d6e5420dc31 |
|
BLAKE2b-256 | 3a6ad9d2bd5ab25f83cbec524e3e8ec6c0a1b59f0d0c0b89eb2cb997f1fa6794 |