[wpkg-users] test packages upgrades

Fabrice Flore-Thebault themroc at centsix.org
Mon Dec 21 12:41:10 CET 2009


On Sunday 20 December 2009 09:44:08 Andrea Zagli wrote:
> how can i do to test packages upgrades on only one test machine before
> to propagate the upgrade to all others production machines?

Here's an adapted version of the procedure i used in some company :

We use a centralised version control, virtual boxes as test environment and 
have a wpkg-start.bat for network deployment and a wpkg-start-local.bat for 
the local deployment on testing environments (virtualboxes).

WPKG management
I. Version control

WPKG files are stored under version control in this subversion repository:

https://svn.wondefulcompany.com/wpkg

Some files are not under version control as they are volatile :

   1. all files in the clientStates directory
   2. hosts/hosts.xml is generated on production every 5 minutes by 
hosts\generate_hosts_xml.vbs (list every machine with organizational unit 
information from the active directory)

II. Use a testing environment to prepare updates

You should prepare any modification in a testing environment.

   1. (first time only) create a working copy of the project in c:\wpkg :
         1. svn co https://svn.wondefulcompany.com/wpkg/trunk c:\wpkg
   2. if the working copy already exists, do an update
         1. svn update
   3. execute the script which generate the file with hosts information
         1. C:\wpkg\hosts\generate_hosts_xml.vbs
   4. verify that the hosts file has been generated
         1. C:\wpkg\hosts\hosts.xml
   5. make the modifications 
         1. upgrade WPKG core see chapter III.
         2. upgrade/add software package see chapter IV.
   6. test your modifications executing wpkg-start-local.bat
         1. c:\wpkg\wpkg-start-local.bat
         2. lookup at errors in the console
   7. when test is validated, commit your changes, and explain in comment what 
you have done
         1. svn commit c:\wpkg -m "your comment explaining what has been done"
   8. test on every platform supported : 
         1. XP,
         2. Vista (32bit), 
         3. Seven (64bit)
   9. when all tests are validated, update the production environment at 
\\deploy\wpkg
         1. svn up \\deploy\wpkg
  10. test again on the production environment
         1. \\deploy\wpkg\wpkg-start.bat
         2. lookup at errors in the event viewer

III. Upgrade the WPKG core itself

Get the new release of WPKG at http://wpkg.org/

Some configuration files are WonderfulCompany specific and should not be modified:

   1. hosts/*
   2. packages/*
   3. profiles/*
   4. software/*
   5. config.xml
   6. hosts.xml
   7. packages.xml
   8. profiles.xml
   9. wpkg-start.bat

Some files might be upgraded but you should take care of the modifications mades 
at WonderfulCompany :

   1. config.xml

In other words, from the distribution files you will surely only upgrade these 
files :

   1. documents/*
   2. tools/*
   3. xsd/*
   4. wpkg.js
   5. currently unexistent new files and directories that might come with a new 
release of WPKG

IV. Upgrade or add a software in WPKG

   1. get the new software binary
   2. in c:\wpkg\software\packagename\
         1. put the new binary
         2. delete the old binary
   3. edit the c:\wpkg\packages\packagename.xml file according to the new 
installation procedure
         1. you can get an idea of the modifications to be done using the ready 
made silent installers at http://wpkg.org/Category:Silent_Installers
         2. you are encouraged to update the WPKG wiki if it has not already 
be done by someone else
         3. try to use same formating rules as existing to give more 
readability
   4. test the deployment on every architecture that is supported 
(current: XP, Vista) and in every situation (install, upgrade).
         1. XP, install
         2. XP, upgrade
         3. Vista, install
         4. Vista, upgrade
         5. Seven, install
         6. Seven, upgrade

V. WPKG service configuration on production (emawds)
Working copy on \\deploy\wpkg created and updated  from your desktop :

The subversion client is not installed on the server, use the client from your 
desktop.

   1. First installation was :
         1. svn co https://svn.wonderfulcompany.com/wpkg/trunk \\deploy\wpkg
   2. Update the production after tests :
         1. svn up \\deploy\wpkg

Scheduled task on deploy :

One scheduled task is updating the hosts file every 5 minute using the script 
D:\wpkg\hosts\generate_hosts_xml.vbs. 

   1. The user wpkghostgenerator should have write rights on D:
\wpkg\hosts\hosts.xml
   2. Configuration of the scheduled task :
         1. Run: D:\wpkg\hosts\generate_hosts_xml.vbs
         2. Start in : D:\wpkg\hosts
         3. Run as : wpkghostgenerator

Active Directory GPO configuration :

WPKG is launched by a startup script every time a computer is starting. This 
startup script is definined by a Group Policy Object (GPO).

   1. GPO named "wpkg-deployment" on the following OU: 
wonderfulcompany.com\Computers\wpkg
         1. in Active Directory management tool, select the OU: 
wonderfulcompany.com > Computers > wpkg
         2. right click > properties > Group Policy : wpkg-deployment : Edit
         3. wpkg-deployment > Computer Configuration > Windows Settings > 
Scripts : Startup : right click : Properties
         4. Edit script > Script Name : \\deploy\wpkg\wpkg-start.bat
   2. attribution of softwares depends on profiles linked with the OU of the 
computers :
         1. all : every installable packages ; for testing machines
         2. default : default profile
         3. developer : for developers
         5. pm : for project and account managers
         6. purge : doesn't install any package      

-- 
Fabrice Flore-Thébault



More information about the wpkg-users mailing list