Getting Started with HashiCorp Waypoint: How to deploy a python app using flask & Docker

The new delivery standard ?

Waypoint is a new software delivery tool made by HashiCorp, released last week. It’s a new abstraction layer over the build-deploy-release pipeline which provides an ‘infrastructure as code’ like approach to the entire delivery flow.

In this post we’ll cover a couple of introductory operations:

  • Build & deploy a Docker image containing a python flask application
  • Push the docker image into a Docker registry

Build a docker image containing a flask application

Install Waypoint CLI for Mac OS X (for others see here):

Assuming you already have Docker for desktop, install a Docker image of Waypoint’s server:

Using the downloaded CLI, start a Waypoint server over a Docker container:

Using git, clone the example flask project (inspired by Waypoint’s python project) containing a flask application, a Docker image and a Waypoint configuration file:

Initialise and run the flask application using Waypoint CLI:

The application is now running, deployed over our local Docker environment!

Push the docker image into a Docker registry

Let’s customize the delivery flow and add an update into our Docker repository; we’ll use a Docker Hub repository. Notice we’ve added a new registry component as part of our .hcl configuration:

Make sure you are logged in into Docker hub (docker login) as Waypoint doesn’t support authentication as part of it’s workflow.

Now let’s re-run Waypoint and see the addition:

The application is not only deployed but also pushed our latest Docker image into the repository.

What’s next ?

There are many other features that Waypoint provides and I encourage you to check out the docs. Overall it’s an interesting new tool and mostly a new approach for abstracting software delivery.

What do you think? let me know what you think on this new approach; comment here or send me a message!

👨🏻‍💻 Engineering Leader ⛰️ Software Developer ☁️ Cloud Solution Architect