Ansible playbooks for setting up dnflow
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.
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.
Clone this repository locally
git clone https://github.com/docnow/dnflow-ansible
cd dnflow-ansible
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.
$ 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.
$ 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.
Go to http://192.168.60.14
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: