This PR adds some new users data as well as a few new abilities in the api and frontend service. There are some optional configuration options as well, but by default nothing new is required.
The goal is to set the movies app up to demonstrate the Volume Snapshots Okteto feature. In order to do that effectively we needed a bit more data. This PR primarily adds new user data and an "admin" view to display these users.
The setup for Volume Snapshots is optional. There is a document on how you could do it included here, which refers to the official Okteto documentation. Note: All changes here should work on a standard Okteto cluster without any admin intervention
Summary of Changes in this PR
Adds a users.json data file with 10K users in it. We've included a document describing how this data was generated, in case it needs to be re-created or updated at some point.
Adds a new function in the API that will load this data on startup. In my testing the first time startup delay is on the order of seconds. There is an initContainer that runs the load routine which was added to the API deployment manifest.
Adds a new /users endpoint to the API service which will return either all users (/users) or a single user (/users/{userid})
Since the API now has three endpoints (/rentals, /users, and /users/{userid} we've added the gorilla/mux router to handle this nicely.
The frontend has been updated with a new Users view that will display the user data.
To route to the new /admin/users route we added react-router and an associated update to both the frontend service manifest and default nginx configuration
We bump up the default persistence volume for PostgreSQL to 5gi to give us some headroom for the new data
Docs:
Add a new document (demo-with-volume-snapshot.md) to introduce the snapshotting concept
Link from the new snapshotting doc to another new document (creating-db-snapshot.md) on setting up the cluster for Volume Snapshotting, and includes an example on how to prepare an instance of this app for snapshotting and re-use.
:wave: Intro
This PR adds some new users data as well as a few new abilities in the
api
andfrontend
service. There are some optional configuration options as well, but by default nothing new is required.The goal is to set the movies app up to demonstrate the Volume Snapshots Okteto feature. In order to do that effectively we needed a bit more data. This PR primarily adds new user data and an "admin" view to display these users.
The setup for Volume Snapshots is optional. There is a document on how you could do it included here, which refers to the official Okteto documentation. Note: All changes here should work on a standard Okteto cluster without any admin intervention
Summary of Changes in this PR
users.json
data file with 10K users in it. We've included a document describing how this data was generated, in case it needs to be re-created or updated at some point./users
endpoint to the API service which will return either all users (/users
) or a single user (/users/{userid}
)/rentals
,/users
, and/users/{userid}
we've added thegorilla/mux
router to handle this nicely.Users
view that will display the user data./admin/users
route we addedreact-router
and an associated update to both the frontend service manifest and default nginx configurationdemo-with-volume-snapshot.md
) to introduce the snapshotting conceptcreating-db-snapshot.md
) on setting up the cluster for Volume Snapshotting, and includes an example on how to prepare an instance of this app for snapshotting and re-use.CC: @brookeruu, @john-craft, @rberrelleza