Skip to main content

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 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for docker-droplet, version 1.0.6
Filename, size File type Python version Upload date Hashes
Filename, size docker_droplet-1.0.6-py3-none-any.whl (10.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size docker-droplet-1.0.6.tar.gz (48.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page