将现有的 VM Instace (bitnami) 用于 Autoscale Group of Instances [英] Use existent VM Instace (bitnami) for Autoscale Group of Instances

查看:12
本文介绍了将现有的 VM Instace (bitnami) 用于 Autoscale Group of Instances的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Google Cloud 使用 Bitnami Wordpress.现在,我需要设置一个实例模板 -> 实例组 -> 负载均衡器,这样,我的系统将自动缩放:)

I am using a Bitnami Wordpress for Google Cloud. Now, I need to setup a Instance Template -> Group of instances -> Load balancer and with this, my system will be autoscaling :)

但是,我使用 Bitnami 的启动映像创建了 VM 实例,我需要放入一组实例.

But, I have the VM instance created using an boot image by Bitnami, and I need to put in a group of instance.

你能帮我解决这个问题吗?

Can you help me with this, please?

推荐答案

在 GCP 上创建高度可扩展的 Web 应用程序的答案很长,可以写成一篇博文.由于在这里写下整个答案会很长且难以阅读,因此我将答案分为 3 个部分.

The answer for creating a Highly scalable web application on GCP is very long and could be made as a blog post. Since writing the whole answer here will be very long and difficult to read, I have split the answer into 3 parts.

正如您所提到的,在 GCP 上创建高度可扩展的 Web 应用程序的步骤可以分为:

As you have mentioned, the steps for creating a Highly scalable web application on GCP can be divided as:

  1. 实例模板
  2. 托管实例组和自动缩放
  3. 网络/HTTP(s) 负载平衡器

1.实例模板:这是创建这个大规模网络应用程序的第一步.我在此处列出了创建实例模板的步骤.您必须在模板中进行的一项更改是从 CentOS 6 映像更改为 bitnami 映像.

1. Instance Template: This is first step in creating this high scale web app. I have listed out the steps for creating an Instance Template here. One change, that you have to make in the template, is to change from CentOS 6 image to bitnami image.

最佳做法:在我看来,安装所有软件后创建自定义映像比使用启动脚本要好.因为在组中启动新实例所需的时间应尽可能短.这将提高您扩展网络应用的速度.

Best practices: From my perspective, it is better to create a custom image with all your software installed than to use a startup script. As the time taken to launch new instances in the group should be as minimum as possible. This will increase the speed at which you scale your web app.

2.托管实例组和自动缩放:我已经写了创建托管实例组和自动缩放的步骤这里.由于自动缩放和负载平衡是独立的,它们中的任何一个可以先设置.

2. Managed Instance group and Autoscaling: I have written about the steps for creating Managed Instance group and Autoscaling here. As autoscaling and load balancing are independent, either of them can be set up first.

最佳做法:自动缩放和负载平衡器都为实例提供运行状况检查.从我的角度来看,为这两个服务设置健康检查是多余的,我认为单独对负载均衡器进行健康检查会很好.

Best practices: Both autoscaling and load balancers offer health check to the instances. From my perspective, setting up the health check for both the services are redundant and I think health check for load balancer alone would do good.

3.负载平衡器: GCP 提供两种类型的负载平衡器,即网络和 HTTP(s) 负载平衡器.我已经在网络与 HTTP(s) 此处写了有关差异的文章.由于我假设您将使用 bitnami 图像构建网络堆栈,因此我写了设置 HTTP 负载均衡器的步骤 此处.

3. Load balancer: GCP offers two types of load balancers namely, Network and HTTP(s) load balancer. I have written about the differences Network Vs HTTP(s) here. Since I assumed that you will be building a web stack out of bitnami image, I have written about the steps for setting up the HTTP load balancer here.

按照这三个步骤,我希望您能够构建一个高度可扩展的网络应用.这个答案是基于我的观点.如果有任何不正确或我遗漏了什么,请随时发表评论,我会将其添加到表格中.

By following these three steps, I hope you would be able to build an highly scalable web app. This answer is based on my perspective. If anything is incorrect or If I had missed something, please feel free to comment and I will add it to the table.

这篇关于将现有的 VM Instace (bitnami) 用于 Autoscale Group of Instances的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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