VIFIB DESCENTRALIZED CLOUD COMPUTING

SlapOS is a decentralized Cloud Computing technology that can automate the deployment and configuration of applications in a heterogeneous environment.

How to release new Software Release version

This document explains the process to release new Software Release or new version of existing Software Release. Developers should follow it strictly and understand meaning of each step : not following it STRICTLY and/or not understanding will result in waste of time. Of course anybody is encouraged to propose improvements/simplifications.

Release Crimes

  1. A release cannot evolve. A release is FROZEN in time. IT SHOULD NOT BE ABLE TO EVOLVE. Thus the following golden rules:
    • Eggs must be pinned.
      Add How to here
    • Any repository must specify a fixed revision, such as a tag or a specific commit
      Add How to here
    • Any buildout .cfg file downloaded by buildout must have a corresponding md5sum
      Add How to here
    • Every resource must be cached in shacache. (porcess post release)
      Add How to here

Should you discover a new crime, make this list evolve.

Rationale

To develop any Software Release, we use, in slapos.git, a dedicated branch, created from "master" branch.

When work is finished, work can be merged to master, where we create a tag (i.e a snapshot of master).

Preparation

  1. When you want to create a new software release, you will first clone https://git.erp5.org/repos/slapos.git, and create a new branch from "master" branch. Each Software Release has its own branch. Development of this Software Release is made in this branch. We will take ERP5 as an example : https://git.erp5.org/gitweb/slapos.git/shortlog/refs/heads/erp5.
  2. Make sure software.cfg does not contain anything in [versions] except zc.buildout (and maybe some version of eggs you explicitly need),
  3. Use "extensions = buildout-versions" to generate list of versions of eggs when running buildout. It is now part of stack/slapos.cfg (you can extend it and simplify the profile).
  4. If you use an existing branch, please merge often master to your branch. The goal here is to have in your branch all that has been done into master since branch creation.

Parts below should be only done when the Software Release is considered as finished or ready to be released (i.e works in your branch) and master has been merged into the branch.

Release (recipe)

Only if you changed/added any recipe of slapos.cookbook (basically any file in the slapos/recipe directory)

Else, you can skip.

(Althought it is not recommended, you can also skip this if you WANT to use "develop", WITH PINNED git revision, in your stable profile. This is mostly the case for ERP5 only.)

  1. Ideally: Ask review of code on mailing/forum. Note that all new/changed recipes should be tested, even if only a few are currently covered.
  2. Merge your branch to master
  3. Release / ask release of new slapos.cookbook version

Test

From your branch:

  1. Remove any "develop=" related part. It will force to use published eggs.
  2. Test software release installation (ideally using "branch" version on Vifib). In the end of installation, buildout-versions will produce output of versions,
  3. Test instance
  4. Add versions produced by buildout-versions like in: http://git.erp5.org/gitweb/slapos.git/commit/9915f8582b4d09839838c78a6e7b9ba4670e7665,
  5. Add your ShaCache certificate like in: http://git.erp5.org/gitweb/slapos.git/commit/ee3012ffe67322e1087320d54773ac01387a450f,

Release (profile)

  1. Ask review of code on mailing/forum
  2. Merge to master
  3. At this point, unpinning can be done on branch side, so that Software Release on branch can use again latest available eggs. We say at this point that we "go back to develoment".
  4. Create new tag from master named slapos-XX (XX is the revision number)

Publish and add to automatic test system

  1. Add / ask to add your Software Release in the slapos.org Software Releases list
  2. The final Software Release has to be installed manually, once, by the developer in order to fill SHACache with all required files and to test everything went fine.
  3. Ask in forum to add your Software Release to the Test Agent list

FAQ

Question: Why do we have to pin version of eggs?

Answer: We have to make sure that only the specified version of eggs will be used. Otherwise, eggs can be updated after releasing the software, thus changing the wanted behavior of this software.

Question: Why can't we have pinned eggs when developping?

Answer: When developping, we ALWAYS want to use latest available versions of everything. It is the same for testing in "bleeding edge".

Question: Why can't we develop on master?

Answer: master branch has to be always a stable base to create new branches. Thus, only tested/reviewed commits can be merged to master.

Question: Can I develop on my own fork?

Anwser: Sure. It may allow you to rebase your commits before merging to have clean, readable history.

Improvements ideas

Pinning eggs should be done using webrunner.

slapos.git should be split in two different repository, one containing recipes, the other containing profiles.