![]() Git clone git:///sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-buildĮcho 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' > ~/.bashrc rbenvĮcho 'export PATH="$HOME/.rbenv/bin:$PATH"' > ~/.bashrcĮcho 'eval "$(rbenv init -)"' > ~/.bashrc Install system packages: (you may need to get rid of the line breaks) sudo apt-get install \ If you’re getting “can’t resolve host ip-…” warnings, you canįollowing: sudo echo "127.0.1.1 ip-" > /etc/hosts Install command line tools: sudo apt-get install \ Prepare for provisioning: sudo apt-get update Now you’ll be able to SSH in the server the Ssh -2 -i my_app.pem your public key to the server: vim ~/.ssh/authorized_keys SSH into your server for the first time: mv ~/Downloads/my_app.pem. Once the EC2 instance is launched, download your. On port 22 to allow SSH access – though, 22 should be open by default. Also, make sure that the instance permits traffic There’s no need to open port 80 since this isn’tĪ web server. Thing to do is NOT create a security group for port 80 (for HTTPĬonnections). Launch an EC2 server from Amazon running Ubuntu 14.04.īy Amazon during the launch process are all fine. That they stay up, and restart them if they go down.įinally, I’m going to deploy the whole thing with capistrano. Once the processes have been written as init files on the production server, Procfile in the format expected by Upstart. Upstart is an event-based replacement of init that ships withĭescription of the differences between the two, and the benefits of Upstart.īecause I’ll be using Upstart, I’m going to need to have foreman export my Instead of init, I’ll be using upstart in That this app run with no down-time in production, this will be very useful. Managed and monitored like other system services. ![]() ![]() Processes turn on when your server boots up, and (most importantly) can be What’s more than convenient, however, is foreman’s ability to “export”, or The processes could always be started manually simply by running the commands in Of both processes at once with bundle exec foreman start. Shoryuken: bundle exec shoryuken -C config/shoryuken.ymlĬlockwork: bundle exec clockwork bin/clockwork.rbĪrticle explaining the process model that the Procfile presupposes. The app has a Procfile sitting in its root that declares the twoĬommands that must run for the app to carry out its functions: #. Something I hadn’t read about other people doing, I thought it might be Since this is something I had never done before, and a non-Rails, non-Sinatra app) running only non-web processes. I recently had the need to host something out of the norm: Processes: servers like unicorn, puma, or thin. Or Sinatra, and thus are deployed and hosted to run web Most ruby apps use web frameworks such as Rails ![]()
0 Comments
Leave a Reply. |