User Tools

Site Tools


devel:controller

Controller developer's guide

  • Stable versions are usually released at the begining of each month. So last week is reserved for fixing issues/bugs and its recommended not adding new features.
  • New features are planned to be merged into master during the first weeks of the month.
  • For testing purposes, using the VCT is recommended.

Repository branches description

  • master: this is the main branch of the project.
    • Use this branch to merge the new feautures developed (previously tested)
    • The stable releases will be tagged usig git-tags.
  • stable/version: these are the stable release branches.
    • Use this branch to publish minor releases (e.g. both 0.11.7 and 0.11.8 go to stable/0.11.x).
    • Create a new branch to publish major releases (e.g. version 1.1 goes to a new branch stable/1.1.x)
  • private developer branches:
    • It would be a good practice for each developer to make changes on a private branch before merging with testing.
    • This branch should be tested by yourself and, better, by another developer before being merged into master.

Project design, structure and modules

Confine-controller is based on Django framework, description about its design and structure is on Design, Structure and Coding of the Server Software article.

Controller is split into several applications which encapsulate functionalities.

How to release a new version of the confine-controller

During the development of a new release:

  • Create database schema migrations
    python manage.py schemamigration app_name --auto
  • Other kinds of migrations go to postupgradecontroller.py, which is executed automatically during upgradecontroller. You can define PRE and POST upgrade operations and general or version specific (see examples at the code).
  • Update the release notes

When there are some new functionalities, a new released can be planned, but before:

  1. Check tests results.
  2. Upgrade your pre-production server to master
    python manage.py upgradecontroller --controller_version dev
  3. Run the tests against this server and check that are working properly.

If everything works on the previous steps, you can upload the new packet to pypi:

  1. Increment confine-controller version number at controller/init.py
  2. Run
    python setup.py sdist upload

Finally upgrade the production server

python manage.py upgradecontroller

Also updating the confine-controller version at VCT server can be done at confine-utils/utils/vct/vct.conf.default

Testing

Tests: unittests (Django) + API & integration tests (confine-testing).

XXX TODO XXX

Initialize database (datamigrations)

XXX TODO XXX

devel/controller.txt · Last modified: 2015/06/17 16:24 by santiago