The basic idea of docker as well as k8s are immutable images. The advantage of these is that you can give them a version and this way uniquely identify what is running in the cloud at any time.
The upgrade process in k8s typically is that a new pod is installed with the new docker image. As soon as it reports ready the old pod is taken down. So this ensures your system is always available. The simplest way to apply this pattern in OSGi is to create a an application using a bndrun file. The resulting jar is easy to package into a docker container. The only thing I miss there is to not have a single jar but a starter and individual bundles as files. This would make it easier to use docker layers to minimize the size of a docker image. You can try to use you current upgrade scheme in docker / k8s but it will be very different from its normal operation and I suspect you will hit many small issues. Of course giving up live upgrades takes away one OSGi feature but to be honest I never used this much for OSGi production systems. Christian Am Di., 6. Aug. 2019 um 16:29 Uhr schrieb Cristiano via osgi-dev < osgi-dev@mail.osgi.org>: > Hello all, > > I have a challenged POC to do in order to dockerize an existent OSGi > based application and then deploy it to a Kubernetes based cloud. > > I'm not totally aware of k8 features yet, so I have some doubts that I > would like discuss here. > > The main doubt is related to our existent upgrading process which > currently we upload a R5 repository to a webserver and then a node > management agent bundle access it and upgrades the necessary app bundles. > > Many examples I saw in the web creates a docker image in their building > process and delivery an image at each dev cycle. I don't like much of > this idea, so initially I thought to mimic our existent process in a > docker container just setting up a Volume in order to upload the newer > repositories. > > So I have created two docker images for testing this locally. One image > contains the OSGI container and framework bundle (that do not change > much) and other image that extends the other for only the apps bundles. > it have worked well running locally. > > Would this also work in K8 ? What would happen if I need to scale and > then create multiple PODS for this application? > > thanks for any help. > > best regards, > > Cristiano > > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev -- -- Christian Schneider http://www.liquid-reality.de Computer Scientist http://www.adobe.com
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev