diff --git a/README.md b/README.md index b3298ef..7952192 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ The goal of this repository is to have a lightweight method of developing and re ### 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 Trusty Tahr +These scripts are intended to be run on a Unix-like system. They are tested to work on Mac OSX and Ubuntu Trusty Tahr. -To use these scripts, [Vagrant](https://vagrantup.com) must already have been installed on the local system with the [VirtualBox](https://virtualbox.org) provider working. For provisioning to AWS, the `aws` will be installed. +To use these scripts, [Vagrant](https://vagrantup.com) must already have been installed on the local system with the [VirtualBox](https://virtualbox.org) 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. +For each of these providers only Ubuntu 14.04 is supported. ## Includes @@ -29,17 +29,15 @@ 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](https://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: +Before deploying the environment you must make a few changes. Specifically you will need to register an application at [apps.twitter.com](https://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: ```bash -cp group_vars/all.template group_vars/all +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 - +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. @@ -49,7 +47,7 @@ Boxes take approximately _10 mins_ to come up, and it can take much longer local $ 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 +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. ```bash @@ -60,17 +58,19 @@ again. ### Provider AWS - ```bash $ 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. This keypair should already exist within your AWS account and its private key file should reside on the local system. -* `KEYPAIR_FILE`: the pathname of the private key on the local system corresponding to the aforementioned keypair. -* `AWS_ACCESS_KEY`: the AWS IAM access key to the account under which the EC2 instance will be created. -* `AWS_SECRET_KEY`: the AWS IAM secret key to the account under which the EC2 instance will be created. +* `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 @@ -85,11 +85,11 @@ Go to your AWS Console * Select your running instance * Click on the **connect** information to log into it. -You will need the AWS provided public dns name (make a note of this) This information will be needed to be replaced in the following files +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` servername +`/etc/nginx/sites-enabled/docnow` server_name The run the following command @@ -98,7 +98,7 @@ sudo stop docnow sudo start docnow ``` -Then point your URL to the AWS location above +Then point your URL to the IP address provided above. Current maintainers: diff --git a/group_vars/all_template b/group_vars/all_template index 26bbb7b..484f797 100644 --- a/group_vars/all_template +++ b/group_vars/all_template @@ -1,7 +1,7 @@ --- -hostname: "{{ ansible_eth0.ipv4.address }}" +hostname: "{{ ansible_default_ipv4.address }}" twitter_consumer_key: your_key twitter_consumer_secret: your_secret -#http_basicauth_user: username -#http_basicauth_pass: password -#google_analytics: blah +http_basicauth_user: +http_basicauth_pass: +google_analytics: