Skip to main content

docker-droplet

Create a single digital ocean droplet and provision it to run the docker engine over a simple cli.

Status

Source Shields
Project license release
Publishers pypi
Downloads pypi_downloads
Raised issues pulls

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

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

Release files for docker-droplet 1.0.8

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

Source distribution (sdist)

Source distribution for docker-droplet 1.0.8
File Size Uploaded
docker-droplet-1.0.8.tar.gz 14.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docker-droplet 1.0.8
File Interpreter ABI Platform
docker_droplet-1.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 39.1 kB

Release files / docker-droplet-1.0.8.tar.gz

Download URL docker-droplet-1.0.8.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
40c634cc18fd6006d9de4efe9d3869c5dbb95c796b9e8661bf62aaef6c666336
BLAKE2b-256 checksum
How to use checksums
94444c63b41e98f1167621b6ac245be8bee3767a07d9071caea0011d8611a55d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / docker_droplet-1.0.8-py3-none-any.whl

Download URL docker_droplet-1.0.8-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f2c8d42406fb7685dd7ca4d8aec46d78f65ae06f70cdac15d288e3a81af9f22
BLAKE2b-256 checksum
How to use checksums
3a6ad9d2bd5ab25f83cbec524e3e8ec6c0a1b59f0d0c0b89eb2cb997f1fa6794
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 release files

1.0.6

2 release files

1.0.3

2 release files

1.0.1

2 release files

0.2.3

2 release files

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