简体   繁体   English

为Google Compute Engine VM设置负载平衡器

[英]Setup load balancer for Google Compute Engine VM

I'm new to google compute engine and have installed Wordpress on compute engine using gogole cloud launcher.Now I want to setup load balancer for that, Here's what I have tried: Step by step: 我是Google计算引擎的新手,并且已经使用gogole cloud launcher在计算引擎上安装了Wordpress。现在,我想为此设置负载均衡器,这是我尝试过的步骤:逐步:

  1. Install WP using cloud launcher which create a vm instance. 使用创建虚拟机实例的云启动器安装WP。
  2. I have create a new VM instance 我创建了一个新的VM实例
  3. Create a Instance template 创建实例模板
  4. Create an Instance group 创建一个实例组
  5. Then I setup a health check 然后我进行健康检查
  6. Create a firewall rule with which permits HTTP & HTTPs traffic at 130.211.0.0/22 创建一个防火墙规则,该规则允许HTTP&HTTPs流量为130.211.0.0/22
  7. Then I create a load balancer in which creates Backend service, for host and path rules I leave it blank and setup fronted service. 然后,我创建一个负载平衡器,在其中创建后端服务,对于主机和路径规则,我将其保留为空白并设置前端服务。

But my load balancer is not working, when I try to open my Wordpress site from load balancer IP it says : Server Error , it's temporary not process your request try again later after 30 seconds . 但是我的负载均衡器无法正常工作,当我尝试从负载均衡器IP打开我的Wordpress网站时,它说: 服务器错误,暂时不处理您的请求,请等待30秒后再试一次

Help me please! 请帮帮我! Thanks in Advance! 提前致谢!

You do not need to create firewall rule. 您不需要创建防火墙规则。 These are the steps I followed to create my setup: 这些是我创建设置所遵循的步骤:

  1. Deploy a Google click to deploy Wordpress package using the cloud launcher 部署Google点击以使用云启动器部署Wordpress程序包
  2. Create an image using this deployment 使用此部署创建映像
  3. Create an instance template using the image 使用图像创建实例模板
  4. Create an instance group using the instance template 使用实例模板创建实例组

Make sure you create a health checkup in the instance group, otherwise the autohealing doesn't work. 确保在实例组中创建运行状况检查,否则自动修复将不起作用。 Also make sure the instance group accepts http/https traffic by checking the boxes. 还要选中复选框,以确保实例组接受http / https通信。

Once this is done create an Http load balancer. 完成此操作后,创建一个Http负载平衡器。 Include the instance group in the backend service. 将实例组包括在后端服务中。 Host and path leave it as it. 主机和路径保持不变。 Create a frontend. 创建一个前端。 Create loadbalancer. 创建负载均衡器。

Do not delete/stop the initial Wordpress deployment that you used to create the image, otherwise your site will not work. 不要删除/停止用于创建映像的初始Wordpress部署,否则您的站点将无法工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM