1. John Kodumal
  2. lr-api-demo

Overview

ApiDemo class contains example code

  • This project contains example of using LiveRebel Java API to:

    1. upload application to LiveRebel Command Center
    2. get ids of all servers (use it later for deploying and updating)
    3. deploy ver1 of demo application to given servers (note that demo application needs Redis database to properly function, but it is not strictly required for this demo unless you really want to interact with demo application)
    4. show active versions and urls of applications
    5. update all applications to latest version using rolling restart (rolling restart update strategy requires at least 2 connected servers)
    6. show again active versions and urls of applications
  • Usage:

    1. download LiveRebel
    2. install LiveRebel
    3. install LiveRebel agent to Server or servers (for example Tomcat, JBoss, Glassfish or Jetty)
    4. start servers with LiveRebel
    5. copy lr.properties.sample to lr.properties and update properties with appropriate values for connecting to LiveRebel
    6. buid and run project using following command:
      • mvn clean install exec:java