[
https://issues.apache.org/jira/browse/KARAF-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160776#comment-16160776
]
Guillaume Nodet commented on KARAF-5350:
----------------------------------------
I was mainly referring to deploying an inconsistent set of artifacts, not a
not-fully deployed jar.
For example, if you use {{mvn deploy}} on your project, if the project is big
enough, the deployment can take several minutes. You may end up updating 2
snapshot bundles which are incompatible (api + impl, where the api has
changed). Of course, this will be fixed on the next pass, but in the mean
time, your application can be in a bad state.
That also applies to {{bundle:watch}}, but that's why it's not meant to be used
in production.
My worry is that you're trying to use such a tool in production, but that's up
to you really.
In order to solve the problem, a better way would be to use a mechanism similar
to Fuse Fabric. I.e. have an information somewhere containing informations
concerning the deployment on a given server. The server polls for change and
if there is any change, run the FeaturesService and somehow store back the
result. It depends if you have a single or a dozen servers though...
And btw, I would not use snapshot in production either, as it's quite difficult
to trace them back to the source revision. Imho, it's better to use an
auto-incremented version and tag them before deploying.
Just some toughts...
> Get auto update functionality like "bundle:watch *" on snapshot artifacts
> from remote repositories
> --------------------------------------------------------------------------------------------------
>
> Key: KARAF-5350
> URL: https://issues.apache.org/jira/browse/KARAF-5350
> Project: Karaf
> Issue Type: Improvement
> Reporter: Steinar Bang
>
> I now have a continous deployment pipeline for [my
> project|https://github.com/steinarb/ukelonn] almost automated:
> # All changes I would like deployed, I merge to master and then push master
> to github
> # New pushes on master triggers a build on travis-ci
> # A successful build on travis-ci results in a new snapshot being deployed to
> a maven repository accessible via HTTP
> ## The bundles that make up my application have been installed from snapshots
> in the maven repository, like so (karaf consolle commands):
> {noformat}
> config:edit org.ops4j.pax.url.mvn
> config:property-append org.ops4j.pax.url.mvn.repositories ",
> https://maven.bang.priv.no/repository/@snapshots,
> http://maven.vaadin.com/vaadin-addons"
> config:property-set org.ops4j.pax.url.mvn.globalUpdatePolicy always
> config:update
> feature:repo-add mvn:no.priv.bang.ukelonn/ukelonn.karaf/LATEST/xml/features
> feature:install ukelonn-db-postgresql
> feature:install ukelonn
> {noformat}
> # The final step I have to do during a deployment, is to log in with ssh to
> the karaf console and give "bundle:update" on each bundle
> {noformat}
> bundle:update no.priv.bang.ukelonn.api
> bundle:update no.priv.bang.ukelonn.db.liquibase
> bundle:update no.priv.bang.ukelonn.db.postgresql
> bundle:update no.priv.bang.ukelonn
> {noformat}
> It is the final step I would like to have automated, so that new snapshots
> deployed to the remote repository is automatically picked up by karaf.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)