-
Notifications
You must be signed in to change notification settings - Fork 466
/
Serverless Firebase Development: Challenge Lab
52 lines (31 loc) · 1.61 KB
/
Serverless Firebase Development: Challenge Lab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Let's Define Some Environment Variables!
export DATASET_SERVICE_NAME=
export FRONTEND_STAGING_SERVICE=
export FRONTEND_PRODUCTION_SERVICE=
Then Clone The Repository!!
TASK 2 ----------------------------------------------
cd pet-theory/lab06/firebase-import-csv/solution
npm install
node index.js netflix_titles_original.csv
TASK 3 -----------------------------------------------
cd ~/pet-theory/lab06/firebase-rest-api/solution-01
npm install
gcloud builds submit --tag gcr.io/$GOOGLE_CLOUD_PROJECT/rest-api:0.1
gcloud beta run deploy $DATASET_SERVICE_NAME --image gcr.io/$GOOGLE_CLOUD_PROJECT/rest-api:0.1 --allow-unauthenticated
TASK 4 -----------------------------------------------
cd ~/pet-theory/lab06/firebase-rest-api/solution-02
npm install
gcloud builds submit --tag gcr.io/$GOOGLE_CLOUD_PROJECT/rest-api:0.2
gcloud beta run deploy $DATASET_SERVICE_NAME --image gcr.io/$GOOGLE_CLOUD_PROJECT/rest-api:0.2 --allow-unauthenticated
SERVICE_URL=<copy url from your netflix-dataset-service>
curl -X GET $SERVICE_URL/2019
TASK 5 ----------------------------------------------
cd ~/pet-theory/lab06/firebase-frontend/public
nano app.js
npm install
cd ~/pet-theory/lab06/firebase-frontend
gcloud builds submit --tag gcr.io/$GOOGLE_CLOUD_PROJECT/frontend-staging:0.1
gcloud beta run deploy $FRONTEND_STAGING_SERVICE --image gcr.io/$GOOGLE_CLOUD_PROJECT/frontend-staging:0.1
TASK 6 -------------------------------------------------
gcloud builds submit --tag gcr.io/$GOOGLE_CLOUD_PROJECT/frontend-production:0.1
gcloud beta run deploy $FRONTEND_PRODUCTION_SERVICE --image gcr.io/$GOOGLE_CLOUD_PROJECT/frontend-production:0.1