Skip to content
pshields edited this page Jun 7, 2016 · 8 revisions

Image Service

Running Locally

With any application that is designed to deal with large amounts of data, one of the main issues with running the application locally for development purposes is that you need a source of data.

One possible way of addressing this and getting a working image-service running locally is to follow the following process:

  1. Check out the code from source control and import and setup in your IDE

  2. Find an existing dev environment instance of ImageService that is already running and contains the Image data, at the time of writing images2-dev.ala.org.au was suitable.

  3. If the dev environment does not accept connections from local host, either have the firewall adjusted or SSH tunnel to the remote database.

  4. Obtain a copy of the external configuration file /data/images/config/images-config.properties. These are not kept centrally so you will need to copy one from another environment or get a copy from a developer who has recently been working on the application (check source control log).

  5. Modify the external configuration file to point to the remote database, note the dataSource.url will be jdbc:postgresql://localhost:5432/images, if you are tunneling, as the command you used in step 3 will have mapped this value to the actual database url and port. You will have to check the configuration on the remote host for the username and password. The database contains data about the images including their unique ids.

  6. Modify the external configuration file to point at the images by modifying imageservice.apache.root to equal remote host url + '/store/'.

  7. Run the local image-service in your IDE, you will get null pointers on the first page.

  8. Login and navigate to /admin (I had to remove the invalid ticket from the URL).

  9. Run Tools --> re-index all images (fixes null pointers).

(I've left parts of the above a bit vague as this is publicly accessible information. If you find any of this becomes outdated please update for the benefit of other developers.)

Clone this wiki locally