使用nodsjs代码将AWS EC2迁移到Azure VM [英] AWS EC2 migration to Azure VM using nodsjs code

查看:79
本文介绍了使用nodsjs代码将AWS EC2迁移到Azure VM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用nodejs代码将AWS EC2实例迁移到Azure VM.我检查了Azure网站的说明.

I need to migrate my AWS EC2 instance to Azure VM using nodejs code. I checked instruction from Azure Site .

https://azure.microsoft.com/en-in/blog/seamlessly-migrate-your-application-from-aws-to-azure-in-4-simple-steps/

所以我在这里的简单问题是我可以仅使用nodejs代码将EC2迁移到Azure.或者我可以使用我的nodejs应用程序复制以上链接

So my simple question here can i migrate my EC2 to Azure using nodejs code only. Or Can i replicate above link using my nodejs application

推荐答案

这是一个开放式问题,很大程度上取决于当前如何设置应用程序以及迁移到Azure的目标.话虽如此,以下是一些可能有用的调查途径.

This is quite an open-ended question, and depends a great deal on how your application is currently set up, and what the goals of migrating to Azure are. With that said, here are some avenues for investigation that may help.

您提到"EC2实例",所以我假设它是单个VM,而不是群集.您可以在Azure中设置VM并为VM选择模板,例如这是您可以用作起点的预配置Node.js框:

You mention "EC2 instance", so I'm assuming that it's a single VM, rather than a cluster. You can set up VMs in Azure and choose templates for the VMs e.g. here are preconfigured Node.js boxes that you could use as a starting point: https://azuremarketplace.microsoft.com/en-us/marketplace/apps/category/compute?operatingSystem=acom-linux&search=node.js

设置完成后,像通常部署应用程序一样将其部署到VM.确保安装您的应用程序需要的所有依赖项.理想情况下,您应该对此进行自动化和编写脚本,而不是直接在盒子上进行操作:-)

Once set up, deploy to the VM like you would normally deploy your application; making sure to install any dependencies that your application needs. Ideally you'd be automating and scripting this, rather than working directly on the box :-)

Azure还以Azure App Service的形式提供了有趣的PaaS产品,并且现在可以在App Service上运行Linux. (请参阅 https://docs.microsoft. com/en-us/azure/app-service/app-service-linux-readme )

Azure also has an interesting PaaS offering in the form of Azure App Service, and running Linux on App Service is now in preview. (See https://docs.microsoft.com/en-us/azure/app-service/app-service-linux-readme)

您可以通过两种方式使用它:

There are two ways that you can use this:

  1. 如果您的应用程序在Docker容器中运行,则可以创建一个新应用程序,以从Docker注册表(例如Docker Hub)中拉出您的容器.在此处查找更多信息:您还可以在Node.js堆栈上设置一个新应用,并将代码git push到提供的端点.然后,Azure将生成并运行您的应用程序.在此处查找更多信息: https://docs.microsoft.com/zh-CN/azure/app-service-web/app-service-web-nodejs-get-started

    You can also set up a new app on the Node.js stack, and git push your code to the provided endpoint. Azure will then build and run your application. Find out more here: https://docs.microsoft.com/en-us/azure/app-service-web/app-service-web-nodejs-get-started

    其他注意事项

    如果您的应用程序使用在其他VM上运行的服务(例如独立数据库),请考虑将其部分迁移到Azure以简化工作,并在每个步骤中证明一切仍然可以正常进行.例如:首先移动应用程序服务器.然后是数据库.然后是其他任何服务.在生产数据库上不建议这样做(您可能会遇到许多问题,例如连接用尽或创建意外的锁);并且您要小心两种方式的出口带宽成本.

    Other considerations

    If your application uses services that run on other VMs (e.g. a standalone database), consider moving it over to Azure in parts to simplify the work, and prove at each step that everything still works as expected. For example: move the application servers first. Then the database. Then any other services. This isn't advisable on production databases (you may hit up against any number of issues like running out of connections or creating unexpected locks); and you'll want to be careful of egress bandwidth costs both ways.

    这篇关于使用nodsjs代码将AWS EC2迁移到Azure VM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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