Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Latest commit

 

History

History

vmapp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Installing the VM-based components sample

About VM Components

Applications can include non-Kubernetes (e.g. VM-based) components, as well as new, cloud native components. This is common during application modernization scenarios, where parts of a monolith are transformed to, or replaced by, cloud native components. This short video demonstrates an actual example, based on the stocktrader application.

The sample in this repository demonstrates how you can represent and include vm components as part of your application, as displayed by Kubernetes Application Navigator.

Overview

The sample vmapp application consists of two vm-based components. The webapp component runs on a stand-alone WebSphere Liberty server that runs on a virtual machine. The helloworld component runs on a JBoss server that also runs on a virtual machine.

overview

An application that is modernized usually contains non-Kubernetes (e.g. vm-based) and cloud-native components. For more information, see the app modernization demonstration.

Prerequisites

  1. Install kAppNav.

  2. Install WebSphere Liberty to create the default server.

    Important: You must have a Java Runtime Environment that is installed separately.

    1. Create and start the default server with the following commands:
    $LIBERTY_HOME/bin/server create
    $LIBERTY_HOME/bin/server start 
    
    1. Install the WebSphere Liberty server on a VM that is network accessible with the Kubernetes cluster that runs Kubernetes Application Navigator.
  3. Install JBoss EAP 7.2.

    Important: You must have a Java Runtime Environment that is installed separately.

    • Install the JBoss server on a VM that is network accessible from the Kubernetes cluster that runs Kubernetes Application Navigator.

    Important: You must configure the JBOSS stand-alone server to listen on all interface to be accessible for the sample.

    • Make the following change to the $JBOSS_HOME/standalone/configuration/standalone.xml file:

    From:

    <interfaces>
      <interface name="management">
          <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
      </interface>
      <interface name="public">
          <inet-address value="${jboss.bind.address:127.0.0.1}"/>
      </interface>
    </interfaces>
    

    To:

    <interfaces>
      <interface name="management">
          <any-address/>
      </interface>
      <interface name="public">
          <any-address/>
      </interface>
    </interfaces>
    

    Use the following command to start the stand-alone server:

    $JBOSS_HOME/bin/standalone.sh 
    
1. [Install a helloworld sample application](https://developers.redhat.com/products/eap/hello-world#fndtn-macos).

   * Use a stand-alone WebSphere Liberty server to run the `helloworld` sample application.

Installing the sample application

  1. Install a Liberty stand-alone application

    git clone https://github.com/kappnav/samples.git
    cd kappnav/samples/vmapp/liberty
    ./install.sh \<hostname\>
    

    Hostname is the hostname of the VM that you installed and started the WebSphere Liberty server with.

  2. Install a JBoss application.

    cd ../jboss
    ./install.sh \<hostname\>
    

    Hostname is the hostname of the VM that you installed and started the JBoss server with and hosts the helloworld sample.

The vmapp sample as viewed through Kubernetes Application Navigator.

overview

overview

Stopping components

If you stop the WebSphere Liberty and JBoss servers, Kubernetes Application Navigator updates the status to show that the components are down:

overview

Selecting actions

On the component view page, you can select pre-defined actions to perform in the context of the selected component:

Liberty stand-alone application action - View home page

overview

overview

JBoss application actions

Viewing the application configuration

overview

overview

Viewing the server metrics

overview

overview

Uninstalling the sample application

Use the following uninstall.sh scripts to uninstall the sample application with Kubernetes:

cd kappnav/samples/vmapp/liberty
./uninstall.sh 
cd ../jboss
./uninstall.sh