jpa05 : Deploying Team Deployment of Legacy Code App (Course Search/LAs/Mapache)

num ready? description assigned MW lect due MW lect assigned TR lect due TR lect
jpa05 true Deploying Team Deployment of Legacy Code App (Course Search/LAs/Mapache) Tue 01/26 05:00PM Wed 02/03 11:59PM

This lab is similar to jpa04, in that you will be working as a team to set up a deployment of a Spring/React full-stack web application.

Here’s what’s different:

Why are we doing all of this

In order to be able to work on a full stack web application, you need to be able to:

These setup steps, as you’ve already experienced, can be a little complex. We are introducing them into the course early so that you get experience with them early. We don’t want these steps to be the stumbling blocks when you are trying to deal with the actual code changes.

OK, I get that, but what are all of these steps?

We can talk more about this in lecture, and I’m happy to… just ask. But here’s a quick run down.

If you have more questions, ask in lecture, in office hours, or ask the TAs/LAs during section.

Steps for jpa05

Steps 1 and 2 can be delegated to individual members of your team, and done in parallel with the remainder of the steps.

Step 1: Give everyone on your team access to your Heroku app

On your team’s slack channel, you should find a message about your jpa05 Heroku app. The name of the app will be something like this:

Examples:

Some on your team was given admin access to the app. Identify that person. They should add everyone else on your team, using the email address that person uses to login to Heroku.

If that person is not available, there is an LA designated for your team. Ask them, or one of the TAs, or the instructor, to add someone else from your team, and then they can add everyone else.

Step 2: Give everyone on the staff access to your Heroku app

On the Slack, in the channel #course-notes, there is a list of the email addresses of the course staff. Some of them already have access to your app, but the rest do not. Please add the rest of them.

Step 3: Clone the Repo assigned to your team.

This step should be done, eventually, by each member of the team individually. For today, though, it is sufficient for one member of the team to do it, preferably, sharing their screen with other members looking on and helping.

Identify the repo associated with your team:

Clone this repo on your local machine, or in your CSIL account.

Step 4: Follow the SETUP-QUICKSTART.md instructions to create a temp-credentials.txt

Next, follow the SETUP-QUICKSTART.md instructions for your repo.

Note that you should be able to use these instead of the SETUP-FULL.md instructions, since you should already have:

So, following these instructions:

Also: add the additional steps needed, depending on your particular application:

Once you’ve filled in all these values in your temp-credentials.txt, distribute these among the members of your team.

It is best to do this via Slack DMs rather than in a public message on the team slack channel.

Step 5: Configure your secrets-localhost.properties and javascript/.env.local files

Next, set up the values in secrets-localhost.properties and javascript/.env.local files, and secrets-heroku.properties using the values from temp-credentials.txt.

For the app.admin.emails value, add half of the team members to the list, and leave half off:

app.admin.emails=phtcon@ucsb.edu,cgaucho@ucsb.edu,foobear@ucsb.edu,ldelplaya@ucsb.edu

Here’s why: as a team, you want to be able to test with, and without admin privileges. The users you list here are “permanent admins” that always have admin privileges. The rest can be shapeshifters; existing admins can turn admin privileges on/off for these users.

You should always have at least one permanent admin on your team, but it is good to have several folks that can test the application in both admin and non-admin mode.

You might distribute these files via DMs on slack also.

Step 5: Test the application on localhost

Now, with the values in place in secrets-localhost.properties and javascript/.env.local, you should be able to run your application using

mvn spring-boot:run

Make sure it comes up on localhost, and that you can login and logout.

Step 6: Run setHerokuVars.py and then deploy on Heroku

Next, run the setHerokuVar.py script (following the instructions), and then deploy your main branch on Heroku.

You should be able to access the application, and then login, and logout.

Step 7: Test the admin features

Check that the permanent admins have access to the admin menu.

Then, try having some non-admin members login to the app. After they login, admins should be able to see their logins on the admin menu.

They should also be able to promote and demote these users, giving and taking away admin status.

When all of this is done, you’re basically finished with this lab, and ready to submit it on Gauchospace.

Step 8: Submit on Gauchospace

One member of your team should submit here: https://gauchospace.ucsb.edu/courses/mod/assign/view.php?id=6056872