NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

labs:


App Engine: Qwik Start - Java
with app engine developers can build and deploy their application without worrying about the infrastructure and it also supports various programming languages.in this lab we have created one small application with some message.for that first we need to
task1:enable app engine admin api
we should navigate to api&services>library in navigation menu and search for app engine admin api and there we need to enable that.
task2:download the application which we created
we need to clone the respository from git hub by running the git clone cmd in cloud shell
task3:Test the application using the development server
we need to download maven to manage compilation of the app and to start the development server.for that we need to run mvn appengine:run cmd in cloud shell.then the maven will be installed and the app will be running.we can see the application in web preview.
task4:deploy our app
we need to create an application on app engine by running gcloud app create cmd in cloud shell.we need to pom xml file by running nano pom.xml cmd and after giving the project id we need to exit nano and save the file by doing CTRL + X > Y > Enter. and to deploy our application we need to run mvn package appengine:deploy
task5:view the application in browser
we need to run gcloud app browse in cloud shell where we can get the link which redirects to the browser.



Set Up Network and HTTP Load Balancers
in this lab we will set some default zones and regions where we can create few compute engine vm instances and we will configure the load balancing service and send traffic to those vms and create a http load balancer to distribute the traffic across the regions and test the traffic which we sent to our instances whether they are healthy.
task1:set the default zone and region
we need to run gcloud config set compute region and gcloud config set compute zone which will set the default zone and region for all resources.
task2:Create multiple web server instances
for this we need to create 3 compute engine vm instances and install apache and run the firewall rule for all the 3 instances which allows HTTP traffic to reach the instances.
task3:Configure the load balancing service
task4:sending traffic to the instances
task5:creating a http load balancer
task6:testing the traffic we sent to our instances.


Google Kubernetes Engine: Qwik Start
GKE is used to deploy and manage containerized applications using google infrastructure.in this lab we will create a gke cluster and deploy the application to the cluster and delete the cluster.
task1:set a default compute zone and region
task2:create a GKE cluster
A cluster consists of at least one cluster master machine and multiple worker machines called nodes. Nodes are Compute Engine virtual machine (VM) instances that run the Kubernetes processes necessary to make them part of the cluster.
to create a cluster we need to run gcloud container clusters create --machine-type=e2-medium --zone=ZONE lab-cluster
task3:Get authentication credentials for the cluster
After creating the cluster, we need authentication credentials to interact with it.for that we need to run gcloud container clusters get-credentials lab-cluster cmd in cloud shell
task4:deploy the application to the cluster
we need to deploy the application in the cluster by creating a deployment server from the cluster and to expose the application to traffic we need to create a load balancer.
task5:deleting the cluster
to delete the cluster we need to run gcloud container clusters delete lab-cluster cmd in cloud shell


Google Cloud Pub/Sub: Qwik Start - Console
pub/sub is a messaging service which exchanges event data among applications and services.producer of the data publishes a message to the pub/sub topic and the subscriber will subscribe to that topic and either pull messages or push subscriptions to that topic.and the subscriber must acknowledge after receiving the message.
task1:setup pub/sub
to setup pub/sub we need to create a topic that holds the data.for that we need to navigate to pub/sub service then topics and there we can find create topic.
task2:add a subscription
after creating a topic we need to subscribe to access the data.for that we can find create subscription beside the list of topics.there we can set either pull/push based on our requirement.
task3:publish a message to that topic
to publish a message to the topic we need to navigate to pub/sub>topics>my topics there we can find messages where we can create a message and publish.
task4:view the message
to view the message we need to pull that by using gcloud pubsub subscriptions pull --auto-ack mySub.


Deploy Your Website on Cloud Run
as cloud run is serverless the developers can run their containers and deploy their code without worrying about the infrastructure and the steps to deploy our website to cloud run is:
first we need to create a docker container through cloud build and deploy the application to that container
task1:clone the respository
we need to clone the repository which has application through cloud shell and run that application by starting the server to test
task2:Create a Docker container with Cloud Build
we need to containerize the application to deploy that in cloud run.so for that we need to create a repository to push the images so we need to navigate to ci/cd>artifact registry>repositories there we will create a repository in docker format and configure the docker then we need to push image to the docker by enabling the artifact registry,cloud build and cloud run.
Task 3. Deploy the container to Cloud Run
so now we have containerized the application and we need to deploy that to cloud run by running the gcloud run deploy monolith --image Region-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/monolith-demo/monolith:1.0.0 --region Region cmd
task4:create a new revision with lower concurrency level
task5:make changes and redeploy
task6:update the website with zero downtime


APIs Explorer: Cloud SQL
api explorer is a tool with which we can explore google apis interactively.we can browse quickly and we can make requests and get the response.cloud sql is database service which deals with the relational databes and offers high performance,scalability and convinience.
Task 1. Build a Cloud SQL instance with instances.insert
first we need to create an instance to store the data.for that we need to enable cloud sql admin api by navigating to api&services>library>cloud sql admin api.to create an instance navigate to all api and reference>rest reference>v1beta4>instance>insert and fill a form which has details of projectid,instance name and all.
task2:Create a database with databases.insert
Now that we have a Cloud SQL instance created, now add a database to it with the databases.insert method and navigate to All APIs and reference > REST Reference > v1beta4 > databases > insert to select sql.databases.insert method and fill the form which has details of projectid,instance name,database name and all.
Task 3. Create a table in your MySQL database and upload a CSV file to a Cloud Storage bucket
now we have instance and database and now we need data so we need to enter into our database through cloudshell and create a table in that.and we need to create a csv file and upload that in cloud storage bucket.for that first we need to navigate to sql and on my instance we need to copy the service account name and paste that in add principal by navigating to Storage > Cloud Storage > Buckets.
Task 4. Add a CSV file to your database using instances.import
navigate to All APIs and reference > REST Reference > v1beta4 > instances > import to select sql.instances.import method and fill the form with the details of projectid,instance name,databaes name,path of csv file and add the file .now we can view and manage the database.


Cloud IAM: Qwik Start
with IAM we can create and manage the permissions for the google cloud services and we can control the access to the users for google cloud services.
in this lab we have given 2different roles to 2 different users and tried to access the application.so for one user we have given admin role and for another user we have given viewer role.the admin role user can able to do any type of actions to the application but the viewer role user can only able to read but couldn't make any changes.and again we have removed the viewer role for user2 and given cloud storage access and checked whether we can access the application through cloud storage in cloud shell




     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.