X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=docker%2FREADME.rst;h=3a979af25955c830f5a2b2fee783bf31a1817e66;hb=c5ad3fa5dcff60eb9108ed303806ff28b31a9c09;hp=8182b737f7ee15f0e2c1201db273a5dccaa70bd6;hpb=d8a24b76b0c1cf0c98e47397aa4d6f68ed271951;p=validation.git diff --git a/docker/README.rst b/docker/README.rst index 8182b73..3a979af 100644 --- a/docker/README.rst +++ b/docker/README.rst @@ -19,19 +19,117 @@ Overview ======== The Makefile in this directory is used to build and push all -the validation containers. The command to do that is: - make all REGISTRY= +the validation containers. The default registry is **akraino** on +dockerhub, but only CI jenkins slaves are authorized to push +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: + +.. 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: + +.. 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 + + +The postgresql container +================= + +Building and pushing the container +---------------------------------- + +To build just the postgresql container, use the command: + +.. code-block:: console + + make postgresql-build [ REGISTRY= NAME=] + 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 \ -/akraino_validation:k8s-latest /bin/sh +.. code-block:: console + + make postgresql [ REGISTRY= NAME=] + +Using the container +------------------- +If you want to deploy the container, you can run the corresponding deploy.sh script with the appropriate parameters. + +Example: + +.. code-block:: console + ./deploy.sh POSTGRES_PASSWORD=password + + +The ui container +================= + +Building and pushing the container +---------------------------------- + +To build just the ui container, you must first compile the ui project. +Then use the command: + +.. code-block:: console + + make ui-build [ REGISTRY= NAME=] + +To both build and push the container, use the command: + +.. code-block:: console + + make ui [ REGISTRY= NAME=] + +Using the container +------------------- +If you want to deploy the container, you can run the corresponding deploy.sh script with the appropriate parameters. +Note, that you must also build and run the postgresql container for a functional UI. + +Example: + +.. code-block:: console + ./deploy.sh postgres_db_user_pwd=password jenkins_url=http://192.168.2.2:8080 jenkins_user_name=name jenkins_user_pwd=jenkins_pwd jenkins_job_name=job1 nexus_results_url=https://nexus.akraino.org/content/sites/logs proxy_ip=172.28.40.9 proxy_port=3128