Skip to content

Commit

Permalink
Enforce version constraint and clarify ubuntu install (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinbyers committed Mar 22, 2018
1 parent 775092d commit ecf91bc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 29 deletions.
66 changes: 37 additions & 29 deletions docs/source/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@ Install Dependencies
--------------------
BinaryAlert can be deployed from any MacOS/Linux environment (and likely Windows as well, though we haven't tried).

1. Install `Python 3.6 <https://www.python.org/downloads/release/python-362>`_:
1. Install `Python 3.6 <https://www.python.org/downloads/release/python-364/>`_:

.. code-block:: bash
$ brew install python3 # MacOS Homebrew
$ sudo apt-get install python3.6 # Ubuntu 16+
$ python3 --version # Should show 3.6.x
# MacOS Homebrew
brew install python3
python3 --version
# Ubuntu16 - Python 3.6 is only available in third-party repositories
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6 python3.6-dev python3-pip
sudo -H pip3 install --upgrade pip
python3.6 --version
.. warning:: Python 3.5 is installed by default on some systems, but BinaryAlert requires Python 3.6.

2. Install `Terraform <https://www.terraform.io/downloads.html>`_ v0.11.X:

Expand All @@ -28,7 +37,7 @@ BinaryAlert can be deployed from any MacOS/Linux environment (and likely Windows

.. code-block:: bash
$ pip3 install virtualenv
$ sudo -H pip3 install virtualenv
$ virtualenv --version
4. Install the OpenSSL development library if it isn't already (OS X should have it).
Expand All @@ -40,29 +49,6 @@ and must be installed *before* installing the BinaryAlert requirements.
$ sudo apt-get install libssl-dev # Ubuntu
$ sudo yum install openssl-devel # Amazon Linux
Set AWS Credentials
-------------------
1. Create an AWS account and an IAM user with permissions for at least the following services:

* CloudWatch
* DynamoDB
* IAM
* KMS
* Lambda
* S3
* SNS
* SQS

.. note:: See `Creating an IAM group <iam-group.html>`_ for a least-privilege policy that allows users to deploy BinaryAlert.

2. Set your AWS credentials using `any method supported by Terraform <https://www.terraform.io/docs/providers/aws/#authentication>`_.
For example, using the AWS CLI:

.. code-block:: bash
$ pip3 install awscli
$ aws configure
Download BinaryAlert
--------------------
Expand All @@ -77,7 +63,7 @@ Download BinaryAlert
.. code-block:: bash
$ cd binaryalert
$ virtualenv -p python3 venv
$ virtualenv -p python3.6 venv
$ source venv/bin/activate
3. Install the BinaryAlert requirements:
Expand All @@ -94,6 +80,28 @@ Download BinaryAlert
$ ./manage.py unit_test
Set AWS Credentials
-------------------
1. Create an AWS account and an IAM user with permissions for at least the following services:

* CloudWatch
* DynamoDB
* IAM
* KMS
* Lambda
* S3
* SNS
* SQS

.. note:: See `Creating an IAM group <iam-group.html>`_ for a least-privilege policy that allows users to deploy BinaryAlert.

2. Set your AWS credentials using `any method supported by Terraform <https://www.terraform.io/docs/providers/aws/#authentication>`_.
For example, using the AWS CLI:

.. code-block:: bash
$ pip3 install awscli
$ aws configure
Deploy!
-------
Expand Down
5 changes: 5 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@ def unit_test() -> None:

def main() -> None:
"""Main command dispatcher."""
if sys.version_info < (3, 6):
print('ERROR: Python 3.6+ is required, found Python {}.{}.{}'.format(
sys.version_info.major, sys.version_info.minor, sys.version_info.micro))
exit(1)

manager = Manager()

parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter)
Expand Down

0 comments on commit ecf91bc

Please sign in to comment.