Closed hectcastro closed 8 years ago
Rebased to resolve merge conflicts and updated absolute file system paths to relative so that the build works within Travis CI.
I tried to test this, but got:
> vkj infra plan
/vagrant/deployment/terraform /vagrant
Remote configuration updated
Remote state configured and pulled.
Terraform doesn't allow running any operations against a state
that was written by a future Terraform version. The state is
reporting it is written by Terraform '0.7.5'.
Please run at least that version of Terraform to continue.
Connection to 127.0.0.1 closed.
I noticed the version of Terraform had been bumped, so I provisioned my VM again, and ran the command again to get the same output. During provisioning, I noticed:
TASK [azavea.terraform : Download Terraform] ***********************************
changed: [default]
TASK [azavea.terraform : Extract and install Terraform] ************************
skipping: [default]
So apparently it knew enough to download a new Terraform version, but not install it. I couldn't find where this was described in Ansible though, short of https://github.com/azavea/ansible-terraform/blob/develop/tasks/main.yml#L20?
I can probably get this to work by destroying and recreating my VM, which on such a small project is not a big deal at all.
So apparently it knew enough to download a new Terraform version, but not install it. I couldn't find where this was described in Ansible though, short of https://github.com/azavea/ansible-terraform/blob/develop/tasks/main.yml#L20?
This is a bug in the Terraform role. Should be resolved in https://github.com/azavea/ansible-terraform/pull/6.
Tested by recreating the VM. Works well. Saw the expected messages in the console for deployment. Travis deploy was logged correctly too. But I guess the site is not currently up at staging.micro.app.wikiwatershed.org?
This may be just me, but I always find it easier if the environment variable is always a prefix, rather than somewhere inside the URL. So, staging.url.com
rather than url.staging.com
. I also find it helpful to think of it as the Staging version of the Micro site, rather than the Micro version of the Staging site.
Use Travis CI to deploy bundled versions of the micro site to both staging and production with the AWS CLI (encapsulated in
cipublish
). This uses a single set of credentials that are whitelisted to write to both the staging and production buckets.Also, adjust the interaction between CloudFront and S3 so that only S3 is able to read objects in the origin via an origin access policy.
Testing