NOTE: you will need to work with the network administrator to have your institution's IP address whitelisted on the HUB before you can proceed in this section


First, ask your hub admin for the base url for your hub.

Second, ensure that - from your tomcat's machine - you can reach the hub's tomcat with this curl command (substitute the right base url):

> curl -kw "\n%{response_code}\n" -X GET https://shrine-hub.faraway.com:6443/shrine-api/hub/ping
pong
200

If that does not work, you may need to open an outbound firewall hole, or work through your network's proxies. You will very likely need help from your local network admin group to solve this problem.

Third, edit your shrine.conf to use the hub's base url. The shrine.conf template uses the shrineHubBaseUrl property for this:

shrineHubBaseUrl = "https://shrine-hub.faraway.com:6443"


shrine {...}

Forth, tell your hub admin that you are ready to run a test query. He will need to know your node key (from your shrine.conf), your preferred node name, your i2b2 user domain, and your sys admin email address (you might want to use an alias for your team).

A few notes about these values:

  1. Once you select your node key value, it cannot be changed in the hub.  Please select a value that reflects your site.
  2. Please keep your preferred node name descriptive and concise.  This is the value that will be displayed in query result outputs.
  3. Regarding the i2b2 user domain, please specify a domain that reasonably reflects your site.  Please do not use the default setting.
  4. You may choose a departmental or role-based email address if you wish.

The hub admin will run this curl command on the network.

> curl -u username:password -w "\n%{response_code}\n" -k -X PUT "https://shrine-hub.faraway.com:6443/shrine-api/hub/createNode/yourNodeKey?nodeName=your%20Node%20Name&userDomain=yourDomain&adminEmail=you@example.com&sendQueries=false"


Start tomcat. If all is well after SHRINE starts you should see recurring entries of your shrine node asking the hub for updates in shrine-api.log:

 2019-Jun-06-16:38:56.241 INFO [SHRINE-API][Log$][httpClient-13] No message received from https://shrine-hub.faraway.com:6443/shrine-api/mom/receiveMessage/shrinedev2?timeOutSeconds=10, HTTP Response 204 No Content  
 2019-Jun-06-16:39:06.263 INFO [SHRINE-API][Log$][httpClient-13] No message received from https://shrine-hub.faraway.com:6443/shrine-api/mom/receiveMessage/shrinedev2?timeOutSeconds=10, HTTP Response 204 No Content  
 2019-Jun-06-16:39:16.285 INFO [SHRINE-API][Log$][httpClient-13] No message received from https://shrine-hub.faraway.com:6443/shrine-api/mom/receiveMessage/shrinedev2?timeOutSeconds=10, HTTP Response 204 No Content  

Log in to the DSA, create a topic, then log into shrine and try running a test query.

After you successfully run a query and get results back from other nodes then you should start accepting queries from elsewhere. Let your hub admin know and he will run this curl command so that you receive queries from the network:

> curl -u username:password -w "\n%{response_code}\n" -k -X PUT "https://shrine-hub.faraway.com:6443/shrine-api/hub/modifyNode/yourNodeKey?sendQueries=true"

Once your hub admin has done that, run another test query to see results from your node listed with the others.