-
Notifications
You must be signed in to change notification settings - Fork 3
Project Setup
- Install java 1.7 if you don't already have it
- Clone profile-service and profile-hub from GitHub
- Create an IntelliJ project from existing source for each
- Create the following directory structure:
/data/profile-hub/config
/data/profile-hub/private-images
/data/profile-hub/staged-images
/data/profile-hub/temp
/data/profile-service/config
/data/profile-service/snapshots
- Copy the profile-hub template config file to
/data/profile-hub/config
and fill in the variable values - Copy the profile-service template config file to
/data/profile-service/config
and fill in the variable values - Install MongoDB 3.0
- Install Elastic Search 1.7.2
- Install Elastic Search
- Read this: https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
- Change the cluster name for ES 1. [es_install_dir]/conf/elasticsearch.yml 1. Uncomment cluster.name 1. Change to something unique 1. Change the value elasticSearch.cluster.name (in the profile-service config file) to match the unique value you provided to Elasticsearch
- Install the name index
- Download the latest names index file from http://s3.amazonaws.com/ala-nameindexes/
- Unzip it to
/data/lucene/[filename]
1. Change thename.index.location
property of the profile-service config file to match the directory path - Change profile-service to run on a different port
- In IntelliJ, edit the runtime configuration and add
-Dgrails.server.port.http=8081
to the command line (change 8081 to whatever you want) - Run both profile-hub and profile-service
- http://localhost:8080/profile-hub
- Follow the steps here to set up your environment to run the unit tests
- Follow the steps here to set up your environment to modify the Jasper Reports files
- Once the application is running, follow these steps to import some sample data:
- Log in with an ALA Admin user
- Create a new collection
- Copy the GUID from the URL
- In a terminal, go to the root of the profile-service project
- Run the following (you may need to change paths/ports to suit your environment):
groovy scripts/FOAImport.groovy -f ../profile-hub/data/sample -p http://localhost:8008/profile-service -o [guid]
Note that the actual port for the command above is 8008, that is a special connector created on development that will allow an unlimited post size
Profiles supports the use of a dedicated Sandbox instance to provide private occurrence data for collections ('private' in the sense that it is only visible through the Profiles application, not through any other ALA systems). See the Sandbox Integration wiki page for more info.
If you need to make changes to the sandbox integration, then you will need to install and run the sandbox infrastructure. You have 2 options here:
- Run everything locally
- Run sandbox on a VM
Option 1 is the most complicated, as you will need to install and configure Sandbox, SOLR, biocache-service and Cassandra. If you want to do that, then you're on your own.
Option 2 is the simplest approach, but has a couple of drawbacks, the main one being that file uploads won't be possible unless your VM and local workstation can share a data directory.
- Run a local VM (use Vagrant/Virtual Box as per the ala-install instructions).
- Give it 8GB of memory - 4 is not enough to run all the sandbox stuff
- Run the
sandbox.yml
playbook from ala-install, using theala-install/ansible/inventories/vagrant/profiles-vagrant
inventory - Change the
sandbox.base.url=
property of the profile-hub-config.properties file toprofiles.vagrant1.ala.org.au/sandbox
At the time of writing, the sandbox did not include the CORS plugin, so you might need to deal with cross-origin errors.