upgrade kura installation without losing configuration - osgi

I'm currently running Kura 1.1.1 on a beagle bone black running debian linux with some custom packages and some altered configuration.
I would like to upgrade to the latest Kura release without losing the configuration and packages.
How do you upgrade while maintaining the state of a kura installation?

AFAIK there is not an official way to do this yet.
You can backup the following files and include them again after upgrading:
data/snapshots/snapshot_14xxx.xml this is the file containing your bundles' configuration. Most recent changes have a higher timestamp.
kura/dpa.properties this files contains a list of deployed Deployment Packages, installed through web-ui or DEPLOY-V1 cloudlet.
*.dp the actual Deployment Packages installed.
If you manually added jars or edited start scripts, you must copy/edit them again
Depending on how you upgrade, you may or may not have the previous installation deleted. Shell script installer for example changes /opt/eclipse/kura/ symlink to the version it installs, without deleting the old one.

Related

Installing two different yt versions in two different directories

I am using yt 3.1 on a cluster and the current version is installed in a directory /work/../../sw/yt-3.1/yt-x86_64/bin/yt , now I would like to try the new version 3.3.1 but I still want to use the older version in parallel to compare. Please let me know what is the procedure to get a different version in a different directory.
Just run the latest version of the install script in a folder like /work/../../sw/yt-3.3. The install script creates an isolated environment that is entirely contained in the installation folder.
Keep in mind that the install script was updated for yt 3.3 to build a conda environment by default. This makes the install script run much more quickly and is also more robust on most machines, particularly ones with old or nonexistent OpenSSL installs. If you want to make the install script build everything from source like it did for yt 3.1, set INST_YT_SOURCE=1 and INST_CONDA=0 in the install script.

How to uninstall old OSGI bundle version upon installation of a new version?

I am using the CQ Blueprints maven archetype for Adobe CQ to deploy OSGi bundles into CQ5.6.1. This archetype uses the Maven Sling Plugin to deploy the bundles by copying them into an install directory of my content repository.
I am changing the version numbers of my bundles upon every build using the maven versions plugin. Therefore, upon each deployment, a bundle jar with a new filename is installed, like commons-services-1.0.30.jar. My problem is, currently the older bundle versions, like commons-services-1.0.29.jar, are not removed upon installation of a newer version.
I would like to avoid old bundle versions piling up in my install folders. Therefore my question is: What is the best way to uninstall/delete these older versions upon installation of a new version?
Bundles piling up in an install folder are not really a problem - they will only use the space, but they are ignored by the Apache Sling OSGI installer that CQ uses to detect and install the bundles. The installer only considers the latest version of the bundle (based on its OSGi version header), and ignores older versions.
If you really want to remove the older bundle files, best is probably to create a small tool that finds them by walking the JCR tree under which they are installed (/apps I assume), and delete all but the latest version. If the bundle filenames consistently include the version number you can probably just sort their names with the right comparator and remove all but the last one. If you want to be really robust you'll need to read the bundle metadata to find out about its version number.
If you want to run your tool automatically at regular intervals you could register an OSGi EventHook to detect when new bundles are installed, and trigger a cleanup run when that happens.
Sorry if this sounds a bit complicated - but again leftover bundle files are not really problematic.
I solved the problem by configuring the filter.xml in my myproject-all module (see CQBlueprints description for the purpose of this module) to delete the contents of my bundle install folder. This way, old bundles are always deleted before new bundles are installed.
To delete the contents of my install folder, I added the following line to my filter.xml file:
<filter root="/apps/myapp/install">
use curl command to delete the specific bundle version.
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Edit: Removed purging as that was not applicable to the osgi bundle.

How to create upgrade package using iceberg for mac

I have created a installation package for mac os x using iceberg, which was successful and working fine.
But i have many version of my application.
So My question is how to make a upgrade package using iceberg?,
During upgrade some of the directories inside the installation directory should be untouched(not to be replaced)
In your installer, leave out the directories which shouldn't be touched and they will be ignored. I've noticed that existing directories and files not targeted with changed/added bits aren't touched.

Eclipse crashed, files got corrupted, now I can't install or uninstall EGit plugin

I am trying to configure Eclipse for Windows to meet my workplace's requirements, and in doing so the program ran out of memory and crashed. I am trying again with a fresh install (deleted all files I could find related to Eclipse and recopied).
I have a Git perspective available, but it is completely blank. Git is not listed in my current plugins, and not present in my plugins folder that I can find. If I try to install it, however, I am told it already exists.
Eclipse Version: 3.6.2
EGit Version: 1.1.0.201109151100-r
You can usually fix a lot of problems like this by doing a
$ eclipse -clean
You may have to add this to your eclipse.ini file.
If this doesn't work, start from a clean install (the eclipse directory & the workspace).

How do I manually install an old cygwin package?

A project I am working on requires an old version of SLAPD (the LDAP
server) and must run on Windows, hence I am using cygwin packages:
I've found a binary package of slapd version I need 2.2.x here:
http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/release/...
How do I manually install it in cygwin? It does not seem to be a package-manager file format (like an RPM or a Deb), but is there a tool to install it for me?
FYI, I'm operating behind a corporate firewall that prevents me from viewing the main cygwin site (including the documentation), so please nobody tell me to RTFM - I wish I could!
Thanks
If you need an older version, the Cygwin time machine might help. To use it, I had to invoke setup.exe from the command line, giving it the --no-verify/-X option and it still wouldn't let me downgrade the "cygwin" package itself but at least it is, albeit very slowly, allowing me to install the version I wanted to test as a parallel installation.
If you are using the cygwin package installer to install this package, usually if you select to view the full info and scroll to the package you need you will see some info about the version.
Now if you click on the version number you will see that it changes from the oldest in the repository to the current. If your repository has the version you need then just finish the wizard.
Some cygwin mirrors keep old package files, for example, http://mirror.isoc.org.il/pub/cygwin/
You can use Sonatype nexus to mirror an existing cygwin repository, but provide your own setup.ini .
Copy the already downloaded repo content to c:\progs\nexus\sonatype-work\nexus\storage\mirror.isoc.org.il-pub-cygwin\
Put your own setup.ini and setup.bz2 there.
Start setup.exe with --no-verify
Paste
http://localhost:8081/nexus/content/repositories/mirror.isoc.org.il-pub-cygwin/
into the mirror selection box and click "Add"

Resources