brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhishek Sharma <abhisharm...@gmail.com>
Subject Re: Launching multiple apps when starting Brooklyn
Date Wed, 23 Dec 2015 19:05:30 GMT
Thanks for the inputs, Graeme.

It is necessary for me to go beyond the YAML approach you mentioned. Would
deeply appreciate if you can give me pointers on how that can be done.

Here are few of my top reasons:
1. I want to be able to deploy my services (built on Brooklyn) on bare
metal, IaaS and any PaaS that we plan to support. I want a single entry
point and ease for deployment.
So based on a particular custom added CLI options I change by
brooklyn.properties files to run services with particular settings.

2. We have done a lot of stuff in Java Blueprints and want to keep it that
way.

3. Based on certain flags that are set we have some existing code that
initializes some Guice modules.

I do not want to disrupt all that for now and just have my ApplicationMain
class which extends Brooklyn Main class start multiple applications.
The locations, environment etc all other settings are specified in java
classes already for my services. Just want to be able to run multiple
services from Main class.

Thanks,
Abhishek


On Wed, Dec 23, 2015 at 9:30 AM, Graeme Miller <
graeme.miller@cloudsoftcorp.com> wrote:

> Hello,
>
> I can try this. Is there an actual code example of such a kind you can
> point me to ?
>
> The three lines I provided in the previous email should be enough, just
> replace "com.abhishek.dropwizzard" and "com.abhishek.nodejs" with your
> classes and set the '-a' option to point to the YAML file. You'll also need
> to specify a location either in the yaml or via the '-l' option.
>
> 1. Treating Brooklyn as my central guy for deploying and monitoring all my
> services
>
> Would highly recommend it :)
>
> 2. I have extending the Main class and added some custom flags for my own
> needs. I also extend the main.launch command and use my own. Were I have
> over-ridden the call method. I use setAppToLaunch() to set the app I want
> to launch. I was looking for some way to set multiple apps.
>
> Would not recommend this unless necessary. Apart from multiple apps, what
> else is required? It is possible that this can be done via YAML, which
> should be easier to use.
>
> The Yaml file option you mentioned must also have to do something on
> similar lines, can I do something similar is my own AppMain which extends
> Brooklyn's Main Class.
>
> See above, what else would it need to do?
>
> Another option would be to use the Brooklyn CLI which is currently being
> developed, see here <https://github.com/brooklyncentral/brooklyn-cli>.
> Please note this is a fairly new project that is under active development.
>
> Regards,
> Graeme
>
> On 23 December 2015 at 17:10, Abhishek Sharma <abhisharma.b@gmail.com>
> wrote:
>
> > Hey Graeme,
> >
> > I can try this. Is there an actual code example of such a kind you can
> > point me to ?
> >
> > Although, Ideally I would like to be able to do this from Java code
> itself.
> > The way I am looking at this is following:
> >
> > 1. Treating Brooklyn as my central guy for deploying and monitoring all
> my
> > services
> >
> > 2. I have extending the Main class and added some custom flags for my own
> > needs. I also extend the main.launch command and use my own. Were I have
> > over-ridden the call method. I use setAppToLaunch() to set the app I want
> > to launch. I was looking for some way to set multiple apps.
> >
> > The Yaml file option you mentioned must also have to do something on
> > similar lines, can I do something similar is my own AppMain which extends
> > Brooklyn's Main Class.
> >
> > Thanks,
> > Abhi
> >
> > On Wed, Dec 23, 2015 at 2:53 AM Graeme Miller <
> > graeme.miller@cloudsoftcorp.com> wrote:
> >
> > > Hi Abhishek,
> > >
> > > The Brooklyn launch command allows you to specify an application with
> the
> > > '-a' option. However, it only allows you to specify one application.
> > >
> > > This specified application can be either a Java Class or a YAML file.
> One
> > > solution to this would be to write a small YAML file that defines an
> > > application that starts both your node.js and drop-wizard entities. The
> > > file would contain only three lines:
> > >
> > > > services:
> > >
> > >    - type: com.abhishek.dropwizzard
> > >
> > >    - type: com.abhishek.nodejs
> > >
> > >
> > >
> > > You can then use the YAML file as the -a option. Would that be a
> suitable
> > > solution?
> > >
> > > Regards,
> > > Graeme
> > >
> > >
> > >
> > > On 23 December 2015 at 07:12, Abhishek Sharma <abhisharma.b@gmail.com>
> > > wrote:
> > >
> > > > Hey guys,
> > > >
> > > > I am trying to make Brooklyn start my node.js web application and
> also
> > a
> > > > drop-wizard based java service. I am using Java Blueprints and not
> > YAML.
> > > >
> > > > How do I make brooklyn start multiple applications ?
> > > > My goal is to start these based on a command line parameters passed
> > when
> > > > starting brooklyn.
> > > >
> > > > Thanks in advance,
> > > > Abhi
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message