Deployment

Topics covered in this week are:

Deploying Javalin applications on Docker in the Cloud using:

  • Docker
  • Continuous Integration & Deployment
  • GitHub Actions
  • Docker Hub
  • Watchtower
  • Ubuntu VM on Digital Ocean
  • Caddy Server
  • Domains, SSL Certificates, and HTTPS

Learning objectives for the week

Monday

Online review on the Friday assignment:

  • What did you solve?
  • Show your code an run it in IntelliJ
  • Think about what you could have done differently
  • What did you learn?

For the rest of the day: Prepare for the week. Watch the videos and read the articles.

Tuesday (class) - Docker, Docker Hub, and GitHub Actions

Prepare for the class

Watch this video:

Skim through these articles:

In-class exercises

Wednesday (CodeLab) - Docker, Digital Ocean, Watch Tower, and Caddy Server

Today we will finish deploying a web api on a Digital Ocean Droplet. We will use Docker, Watch Tower, and Caddy Server to deploy the web api.

The goal is to have a running web api on a Digital Ocean Droplet with a domain name and SSL certificate. The web api should be accessible through the domain name and should be updated automatically when a new version is pushed to the Docker Hub.

Prepare for the CodeLab

  1. It would be good if you have a domain name ready. It takes a little while to get a domain activated and have the dns handling transfered to Digital Ocean. If you don’t have a domain name yet, please follow this tutorial.

  2. Also, sign up on Digital Ocean if you haven’t done that already. Here is a tutorial.

  3. Make sure you have a Droplet running on Digital Ocean. Here is a tutorial.

In-class exercises

This week’s CodeLab is a full pipeline exercise. You will set up a full CI/CD pipeline for a Java project using GitHub Actions, Docker Hub, and Watchtower. You will learn how to automate the building, testing, and deployment of your application in a containerized environment and later run it on a Digital Ocean server.

Thursday (class) - Putting the pieces together - Integration testing with Security

No preparations needed for this day. But bring your laptop ;-)

In-class exercises

  1. First off a premiere of the new event Architecture Bingo 2025.
  2. First we will go through how to setup integration testing of Javalin endpoints with security. Hotel API with tests and security. The branch called “restassured” is the one to look at. It contains a working example of how to set up integration testing for rest endpoints.
  3. Then we will apply the methodology to a new project. We will use this project as a base for the tests: Todos

Friday (exercise day)

Let’s finish the week strong with a brainstorm and preparations for next weeks SP-2. More to come!


Check TimeEdit for time schedule, teacher, and location - and keep an eye on your inbox for urgent updates.


Table of contents


Top

3. semester efterår 2024