Skip to content
This repository has been archived by the owner on Sep 5, 2018. It is now read-only.

Latest commit

 

History

History
111 lines (67 loc) · 4.28 KB

README.md

File metadata and controls

111 lines (67 loc) · 4.28 KB

docnow-ansible

Ansible playbooks for setting up dnflow

LICENSE

Purpose

The goal of this repository is to have a lightweight method of developing and reproducing the docnow/dnflow tool. With the use of freely available tools a user can set up a disposable environment on their personal computer or on the AWS cloud.

Install prerequisite tools

These scripts are intended to be run on a Unix-like system. They are tested to work on Mac OSX and Ubuntu Xenial Xerus.

To use these scripts, Vagrant must already have been installed on the local system with the VirtualBox provider working (do not use a package manager, follow the instructions on the sites directly). For provisioning to AWS, the aws will be installed.

For each of these providers only Ubuntu 14.04 is supported.

Includes

  • Ubuntu 14.04
  • Python3

Setup

Clone this repository locally

git clone https://github.com/docnow/dnflow-ansible
cd dnflow-ansible

Initial Configuration

Before deploying the environment you must make a few changes. Specifically you will need to register an application at apps.twitter.com. Once you've created your application, note down the consumer key, consumer secret. It is also important to remember to fill out the Callback URL otherwise the application will not work. You can use http://example.org. With these two variables in hand you can modify the group_vars/all_template and then copy it into place:

cp group_vars/all_template group_vars/all

For all environments, we have a Vagrantfile which will work. We have provided example provider files for Virtualbox and AWS.

Boxes take approximately 10 mins to come up, and it can take much longer locally depending on your internet connection.

Provider: Virtualbox

$ vagrant up

On the first run it will install the vagrant-triggers plugin. In addition it will make a copy of provider/example.virtualbox.yml Take a look at the contents of that file and if you need to make adjustments do so before running.

$ vagrant up

again.

Provider AWS

$ vagrant up --provider aws

On the first run it will install the vagrant-triggers and vagrant-aws plugins. In addition it will make a copy of provider/example.aws.yml Take a look at the contents of the provider/aws.yml and enter the AWS account information needed. You must enter the following.

  • keypair_name: the name of the AWS keypair that will be used to log in to the instance (these are .pem files).
  • region: For convenience, you may want to set the same region as the one your other machines are using (i.e. us-west-2).
  • private_key_path: the pathname of the private key on the local system corresponding to the aforementioned keypair.
  • access_key_id: the AWS IAM access key to the account under which the EC2 instance will be created.
  • secret_access_key: the AWS IAM secret key to the account under which the EC2 instance will be created.

If the install hangs on Waiting for SSH to become available.., you may need to edit the securiy group on your EC2 instance. You can do so by right-clicking on the instance, selecting "Networking," and "Change Security Groups." For your new security group, make sure you allow Inbound HTTP (port 80) and SSH (port 22) traffic.

After installation

Provider: Virtualbox

Go to http://192.168.60.14

Provider: AWS

Go to your AWS Console

  • Select your running instance
  • Click on the connect information to log into it.

You will need the AWS provided IP address (make a note of this). It will be listed in the EC2 table under "Public IP". This information will be needed to be replaced in the following files. Note that you will have to use sudo to make edits to these read-only files.

/home/docnow/dnflow/dnflow.cfg HOSTNAME

/etc/nginx/sites-enabled/docnow server_name

The run the following command

sudo stop docnow
sudo start docnow

Then point your URL to the IP address provided above.

Current maintainers:

License

MIT