GitHunt
CH

chids/cloud-starter

An example of a playbook format for getting started with cloud platforms

About

This is basic tutorial and showcase for how to take a basic HTTP API written in Java and run it; first locally, then on Heroku by pushing code, then on Heroku using Docker and finally on AWS by leveraging Convox.

The tutorial was written from the persective of being on MacOS and having Homebrew installed.

Step 0: Getting the basics in place

  1. Unless you already have git, install it (e.g. brew install git)
  2. git clone this repository
  3. cd cloud-starter
  4. Install Maven and the Heroku CLI (e.g. brew install maven heroku)
  5. Compile and package the application by running: mvn package

Step 1: Deployin' time

Locally

Estimated time to complete this section: 30 seconds

  1. Deploy: heroku local
    • Estimated deployment time: 1 second
  2. Test: http://127.0.0.1:8090

Heroku (git)

Estimated time to complete this section: 5 minutes

  1. Prerequisites: A Heroku.com account
  2. Setup: heroku create <appname> --region eu
  3. Deploy: git push heroku master
    • Estimated deployment time: 15 seconds
  4. Test: https://<appname>.herokuapp.com

Heroku (Docker)

Estimated time to complete this section: 10 minutes

  1. Prerequisites: Docker installed & running on your machine
  2. Setup: heroku container:login
  3. Deploy: heroku container:push web
    • Estimated deployment time: 15 seconds
  4. Test: https://<appname>.herokuapp.com

Convox

Estimated time to complete this section: 25 minutes

  1. Prerequisites:
  2. Setup: convox apps create <appname> --wait
  3. Deploy: convox deploy --app <appname> --wait
    • Estimated deployment time: 3 minutes
    • Get a ☕ while the first deploy sets up the app and propagates the DNS records
  4. Test: https://<appname>-<processname>-<something>.<awsregion>.elb.amazonaws.com
    • The DNS endpoint is displayed by: convox services --app <appname>

Languages

Java84.7%Dockerfile15.3%

Contributors

Created August 16, 2018
Updated January 28, 2023
chids/cloud-starter | GitHunt