Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.57 KB

README.md

File metadata and controls

57 lines (47 loc) · 1.57 KB

Interactive Cloud Deployment

The project's purpose is for the interactive deployment of a Digital Ocean droplet and setup of a Docker Compose file which spawns an Nginx webserver with SSL enabled.

How it works

The script uses calls with the Digital Ocean API directly for the Droplet creating and setup using Ansible

Requirements

Python +v3.x

Installation

Setup Virtual Environment

sudo apt-get install virtualenv

virtualenv -p python3 venv
. venv/bin/activate

Install Requirements

pip install -r requirements.txt

Configuration

  • Edit 'env.json' with the desired values.
  • Create a Digital Ocean API token. (How-to)
  • Customize 'docker-compose.yml' file to your needs. (Documentation)

Usage

Interactive

python3 run_deployment.py

Automatic

Configure 'config' JSON document inside 'run_deployment.py' file.

python3 run_deployment.py

Testing Purposes

Replace 'docker-compose.yml' with the following:

---
  version: "3.2"
  
  services:
    test:
      image: tutum/hello-world
      container_name: test
      ports:
        - 5000:80

Navigate to http://<Droplet_IP>:5000/ to see the results.

References