Issue 17259

Make that GBIF Services survive system crashes

17259
Reporter: fmendez
Assignee: fmendez
Type: Improvement
Summary: Make that GBIF Services survive system crashes
Description: Iif the server that hosts the GBIF services, crashes or it's restarted, the GBIF services that were running have to be started manually
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2015-02-19 04:54:16.754
Updated: 2018-05-31 16:44:24.027
Resolved: 2018-05-31 16:44:23.982


Author: fmendez@gbif.org
Created: 2015-02-19 05:22:32.117
Updated: 2015-02-19 05:22:32.117
        
The branch https://github.com/gbif/c-deploy/tree/systemd installs the GBIF services as systemd services, for each service a file "/etc/systemd/system/artifactId.service" is created. Additionally, the mechanism to manage ports trough the firewall-cmd has been improved too, a file "/etc/firewalld/services/artifactId.xml" is created, that file contains the definition of the ports used by the firewalld service: {{https://github.com/gbif/c-deploy/blob/systemd/services/roles/appserver/templates/firewalld-service.xml}}; managing the services in this way facilitates the management of GBIF services at the system level by having a common place to consult what ports are being used by a service, for example, the command {{firewall-cmd --list-all}} would return:
{code}
public (default, active)
  interfaces: eth0 eth1
  sources:
  services: dhcpv6-client occurrence-ws ssh
  ports:
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:
{code}

...and the occurrence-ws service would be defined in the file {{/etc/firewalld/services/occurrence-ws.xml}}:
{code:xml}


  occurrence-ws
  GBIF Service occurrence-ws