Καλώς ήλθατε σε έναν ιστότοπο της Υπολογιστικής Μηχανής με θερμή ανακατεύθυνση στο Cloud Storagep>

Οι ομάδες διαχειριζόμενων παρουσιών ανακτούν και μπορούν να εξυπηρετήσουν την επισκεψιμότητα για τον πλήρη ιστότοπο εμπειρία. - Επαληθεύστε τον τομέα που θέλετε να χρησιμοποιήσετε με τον κάδο σας στο 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.