Low usage AWS
=============
.. image:: /images/deployment/low_usage_aws.png
This scenario is a little bit more complex than :doc:`/how_to/deployment/low_usage_scenario` but it provides some
advantages:
+-------------------------------------------+-----------------------------------------+
| Advantages | Disadvantages |
+===========================================+=========================================+
| Can be autoscaled. | Requires AWS EC2 instances |
+-------------------------------------------+-----------------------------------------+
| Easier crash recovery | Requires manual configuration |
+-------------------------------------------+-----------------------------------------+
| Very easy monitoring support (CloudWatch) | Requires AWS EBS. |
+-------------------------------------------+-----------------------------------------+
| | Requires some AWS know how. |
+-------------------------------------------+-----------------------------------------+
| | Static files are not served from a cdn. |
+-------------------------------------------+-----------------------------------------+
This scenario is recommended if you want to rollout you application on AWS infrastructure. Usually it is non expensive
to do this as it requires micro instances and low cost storage. For more information about AWS required components
read:
#. `AWS Instance types `_.
#. `AWS EBS `_.
Setup
-----
#. Create an AWS account. (`AWS Getting Started `_).
#. Create an EC2 instance from AWS Management Console (`EC2 setup `_).
#. SSH on EC2 instance.
#. Install Fantastico framework on the production machine (:doc:`/get_started/installation`.).
#. Goto $FANTASTICO_ROOT
#. fantastico_setup_low_usage_
#. Create an AWS account. (`AWS Getting Started `_).
#. Create an EC2 instance from AWS Management Console (`EC2 setup `_).
#. SSH on EC2 instance.
#. Install Fantastico framework on the production machine (:doc:`/get_started/installation`.).
#. Goto $FANTASTICO_ROOT/deployment
#. fantastico_setup_low_usage_s3_ --vhost-name --uwsgi-port --root-folder --modules-folder (e.g fantastico_setup_low_usage_s3_ubuntu.sh --ipaddress 127.0.0.1 --vhost-name fantastico-framework.com --uwsgi-port 12090 --root-folder \`pwd\` --modules-folder /fantastico/samples)
#. Done.
It is usually a good idea to change the number of parallel connections supported by your linux kernel:
1. sudo nano /etc/sysctl.conf
2. Search for **net.core.somaxconn**.
3. If it does not exist you can add net.core.somaxconn = 8192 to the bottom of the file.
4. Restart the os.