Deployments for data.gov.uk
Find and Publish (Rails Apps)
Travis is configured for both Publish (CI) and Find (CI) according to
.travis.yml file in each repo. Each PR request should automatically build a Heroku Review App, which can be accessed from the PR page on GitHub.
Heroku Integration Environment
Heroku has a pipeline for each of Publish and Find, with each app set to run in its ‘integration’ environment. Each pipeline has a permanent instance of the app, providing a common instance of Elasticsearch for us by the Find PR apps.
Each repo has a
Procfile and an
app.json file, which help to specify how the app is deployed. The environment variables ('Config Vars’) are then set via the website, both for the permanent app instance, and the review app template.
PaaS Staging and Production Environments
The deployment for both apps can be triggered automatically via GitHub flow, or manually via command line tools.
The deployment to staging is triggered when a PR gets merged into master. You
can check the Travis logs of the
master build to see progress. The deployment
to production is triggered when a new release with an appropriate version
number is created in GitHub. This behaviour is defined in Publish’s travis.yml
and in Find’s travis.yml.
The process to manually deploy is as follows.
## run once to install the plugin cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org cf install-plugin autopilot -r CF-Community -f ## manually deploy the publish app cf zero-downtime-push publish-data-beta-staging -f staging-app-manifest.yml cf zero-downtime-push publish-data-beta-staging-worker -f staging-worker-manifest.yml
There are some scripts available for datagovuk_publish which can run a deploy for you, for example:
$ cd datagovuk_publish $ git pull $ ./scripts/deploy-staging.sh $ ./scripts/deploy-production.sh
For more advanced uses of the PaaS that are not covered in the PaaS internal documentation (e.g. provisioning an app using a buildpack that is not Ruby or Java), refer to the Cloud Foundry documentation.
Integration, staging and production environments behave like all other GOV.UK applications on AWS.