Ask Your Question

how to launch an instance and deploy our Java Application in it

asked 2014-08-13 07:46:59 -0500

jagan gravatar image

updated 2015-08-03 18:12:56 -0500

smaffulli gravatar image

I want launch an OpenStack instance by using java sdk. How can I launch an instance and deploy an Application in it? What API method need to use to deploy Application and where we need write script data.

edit retag flag offensive close merge delete


Can you please edit the question to make it more clear? I can't really understand what your problem is.

smaffulli gravatar imagesmaffulli ( 2014-08-15 17:03:00 -0500 )edit

how to create or launch instance with application using APIs,so that I am able to use my sample web application from instance

jagan gravatar imagejagan ( 2014-08-18 01:32:10 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-08-04 12:54:34 -0500

  1. Install the commandline utilities to your desktop
  2. launch a virtual machine with your favorite distribution
  3. log in to the virtual machine
  4. excute "runlevel", you'll get an answer like "N 2"
  5. add a script in /etc/rc2.d/S98myJavaApp (assuming the default run level is 2) Put the commands here that will start your app such as "java -jar /home/javaGuy/java/javapp.jar"
  6. reboot the virtual machine, and check that your app starts
  7. take a snap shot with nova image-create virtualMachineName javaImageName

After this you can launch it in this way

#Define flavor
#define securityGroups
#define network
command = StringFormat ("nova boot --flavor %s --image %s --key_name %s --security-groups %s --nic net-id=%s  %s",
p = Runtime.getRuntime().exec(command);
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-08-13 07:46:59 -0500

Seen: 1,321 times

Last updated: Aug 04 '15