Cloud Storage로의 웜 장애 조치가 포함된 Compute Engine 웹사이트에 오신 것을 환영합니다p>

관리형 인스턴스 그룹은 복구되어 전체 웹 사이트에 대한 트래픽을 제공할 수 있습니다. 경험. - 도메인 확인 Cloud Storage 버킷과 함께 사용하려는 소유한 도메인의 이름과 일치하도록 Cloud Storage 버킷을 만듭니다. 다음을 사용하고 싶습니다. gsutil mb gsstatic-web.$DOMAIN 그만큼 이 문서의 시작 부분에 정의된 DOMAIN변수는 다음과 같이 사용됩니다. . 이 예는 다음 위치에 정적 파일을 저장합니다. example.com static-web.example.com. 다음에서 Cloud Storage 버킷에 복사할 로컬 파일을 만듭니다. 다음 단계: cat< index.html HA / DR example

Welcome to a test static web server with warm failover from Cloud Storagep>

HA / DR example

Welcome to a test static web server with warm failover from Cloud Storagep>

curlagain, or open your web browser, to access the IP address of the load balancer: curl $IP_ADDRESS It might take a few minutes for the load balancer to update the configuration and to correctly direct traffic back to your managed instance groups. If needed, wait a few minutes and try to access the website again. The main website from the managed instance groups is returned, as shown in the following example output: HA / DR example p>Welcome to a Compute Engine website with warm failover to Cloud Storagep> ## Clean up To avoid incurring charges to your Google Cloud account for the resources used in this tutorial, either delete the project that contains the resources, or keep the project and delete the individual resources. To delete the individual resources created in this document, complete the following steps: - Delete the Cloud Storage bucket: gsutil rm -r gsstatic-web.$DOMAIN Delete the load balancer configuration: gcloud compute forwarding-rules delete n http-content-rule-$NAME_SUFFIX --global --quiet gcloud compute target-http-proxies delete n http-lb-proxy-$NAME_SUFFIX --quiet gcloud compute url-maps delete web-map-http-$NAME_SUFFIX --quiet gcloud compute url-maps delete web-map-http-bucket-$NAME_SUFFIX --quiet gcloud compute backend-services delete n web-backend-service-$NAME_SUFFIX --global --quiet gcloud compute backend-buckets delete web-bucket-$NAME_SUFFIX --quiet Delete the managed instance groups and health check: gcloud compute instance-groups managed delete n instance-group-$NAME_SUFFIX-$REGION1 n --region=$REGION1 --quiet gcloud compute instance-groups managed delete n instance-group-$NAME_SUFFIX-$REGION2 n --region=$REGION2 --quiet gcloud compute health-checks delete http-basic-check-$NAME_SUFFIX --quiet Delete the instance templates, images, base VM, and persistent disks: gcloud compute instance-templates delete n template-$NAME_SUFFIX-$REGION1 --quiet gcloud compute instance-templates delete n template-$NAME_SUFFIX-$REGION2 --quiet gcloud compute images delete image-$NAME_SUFFIX --quiet gcloud compute images delete image-disk-$NAME_SUFFIX --quiet gcloud compute instances delete vm-base-$NAME_SUFFIX n --zone=$ZONE --quiet Delete the firewall rules. gcloud compute firewall-rules delete n allow-health-check-$NAME_SUFFIX --quiet gcloud compute firewall-rules delete n allow-ssh-$NAME_SUFFIX --quiet gcloud compute firewall-rules delete n allow-http-$NAME_SUFFIX --quiet Delete the subnet and VPC. gcloud compute networks subnets delete n subnet-$NAME_SUFFIX-$REGION1 --region=$REGION1 --quiet gcloud compute networks subnets delete n subnet-$NAME_SUFFIX-$REGION2 --region=$REGION2 --quiet gcloud compute networks delete network-$NAME_SUFFIX --quiet ## What's next - - For an alternative approach that uses Cloud DNS instead of external HTTP(S) Load Balancing to control the failover, see Deploy a warm recoverable web server using Cloud DNS with Compute Engine and Cloud Storage. This pattern is useful if you have, or want to use, Cloud DNS. - To learn how how to determine the best approach for your own applications and which recovery method to use, see the Disaster recovery planning guide. - To see other patterns for applications, such as cold and hot failover, see Disaster recovery scenarios for applications. - For more ways to handle scale and availability, see the Patterns for scalable and resilient apps. - Explore reference architectures, diagrams, tutorials, and best practices about Google Cloud. Take a look at our Cloud Architecture Center.