I'm building some in-house configuration packages for Debian-based OS.
There is a package (in default Debian repositories) which contains some service (as a binary) and all machinery needed to run it, but it's not started automatically during installation (and it does not even create the appropriate user for it to be run under).
I've successfully built a custom dependent configuration package which creates a dedicated system user to run this service, adjusts the configuration, and starts this service instance via systemd.
However I'm not sure how to handle original service package update case. I think that my service instance (running under custom system user with custom configuration) should be restarted in case of such upstream update but I can't find a good way to do it. According to official documentation apt/dpkg doesn't notify (call) any maintainer scripts of a package's dependency graph - only those of the package being directly updated. Currently I'm thinking about some inotify-based workarounds to watch for service binary file changes and trigger my service instance restart manually but it feels... hacky =)
So here goes the question:
Is there any existing infrastructure in apt/dpkg to notify dependent packages about updates of their dependencies?
Related
According to Jelastic documentation it is possible to export the Environment configuration and download it so it can be restored in another provider
However I have tried with 2 Jelastic providers and they both have disabled the option for exporting private data.
So exporting/download/upload/import of environment is not possible.
i.e. I was expecting to have a process similar to CPanel backup/restore tool
In fact, another view for the deployment process gives a possibility to get rid of the model of handling the data or configuration on the platform. Try to think a bit differently and using CI/CD approach. The Jelastic provides a platform where something you created, locate on somewhere you're elaborating(VCS or GIT as an example) and based on or depends on the specific stack, already pre-configured like a layer and can be installed(copied) over Jelastic. Don't need to handle the data somewhere in the cloud because you have it locally(means within any VCS) and doing the changes there. Then just do a 'pull' procedure(manually or automatically) on that deployment(test, production, staging) environment you're expecting.
Moreover, you can expect any environments type like a code and perform it creating before deploying the data.
Please, find the articles being described each case:
Deployment Guide
Jelastic Packaging Standard for CI/CD Automation
In case you would like to handle the databases' backups, check this article:
Scheduling Database Backups
Additional FTP add-on can make the copies more easily for each instance:
FTP/FTPS Support in Jelastic
On Jelastic, I created a node for building an application (maven), there are several identical environments (NGINX + Spring Boot), the difference is in binding to its database and configured SSL.
The task is to ensure that after building the application (* .jar), deploy at the same time go to these several environments, how to implement it?
When editing a project, it is possible to specify only one environment, multi-selection is not provided.
it`s allowed to specify just one environment
We suggest creating a few environments using one Repository branch, and run updates by API https://docs.jelastic.com/api/#!/api/environment.Vcs-method-Update pushing whole code to VCS.
It's possible to use CloudScripting technology for attaching custom logic to onAfterBuildProject event and deploying the project to additional environments after build is complete. Please check this JPS as an example of the code syntax. Most likely you will need to use DeployProject API method.
I am looking for any best practices and/or recommendations around how best to manage releases for custom modules in a production environment running on the Spring-XD platform.
Specifically, if I have a custom module foo-1.0.0 deployed into a farm of xd containers and I wish to rev it to version foo-1.1.0. What are my alternatives? I gather the following might work (from looking at other questions and docs):
Assuming a shared filesystem/directory for each server/container the custom module jar can be replaced and the container will pick up the new version without a need to restart the server. Will this work? Does this mean the jar name needs to be the same or will it work with versioned named jars?
Maintain a duplicate/mirrored container envs so that one set of containers can be updated by properly removing the stream/job/modules and then bring up the environment up with the updated module version etc... (though this is expensive from a hardware perspective) basically doing a rolling upgrade of sorts
Any other ways?
An ancillary question might be about how easy is it to expose the version of the custom module being used by a given container?
Any thoughts would be appreciated.
Thanks,
Mark
There are two publishing instances and one is recently down. An advice is to start a clean publishing instance and let the sync happen automatically.
The situation is, two publishing instances are not clustered now and there are quite a few bundles installed.
My question is, if I try to start a clean publishing instance as advised, do I need to do anything to make it exactly the same as the running one? like the followings:
republish the pages
manually install OSGi bundles
configure publishing agent (if url and port number remains the same)
Anything is appreciated.
You're not far off in my opinion.
Some minor additions:
You don't need to install the site-specific osgi bundles manually,
you can replicate them (after configuring the replication agent) from
the author instance.
Re-Publish the pages using tree-activiation.
Suppose I deploy an Azure role supplying a service package and a service configuration. Then I change the configuration one or more times without redeploying the role.
Is it possible to get the initial configuration?
The RoleEnvironment API only reflects the current values.
You could handle the RoleEnvironment.Changing event and keep track of the configuration changes from there.
You can change the service configuration in a number of ways:
Using the management portal
Click on the deployment (it must in Ready state!)
Click on "Configure" - edit the configuration.
Using the Manamgement REST API's Change Deployment Configuration method.
If you go for second option, you can either create your own classes or use, for example this NuGet package.
However I don't think (I'm not aware of a method) you can get the initial service configuration once it has been changed.