Skip to content

Installation

Andrew Dunn edited this page May 25, 2017 · 1 revision

Installation

The service has three options for installing and running the software. The build makes use of the (Spring Boot Gradle)[https://plugins.gradle.org/plugin/org.springframework.boot] plugin that embeds a couple service script within the jar file.

Running Standalone

Option 1

The service is built as an executable jar file with an embedded HTTP server (Undertow) and built in defaults. The service can simply be run using java -jar rcloud-gist-service-0.3.1.jar.

Option 2

On linux, the jar file has an embedded service script so the following command can also be run (as long as the jar file is executable) ./rcloud-gist-service-0.3.1.jar start.

Running as a service

The jar file has an embedded service script in it, so the jar file can be symlinked into the /etc/init.d folder and then can be started and stopped as any other service. The script will run the service as the same user as the jar file itself. More information can be found on the Spring Boot documenation https://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html

Using the installation package

The build creates a Debian package that can be used to install the service. To install the service using the package use dpkg -i <packagename>. The package does the following:

  1. Creates a user for the service rcloudgistservice.
  2. Installs the software into /opt/rcloud-gist-service/ as the above user.
  3. Installs a default configuration (application.yml) alongside the software.
  4. Installs a java service configuration file service-<packagename>.conf that can be used to configure how the Java service starts such as memory options.
  5. Logging configuration file logback.xml.
  6. Creates a /var/log/rcloud-gist-service directory for the log files.
  7. Symlinks the application into the /etc/init.d folder setting up the rcloud-gist-service service.

With the above service installed then the normal linux service scripts can be used e.g. service rcloud-gist-service start

Clone this wiki locally