Skip to end of metadata
Go to start of metadata

The general concept is continuous production where nodes upgrade application and configuration automatically. Which application version and configuration each node should run is controlled by a central ConfigService.

The first version is aimed at providing this functionality on Windows. Later version might add support for Linux.
See Discussion on Windows service management for a description of technology choices.

Prerequisites

  1. Account priveleges required: start/stop/install services
    1. Windows user: Open SCM Manager
    2. Unix user: sudo?
    3. Firewall Requirements: Outbound SSL port 443

Getting started

  1. Install Java
    1. install_java.bat ?
  2. Download install_jau script
  3. Run install_jau script with url to ConfigService as parameter

About Java Auto-Update

  1. Query ConfigService for service configuration.
    1. Input parameters: artifactId, clientId (optional)
  2. if ServiceConfig lastChanged string is not identical to previous
    1. download all download items
    2. stop service if running
    3. start service

Java Auto-Update implementation notes

  • Java process
  • Should always be running (start at boot, integrate with process manager on OS)
  • Simple, stable, robust
  • JAU is not responsible for selecting nether appplication version or which config. This is the responsibility of ConfigService.
  • Poll ConfigService for ServiceConfiguration using http(s).
  • Work on Linux and Windows
  • Perhaps use ScheduledExecutorService to provide cron/schedule functionality.
    • Check for changes to application binaries or configuration every 5 minutes.
  • TODO verify that process management support in JDK 8 is powerful and robust enough.

Useful links

Full Size

Are there existing relevant libraries or projects?

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Oct 31, 2018

    2018-10-31T10:50:31.269+0000 [pool-2-thread-1] WARN n.c.jau.coms.CheckForUpdateHelper - checkForUpdate failed, do nothing. Retrying in 60 seconds.
    java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOfRange(Arrays.java:3664)
    at java.lang.String.<init>(String.java:207)
    at java.lang.StringBuilder.toString(StringBuilder.java:407)
    at com.fasterxml.jackson.core.util.TextBuffer.contentsAsString(TextBuffer.java:404)
    at com.fasterxml.jackson.core.io.SegmentedStringWriter.getAndClear(SegmentedStringWriter.java:83)
    at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:3213)
    at no.cantara.cs.client.ConfigServiceClient.checkForUpdate(ConfigServiceClient.java:194)
    at no.cantara.jau.coms.CheckForUpdateHelper.lambda$getCheckForUpdateRunnable$0(CheckForUpdateHelper.java:54)
    at no.cantara.jau.coms.CheckForUpdateHelper$$Lambda$11/1108862983.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)