Skip to content

odaceo/lab-unikernel-osv-spring-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lab :: Unikernel :: OSv + Spring Boot

License

Description

A Spring Boot application configured to run on OSv.

Prerequisites

You need to have Capstan installed on your computer.

export PATH=$HOME/bin:$PATH 
export CAPSTAN_QEMU_PATH=`which qemu-system-x86_64` 

Building the application

The build command creates a virtual machine running on Virtual Box.

If you modify Capstanfile, you will need rebuild the image with the following command:

capstan build -p 'vbox' -v

Running the application

To launch the application under VirtualBox use the following command:

capstan run -p 'vbox' -f '8080:8080' -f '9090:9090' -v

To run the service use the following command:

curl http://localhost:8080/greeting?name=Odaceo

To check the application's health use the following command:

curl http://localhost:9090/health

Deploying the application on CloudSgima

First, build the disk image for KVM using the following command:

capstan build -p 'qemu' -v

To convert the disk image into a RAW format use the following command:

qemu-img convert -f qcow2 -O raw ~/.capstan/repository/lab-unikernel-osv-spring-boot/lab-unikernel-osv-spring-boot.qemu lab-unikernel-osv-spring-boot.raw

Sign into your CloudSigma account and create a new disk using the previously created RAW image.

Create a new machine with sufficient resources. Typically 1GHz of CPU and 256MB of RAM are more than enough.

Start the machine.

Now that the virtual machine is running, go to the OSv dashboard:

http://public-ip:8000/dashboard/

Replace public-ip with the public IP to get access to the service and the service health status page.

Reporting Issues

Issues can be reported at https://github.com/odaceo/lab-unikernel-osv-spring-boot/issues

Source code

The source code is available at https://github.com/odaceo/lab-unikernel-osv-spring-boot

License

All the source code is distributed under ASL 2.0.

Copyright

© 2015 Odaceo. All rights reserved.