For due date: see jpa05 on Canvas.

Instructions for jpa05

If you run into problems, let us know on the #help-jpa05 channel on the slack.

This is an individual lab on the topic of creating a dokku dev deployment for one of the legacy code projects for CMPSC 156.

The detailed instructions will depend on which project you are assigned to. Here are the legacy project assignments:

Goal

The goal of this lab is to build on what you learned in about setting up dokku deployments. This time, you’ll be setting up a deployment of a full stack app (backend and frontend) that represents one of the legacy code projects in CMPSC 156.

By the end of this lab, you’ll have deployed your own copy of the main branch of one of these four repos on both localhost and Dokku. The repo you will deploy depends on which team you are a part of.

Note that you will have read only access to these repos, but at a later stage, you will have a copy of these repos that is set up specifically for your team, where you will the ability to push to every branch except the main branch.

Your dev deployment should be named as follows:

  • https://project-dev-username.dokku-team.cs.ucsb.edu

Where:

  • project is the project you are assigned to: courses, dining, frontiers, or happycows
  • username is your Github username
  • team is your two digit team number (01,02,…16)

You should end up with a private instance of one of these four running applications (which you can access to check your work):

You may cooperate with one or more pair partners from your team to help in debugging and understanding the lab, but each person should complete the lab separately for themselves.

As with jpa03, the configuration and deployment of the app can be broken down into several parts:

  • Setting up SSL (https) for your dokku app
  • Configuring Google OAuth (this can be tested on localhost first)
  • Setting up the dokku app
  • Connecting it to a Github repo
  • Configuring https
  • Configuring a postgres database on Dokku

Step 1: Clone the starter repo on your machine

The starter repo you should clone is one of these:

NOTE: You should use the https link rather than the ssh link, since you don’t have push access to these repos.

Clone that repo somewhere and cd into it. Note that for this assignment, you won’t actually be making any changes to this repo; you’ll just be running the code that it contains, both on localhost, and on dokku.

Step 2: Configure your app for localhost as documented in the README.md

Now, you need to configure your app for localhost as documented in the README.md

This step may differ in subtle ways across the four repos, so we have created separate pages for each of the four repos with details. Please follow the details there for this step:

Step 3: Configure your app to run on Dokku

Now, you need to set up a dokku deployment on your team’s dokku machine.

This step may differ in subtle ways across the four repos, so we have created separate pages for each of the four repos with details. Please follow the details there for this step:

What if it doesn’t work?

If it doesn’t work:

  • Check on the Slack channel #help-jpa05 to see if there are any known issues.
  • Ask folks on your own team for help first on your team’s slack channel.
  • Post a specific question on the #help-jpa05 slack channel—note what you were trying to do, what you expected, and what happened instead. Screenshots or copy/pasted console output is helpful!
  • Come to office hours (posted here: <>)
  • Ask during class on #help-lecture-discussion

On canvas submit a link to your running app.

It should look like this:

The grading rubric is as follows:

  • (20 pts) Submitted a dokku link in the correct format
  • (20 pts) There is a running app
  • (10 pts) Configured for OAuth correctly so that a user can login with Google Credentials
  • (10 pts) ADMIN_EMAILS is configured correctly.
  • (40 pts) Application specific configuration is correct (includes database, access keys, etc.)

Instructor Resources

Click the triangle for a list of tasks the instructor should do prior releasing this lab.
  • Create a Canvas assignment for jpa05
  • Make sure the legacy code apps are all running in production.
  • Proofread the instructions in this file, and request that the staff (TAs/LAs do also)
  • Consider assigning at least one TA/LA (preferably the one with the least prior experience with the course) to complete the lab in it’s entirety to debug the starter code and instructions