Introduction to Serverless: Firebase Development Challenge Lab

 Introduction to Serverless: Firebase Development Challenge Lab



In this Challenge there are 6 tasks so the steps are given below. Pls subscribe the challenge above (TECH_ED) and hope you will get more and more badges :))





Write this command in the shell as your first step:

gcloud config set project $(gcloud projects list --format='value(PROJECT_ID)' --filter='qwiklabs-gcp')
git clone https://github.com/rosera/pet-theory.git


Now for task one watch along the video, go to firestore and create a database using Nam5 location.


task 1 complete :))

Now for 2nd task copy paste below code in Shell:

cd pet-theory/lab06/firebase-import-csv/solution
npm install
node index.js netflix_titles_original.csv

task 2 complete :))


For third task run these commands, don't forget to replace your project_id as I had done in the video

cd
cd pet-theory/lab06/firebase-rest-api/solution-01
gcloud builds submit --tag gcr.io/[PROJECT_ID]/rest-api:0.1
gcloud run deploy --image gcr.io/[PROJECT_ID]/rest-api:0.1

For the target plat form, select the option :  [1] Cloud Run (fully managed)
For the Service name (rest-api), enter: netflix-dataset-service
If it is asking for the "you like to enable and retry (this will take a few minutes)?" prompt, press y and hit Enter
For the region, select the option of us-central1 (in my case it was at 18th number)
For the "Allow unauthenticated invocations to [netflix-dataset-service] (y/N)?" prompt, press y and hit Enter.

task 3 complete :))


For 4th task run these commands:

cd
cd pet-theory/lab06/firebase-rest-api/solution-02
gcloud builds submit --tag gcr.io/[PROJECT_ID]/rest-api:0.2
gcloud run deploy --image gcr.io/[PROJECT_ID]/rest-api:0.2

For the target plat form, select the option :  [1] Cloud Run (fully managed)
For the Service name (rest-api), enter: netflix-dataset-service
If it is asking for the "you like to enable and retry (this will take a few minutes)?" prompt, press y and hit Enter
For the region, select the option of us-central1 (in my case it was at 18th number)
For the "Allow unauthenticated invocations to [netflix-dataset-service] (y/N)?" prompt, press y and hit Enter.

task 4th complete :))

Execute these commands for task 5th:

cd
cd pet-theory/lab06/firebase-frontend
gcloud builds submit --tag gcr.io/[PROJECT_ID]/frontend-staging:0.1
cloud builds submit --tag gcr.io/[PROJECT_ID]/frontend-staging:0.1

For the target plat form, select the option :  [1] Cloud Run (fully managed)
For the Service name (frontend-staging), enter: frontend-staging-service
If it is asking for the "you like to enable and retry (this will take a few minutes)?" prompt, press y and hit Enter
For the region, select the option of us-central1(18th in the video)
For the "Allow unauthenticated invocations to [frontend-staging-service] (y/N)?" prompt, press y and hit Enter.

task 5 complete :))


Last but not least 6th task requires special attention (*NOTE* - Please watch the video if you want to do this properly as it requires edit in app.js file😱) 

Go to pet-theory/lab06/firebase-frontend/public and open app.js then uncommend this "https://XXXX-SERVICE.run.app/2020" and replace it with the service URL copied and save changes.

Now back to the same work let's excute these commands:

gcloud builds submit --tag gcr.io/[PROJECT_ID]/frontend-production:0.1
gcloud run deploy --image gcr.io/[PROJECT_ID]/frontend-production:0.1

For the target plat form, select the option :  [1] Cloud Run (fully managed)
For the Service name (frontend-production), enter: frontend-staging-service
If it is asking for the "you like to enable and retry (this will take a few minutes)?" prompt, press y and hit Enter
For the region, select the option of us-central1
For the "Allow unauthenticated invocations to [frontend-production-service] (y/N)?" prompt, press y and hit Enter.

Task 6 also complete :))


Hope you now able to achieve the Firebase badge 🤩🥳 and for more updates pls subscribe the channel if you like coding, web-dev, app-dev, cloud and lot more..

Channel Name : TECH_ED (CS/IT)
Link of this lab : https://youtu.be/_FA7oOizndQ

Thanks for reading 
Stay Update