I am trying to deploy a node.js application on AWS on an existing EC2 instance. Steps http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs.sdlc.html describes to deploy on newly created elastic beanstalk instance. How can I reconfigure to add my existing EC2 instance to deploy code on? Or the entire purpose of elastic beanstalk, it to deploy on newly created EB environment?
Asked
Active
Viewed 1,469 times
0
-
You can configure your own environment with an AMI. Not sure if you can make EB deploy to a running E2 instance though. Mainly because EB adds in autoscaling and such, for which it needs to be configured prior with an AMI or default env – user602525 Mar 05 '14 at 21:08
1 Answers
1
Elastic Beanstalk deployment is very specific to the service.
You can conceivable hack the eb
scripts to make it work for your EC2 instance. You can look at the AWSDevTools/aws.elasticbeanstalk.push
file that the eb
command creates under the .git
directory. It's essentially a Ruby script that does the git push
.
You can could also look at the eb
script and libraries themselves which are essentially written in Python.
Nevertheless, I recommend to stick to just a plain node.js deployment model that has been answered here on SO on some other posts and Internet blogs. For example: How do I run a Node.js application as its own process?
You can also take a look at this blog too (which is referred from the previous SO post)