Re: Best practise to trigger actions when application is created

2016-02-12 Thread David Strejc
Any better solution please Clayton?

David Strejc
t: +420734270131
e: david.str...@gmail.com

On Thu, Feb 11, 2016 at 4:58 PM, David Strejc 
wrote:

> In this scenario we will use clusters for deploying one specific
> application in many copies (each with its own database and fileset).
>
> So yes - it is for every application in cluster. I though I will use
> something like Mateus send.
> Or if there is better approach I will appreciate it - cause otherwise I
> will need to create some service and maintain it, monitor it etc.
>
> David Strejc
> t: +420734270131
> e: david.str...@gmail.com
>
> On Thu, Feb 11, 2016 at 4:53 PM, Clayton Coleman 
> wrote:
>
>> Is this for every application on the cluster?  Or just specific
>> applications?  Do you want to create a glusterfs volume for *every* object
>> of a certain type that is created?  More detail will help recommend an
>> option.
>>
>> On Thu, Feb 11, 2016 at 10:45 AM, Mateus Caruccio <
>> mateus.caruc...@getupcloud.com> wrote:
>>
>>> I wrote myself. Here is a very simplified version of it
>>> http://www.fpaste.org/321270/14552054/
>>> You can take actions base on obj['kind']. This example watches only for
>>> "Pod" objects since I only need to track pod usage by the user.
>>>
>>> *Mateus Caruccio*
>>> Master of Puppets
>>> +55 (51) 8298.0026
>>> gtalk:
>>>
>>>
>>> *mateus.caruc...@getupcloud.com twitter:
>>> @MateusCaruccio *
>>> This message and any attachment are solely for the intended
>>> recipient and may contain confidential or privileged information
>>> and it can not be forwarded or shared without permission.
>>> Thank you!
>>>
>>> On Thu, Feb 11, 2016 at 1:33 PM, David Strejc 
>>> wrote:
>>>
 Are you using any specific component?

 Or you have written something yourself?

 David Strejc
 t: +420734270131
 e: david.str...@gmail.com

 On Thu, Feb 11, 2016 at 4:27 PM, Mateus Caruccio <
 mateus.caruc...@getupcloud.com> wrote:

> From my own experience, monitoring etcd is one way to do it, but
> requires an extra component (the monitor) to be always up and running.
> This monitor must have cluster roles, since it need to watch both
> project and app (bc/dc) objects.
>
> The other way is to provide your users with templates containing all
> stuff they will need.
>
>
> *Mateus Caruccio*
> Master of Puppets
> +55 (51) 8298.0026
> gtalk:
>
>
> *mateus.caruc...@getupcloud.com twitter:
> @MateusCaruccio *
> This message and any attachment are solely for the intended
> recipient and may contain confidential or privileged information
> and it can not be forwarded or shared without permission.
> Thank you!
>
> On Thu, Feb 11, 2016 at 1:21 PM, David Strejc 
> wrote:
>
>> Dear all,
>>
>> what is the best practise to trigger actions when I am creating
>> application?
>>
>> Let's say I want to create database (as I am using external database
>> cluster) and glusterfs volume for my application.
>>
>> Which approach should I look at? Should I make docker conteiner to
>> ssh somewhere and let it trigger some scripts?
>>
>> Or is there any other way? Shoudl I somehow monitor etcd for app
>> creation (as it was with activemq messages in Open Shift v2)?
>>
>> Thank you.
>>
>> David Strejc
>> t: +420734270131
>> e: david.str...@gmail.com
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>

>>>
>>> ___
>>> users mailing list
>>> users@lists.openshift.redhat.com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Best practise to trigger actions when application is created

2016-02-11 Thread Michalis Kargakis
David,

you may want to have a look at hooks for *DeploymentConfigs*
https://docs.openshift.org/latest/dev_guide/deployments.html#lifecycle-hooks

Currently, *Recreate* strategy supports three types of hooks[1] and
*Rolling* has two[2]

[1]
https://github.com/openshift/origin/blob/8301f6b263b039d9031d4384fcf25a716f3c6497/pkg/deploy/api/v1/types.go#L73-L82
[2]
https://github.com/openshift/origin/blob/8301f6b263b039d9031d4384fcf25a716f3c6497/pkg/deploy/api/v1/types.go#L165-L171

On Thu, Feb 11, 2016 at 4:33 PM, David Strejc 
wrote:

> Are you using any specific component?
>
> Or you have written something yourself?
>
> David Strejc
> t: +420734270131
> e: david.str...@gmail.com
>
> On Thu, Feb 11, 2016 at 4:27 PM, Mateus Caruccio <
> mateus.caruc...@getupcloud.com> wrote:
>
>> From my own experience, monitoring etcd is one way to do it, but requires
>> an extra component (the monitor) to be always up and running.
>> This monitor must have cluster roles, since it need to watch both project
>> and app (bc/dc) objects.
>>
>> The other way is to provide your users with templates containing all
>> stuff they will need.
>>
>>
>> *Mateus Caruccio*
>> Master of Puppets
>> +55 (51) 8298.0026
>> gtalk:
>>
>>
>> *mateus.caruc...@getupcloud.com twitter:
>> @MateusCaruccio *
>> This message and any attachment are solely for the intended
>> recipient and may contain confidential or privileged information
>> and it can not be forwarded or shared without permission.
>> Thank you!
>>
>> On Thu, Feb 11, 2016 at 1:21 PM, David Strejc 
>> wrote:
>>
>>> Dear all,
>>>
>>> what is the best practise to trigger actions when I am creating
>>> application?
>>>
>>> Let's say I want to create database (as I am using external database
>>> cluster) and glusterfs volume for my application.
>>>
>>> Which approach should I look at? Should I make docker conteiner to ssh
>>> somewhere and let it trigger some scripts?
>>>
>>> Or is there any other way? Shoudl I somehow monitor etcd for app
>>> creation (as it was with activemq messages in Open Shift v2)?
>>>
>>> Thank you.
>>>
>>> David Strejc
>>> t: +420734270131
>>> e: david.str...@gmail.com
>>>
>>> ___
>>> users mailing list
>>> users@lists.openshift.redhat.com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Best practise to trigger actions when application is created

2016-02-11 Thread David Strejc
In this scenario we will use clusters for deploying one specific
application in many copies (each with its own database and fileset).

So yes - it is for every application in cluster. I though I will use
something like Mateus send.
Or if there is better approach I will appreciate it - cause otherwise I
will need to create some service and maintain it, monitor it etc.

David Strejc
t: +420734270131
e: david.str...@gmail.com

On Thu, Feb 11, 2016 at 4:53 PM, Clayton Coleman 
wrote:

> Is this for every application on the cluster?  Or just specific
> applications?  Do you want to create a glusterfs volume for *every* object
> of a certain type that is created?  More detail will help recommend an
> option.
>
> On Thu, Feb 11, 2016 at 10:45 AM, Mateus Caruccio <
> mateus.caruc...@getupcloud.com> wrote:
>
>> I wrote myself. Here is a very simplified version of it
>> http://www.fpaste.org/321270/14552054/
>> You can take actions base on obj['kind']. This example watches only for
>> "Pod" objects since I only need to track pod usage by the user.
>>
>> *Mateus Caruccio*
>> Master of Puppets
>> +55 (51) 8298.0026
>> gtalk:
>>
>>
>> *mateus.caruc...@getupcloud.com twitter:
>> @MateusCaruccio *
>> This message and any attachment are solely for the intended
>> recipient and may contain confidential or privileged information
>> and it can not be forwarded or shared without permission.
>> Thank you!
>>
>> On Thu, Feb 11, 2016 at 1:33 PM, David Strejc 
>> wrote:
>>
>>> Are you using any specific component?
>>>
>>> Or you have written something yourself?
>>>
>>> David Strejc
>>> t: +420734270131
>>> e: david.str...@gmail.com
>>>
>>> On Thu, Feb 11, 2016 at 4:27 PM, Mateus Caruccio <
>>> mateus.caruc...@getupcloud.com> wrote:
>>>
 From my own experience, monitoring etcd is one way to do it, but
 requires an extra component (the monitor) to be always up and running.
 This monitor must have cluster roles, since it need to watch both
 project and app (bc/dc) objects.

 The other way is to provide your users with templates containing all
 stuff they will need.


 *Mateus Caruccio*
 Master of Puppets
 +55 (51) 8298.0026
 gtalk:


 *mateus.caruc...@getupcloud.com twitter:
 @MateusCaruccio *
 This message and any attachment are solely for the intended
 recipient and may contain confidential or privileged information
 and it can not be forwarded or shared without permission.
 Thank you!

 On Thu, Feb 11, 2016 at 1:21 PM, David Strejc 
 wrote:

> Dear all,
>
> what is the best practise to trigger actions when I am creating
> application?
>
> Let's say I want to create database (as I am using external database
> cluster) and glusterfs volume for my application.
>
> Which approach should I look at? Should I make docker conteiner to ssh
> somewhere and let it trigger some scripts?
>
> Or is there any other way? Shoudl I somehow monitor etcd for app
> creation (as it was with activemq messages in Open Shift v2)?
>
> Thank you.
>
> David Strejc
> t: +420734270131
> e: david.str...@gmail.com
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>

>>>
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Best practise to trigger actions when application is created

2016-02-11 Thread Mateus Caruccio
>From my own experience, monitoring etcd is one way to do it, but requires
an extra component (the monitor) to be always up and running.
This monitor must have cluster roles, since it need to watch both project
and app (bc/dc) objects.

The other way is to provide your users with templates containing all stuff
they will need.


*Mateus Caruccio*
Master of Puppets
+55 (51) 8298.0026
gtalk:


*mateus.caruc...@getupcloud.com twitter:
@MateusCaruccio *
This message and any attachment are solely for the intended
recipient and may contain confidential or privileged information
and it can not be forwarded or shared without permission.
Thank you!

On Thu, Feb 11, 2016 at 1:21 PM, David Strejc 
wrote:

> Dear all,
>
> what is the best practise to trigger actions when I am creating
> application?
>
> Let's say I want to create database (as I am using external database
> cluster) and glusterfs volume for my application.
>
> Which approach should I look at? Should I make docker conteiner to ssh
> somewhere and let it trigger some scripts?
>
> Or is there any other way? Shoudl I somehow monitor etcd for app creation
> (as it was with activemq messages in Open Shift v2)?
>
> Thank you.
>
> David Strejc
> t: +420734270131
> e: david.str...@gmail.com
>
> ___
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users