“Elasticbeanstalk” supports quickly deploying and managing applications in the AWS Cloud without worrying about the infrastructure that runs those applications.
This article explains “How to deploy Rails App to Elasticbeanstalk”.
🎳 Create IAM
- 1) Go to “IAM Console“
- 2) Goto “Users” > “Create New Users”
- 3) Create user “elasticbean-deploy” and get Access Key ID & Secret Access Key
- 4) Setup attachment policy
🚜 Create SSH Key
- 1) Go to “EC2 Console“
- 2) Goto “Key Pairs” > “Create Key Pair”
- 3) Get SSH Key(“xxx.pem” file)
🍣 Create New Environement
- 1) Go to “Elasticbeanstalk Console“
- 2) Goto “Action” > “Create New Environement” > “Web server environment”
- 3) Set configuration and create RDS instance
🎉 Istallation EB CLI
$ brew install awsebcli |
🐯 Preparation
# Initialize |
🐰 Set Custom Configuration
Setup Tizezone
Add the following .ebextensions/00-set-timezone.config
to your project:
commands: |
Setup Swap Space
Add the following .ebextensions/01-set-swap-space.config
to your project if you want to use crontab:
commands: |
Setup Crontab
Add the following .ebextensions/02-set-crontab.config
to your project if you want to use crontab:
files: |
🏈 Deployment
# Put Souce code to server |
🍄 Special Thanks
- Getting Started Using Elastic Beanstalk - AWS Elastic Beanstalk
- amazon web services - AWS Elastic Beanstalk, running a cronjob - Stack Overflow
- php - creating a swap file/drive on ec2 micro instance on elastic beanstalk deploy - Stack Overflow
- http://qiita.com/yoneapp/items/a1bea9d3a21a5505ef03
- http://qiita.com/jr_qrank/items/aadc076ebf93a2692d14
- http://qiita.com/tak_nishida/items/912fda099e54b0292667
🖥 Recommended VPS Service
VULTR provides high performance cloud compute environment for you.
Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour).
In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!