Skip to main content

Application: datagovuk_find

Beta version of Find Data

Ownership
#govuk-platform-health owns the app. #govuk-datagovuk is responsible for updating its dependencies.
Hosting
GOV.UK PaaS
Continuously deployed?
No

README

Code Climate Test Coverage

This repository contains the beta-stage frontend component of data.gov.uk

Prerequisites

You will need to install the following for development.

Most of these can be installed with Homebrew on a Mac.

Getting Started

First run bin/setup to bundle, etc. Then run rails s.

Deployment

You can track the deployments on travis - https://travis-ci.org/alphagov/datagovuk_find.

Staging

To deploy to staging merge a PR into master.

Test that your changes are working here - https://find-data-beta-staging.cloudapps.digital before releasing to Production.

(There is also https://staging.data.gov.uk but it currently has an authentication configuration issue).

Production

To deploy to production you need to tag the release, the tag needs to be in this format - v9.9.9 where 9 is a number and the leading v is required. E.g. v0.1.11 is valid, 0.1.11 is not.

Developing against production elasticsearch

Grab the full URL (including HTTP Basic username and password) from the paas. You can do this with cf env find-data-beta.

Open up an SSH tunnel to allow access to the elasticsearch instance:

cf ssh -N -L <es-port>:<es-host>:<es-port> find-data-beta

You can use any port you like for the local connection (i.e., the first <es-port>) but I would recommend using the same port as the remote side to reduce confusion.

Set the following environment variables (via direnv or other method of your choice):

  • ES_HOST="https://<username>:<password>@localhost:<es-port>"
  • ES_INDEX="datasets-production"

If you’re using direnv you’ll need to add export in front of those lines in your .envrc.

After (re)starting your Rails server, any requests to your local instance will behave the same as production.

If you’re having connection issues, try opening new tabs in your terminal to ensure all your environment variables are cleared and refreshed.

Testing on docker ckan

Source the bin/setup-docker-test.sh script in order to set up the environment variables for testing and install chrome on the debian docker container.