内容中心

2026年口碑好的储钱铁罐厂家推荐与选型指南-安徽利德印铁制罐有限公司

This Qwiklabs challenge lab tests your ability to create and manage core Google Cloud resources. Below is a concise, step-by-step guide (with both Console and CLI options) to complete all tasks successfully:

Prerequisites

Ensure you’re logged into the Google Cloud Console with your Qwiklabs account and have the gcloud CLI configured (if using CLI).

Task 1: Create a Project

Replace xxxxxxxxx with your unique Qwiklabs ID.

  • Console:
    1. Go to Project Selector → New Project.
    2. Name: qwiklabs-gcp-00-xxxxxxxxx → Click Create.
  • CLI:
    gcloud projects create qwiklabs-gcp-00-xxxxxxxxx --name="My Lab Project"
    gcloud config set project qwiklabs-gcp-00-xxxxxxxxx  # Set as default

Task 2: Set Up VPC Network & Subnet

  • Console:
    1. Go to VPC Networks → Create VPC Network.
    2. Name: my-vpc → Subnet mode: Custom.
    3. Add Subnet: Name my-subnet, Region (e.g., us-central1), IP range 10.0.0.0/24 → Create.
  • CLI:
    gcloud compute networks create my-vpc --subnet-mode=custom
    gcloud compute networks subnets create my-subnet \
    --network=my-vpc \
    --region=us-central1 \
    --range=10.0.0.0/24

Task3: Deploy Compute Engine Instance

  • Console:
    1. Go to Compute Engine → Instances → Create Instance.
    2. Name: my-instance, Region: us-central1, Zone: us-central1-a (same region as subnet).
    3. Machine type: e2-micro, Boot disk: Debian 10.
    4. Networking: Select my-vpc and my-subnet → Create.
  • CLI:
    gcloud compute instances create my-instance \
    --zone=us-central1-a \
    --machine-type=e2-micro \
    --image-family=debian-10 \
    --image-project=debian-cloud \
    --subnet=my-subnet

Task4: Configure Firewall Rule (Allow HTTP)

  • Console:
    1. Go to VPC Networks → Firewall Rules → Create Firewall Rule.
    2. Name: allow-http, Network: my-vpc.
    3. Target: All instances in the network, Source IP: 0.0.0.0/0.
    4. Protocols: Check tcp, Port: 80 → Create.
  • CLI:
    gcloud compute firewall-rules create allow-http \
    --network=my-vpc \
    --allow=tcp:80 \
    --source-ranges=0.0.0.0/0

Task5: Set Up Cloud Storage Bucket

Bucket names are globally unique—add your Qwiklabs ID to avoid conflicts.

  • Console:
    1. Go to Cloud Storage → Buckets → Create Bucket.
    2. Name: my-bucket-xxxxxxxxx, Region: us-central1, Storage class: Standard → Create.
  • CLI:
    gsutil mb -l us-central1 gs://my-bucket-xxxxxxxxx/

Task6: Manage IAM Access

Add a test user (replace test-user@example.com with a valid email) with Storage Object Viewer role.

  • Console:
    1. Go to IAM & Admin → IAM → Add.
    2. Enter email → Select role: Storage → Storage Object Viewer → Save.
  • CLI:
    gcloud projects add-iam-policy-binding qwiklabs-gcp-00-xxxxxxxxx \
    --member=user:test-user@example.com \
    --role=roles/storage.objectViewer

Key Notes

  • Bucket Uniqueness: If your bucket name is taken, append more unique characters (e.g., your full Qwiklabs ID).
  • Firewall Propagation: Wait 1-2 minutes for rules to apply before testing HTTP access.
  • Zone Consistency: Ensure your instance’s zone is in the same region as the subnet (e.g., us-central1-a for us-central1).

By following these steps, you’ll complete the lab and demonstrate core Google Cloud resource management skills!

安徽利德印铁制罐有限公司

安徽利德印铁制罐有限公司



作者声明:本文包含人工智能生成内容。

在线客服

在线留言
您好,很高兴为您服务,可以留下您的电话或微信吗?