DocNow / dnflow-ansible

Ansible playbooks for setting up dnflow
MIT License
1 stars 0 forks source link

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

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.

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

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