Configure a custom network with VPC Flow Logs Create the custom network In the Console, navigate to Navigation menu > VPC network > VPC networks. Click Create VPC Network. Set the following values, leave all others at their defaults: Name: vpc-net Description: Enter an optional description For Subnet creation mode, click Custom. Set the following values, leave …
VPC Network Peering setup In this lab you have been provisioned 2 projects, the first project as a Project A and second as Project B. Project-A: Go back to first cloud shell and create a custom network: gcloud compute networks create network-a –subnet-mode custom Create a subnet within this VPC …
In Cloud Shell, use the following gcloud command to create a custom mode network called labnet: gcloud compute networks create labnet –subnet-mode=custom With this command you’re doing the following: gcloud invokes the Cloud SDK gcloud command line tool compute is a one of the groups available in gcloud, part of a nested hierarchy of command groups networks is a …
Explore the default network View the subnets The default network has a subnet in each Google Cloud region. In the Console, navigate to Navigation menu () > VPC network > VPC networks. Notice the default network with its subnets. View the routes Routes tell VM instances and the VPC network how to send traffic from an instance to a …
Configure the environment Enable Cloud Run API gcloud services enable run.googleapis.com Set the compute region gcloud config set compute/region us-central1 Create a LOCATION environment variable LOCATION=”us-central1″ Create a Cloud SQL instance Create a PostgreSQL instance with the following values Instance ID: poll-database Password: secretpassword Database version: PostgreSQL 13 Region: us-central1 …
Create a Cloud SQL instance From the Navigation menu () click on SQL. Click Create Instance. Create your instance with the following settings: Click choose MySQL Type “myinstance” for Instance ID In the password field click on the Generate link and the eye icon to see the password. Save the password to use in the next section. Leave all …
Navigate to VM Instances by going to Navigation Menu > Compute Engine > VM Instances and click Create instance. Set up your VM with the following information: Name: nfs-client Region: us-central1(Iowa) Zone: us-central1-c Series: N1 Machine Type: 1 vCPU (n1-standard-1) Boot Disk: Debian GNU/Linux 9 (stretch) Firewall: Allow HTTP traffic …
Define an environment variable named Cloud Storage_BUCKET and use your Project ID as the bucket name. Use the following command which uses the Cloud SDK to get your Project ID. export BUCKET=”$(gcloud config get-value project)” Next, make a new bucket using the following gsutil command: gsutil mb “gs://$BUCKET” You can …
In the Cloud Console, in the top right toolbar, click the Activate Cloud Shell button. Click Continue. (Optional) You can list the active account name with this command: gcloud auth list (Optional) You can list the project ID with this command: gcloud config list project Create a bucket gsutil mb gs://<bucket-name> Upload an …
Create a Bucket Buckets are the basic containers that hold your data in Cloud Storage. To create a bucket: In the Cloud Console, go to Navigation menu > Cloud Storage > Browser. Click Create Bucket: Enter your bucket information and click Continue to complete each step: Name your bucket: Enter a unique name for your bucket. For this lab, …
In Cloud Shell, run the following to create a Cloud Pub/Sub topic named vm-audit-logs: gcloud pubsub topics create vm-audit-logs Set an environment variable for the Compute Engine zone: export ZONE=us-central1-c Now create a virtual machine instance in your selected zone. This machine is created only to generate log messages, you …
In the Cloud Console, select Navigation menu > Cloud Functions, and then CREATE FUNCTION. Set the following: Function Name: helloWorld Trigger type: HTTP Authentication: check the box next to Allow unauthenticated invocations Click SAVE. Expand Runtime, build, connections and security settings. Under Autoscaling, set the Maximum number of instances to 5. …
In the Cloud Console, in the top right toolbar, click the Activate Cloud Shell button. Ensure the Cloud Functions API is enabled gcloud services enable cloudfunctions.googleapis.com Download and setup the code curl -LO https://github.com/GoogleCloudPlatform/golang-samples/archive/main.zip unzip main.zip cd golang-samples-main/functions/codelabs/gopher tree Deploy this function as an HTTP Cloud Function! gcloud functions deploy …
Navigate to cloud logging and go to log viewer Now inside Cloud Logging you have two options you can use the filter option which will generate a query for you or you can use the Logs field explorer and you can select the right field, so for this example let’s …
From the menu go to the Logging on & select Log viewer Now click on Log Router Now click on Create Sink Select the single destination as Cloud Logging Bucket Now enter Sink Name and select the bucket then click on Create Sink
From your Google Cloud to go App Engine dashboard Click on Create Application Select the Region where you wanted deploy App Engine Now open CloudShell Clone the application repository from Github in CloudShell git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git cd python-docs-samples/appengine/standard/hello_world ls -la Now let’s deploy the application by running below command gcloud …
Lets create some application files, assuming we will be working with a Python application Create python app file vim app.py from flask import Flask app = Flask(__name__) @app.route(‘/’) def counter(): return ‘0’ save the file ESC + wq! Create python app dependency definition file vim requirements.txt Flask==0.12 save the file ESC + wq! Now …