横向扩展!
编辑横向扩展!编辑
您需要先创建之前机器的镜像。断开与机器的连接,并在本地运行以下命令
# Shutdown the instance azure vm shutdown myesnode1 # Create an image from this instance (it could take some minutes) azure vm capture myesnode1 esnode-image --delete # Note that the previous instance has been deleted (mandatory) # So you need to create it again and BTW create other instances. azure vm create azure-elasticsearch-cluster \ esnode-image \ --vm-name myesnode1 \ --location "West Europe" \ --vm-size extrasmall \ --ssh 22 \ --ssh-cert /tmp/azure-certificate.pem \ elasticsearch password1234\!\!
Azure 可能更改端点公共 IP 地址。DNS 传播可能需要几分钟才能再次使用名称连接。如果需要,您可以使用以下方法从 Azure 获取 IP 地址
# Look at Network `Endpoints 0 Vip` azure vm show myesnode1
让我们启动更多实例!
for x in $(seq 2 10) do echo "Launching azure instance #$x..." azure vm create azure-elasticsearch-cluster \ esnode-image \ --vm-name myesnode$x \ --vm-size extrasmall \ --ssh $((21 + $x)) \ --ssh-cert /tmp/azure-certificate.pem \ --connect \ elasticsearch password1234\!\! done
如果您想删除正在运行的实例
azure vm delete myesnode1