Mac to EC2 - the source control Triangle Problem - git? rsync? WTH?

久未见 提交于 2019-12-06 10:57:04
cfiske

I can think of two ways to solve this:

  1. Create an Elastic IP and associate it with your instance. Then your IP doesn't change. (Personally I would create a DNS name for it anyway. It's easier to remember it when you need to, and it can be descriptive of what the host is.)

Couldn't be easier, but hard to find

  • go to your EC2 instance
  • left column click "Elastic IPs" under "Network & Security". (Not "Elastic Block Store")
  • simply click "Allocate" - done

  1. Use a dynamic DNS solution such as the one outlined here. Then your git URL can be a fixed name instead of a changing IP. Once you configure it your instance can update the DNS record whenever its IP changes.

I see the elastic IP allowing you to push directly. A couple of additional options

Check out the aws-cli integration options which both deploy code (usually to s3) and then start ec2 instances that are attached to the code to run websites.

Or you could publish your work to github (public or private repo) and have a mechanism to have the EC2 instance connect & pull to its local storage (I'm assuming it has some persistent-ish).

Choices for notification include periodic fetch of a version file, method in your webapp to kick off etc.

Maybe just do it when the instance restarts & just restart it each time (rather brutish)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!