SDK Update Site

Chapters

  1. Abstract

1 Abstract

This Article describes, how the SDK Update Site works.

Productive Updates

Update Site

The URL to access the SDK Update Site is

https://secure.gentics.com/update/eclipse33/secure_site.xml This accesses the file

/var/www/ssl/update/eclipse33/secure_site.xml on secure.gentics.com, which is a PHP script and normally just returns the file

/var/www/ssl/update/eclipse33/live/secure_site.xml This file contains

URL setting to “/Portal.Node.License/license/downloads/eclipse33” The Category “Gentics Portal.Node SDK” The Feature “com.gentics.portalnode.sdk.feature” in the latest version (SDK Plugin) The Feature “com.gentics.portalnode.sdk.gep.feature” in the latest version (GEP Plugin) The URL setting will let the SDK download the plugins from URL

https://secure.gentics.com/Portal.Node.License/license/downloads/eclipse33/… which ensures that access is restricted to requests that contain a valid serial number.

The path /Portal.Node.License/ is forwarded to the Tomcat instance installed on

/opt/tomcat_secure via the configuration in files

/etc/apache2/sites-available/secure.gentics.com (JkMount) /etc/apache2/mods-available/jk.conf (workers.properties) /etc/libapache2-mod-jk/workers.properties (worker) LicenseServlet

The license servlet does

Check for valid serial number (if not provided, forward to https://secure.gentics.com/service/updates/?error=sn When the servlet path starts with /license/downloads, returns the requested file filename might be given as request parameter “filename” filename might be noted in path after “/license/downloads/…” filename is taken relative to configured downloadpath (/var/www/ssl/service/updates/downloads/) The downloadpath is configured in

/opt/tomcat_secure/webapps/Portal.Node.License/WEB-INF/licenseservlet.properties Testing

During the release process (see below), updating to the new plugin can be tested by setting the contents of the file

/var/www/ssl/update/eclipse33/enabletest.txt to “1”.

In this case, when accessing the update site URL from the Gentics IP address 78.142.159.226, the content of file

/var/www/ssl/update/eclipse33/test/secure_site.xml is returned (which contains the new version of the plugin feature) and the Update Site URL within is replace by

/Portal.Node.License/license/downloads/eclipse33_test/ Access from other IP addresses will still return the old SDK plugin.

Testing update site (new)

With the new release process, there is now also a testing update site. It is a copy of the productive update site in different paths:

/var/www/ssl/update/eclipse33_testing instead of /var/www/ssl/update/eclipse33

and

/var/www/ssl/service/updates/downloads/eclipse33_testing instead of /var/www/ssl/service/updates/downloads/eclipse33 Release Process (old)

In the release process, the SDK Update files are uploaded in file

dev6.office:/home/scripts/pn/dev4/release.sh (Method do_copyupdatefiles) The method is called with the following parameters

Name Description Value remotehost Remote Host asp-cms.gentics.com remoteuser User for accessing the Remote Host node remotedir Base directory for the update files /var/www/ssl/ Set permissions

The permissions on the remote server are set by remotely calling script

/home/scripts/pnrelease_setpermissions.sh Preparing remote directory structure

The remote directory structure for testing the Update Site is prepared by

cp -r $remotedir/update/eclipse33/live/ $remotedir/update/eclipse33/test/ cp -r $remotedir/service/updates/downloads/eclipse33 $remotedir/service/updates/downloads/eclipse33_test Merge new feature into secure_site.xml

The currently used secure_site.xml is downloaded via

scp secure.gentics.com:$remotedir/update/eclipse33/live/secure_site.xml /var/tmp/ and the new feature merged into the file via script

/home/scripts/pn/dev4/mergesitexml.pl Afterwards the new secure_site.xml is uploaded into the test directory.

Upload files to remote server

The update site files are uploaded into path

$remotedir/service/updates/downloads/eclipse33_test/ of the remote server.

Activate testing

Testing the new update site from the Gentics IP address is activated by remotely

echo 1 > $remotedir/update/eclipse33/enabletest.txt Moving to live update site

echo 0 > $remotedir/update/eclipse/enabletest.txt cd $remotedir/service/updates/downloads/ ; mv eclipse33 eclipse33_old ; mv eclipse_test eclipse33 ; rm -rf eclipse33_old cd $remotedir/update/eclipse33 ; mv live live_old ; mv test live ; rm -rf live_old Release Process (new)

The new release process of the SDK update site is performed with the script

dev6-jenkins:/home/scripts/gpn/updatesite/uploadupdatesite.sh and performs the same steps as described above.