如何安全地从t1升级Amazon EC2实例。微大吗?

时间:2023-01-26 12:37:22

I have an Amazon EC2 micro instance (t1.micro). I want to upgrade this instance to large. This is our production environment, so what is the best and risk-free way to do this?

我有一个Amazon EC2微实例(t1.micro)。我想将这个实例升级为large。这是我们的生产环境,那么最好和无风险的方式是什么呢?

Is there any step by step guide to do this?

这有什么步骤吗?

5 个解决方案

#1


282  

From my experience, the way I do it is create a snapshot of your current image, then once its done you'll see it as an option when launching new instances. Simply launch it as a large instance at that point.

根据我的经验,我的方法是创建当前映像的快照,一旦完成,您将在启动新实例时将它视为一个选项。只需在此时将其作为一个大型实例启动。

This is my approach if I do not want any downtime(i.e. production server) because this solution only takes a server offline only after the new one is up and running(I also use it to add new machines to my clusters by using this approach to only add new machines). If Downtime is acceptable then see Marcel Castilho's answer.

这是我的方法,如果我不希望任何停机时间(例如。因为这个解决方案只在新服务器启动并运行后才使服务器脱机(我还使用它将新机器添加到集群中,使用这种方法只添加新机器)。如果停机时间是可以接受的,那么请参阅Marcel Castilho的答案。

#2


476  

Using AWS Management Console:

使用AWS管理控制台:

  • Right-Click on the instance
    • Instance Lifecycle > Stop
    • 实例的生命周期>停止
    • Wait...
    • 等待……
    • Instance Management > Change Instance Type
    • 实例管理>更改实例类型
  • 右键单击实例生命周期>停止等待…实例管理>更改实例类型

#3


44  

Using the AWS Management Console

使用AWS管理控制台

  • Go to "Volumes" and create a Snapshot of your instance's volume.
  • 转到“卷”并创建实例的卷的快照。
  • Go to "Snapshots" and select "Create Image from Snapshot".
  • 转到“快照”并选择“从快照创建图像”。
  • Go to "AMIs" and select "Launch Instance" and choose your "Instance Type" etc.
  • 转到“AMIs”并选择“Launch Instance”并选择“Instance”等。

#4


17  

Use the AWS EC2 console, not ElasticFox.

使用AWS EC2控制台,而不是弹塑性福克斯。

First Way:

第一个方法:

  • Create a new AMI of the instance
  • 创建实例的新AMI。
  • Launch it
  • 启动它

Alternative Way:

替代方法:

  • Make a snapshot of the disk
  • 创建磁盘的快照
  • Launch a large EBS instance with the same AMI type (please note that at this point the disk will contain the data that was present when this AMI was created, not your latest changes)
  • 启动一个具有相同AMI类型的大型EBS实例(请注意,此时磁盘将包含创建此AMI时出现的数据,而不是您的最新更改)
  • Once is fully booted, stop the new instance
  • 一旦完全启动,停止新实例。
  • Detach the root volume from the stopped instance
  • 从已停止的实例中分离根卷
  • Create a virtual disk from the snapshot created before in the same availability zone of the new instance
  • 从以前在新实例的相同可用性区域中创建的快照创建一个虚拟磁盘
  • Attach the root volume to /dev/sda1
  • 将根卷附加到/dev/sda1
  • Start the new instance again
  • 重新启动新实例

#5


8  

Create AMI -> Boot AMI on large instance.

在大实例上创建AMI ->启动AMI。

More info http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/creating-an-image.html

更多信息:http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/creating-an-image.html

You can do this all from the admin console too at aws.amazon.com

你也可以通过aws.amazon.com的管理控制台来完成

#1


282  

From my experience, the way I do it is create a snapshot of your current image, then once its done you'll see it as an option when launching new instances. Simply launch it as a large instance at that point.

根据我的经验,我的方法是创建当前映像的快照,一旦完成,您将在启动新实例时将它视为一个选项。只需在此时将其作为一个大型实例启动。

This is my approach if I do not want any downtime(i.e. production server) because this solution only takes a server offline only after the new one is up and running(I also use it to add new machines to my clusters by using this approach to only add new machines). If Downtime is acceptable then see Marcel Castilho's answer.

这是我的方法,如果我不希望任何停机时间(例如。因为这个解决方案只在新服务器启动并运行后才使服务器脱机(我还使用它将新机器添加到集群中,使用这种方法只添加新机器)。如果停机时间是可以接受的,那么请参阅Marcel Castilho的答案。

#2


476  

Using AWS Management Console:

使用AWS管理控制台:

  • Right-Click on the instance
    • Instance Lifecycle > Stop
    • 实例的生命周期>停止
    • Wait...
    • 等待……
    • Instance Management > Change Instance Type
    • 实例管理>更改实例类型
  • 右键单击实例生命周期>停止等待…实例管理>更改实例类型

#3


44  

Using the AWS Management Console

使用AWS管理控制台

  • Go to "Volumes" and create a Snapshot of your instance's volume.
  • 转到“卷”并创建实例的卷的快照。
  • Go to "Snapshots" and select "Create Image from Snapshot".
  • 转到“快照”并选择“从快照创建图像”。
  • Go to "AMIs" and select "Launch Instance" and choose your "Instance Type" etc.
  • 转到“AMIs”并选择“Launch Instance”并选择“Instance”等。

#4


17  

Use the AWS EC2 console, not ElasticFox.

使用AWS EC2控制台,而不是弹塑性福克斯。

First Way:

第一个方法:

  • Create a new AMI of the instance
  • 创建实例的新AMI。
  • Launch it
  • 启动它

Alternative Way:

替代方法:

  • Make a snapshot of the disk
  • 创建磁盘的快照
  • Launch a large EBS instance with the same AMI type (please note that at this point the disk will contain the data that was present when this AMI was created, not your latest changes)
  • 启动一个具有相同AMI类型的大型EBS实例(请注意,此时磁盘将包含创建此AMI时出现的数据,而不是您的最新更改)
  • Once is fully booted, stop the new instance
  • 一旦完全启动,停止新实例。
  • Detach the root volume from the stopped instance
  • 从已停止的实例中分离根卷
  • Create a virtual disk from the snapshot created before in the same availability zone of the new instance
  • 从以前在新实例的相同可用性区域中创建的快照创建一个虚拟磁盘
  • Attach the root volume to /dev/sda1
  • 将根卷附加到/dev/sda1
  • Start the new instance again
  • 重新启动新实例

#5


8  

Create AMI -> Boot AMI on large instance.

在大实例上创建AMI ->启动AMI。

More info http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/creating-an-image.html

更多信息:http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/creating-an-image.html

You can do this all from the admin console too at aws.amazon.com

你也可以通过aws.amazon.com的管理控制台来完成