使用Google Cloud Schedulers自动关闭和启动GCP [英] GCP auto shutdown and startup using Google Cloud Schedulers

查看:179
本文介绍了使用Google Cloud Schedulers自动关闭和启动GCP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Google Cloud Scheduler在Google Cloud Platform中启动/停止一组Compute引擎实例.我该怎么办?

I want to start/stop a set of Compute engine instances in Google Cloud Platform using Google Cloud Scheduler. How can I do it?

推荐答案

为了使用Cloud Scheduler启动和停止Compute Engine,您可以按照

In order to start and stop a Compute Engine using the Cloud Scheduler you can follow Google this tutorial, or this other

我不会在此处复制粘贴所需的代码,因为该教程非常完整,但是我将在此处继续执行以下步骤.

I won’t be copy-pasting the required code here because the tutorial it's very complete but I will resume here the steps to follow.

  1. 设置您的Compute Engine实例
  2. 部署入门级Cloud Function.您可以在此处看到一个示例>
  3. 部署停止云功能.您可以在此处看到一个示例>
  4. 设置Cloud Scheduler作业
  1. Set up your Compute Engine instances
  2. Deploy the starter Cloud Function. You can see an example in here
  3. Deploy the stop Cloud Function. You can see an example in here
  4. Set up the Cloud Scheduler jobs

如果您需要本教程的任何帮助,请告诉我!

If you need any help with the tutorial please just let me know!

这篇关于使用Google Cloud Schedulers自动关闭和启动GCP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆