This assignment contains two options (4a-App Deploy and 4b-Docker Deploy). Completing both is not a requirement. You are to implement one or the other. If you attempt both — please be explicit as to which one you have selected.

Both options will result in a deployment to Heroku and an IT test against that instance. You must deploy the application using your well-known-application name and leave it deployed during the grading period. The application will not be deployed during a build in the grading environment.

Because of the choice of deployments, the various paths that can be taken within each option, and the fact that this assignment primarily deploys what you have already created — there is no additional support or starter modules supplied for this assignment. Everything you need should be supplied by

Include Details Relevant to a Single Deployment Solution
Please make every attempt to follow one solution path and turn in only those details required to implement either the Spring Boot JAR or Docker deployment.

1. Assignment 4a: Application Deployment Option

1.1. Purpose

In this portion of the assignment, you will demonstrate your knowledge of deploying a Spring Boot executable JAR to Heroku. You will:

  1. create a new Heroku application with a choice of names

  2. deploy a Spring Boot application to Heroku using the Heroku Maven Plugin or Git commands

  3. interact with your developed application on the Internet

1.2. Overview

In this portion of the assignment you will be deploying your assignment 3 solution to Heroku as a Spring Boot JAR, making it accessible to the Internet, and be able to update with incremental changes.

assignment4a homesales appdeploy
Figure 1. Spring Boot JAR Heroku Deploy

1.3. Requirements

  1. Create an application name on Heroku. This may be random, a provided name, or random renamed later to a provided name.

  2. Deploy your application as a Spring Boot JAR using the Heroku Maven Plugin. The profile(s) activated should use HTTP — not HTTPS added in the last assignment.

  3. Provide a failsafe, IT integration test that demonstrates functionality of the deployed application on Heroku. This can be the same IT test submitted in the previous assignment adjusted to use a remote URL.

  4. Turn in a source tree with complete Maven modules that will build web application. Deployment should not be a default goal in what you turn in.

1.3.1. Grading

Your solution will be evaluated on:

  1. create a new Heroku application with a choice of names

    1. whether you have provided the URL with application name of your deployed solution

  2. deploy a Spring Boot application to Heroku using the Heroku Maven Plugin.

    1. whether your solution for assignment 3 is now deployed to Heroku and functional after a normal warm-up period

  3. interact with your developed application on the Internet

    1. whether your integration test demonstrates basic application functionality in its deployed state

1.3.2. Additional Details

  • Setup your Heroku account and client interface according to the course lecture and referenced Heroku reference pages.

  • Your Heroku deployment and integration test can be integrated for your development purposes, but what you turn in must

    • assume the application is already deployed by default

    • be pre-wired with the remote Heroku URL to your application

    • be able to automatically run your IT test as part of the Maven module build.

2. Assignment 4b: Docker Deployment Option

2.1. Docker Image

2.1.1. Purpose

In this portion of the assignment, you will demonstrate your knowledge of building a Docker Image. You will:

  1. build a layered Spring Boot Docker image using a Dockerfile and docker commands

  2. make a Heroku-deployable Docker image that accepts environment variable(s)

2.1.2. Overview

In this portion of the assignment you will be building a Docker image with your Spring Boot application organized in layers

assignment4b homesales dockerimage
Figure 2. Layered Docker Image

2.1.3. Requirements

  1. Create a layered Docker image using a Dockerfile multi-stage build that will extend a JDK image and complete the image with your Spring Boot Application broken into separate layers.

    1. The Spring Boot application should use HTTP and not HTTPS within the container.

  2. Configure the Docker image to map the server.port Web server property to the PORT environment variable when supplied.

    1. assign a default value when not supplied

  3. Turn in a source tree with complete Maven modules that will build web application.

2.1.4. Grading

Your solution will be evaluated on:

  1. build a layered Spring Boot Docker image using a Dockerfile and docker commands

    1. whether you have a multi-stage Dockerfile

    2. whether the Dockerfile successfully builds a layered version of your application using standard docker commands

  2. make a Heroku-deployable Docker image that accepts environment variable(s)

    1. whether you successfully map an optional PORT environment variable to the server.port property for the Web server.

2.1.5. Additional Details

2.2. Heroku Docker Deploy

2.2.1. Purpose

In this portion of the assignment, you will demonstrate your knowledge of provisioning a site and deploying a Docker image to Heroku. You will:

  1. deploy a Docker image to Heroku

2.2.2. Overview

In this portion of the assignment you will be deploying your assignment 3 solution to Heroku as a Docker image.

assignment4 homesales deploys authn
Figure 3. Spring Boot Docker Image Deploy

2.2.3. Requirements

  1. Create an application name on Heroku. This may be random, a provided name, or random renamed later to a provided name.

  2. Deploy your application as a Docker image using the Heroku CLI or other means. The profile(s) activated should use HTTP — not HTTPS added in the last assignment.

  3. Provide an integration test that demonstrates functionality of the deployed application on Heroku. This can be the same tests submitted in the previous assignment adjusted to use a remote URL.

  4. Turn in a source tree with complete Maven modules that will build web application. Deployment should not be a default goal in what you turn in.

2.2.4. Grading

Your solution will be evaluated on:

  1. deploy a Docker image to Heroku

    1. whether you have provided the URL with application name of your deployed solution

    2. whether your solution for assignment 3 is now deployed to Heroku, within a Docker image, and functional after a normal warm-up period

    3. whether your integration test demonstrates basic application functionality in its deployed state

2.2.5. Additional Details

  • Setup your Heroku account and client interface according to the course lecture and referenced Heroku reference pages.

  • Your Heroku deployment and integration test can be integrated for your development purposes, but what you turn in must

    • assume the application is already deployed by default

    • be pre-wired with the remote Heroku URL to your application

    • be able to automatically run your IT test as part of the Maven module build.