blob: 7c4068396436425d4b9343a40cac1686efb028ca [file] [log] [blame]
Matteo Scandolo30fcab42022-03-31 15:51:24 -07001.. _jenkins_setup:
2
3How to setup a node for CI intergration
4=======================================
5
6*NOTE that this guide has only been tested with Jenkins, but we assume a similar
7set of tools would be required for different CI systems as well.*
8
9This page is intended to provide pointers to useful instructions
10that you need to setup your ``Jenkins`` executor and a list of tools install on it in order to
11run the automated tests using the ``ci-management`` pipelines that are used on the `OpenCORD Jenkins <https://jenkins.opencord.org/>`_
12
13.. _jenkins_node:
14
15Connect an executor to Jenkins
16------------------------------
17
18A good guide to do this can be found at `<https://devopscube.com/setup-slaves-on-jenkins-2/>`_.
19At ONF we setup one of the node in the Kubernetes cluster as Jenkins Agent, but that is not mandatory
20as long as ``kubectl`` installed on the Jenkins Agent can interact with the cluster.
21
22Prerequisites for this step are listed in the page, but reported here for your convenience:
23
24* Ubuntu (our executors use 20.04, other versions/distros might work as well but they have not been tested)
25* Java
26* A valid Linux user account that can perform the required tasks on the agent server.
27 (We suggest to use a dedicated ``jenkins`` user)
28
29Once the executor is setup in as a Jenkins Agent there are a few other tools that the pipeline
30will require in order to run the test cases:
31
32* Kubectl - `<https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/>`_
33* Helm - `<https://helm.sh/docs/intro/install/>`_
34* Kail - `<https://github.com/boz/kail>`_
35* Python3 - `<https://docs.python-guide.org/starting/install3/linux/>`_ (if you want to default ``python`` to ``python3``: `<https://webcache.googleusercontent.com/search?q=cache:uSzCWsWfCHsJ:https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux+&cd=3&hl=en&ct=clnk>`_)
36* pip3 - `<https://pip.pypa.io/en/latest/installation/>`_
37* virtualenv - `<https://bootstrap.pypa.io/get-pip.py>`_
38* repo - `<https://stackoverflow.com/questions/4350344/how-to-install-androids-repo-on-my-ubuntu-system>`_
39* sshpass
40* jq
41* make
42
43*NOTE that the tool without links are ``apt`` installable*