[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15854014#comment-15854014 ] Oliver Lietz commented on KARAF-201: That won't work as the service providing resources is shared by different applications and IMHO the feature lifecycle is the best place to hook into when you manage (install, uninstall, update) applications (set of bundles, features and configurations) with Karaf Features. > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15854003#comment-15854003 ] Christian Schneider commented on KARAF-201: --- What I wanted to express is that for each persistence technology you will have some central resource that can provide a good hook for doing migration tasks. Karaf features are only used for the first start of karaf. If you restart karaf then there is only the ordinary bundle startup. So I think it would not be a good practice to use the feature service at all for migration scripts. Instead hook into the resources that channel access to your persistence layer and make sure the migration is finished before the resource is made available to other bundles. > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15853985#comment-15853985 ] Oliver Lietz commented on KARAF-201: Sorry, no. Database migration was an example and it could be any task. In my case it is a [Java Content Repository (JCR)|http://jackrabbit.apache.org/jcr/jcr-api.html], concretely [Apache Jackrabbit Oak|https://jackrabbit.apache.org/oak/] (Oak runs with Tar, Mongo or RDBMS _backend_). _On top_ of Oak sits [Sling|https://sling.apache.org] and provides services to access resources (from Oak but not only). Now you install applications _on top_ of Sling and in some cases you need to transform, add, remove or move existing content before these applications are installed (updated) – this is a concrete example close to database migration but I can imagine more use cases. > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15853921#comment-15853921 ] Christian Schneider commented on KARAF-201: --- I sent a discuss mail on ops4j about database migration https://groups.google.com/d/topic/ops4j/C2dIkkcl5Uw/discussion. Would this work for you? > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15853912#comment-15853912 ] Achim Nierbeck commented on KARAF-201: -- hmm ... for DB migration you might also want to take a look at [PAX Warp|http://ops4j.github.io/pax/warp/0.7.0/index.html] > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15853909#comment-15853909 ] Christian Schneider commented on KARAF-201: --- A simple way to do this is to couple it with a service that encapsulates a resource. For example if you have a db then the common resource is the DataSource. So I think the right place to run automatic migration scripts would be the service that provides the DataSource. The service could make sure the migration scripts are run before the DataSource is published. In OSGi there is already a really good system to express dependencies using capabilities and services. So I think we can implement this in a good way without touching the feature mechanism. If you are interested we can look into providing database migration hooks in pax-jdbc-config which I think would be a good place for this. > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15853825#comment-15853825 ] Oliver Lietz commented on KARAF-201: That's a lot of boilerplate to do some work depending on feature lifecycle (I'm not interested in _any_ OSGi environment but Karaf with Features only). Though having a common _OSGi Task API_ sounds interesting. > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15853808#comment-15853808 ] Christian Schneider commented on KARAF-201: --- You can already do this in an Activator or DS / blueprint callbacks. By putting this code in a bundle you make sure it can run in any OSGi environment. > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15853802#comment-15853802 ] Oliver Lietz commented on KARAF-201: I would like to have a standard mechanism to run pre-/post- install, uninstall and update tasks (full lifecycle) for features (not limited to gogo commands) for e.g. database migrations. > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15853792#comment-15853792 ] Christian Schneider commented on KARAF-201: --- Do we really still need this? After all bundles can also do actions once they become active. So I think we can already do this without a new element for features. > Add post feature installation triggers > -- > > Key: KARAF-201 > URL: https://issues.apache.org/jira/browse/KARAF-201 > Project: Karaf > Issue Type: New Feature > Components: karaf-core, karaf-feature >Reporter: Guillaume Nodet > Fix For: 4.1.1 > > > Something like: > {code} > > // do anything using gogo commands > > {code} > The result could be displayed to the user so that the installation could give > him some information (manual steps, or whatever), though it may need a > separate element. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13147288#comment-13147288 ] Jean-Baptiste Onofré commented on KARAF-201: It makes sense to have pre trigger. It's a MUST HAVE for Karaf 3.0. Add post feature installation triggers -- Key: KARAF-201 URL: https://issues.apache.org/jira/browse/KARAF-201 Project: Karaf Issue Type: New Feature Components: karaf-core, karaf-features Reporter: Guillaume Nodet Fix For: 3.0.0 Something like: {code} script trigger=post // do anything using gogo commands /script {code} The result could be displayed to the user so that the installation could give him some information (manual steps, or whatever), though it may need a separate element. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KARAF-201) Add post feature installation triggers
[ https://issues.apache.org/jira/browse/KARAF-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13097085#comment-13097085 ] Andreas Pieber commented on KARAF-201: -- It is, but it has also one disadvantage. The echo would print every time the feature is installed which is also during karaf startup at a customer. And I don't think that they would like to see this message each time. I think we also have to add a switch to do things in those feature-scripts based on the surrounding. If they are installed via features.cfg or directly via the console. Add post feature installation triggers -- Key: KARAF-201 URL: https://issues.apache.org/jira/browse/KARAF-201 Project: Karaf Issue Type: New Feature Components: karaf-core Reporter: Guillaume Nodet Something like: {code} script trigger=post // do anything using gogo commands /script {code} The result could be displayed to the user so that the installation could give him some information (manual steps, or whatever), though it may need a separate element. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira