Documenting the Elastic Beanstalk integration

This commit is contained in:
Daniel Roy Greenfeld 2016-09-22 18:14:22 -07:00
parent fb65b03a45
commit 59e9e21c57
5 changed files with 60 additions and 26 deletions

View File

@ -42,6 +42,7 @@ Features
* Works with Python 2.7.x or 3.5.x * Works with Python 2.7.x or 3.5.x
* Run tests with unittest or py.test * Run tests with unittest or py.test
* Customizable PostgreSQL version * Customizable PostgreSQL version
* Experimental support Amazon Elastic Beanstalk
Optional Integrations Optional Integrations
@ -146,6 +147,7 @@ Answer the prompts with your own desired options_. For example::
4 - Apache Software License 2.0 4 - Apache Software License 2.0
5 - Not open source 5 - Not open source
Choose from 1, 2, 3, 4, 5 [1]: 1 Choose from 1, 2, 3, 4, 5 [1]: 1
use_elasticbeanstalk_experimental: n
Enter the project and take a look around:: Enter the project and take a look around::

View File

@ -22,5 +22,5 @@
"js_task_runner": ["Gulp", "Grunt", "None"], "js_task_runner": ["Gulp", "Grunt", "None"],
"use_lets_encrypt": "n", "use_lets_encrypt": "n",
"open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"], "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"],
"use_elasticbeanstalk_experimental": "y" "use_elasticbeanstalk_experimental": "n"
} }

View File

@ -0,0 +1,54 @@
Deployment with Elastic Beanstalk
==========================================
.. index:: Elastic Beanstalk
Warning: Experimental
---------------------
This is experimental. For the time being there will be bugs and issues. If you've never used Elastic Beanstalk before, please hold off before trying this option.
On the other hand, we need help cleaning this up. If you do have knowledge of Elastic Beanstalk, we would appreciate the help. :)
Prerequisites
-------------
* awsebcli
Instructions
-------------
```
# creates the directory of environments (servers)
eb init -p python3.4 {{ cookiecutter.project_slug }}
# Creates the environment (server) where the app will run
eb create {{ cookiecutter.project_slug }}
# Note: This will fail on a postgres error, because postgres doesn't exist yet
# Make sure you are in the right environment
eb list
# If you are not in the right environment
eb use {{ cookiecutter.project_slug }}
# Set the environment variables
python ebsetenv.py
# Go to EB AWS config. Create new RDS database (postgres, 9.4.9, db.t2.micro)
# Get some coffee, this is going to take a while
# Deploy again
eb deploy
# Take a look
eb open
```
FAQ
-----
Why Not Use Docker on Elastic Beanstalk?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Because I didn't want to add an abstraction (Docker) on top of an abstraction (Elastic Beanstalk).

View File

@ -25,6 +25,7 @@ Contents:
faq faq
troubleshooting troubleshooting
my-favorite-cookie my-favorite-cookie
deployment-with-elastic-beanstalk
Indices and tables Indices and tables
================== ==================

View File

@ -143,31 +143,8 @@ See detailed `cookiecutter-django Docker documentation`_.
Elastic Beanstalk Elastic Beanstalk
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
See detailed `cookiecutter-django Elastic Beanstalk documentation`_.
``` .. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html
# creates the directory of environments (servers)
eb init -p python3.4 {{ cookiecutter.project_slug }}
# Creates the environment (server) where the app will run
eb create {{ cookiecutter.project_slug }}
# Note: This will fail on a postgres error, because postgres doesn't exist yet
# Make sure you are in the right environment
eb list
# If you are not in the right environment
eb use {{ cookiecutter.project_slug }}
# Set the environment variables
python ebsetenv.py
# Go to EB AWS config. Create new RDS database (postgres, 9.4.9, db.t2.micro)
# Get some coffee, this is going to take a while
# Deploy again
eb deploy
# Take a look
eb open
```
{% endif %} {% endif %}