Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Specificities of ONAP gating on Azure


As Azure has no OpenStack APIs, a small openstack instance using devstack (using DevStack Automatic Installation) is created near each worker.

Gating

View file
nameONAP-gerrit-2-gitlab.pdf
height250

View file
nameAzure_ONAP_Use.pptx
height250

Gating is built on top of "automatic deployment" seen before.

As for daily deployments, two chains in chained ci are created per gating environment (2 gating environment today):

  • Infrastructure deployment (Virtual Machines + Kubernetes + Platform services)
  • ONAP deployment and test

One of the difference is that first one will not trigger the second one.

Infrastructure deployment chain is meant to be performed once in a while (after ~100 days, artifacts are too old in gitlab and it must be reinstalled)

ONAP deployment and test chain is meant to be performed anytime a gate is ready to be launched.

As we have a limited number of platform and potentially a bigger number of gates to be performed, a queue system needs to be put in front.

At the time of creation of this gating system, no "out of the box" queue system was found (or understood, we never understood how to use zuul for example)

So the decision was made to create 4 μservices using a MQTT broker named mosquitto as messenging system:

  • Gerrit 2 MQTT : it will create topics / message for every event sent by Gerrit (via SSH)
  • MQTT 2 Gerrit : it will send comments (optionally with score) to a specific Gerrit review when a message is sent in a specific topic
  • Chained CI MQTT Trigger (master mode) : will listen to message on specific topics and queue them when they belongs to a wanted topic. Will resend them when a worker ask for a job
  • Chained CI MQTT Trigger (worker mode) : when free, will listen to message on specific topics and launch a gate (if elected) when receiving one. Will ask for Job every xx seconds when free

Some details are given in the but this is how it's done in the two "main" cases:

Workers are free

  1. A new patchset is created on a watched repo (OOM for example)
  2. Gerrit2MQTT create a message on /onap/oom/patchset-created
  3. Chained CI MQTT Trigger Master reads the message and put it in internal queue
  4. Worker is free and propose to use
  5. Master will acknowledge and remove the message from the queue
  6. Worker will start a chained ci and wait for completion. According to the completion status, it will retrieve failed jobs and abstract messages
  7. Worker will send them to gerrit notification topic
  8. MQTT 2 Gerrit will see the message, retrieve Gerrit number and Patchset number and upload the message

Workers are not free

  1. A new patchset is created on a watched repo (OOM for example)
  2. Gerrit2MQTT create a message on /onap/oom/patchset-created
  3. Chained CI MQTT Trigger Master reads the message and put it in internal queue
  4. Later, a worker is free and send a message to its master to announce it can take a job
  5. Master dequeues the oldest message and resend it
  6. Worker proposes to use
  7. Master acknowledges and removes the message from the queue
  8. Worker starts a chained ci and wait for completion. According to the completion status, it retrieves failed jobs and abstract messages
  9. Worker sends abstract and failed job list gerrit notification topic
  10. MQTT 2 Gerrit will see the message, retrieve Gerrit number and Patchset number and upload the message
  11. Worker announces it's free

Current deployments

All Gating μservices are deployed on Azure ONAP "gating" kubernetes (alongside with a nexus)

Each gating system has a Chained CI MQTT Trigger worker μs.

One Chained CI MQTT Trigger master is created (we can have several that would monitor different repos / have different workers)TBD