Jump to: navigation, search

Difference between revisions of "XenServer/XenServer CI/AdminTips"

(TODO list)
(Re-firmatted and added some additional information)
Line 1: Line 1:
== Status ==
+
===== Status =====
  
 
http://f0ab4dc4366795c303a0-8fd069087bab3f263c7f9ddd524fce42.r22.cf1.rackcdn.com/ci_status/results.html
 
http://f0ab4dc4366795c303a0-8fd069087bab3f263c7f9ddd524fce42.r22.cf1.rackcdn.com/ci_status/results.html
  
== XenServer CI Admin Tips ==
+
== Main box ==
 +
This is the instance which orchestrates the execution of tests.
  
Auth is via ssh-keys, please request access in the XenAPI team meeting, if you want to help.
+
* Authentication via ssh keys. For access, join the XenAPI team meeting on IRC.
 
+
* All the components are deployed to this instance.
Main box:
 
 
* 166.78.153.192
 
* 166.78.153.192
 
* created via jenkins job at Citrix
 
* created via jenkins job at Citrix
* ?? BobBall to send johnthetubaguy an example
 
  
Services that should be running:
+
=== openstack-citrix-ci ===
* citrix-ci-gerritwatch: Watches the gerrit stream and adds jobs to the queue
+
* source code: https://github.com/citrix-openstack/openstack-citrix-ci
** Logs: /var/log/citrix-ci-gerritwatch.log
+
* branch: master
** (Re)start: (re)start citrix-ci-gerritwatch
+
* cloned to: /root/src/openstack-citrix-ci/
* citrix-ci: Progresses jobs through the lifecycle (see below)
+
 
** Logs: /var/log/citrix-ci.log
+
* to update:
** (Re)start: (re)start citrix-ci
+
** Stop all its services
** three threads:
+
cd /root/src/openstack-citrix-ci
*** main (run through state machine, see below)
+
git pull
*** collect results (long blocking process, so its split out so main stuff makes progress -- service net?)
+
pip install -e .
*** delete node (go to collected, delete is a pain, tries upto to 10 mins, need to fix the delete process!!!!!)
+
** Start the required services
* nodepool: Provisions VMs to use in the tests
+
 
** Logs: /var/log/nodepool/nodepool.log,  /var/log/nodepool/debug.log
+
* configuration file: /root/osci.config
** (Re)start: killall nodepool; rm /var/run/nodepool/nodepool.pid; start nodepool
+
 
 +
==== service: citrix-ci-gerritwatch ====
 +
This service watches the gerrit stream and adds jobs to the queue
 +
* Logs: /var/log/citrix-ci-gerritwatch.log
 +
* (Re)start: (re)start citrix-ci-gerritwatch
  
There are some bin files here:
+
==== service: citrix-ci ====
 +
This service progresses jobs through the lifecycle (see below)
 +
* Logs: /var/log/citrix-ci.log
 +
* (Re)start: (re)start citrix-ci
 +
 
 +
* three threads:
 +
** main (run through state machine, see below)
 +
** collect results (long blocking process, so its split out so main stuff makes progress -- service net?)
 +
** delete node (go to collected, delete is a pain, tries up to to 10 mins, need to fix the delete process!!!!!)
 +
 
 +
==== Utilities ====
 
* osci-check-connection
 
* osci-check-connection
 
** checks to node, to xenserver, then logs uploaded to swift from both
 
** checks to node, to xenserver, then logs uploaded to swift from both
Line 48: Line 61:
 
* osci-view
 
* osci-view
 
** prints out the job DB in useful ways
 
** prints out the job DB in useful ways
 
  
 
To report status:
 
To report status:
 
* osci-view is called and content uploaded to swift
 
* osci-view is called and content uploaded to swift
 
* /src/openstack-citrix-ci/upload-ci-status
 
* /src/openstack-citrix-ci/upload-ci-status
 +
 +
=== nodepool ===
 +
* source code: https://github.com/citrix-openstack/nodepool
 +
* branch: master
 +
* cloned to: /root/src/nodepool
 +
* configuration file: /etc/nodepool/nodepool.yaml
 +
 +
==== service: nodepool ====
 +
Provisions VMs to use in the tests
 +
* Logs: /var/log/nodepool/nodepool.log,  /var/log/nodepool/debug.log
 +
* (Re)start: killall nodepool; rm /var/run/nodepool/nodepool.pid; start nodepool
 +
 +
==== Utilities ====
 +
This could be used to get information/control the nodepool service.
 +
* To list the images:
 +
nodepool image-list
 +
  
 
==Useful commands==
 
==Useful commands==
Line 105: Line 134:
 
* create system to construct dev environments
 
* create system to construct dev environments
 
* trial out neutron based tests (with quark?)
 
* trial out neutron based tests (with quark?)
 +
* BobBall to send johnthetubaguy an example on how to deploy the Main Box

Revision as of 12:22, 30 September 2014

Status

http://f0ab4dc4366795c303a0-8fd069087bab3f263c7f9ddd524fce42.r22.cf1.rackcdn.com/ci_status/results.html

Main box

This is the instance which orchestrates the execution of tests.

  • Authentication via ssh keys. For access, join the XenAPI team meeting on IRC.
  • All the components are deployed to this instance.
  • 166.78.153.192
  • created via jenkins job at Citrix

openstack-citrix-ci

  • to update:
    • Stop all its services
cd /root/src/openstack-citrix-ci
git pull
pip install -e .
    • Start the required services
  • configuration file: /root/osci.config

service: citrix-ci-gerritwatch

This service watches the gerrit stream and adds jobs to the queue

  • Logs: /var/log/citrix-ci-gerritwatch.log
  • (Re)start: (re)start citrix-ci-gerritwatch

service: citrix-ci

This service progresses jobs through the lifecycle (see below)

  • Logs: /var/log/citrix-ci.log
  • (Re)start: (re)start citrix-ci
  • three threads:
    • main (run through state machine, see below)
    • collect results (long blocking process, so its split out so main stuff makes progress -- service net?)
    • delete node (go to collected, delete is a pain, tries up to to 10 mins, need to fix the delete process!!!!!)

Utilities

  • osci-check-connection
    • checks to node, to xenserver, then logs uploaded to swift from both
  • osci-manage
    • what citrix-ci service runs
    • runs main lifecycle
    • can also manually add a job to the queue
  • osci-upload
    • upload logs from local host directory up to swift
    • called from osci-manage (via python not cli)
  • osci-watch-gerrit
    • what citrix-ci-gerrit-watch runs
    • reads gerrit stream and adds jobs to DB
  • osci-create-dbschema
    • creates job DB
  • osci-run-tests
    • e.g. osci-run-tests print user host ref
    • calls out to host to run tests
    • used (via python not cli) by osci-manage
  • osci-view
    • prints out the job DB in useful ways

To report status:

  • osci-view is called and content uploaded to swift
  • /src/openstack-citrix-ci/upload-ci-status

nodepool

service: nodepool

Provisions VMs to use in the tests

  • Logs: /var/log/nodepool/nodepool.log, /var/log/nodepool/debug.log
  • (Re)start: killall nodepool; rm /var/run/nodepool/nodepool.pid; start nodepool

Utilities

This could be used to get information/control the nodepool service.

  • To list the images:
nodepool image-list


Useful commands

  • osci-view list: Gives current queue, what is running etc. Shouldn't have jobs in here that are 'older' than 2 hours unless they are 'Finished'.
  • nodepool list: Gives a list of the currently available nodes. Should have some nodes that are 'Ready' or 'Building'
  • eval `ssh-agent`; ssh-add ~/.ssh/citrix_gerrit; osci-manage -c 12345/1; ssh-agent -k: Queue job 12345, patchset 1

VM lifecycle

  • Queued -> Running: citrix-ci job has got a new node from nodepool (nodepool list will show it as 'held') does osci-run-tests to hand over to xenapi-os-testing
  • Running -> Collecting: Job has finished; citrix-ci has changed state to Collecting - waiting on log collection thread
  • Collecting -> Collected: Log collection thread has posted logs to swift and updated job with logs URL
  • Collected -> Finished: Citrix-ci has posted to gerrit and the job is now complete
  • <anything> -> Obsolete: a new job for the same change (recheck or new patchset) has been added

Code

Node pool

Currently using master branch of nodepool:

Configuration is here:

  • /etc/nodepool/nodepool.yaml

It is all installed using this script:

The ssh-keys given to created xenserver boxes are configured in the jenkins job that runs the above script to create the xenserver-ci box.

To see how its all doing, run this command:

  • nodepool list

To claim a node, you can do:

  • nodepool hold id

Above CI scripts do that via a python interface to claim workers from nodepool.

TODO list

  • start using stackforge http://git.openstack.org/cgit/stackforge/xenapi-os-testing/
  • reduce number of excluded tests, using above stackforge integration
  • stop forking infra projects, where possible
  • consider moving to zuul, talk to turbo hipster folks
  • create new environment to test out config changes
  • create system to construct dev environments
  • trial out neutron based tests (with quark?)
  • BobBall to send johnthetubaguy an example on how to deploy the Main Box