From: Cristina Pauna Date: Wed, 29 May 2019 13:43:15 +0000 (+0300) Subject: [docs] Document the changes to k8s container X-Git-Tag: 2.0.0~81^2 X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=validation.git;a=commitdiff_plain;h=5f161107acf9ccdfb0630fa8415789e52e5a8639 [docs] Document the changes to k8s container Document how to use the k8s contaier after the changes introduced by patch 674 JIRA: VAL-18 Signed-off-by: Cristina Pauna Change-Id: I9d99fd6f217b40b496b259629ebf5ad1ebcc6560 --- diff --git a/docker/README.rst b/docker/README.rst index ac1b926..456354f 100644 --- a/docker/README.rst +++ b/docker/README.rst @@ -25,18 +25,53 @@ images to that registry. If you want to push to your own test registry, set the REGISTRY variables as in the commands below. To build and push the images: - make all [ REGISTRY= ] + +.. code-block:: console + + make all [ REGISTRY= ] + To just build the containers, use the command: - make build-all [ REGISTRY= ] + +.. code-block:: console + + make build-all [ REGISTRY= ] The k8s container ================= +Building and pushing the container +---------------------------------- + To build just the k8s container, use the command: - make k8s-build [ REGISTRY= ] + +.. code-block:: console + + make k8s-build [ REGISTRY= ] + To both build and push the container, use the command: - make k8s [ REGISTRY= ] -Container should be started with the admin.conf file mounted: -docker run -ti -v /home/jenkins/admin.conf:/root/.kube/config \ -/validation:k8s-latest /bin/sh +.. code-block:: console + + make k8s [ REGISTRY= ] + +Using the container +------------------- + +The k8s image is meant to be ran from a server that has access to the +kubernetes cluster (jenkins slave, jumpserver, etc). + +Before running the image, copy the folder ~/.kube from your kubernetes +master node to a local folder (e.g. /home/jenkins/k8s_access). + +Container needs to be started with the kubernetes access folder mounted. +Optionally, the results folder can be mounted as well; this way the logs are +stored on the local server. + +.. code-block:: console + + docker run -ti -v /home/jenkins/k8s_access:/root/.kube/ \ + -v /home/jenkins/k8s_results:/opt/akraino/validation/results/ \ + akraino/validation:k8s-latest + +By default, the container will run the k8s conformance test. If you want to +enter the container, add */bin/sh* at the end of the command above