Elastic Beanstalk¶
Setup¶
This section pertains to the setup of the Django web application using Elastic Beanstalk and a Linux operating system. A more general guide (including setup using Windows) can be found in AWS documentation. This guide was made using Python version 2.7.10.
First download the DustyDjango code from here. Navigate to terminal, and install the virtualenv
package using:
pip install virtualenv
virtualenv
is a tool to create isolated Python environments. More information about the package can be found here.
Next we create a new virtualenv
called atamo
via:
source virtualenv ~/atamo
To activate the virtualenv
, run:
source atamo/bin/activate
You will see (atamo
) prepended to your command prompt, indicating that you’re in a virtual environment. Next use the previously downloaded requirement.txt file to install the the required dependencies:
(atamo)~$ python -m pip install -r requirements.txt
Verify installation of packages at any time using pip freeze
, which now should display:
(atamo)~$ pip freeze
boto3==1.4.7
botocore==1.7.33
certifi==2017.7.27.1
chardet==3.0.4
decorator==4.1.2
Django==1.10.8
django-allauth==0.33.0
docutils==0.14
enum34==1.1.6
functools32==3.2.3.post2
futures==3.1.1
idna==2.6
ipython-genutils==0.2.0
jmespath==0.9.3
jsonschema==2.6.0
jupyter-core==4.3.0
nbformat==4.4.0
oauthlib==2.0.4
plotly==2.1.0
python-dateutil==2.6.1
python-openid==2.2.5
pytz==2017.2
requests==2.18.4
requests-oauthlib==0.8.0
s3transfer==0.1.11
six==1.11.0
traitlets==4.3.2
urllib3==1.22
Change directories into the project application (downloaded previously - DustyDjango). In this example the directory where the project is currently stored is called atamoapp_demo
. To change directory, use:
(atamo)~$ cd atamoapp_demo
Your directory (here called atamoapp_demo
) should have now have a layout similar to:
atamoapp_demo/
├ manage.py
├ .db.sqlite3
├ [DIR] mysite
├ [DIR] blog
The following dependencies are needed for the proper functioning of the application. Verify the following packages are installed using pip freeze. If the following packages are not installed, install them using `pip install ` followed by the desired package and version number download.