| layout | title |
|---|---|
docs |
Starting the application |
After describing the application we start instantiating the application by starting the required virtual machines and installing the components by creating instances.
Starting virtual machines is now easy. Simply select the correct offers with respect to Hardware, Image and Location and pass them to Colosseum.
Before starting instance, we have to create a new application instance. An application instance is a logical group for instances, that belong together.
Afterwards, we can start the instances, by binding the already created application components to their virtual machines.
Finally, we have to wait until the instances report an remote state of OK. Using the user interface we can see the IP Address where the load balancer is located, and access our wiki installation.
{
"name": "mariaDBVM",
"cloud": 1,
"image": 19,
"hardware": 10,
"location": 2
}
{
"name": "wikiVM",
"cloud": 1,
"image": 19,
"hardware": 10,
"location": 2
}
{
"name": "lbVM",
"cloud": 1,
"image": 19,
"hardware": 10,
"location": 2
} final VirtualMachine mariaDBVM = client.controller(VirtualMachine.class).create(
VirtualMachineBuilder.of(mariaDBVirtualMachineTemplate)
.name("mariaDBVM"))
.build());
final VirtualMachine wikiVM = client.controller(VirtualMachine.class).create(
VirtualMachineBuilder.of(wikiVirtualMachineTemplate)
.name("wikiVM").build());
final VirtualMachine lbVM = client.controller(VirtualMachine.class).create(
VirtualMachineBuilder.of(loadBalancerVirtualMachineTemplate)
.name("lbVM").build());
{
"application": 1
}
final ApplicationInstance appInstance = client.controller(ApplicationInstance.class)
.create(new ApplicationInstanceBuilder().application(application.getId()).build());{
"applicationInstance": 1,
"applicationComponent": 1,
"virtualMachine": 34
}
{
"applicationInstance": 1,
"applicationComponent": 2,
"virtualMachine": 33
}
{
"applicationInstance": 1,
"applicationComponent": 3,
"virtualMachine": 31
}
final Instance lbInstance = client.controller(Instance.class).create(
new InstanceBuilder().applicationComponent(loadBalancerApplicationComponent.getId())
.applicationInstance(appInstance.getId()).virtualMachine(lbVM.getId()).build());
final Instance wikiInstance = client.controller(Instance.class).create(
new InstanceBuilder().applicationComponent(wikiApplicationComponent.getId())
.applicationInstance(appInstance.getId()).virtualMachine(wikiVM.getId()).build());
final Instance dbInstance = client.controller(Instance.class).create(
new InstanceBuilder().applicationComponent(mariaDBApplicationComponent.getId())
.applicationInstance(appInstance.getId()).virtualMachine(mariaDBVM.getId())
.build());{: .img-responsive}
{: .img-responsive}
{: .img-responsive}
{: .img-responsive}
{: .img-responsive}
{: .img-responsive}
{: .img-responsive}
{: .img-responsive}
{: .img-responsive}








