1 .. ############################################################################
2 .. Copyright (c) 2019 AT&T, ENEA AB, Nokia and others #
4 .. Licensed under the Apache License, Version 2.0 (the "License"); #
5 .. you maynot use this file except in compliance with the License. #
7 .. You may obtain a copy of the License at #
8 .. http://www.apache.org/licenses/LICENSE-2.0 #
10 .. Unless required by applicable law or agreed to in writing, software #
11 .. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
12 .. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
13 .. See the License for the specific language governing permissions and #
14 .. limitations under the License. #
15 .. ############################################################################
21 The Makefile in this directory is used to build and push all
22 the validation containers. The default registry is **akraino** on
23 dockerhub, but only CI jenkins slaves are authorized to push
24 images to that registry. If you want to push to your own test registry, set
25 the REGISTRY variables as in the commands below.
27 To build and push the images:
29 .. code-block:: console
31 make all [ REGISTRY=<dockerhub_registry> ]
33 To just build the containers, use the command:
35 .. code-block:: console
37 make build-all [ REGISTRY=<dockerhub_registry> ]
42 Building and pushing the container
43 ----------------------------------
45 To build just the k8s container, use the command:
47 .. code-block:: console
49 make k8s-build [ REGISTRY=<dockerhub_registry> ]
51 To both build and push the container, use the command:
53 .. code-block:: console
55 make k8s [ REGISTRY=<dockerhub_registry> ]
60 The k8s image is meant to be ran from a server that has access to the
61 kubernetes cluster (jenkins slave, jumpserver, etc).
63 Before running the image, copy the folder ~/.kube from your kubernetes
64 master node to a local folder (e.g. /home/jenkins/k8s_access).
66 Container needs to be started with the kubernetes access folder mounted.
67 Optionally, the results folder can be mounted as well; this way the logs are
68 stored on the local server.
70 .. code-block:: console
72 docker run -ti -v /home/jenkins/k8s_access:/root/.kube/ \
73 -v /home/jenkins/k8s_results:/opt/akraino/validation/results/ \
74 akraino/validation:k8s-latest
76 By default, the container will run the k8s conformance test. If you want to
77 enter the container, add */bin/sh* at the end of the command above
80 The postgresql container
83 Building and pushing the container
84 ----------------------------------
86 To build just the postgresql container, use the command:
88 .. code-block:: console
90 make postgresql-build [ REGISTRY=<dockerhub_registry> NAME=<image_name>]
92 To both build and push the container, use the command:
94 .. code-block:: console
96 make postgresql [ REGISTRY=<dockerhub_registry> NAME=<image_name>]
100 If you want to deploy the container, you can run the corresponding deploy.sh script with the appropriate parameters.
104 .. code-block:: console
105 ./deploy.sh POSTGRES_PASSWORD=password
111 Building and pushing the container
112 ----------------------------------
114 To build just the ui container, you must first compile the ui project.
115 Then use the command:
117 .. code-block:: console
119 make ui-build [ REGISTRY=<dockerhub_registry> NAME=<image_name>]
121 To both build and push the container, use the command:
123 .. code-block:: console
125 make ui [ REGISTRY=<dockerhub_registry> NAME=<image_name>]
129 If you want to deploy the container, you can run the corresponding deploy.sh script with the appropriate parameters.
130 Note, that you must also build and run the postgresql container for a functional UI.
134 .. code-block:: console
135 ./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