This page (revision-37) was last changed on 23-Apr-2022 17:06 by Harry Metske

This page was created on 23-Apr-2022 17:06 by unknown

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
37 23-Apr-2022 17:06 19 KB Harry Metske to previous
36 23-Apr-2022 17:06 18 KB Harry Metske to previous | to last
35 23-Apr-2022 17:06 18 KB Harry Metske to previous | to last
34 23-Apr-2022 17:06 18 KB Harry Metske to previous | to last
33 23-Apr-2022 17:06 18 KB Harry Metske to previous | to last
32 23-Apr-2022 17:06 18 KB Harry Metske to previous | to last
31 23-Apr-2022 17:06 17 KB Harry Metske to previous | to last
30 23-Apr-2022 17:06 17 KB Harry Metske to previous | to last
29 23-Apr-2022 17:06 17 KB HarryMetske to previous | to last
28 23-Apr-2022 17:06 17 KB Harry Metske to previous | to last
27 23-Apr-2022 17:06 17 KB Harry Metske to previous | to last
26 23-Apr-2022 17:06 16 KB Harry Metske to previous | to last
25 23-Apr-2022 17:06 16 KB Harry Metske to previous | to last
24 23-Apr-2022 17:06 14 KB HarryMetske to previous | to last
23 23-Apr-2022 17:06 14 KB HarryMetske to previous | to last
22 23-Apr-2022 17:06 14 KB HarryMetske to previous | to last
21 23-Apr-2022 17:06 15 KB HarryMetske to previous | to last

Page References

Incoming links Outgoing links
Apache Brooklyn...nobody

Version management

Difference between version and

At line 56 added 57 lines
! Deploy to other hosts
The next experiment was to deploy to a host other than the host where the brooklyn server is running.
So, therefore I fired up a second Docker container, arranged ssh and sudo access to that, and tried to deploy the following blueprint :
%%prettify
{{{
name: webnode1
services:
- type: brooklyn.entity.webapp.ControlledDynamicWebAppCluster
name: My Web
location:
byon:
hosts:
- brooklyn@172.17.0.76
brooklyn.config:
wars.root: http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
java.sysprops:
brooklyn.example.db.url: >
$brooklyn:formatString("jdbc:%s%s?user=%s&password=%s",component("db").attributeWhenReady("datastore.url"),"visitors", "brooklyn", "br00k11n")
- type: brooklyn.entity.database.mysql.MySqlNode
id: db
name: My DB
location:
byon:
hosts:
- brooklyn@172.17.0.76
brooklyn.config:
creationScriptUrl: https://bit.ly/brooklyn-visitors-creation-script
}}}
%%
Which basically is a copy of the previous excercise. Note that {{172.17.0.76}} is the IP address of the second Docker container {{brooklyn-node1}}.
This kept failing with {{No machines available in FixedListMachineProvisioningLocation}}.\\
Googled this, but in general you do not get much results foor Apache Brooklyn. After poking around quite a bit I concluded (not sure) that brooklyn can only run one service per location (except for localhost).
So I only added an additional host to the location, and it all worked fine.
Nice to see you get real time stats in your web UI (or REST if you like).
I ran a simple loadtest script against the application's URL, and you nicely see the effects on the stats.
Time for next experiment, autoscaling.
! AutoScaling
We want to be able to automatically scale the number of Tomcat instances, depending on something like response time or request rate.
! Run a Tomcat8 server.
! Use pools of locations by name
We want to use a pool of "servers" by name. I think it can be done by specifying locations in the {{brooklyn.properties}} file, and for example having a bunch of Docker containers available.