From 59e9e21c575b0ffd334a77e1a5cd6d9205750642 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 22 Sep 2016 18:14:22 -0700 Subject: [PATCH] Documenting the Elastic Beanstalk integration --- README.rst | 2 + cookiecutter.json | 2 +- docs/deployment-with-elastic-beanstalk.rst | 54 ++++++++++++++++++++++ docs/index.rst | 1 + {{cookiecutter.project_slug}}/README.rst | 27 +---------- 5 files changed, 60 insertions(+), 26 deletions(-) create mode 100644 docs/deployment-with-elastic-beanstalk.rst diff --git a/README.rst b/README.rst index a0aa50778..78884b6fe 100644 --- a/README.rst +++ b/README.rst @@ -42,6 +42,7 @@ Features * Works with Python 2.7.x or 3.5.x * Run tests with unittest or py.test * Customizable PostgreSQL version +* Experimental support Amazon Elastic Beanstalk Optional Integrations @@ -146,6 +147,7 @@ Answer the prompts with your own desired options_. For example:: 4 - Apache Software License 2.0 5 - Not open source Choose from 1, 2, 3, 4, 5 [1]: 1 + use_elasticbeanstalk_experimental: n Enter the project and take a look around:: diff --git a/cookiecutter.json b/cookiecutter.json index bc741af24..ababd56b7 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -22,5 +22,5 @@ "js_task_runner": ["Gulp", "Grunt", "None"], "use_lets_encrypt": "n", "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"], - "use_elasticbeanstalk_experimental": "y" + "use_elasticbeanstalk_experimental": "n" } diff --git a/docs/deployment-with-elastic-beanstalk.rst b/docs/deployment-with-elastic-beanstalk.rst new file mode 100644 index 000000000..e88decfc0 --- /dev/null +++ b/docs/deployment-with-elastic-beanstalk.rst @@ -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). diff --git a/docs/index.rst b/docs/index.rst index 07cedc4ab..bfa88f18c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -25,6 +25,7 @@ Contents: faq troubleshooting my-favorite-cookie + deployment-with-elastic-beanstalk Indices and tables ================== diff --git a/{{cookiecutter.project_slug}}/README.rst b/{{cookiecutter.project_slug}}/README.rst index 69fe6ff50..b248a2c3d 100644 --- a/{{cookiecutter.project_slug}}/README.rst +++ b/{{cookiecutter.project_slug}}/README.rst @@ -143,31 +143,8 @@ See detailed `cookiecutter-django Docker documentation`_. Elastic Beanstalk ~~~~~~~~~~~~~~~~~~ +See detailed `cookiecutter-django Elastic Beanstalk documentation`_. -``` -# creates the directory of environments (servers) -eb init -p python3.4 {{ cookiecutter.project_slug }} +.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-elastic-beanstalk.html -# 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 %}