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.
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.
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.
-
Install WebSphere Liberty to create the default server.
Important: You must have a Java Runtime Environment that is installed separately.
- Create and start the default server with the following commands:
$LIBERTY_HOME/bin/server create $LIBERTY_HOME/bin/server start
- Install the WebSphere Liberty server on a VM that is network accessible with the Kubernetes cluster that runs Kubernetes Application Navigator.
- You can also use OpenLiberty.
-
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.
-
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.
-
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.
If you stop the WebSphere Liberty and JBoss servers, Kubernetes Application Navigator updates the status to show that the components are down:
On the component view page, you can select pre-defined actions to perform in the context of the selected component:
Use the following uninstall.sh
scripts to uninstall the sample application with Kubernetes:
cd kappnav/samples/vmapp/liberty
./uninstall.sh
cd ../jboss
./uninstall.sh