75af1bb520c371b8ca13ba0810dcd3d382ce140a
[functest.git] / docs / testing / user / configguide / configguide.rst
1 .. SPDX-License-Identifier: CC-BY-4.0
2
3 Installation and configuration
4 ==============================
5
6 Alpine containers have been introduced in Euphrates.
7 Alpine allows Functest testing in several very light containers and thanks to
8 the refactoring on dependency management should allow the creation of light and
9 fully customized docker images.
10
11
12 Functest Dockers for OpenStack deployment
13 -----------------------------------------
14 Docker images are available on the dockerhub:
15
16   * opnfv/functest-core
17   * opnfv/functest-healthcheck
18   * opnfv/functest-smoke
19   * opnfv/functest-smoke-cntt
20   * opnfv/functest-benchmarking
21   * opnfv/functest-benchmarking-cntt
22   * opnfv/functest-vnf
23
24
25 Preparing your environment
26 ^^^^^^^^^^^^^^^^^^^^^^^^^^
27
28 cat env::
29
30   DEPLOY_SCENARIO=XXX  # if not os-nosdn-nofeature-noha scenario
31   NAMESERVER=XXX  # if not 8.8.8.8
32   EXTERNAL_NETWORK=XXX # if not first network with router:external=True
33   DASHBOARD_URL=XXX  # else tempest_horizon will be skipped
34   NEW_USER_ROLE=XXX # if not member
35   SDN_CONTROLLER_IP=XXX  # if odl scenario
36   VOLUME_DEVICE_NAME=XXX  # if not vdb
37   FLAVOR_EXTRA_SPECS=hw:mem_page_size:large    # if fdio scenarios
38
39 See section on environment variables for details.
40
41 cat env_file::
42
43   export OS_AUTH_URL=XXX
44   export OS_USER_DOMAIN_NAME=XXX
45   export OS_PROJECT_DOMAIN_NAME=XXX
46   export OS_USERNAME=XXX
47   export OS_PROJECT_NAME=XXX
48   export OS_PASSWORD=XXX
49   export OS_IDENTITY_API_VERSION=3
50   export OS_REGION_NAME=XXX
51
52 See section on OpenStack credentials for details.
53
54 Create a directory for the different images (attached as a Docker volume)::
55
56   mkdir -p images && wget -q -O- https://git.opnfv.org/functest/plain/functest/ci/download_images.sh | bash -s -- images && ls -1 images/*
57
58   images/cirros-0.4.0-aarch64-disk.img
59   images/cirros-0.4.0-x86_64-disk.img
60   images/cloudify-docker-manager-community-19.01.24.tar
61   images/Fedora-Cloud-Base-30-1.2.x86_64.qcow2
62   images/shaker-image-1.3.0+stretch.qcow2
63   images/ubuntu-14.04-server-cloudimg-amd64-disk1.img
64   images/ubuntu-14.04-server-cloudimg-arm64-uefi1.img
65   images/ubuntu-16.04-server-cloudimg-amd64-disk1.img
66   images/vyos-1.1.8-amd64.qcow2
67
68 Testing healthcheck suite
69 ^^^^^^^^^^^^^^^^^^^^^^^^^
70
71 Run healthcheck suite::
72
73   sudo docker run --env-file env \
74       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
75       -v $(pwd)/images:/home/opnfv/functest/images \
76       opnfv/functest-healthcheck
77
78 Results shall be displayed as follows::
79
80   +--------------------------+------------------+---------------------+------------------+----------------+
81   |        TEST CASE         |     PROJECT      |         TIER        |     DURATION     |     RESULT     |
82   +--------------------------+------------------+---------------------+------------------+----------------+
83   |     connection_check     |     functest     |     healthcheck     |      00:03       |      PASS      |
84   |      tenantnetwork1      |     functest     |     healthcheck     |      00:05       |      PASS      |
85   |      tenantnetwork2      |     functest     |     healthcheck     |      00:06       |      PASS      |
86   |         vmready1         |     functest     |     healthcheck     |      00:06       |      PASS      |
87   |         vmready2         |     functest     |     healthcheck     |      00:08       |      PASS      |
88   |        singlevm1         |     functest     |     healthcheck     |      00:32       |      PASS      |
89   |        singlevm2         |     functest     |     healthcheck     |      00:37       |      PASS      |
90   |        vping_ssh         |     functest     |     healthcheck     |      00:46       |      PASS      |
91   |      vping_userdata      |     functest     |     healthcheck     |      00:39       |      PASS      |
92   |       cinder_test        |     functest     |     healthcheck     |      01:05       |      PASS      |
93   |      tempest_smoke       |     functest     |     healthcheck     |      05:39       |      PASS      |
94   |     tempest_horizon      |     functest     |     healthcheck     |      01:05       |      PASS      |
95   |           odl            |     functest     |     healthcheck     |      00:00       |      SKIP      |
96   +--------------------------+------------------+---------------------+------------------+----------------+
97
98 NOTE: the duration is a reference and it might vary depending on your SUT.
99
100 Testing smoke suite
101 ^^^^^^^^^^^^^^^^^^^
102
103 Run smoke suite::
104
105   sudo docker run --env-file env \
106       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
107       -v $(pwd)/images:/home/opnfv/functest/images \
108       opnfv/functest-smoke
109
110 Results shall be displayed as follows::
111
112   +---------------------------+------------------+---------------+------------------+----------------+
113   |         TEST CASE         |     PROJECT      |      TIER     |     DURATION     |     RESULT     |
114   +---------------------------+------------------+---------------+------------------+----------------+
115   |      tempest_neutron      |     functest     |     smoke     |      15:30       |      PASS      |
116   |       tempest_cinder      |     functest     |     smoke     |      02:01       |      PASS      |
117   |      tempest_keystone     |     functest     |     smoke     |      01:17       |      PASS      |
118   |        tempest_heat       |     functest     |     smoke     |      22:14       |      PASS      |
119   |     tempest_telemetry     |     functest     |     smoke     |      00:00       |      SKIP      |
120   |        rally_sanity       |     functest     |     smoke     |      17:24       |      PASS      |
121   |      refstack_compute     |     functest     |     smoke     |      07:03       |      PASS      |
122   |      refstack_object      |     functest     |     smoke     |      02:09       |      PASS      |
123   |     refstack_platform     |     functest     |     smoke     |      07:31       |      PASS      |
124   |        tempest_full       |     functest     |     smoke     |      41:52       |      PASS      |
125   |      tempest_scenario     |     functest     |     smoke     |      08:42       |      PASS      |
126   |        tempest_slow       |     functest     |     smoke     |      43:42       |      PASS      |
127   |          patrole          |     functest     |     smoke     |      02:42       |      PASS      |
128   |      tempest_barbican     |     functest     |     smoke     |      02:30       |      PASS      |
129   |      tempest_octavia      |     functest     |     smoke     |      00:00       |      SKIP      |
130   +---------------------------+------------------+---------------+------------------+----------------+
131
132 Note: if the scenario does not support some tests, they are indicated as SKIP.
133 See User guide for details.
134
135 Testing smoke CNTT suite
136 ^^^^^^^^^^^^^^^^^^^^^^^^
137
138 Run smoke-cntt suite::
139
140   sudo docker run --env-file env \
141       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
142       -v $(pwd)/images:/home/opnfv/functest/images \
143       opnfv/functest-smoke-cntt
144
145 Results shall be displayed as follows::
146
147   +-------------------------------+------------------+---------------+------------------+----------------+
148   |           TEST CASE           |     PROJECT      |      TIER     |     DURATION     |     RESULT     |
149   +-------------------------------+------------------+---------------+------------------+----------------+
150   |      tempest_neutron_cntt     |     functest     |     smoke     |      11:35       |      PASS      |
151   |      tempest_cinder_cntt      |     functest     |     smoke     |      01:58       |      PASS      |
152   |     tempest_keystone_cntt     |     functest     |     smoke     |      01:13       |      PASS      |
153   |       tempest_heat_cntt       |     functest     |     smoke     |      22:32       |      PASS      |
154   |       rally_sanity_cntt       |     functest     |     smoke     |      17:16       |      PASS      |
155   |       tempest_full_cntt       |     functest     |     smoke     |      41:13       |      PASS      |
156   |     tempest_scenario_cntt     |     functest     |     smoke     |      08:57       |      PASS      |
157   |       tempest_slow_cntt       |     functest     |     smoke     |      35:58       |      PASS      |
158   +-------------------------------+------------------+---------------+------------------+----------------+
159
160 Testing benchmarking suite
161 ^^^^^^^^^^^^^^^^^^^^^^^^^^
162
163 Run benchmarking suite::
164
165   sudo docker run --env-file env \
166       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
167       -v $(pwd)/images:/home/opnfv/functest/images \
168       opnfv/functest-benchmarking
169
170 Results shall be displayed as follows::
171
172   +--------------------+------------------+----------------------+------------------+----------------+
173   |     TEST CASE      |     PROJECT      |         TIER         |     DURATION     |     RESULT     |
174   +--------------------+------------------+----------------------+------------------+----------------+
175   |     rally_full     |     functest     |     benchmarking     |      93:03       |      PASS      |
176   |     rally_jobs     |     functest     |     benchmarking     |      27:05       |      PASS      |
177   |        vmtp        |     functest     |     benchmarking     |      17:56       |      PASS      |
178   |       shaker       |     functest     |     benchmarking     |      24:02       |      PASS      |
179   +--------------------+------------------+----------------------+------------------+----------------+
180
181 Note: if the scenario does not support some tests, they are indicated as SKIP.
182 See User guide for details.
183
184 Testing benchmarking CNTT suite
185 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186
187 Run benchmarking-cntt suite::
188
189   sudo docker run --env-file env \
190       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
191       -v $(pwd)/images:/home/opnfv/functest/images \
192       opnfv/functest-benchmarking-cntt
193
194 Results shall be displayed as follows::
195
196   +-------------------------+------------------+----------------------+------------------+----------------+
197   |        TEST CASE        |     PROJECT      |         TIER         |     DURATION     |     RESULT     |
198   +-------------------------+------------------+----------------------+------------------+----------------+
199   |     rally_full_cntt     |     functest     |     benchmarking     |      89:52       |      PASS      |
200   |     rally_jobs_cntt     |     functest     |     benchmarking     |      19:39       |      PASS      |
201   |           vmtp          |     functest     |     benchmarking     |      16:59       |      PASS      |
202   |          shaker         |     functest     |     benchmarking     |      23:43       |      PASS      |
203   +-------------------------+------------------+----------------------+------------------+----------------+
204
205 Testing vnf suite
206 ^^^^^^^^^^^^^^^^^
207
208 Run vnf suite::
209
210   sudo docker run --env-file env \
211       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
212       -v $(pwd)/images:/home/opnfv/functest/images \
213       opnfv/functest-vnf
214
215 Results shall be displayed as follows::
216
217   +----------------------+------------------+--------------+------------------+----------------+
218   |      TEST CASE       |     PROJECT      |     TIER     |     DURATION     |     RESULT     |
219   +----------------------+------------------+--------------+------------------+----------------+
220   |       cloudify       |     functest     |     vnf      |      05:08       |      PASS      |
221   |     cloudify_ims     |     functest     |     vnf      |      24:46       |      PASS      |
222   |       heat_ims       |     functest     |     vnf      |      33:12       |      PASS      |
223   |     vyos_vrouter     |     functest     |     vnf      |      15:53       |      PASS      |
224   |       juju_epc       |     functest     |     vnf      |      27:52       |      PASS      |
225   +----------------------+------------------+--------------+------------------+----------------+
226
227 Functest Dockers for Kubernetes deployment
228 ------------------------------------------
229 Docker images are available on the dockerhub:
230
231   * opnfv/functest-kubernetes-core
232   * opnfv/functest-kubernetes-healthcheck
233   * opnfv/functest-kubernetes-smoke
234
235 Preparing your environment
236 ^^^^^^^^^^^^^^^^^^^^^^^^^^
237
238 cat env::
239
240   DEPLOY_SCENARIO=k8s-XXX
241
242 Testing healthcheck suite
243 ^^^^^^^^^^^^^^^^^^^^^^^^^
244
245 Run healthcheck suite::
246
247   sudo docker run -it --env-file env \
248       -v $(pwd)/config:/root/.kube/config \
249       opnfv/functest-kubernetes-healthcheck
250
251 A config file in the current dir 'config' is also required, which should be
252 volume mapped to ~/.kube/config inside kubernetes container.
253
254 Results shall be displayed as follows::
255
256   +-------------------+------------------+---------------------+------------------+----------------+
257   |     TEST CASE     |     PROJECT      |         TIER        |     DURATION     |     RESULT     |
258   +-------------------+------------------+---------------------+------------------+----------------+
259   |     k8s_smoke     |     functest     |     healthcheck     |      01:09       |      PASS      |
260   +-------------------+------------------+---------------------+------------------+----------------+
261
262 Testing smoke suite
263 ^^^^^^^^^^^^^^^^^^^
264
265 Run smoke suite::
266
267   sudo docker run -it --env-file env \
268       -v $(pwd)/config:/root/.kube/config \
269       opnfv/functest-kubernetes-smoke
270
271 Results shall be displayed as follows::
272
273   +---------------------------+------------------+---------------+------------------+----------------+
274   |         TEST CASE         |     PROJECT      |      TIER     |     DURATION     |     RESULT     |
275   +---------------------------+------------------+---------------+------------------+----------------+
276   |     xrally_kubernetes     |     functest     |     smoke     |      22:04       |      PASS      |
277   |      k8s_conformance      |     functest     |     smoke     |      173:48      |      PASS      |
278   +---------------------------+------------------+---------------+------------------+----------------+
279
280 Environment variables
281 =====================
282
283 Several environment variables may be specified:
284
285   * INSTALLER_IP=<Specific IP Address>
286   * DEPLOY_SCENARIO=<vim>-<controller>-<nfv_feature>-<ha_mode>
287   * NAMESERVER=XXX  # if not 8.8.8.8
288   * VOLUME_DEVICE_NAME=XXX  # if not vdb
289   * EXTERNAL_NETWORK=XXX # if not first network with router:external=True
290   * NEW_USER_ROLE=XXX # if not member
291
292 INSTALLER_IP is required by Barometer in order to access the installer node and
293 the deployment.
294
295 The format for the DEPLOY_SCENARIO env variable can be described as follows:
296   * vim: (os|k8s) = OpenStack or Kubernetes
297   * controller is one of ( nosdn | odl )
298   * nfv_feature is one or more of ( ovs | kvm | sfc | bgpvpn | nofeature )
299   * ha_mode (high availability) is one of ( ha | noha )
300
301 If several features are pertinent then use the underscore character '_' to
302 separate each feature (e.g. ovs_kvm). 'nofeature' indicates that no OPNFV
303 feature is deployed.
304
305 The list of supported scenarios per release/installer is indicated in the
306 release note.
307
308 **NOTE:** The scenario name is mainly used to automatically detect
309 if a test suite is runnable or not (e.g. it will prevent ODL test suite to be
310 run on 'nosdn' scenarios). If not set, Functest will try to run the default
311 test cases that might not include SDN controller or a specific feature.
312
313 **NOTE:** An HA scenario means that 3 OpenStack controller nodes are
314 deployed. It does not necessarily mean that the whole system is HA. See
315 installer release notes for details.
316
317 Finally, three additional environment variables can also be passed in
318 to the Functest Docker Container, using the -e
319 "<EnvironmentVariable>=<Value>" mechanism. The first two parameters are
320 only relevant to Jenkins CI invoked testing and **should not be used**
321 when performing manual test scenarios:
322
323   * INSTALLER_TYPE=(apex|compass|daisy|fuel)
324   * NODE_NAME=<Test POD Name>
325   * BUILD_TAG=<Jenkins Build Tag>
326
327 where:
328
329   * <Test POD Name> = Symbolic name of the POD where the tests are run.
330                       Visible in test results files, which are stored
331                       to the database. This option is only used when
332                       tests are activated under Jenkins CI control.
333                       It indicates the POD/hardware where the test has
334                       been run. If not specified, then the POD name is
335                       defined as "Unknown" by default.
336                       DO NOT USE THIS OPTION IN MANUAL TEST SCENARIOS.
337   * <Jenkins Build tag> = Symbolic name of the Jenkins Build Job.
338                          Visible in test results files, which are stored
339                          to the database. This option is only set when
340                          tests are activated under Jenkins CI control.
341                          It enables the correlation of test results,
342                          which are independently pushed to the results database
343                          from different Jenkins jobs.
344                          DO NOT USE THIS OPTION IN MANUAL TEST SCENARIOS.
345
346
347 Openstack credentials
348 =====================
349 OpenStack credentials are mandatory and must be provided to Functest.
350 When running the command "functest env prepare", the framework  will
351 automatically look for the Openstack credentials file
352 "/home/opnfv/functest/conf/env_file" and will exit with
353 error if it is not present or is empty.
354
355 There are 2 ways to provide that file:
356
357   * by using a Docker volume with -v option when creating the Docker container.
358     This is referred to in docker documentation as "Bind Mounting".
359     See the usage of this parameter in the following chapter.
360   * or creating manually the file '/home/opnfv/functest/conf/env_file'
361     inside the running container and pasting the credentials in it. Consult
362     your installer guide for further details. This is however not
363     instructed in this document.
364
365 In proxified environment you may need to change the credentials file.
366 There are some tips in chapter: `Proxy support`_
367
368 SSL Support
369 -----------
370 If you need to connect to a server that is TLS-enabled (the auth URL
371 begins with "https") and it uses a certificate from a private CA or a
372 self-signed certificate, then you will need to specify the path to an
373 appropriate CA certificate to use, to validate the server certificate
374 with the environment variable OS_CACERT::
375
376   echo $OS_CACERT
377   /etc/ssl/certs/ca.crt
378
379 However, this certificate does not exist in the container by default.
380 It has to be copied manually from the OpenStack deployment. This can be
381 done in 2 ways:
382
383   #. Create manually that file and copy the contents from the OpenStack
384      controller.
385   #. (Recommended) Add the file using a Docker volume when starting the
386      container::
387
388        -v <path_to_your_cert_file>:/etc/ssl/certs/ca.cert
389
390 You might need to export OS_CACERT environment variable inside the
391 credentials file::
392
393   export OS_CACERT=/etc/ssl/certs/ca.crt
394
395 Certificate verification can be turned off using OS_INSECURE=true. For
396 example, Fuel uses self-signed cacerts by default, so an pre step would
397 be::
398
399   export OS_INSECURE=true
400
401
402 Logs
403 ====
404 By default all the logs are put un /home/opnfv/functest/results/functest.log.
405 If you want to have more logs in console, you may edit the logging.ini file
406 manually.
407 Connect on the docker then edit the file located in
408 /usr/lib/python3.8/site-packages/xtesting/ci/logging.ini
409
410 Change wconsole to console in the desired module to get more traces.
411
412
413 Configuration
414 =============
415
416 You may also directly modify the python code or the configuration file (e.g.
417 testcases.yaml used to declare test constraints) under
418 /usr/lib/python3.8/site-packages/xtesting and
419 /usr/lib/python3.8/site-packages/functest
420
421
422 Tips
423 ====
424
425 Docker
426 ------
427 When typing **exit** in the container prompt, this will cause exiting
428 the container and probably stopping it. When stopping a running Docker
429 container all the changes will be lost, there is a keyboard shortcut
430 to quit the container without stopping it: <CTRL>-P + <CTRL>-Q. To
431 reconnect to the running container **DO NOT** use the *run* command
432 again (since it will create a new container), use the *exec* or *attach*
433 command instead::
434
435   docker ps  # <check the container ID from the output>
436   docker exec -ti <CONTAINER_ID> /bin/bash
437
438 There are other useful Docker commands that might be needed to manage possible
439 issues with the containers.
440
441 List the running containers::
442
443   docker ps
444
445 List all the containers including the stopped ones::
446
447   docker ps -a
448
449 Start a stopped container named "FunTest"::
450
451   docker start FunTest
452
453 Attach to a running container named "StrikeTwo"::
454
455   docker attach StrikeTwo
456
457 It is useful sometimes to remove a container if there are some problems::
458
459   docker rm <CONTAINER_ID>
460
461 Use the *-f* option if the container is still running, it will force to
462 destroy it::
463
464   docker rm -f <CONTAINER_ID>
465
466 Check the Docker documentation [`dockerdocs`_] for more information.
467
468
469 Checking Openstack and credentials
470 ----------------------------------
471 It is recommended and fairly straightforward to check that Openstack
472 and credentials are working as expected.
473
474 Once the credentials are there inside the container, they should be
475 sourced before running any Openstack commands::
476
477   source /home/opnfv/functest/conf/env_file
478
479 After this, try to run any OpenStack command to see if you get any
480 output, for instance::
481
482   openstack user list
483
484 This will return a list of the actual users in the OpenStack
485 deployment. In any other case, check that the credentials are sourced::
486
487   env|grep OS_
488
489 This command must show a set of environment variables starting with
490 *OS_*, for example::
491
492   OS_REGION_NAME=RegionOne
493   OS_USER_DOMAIN_NAME=Default
494   OS_PROJECT_NAME=admin
495   OS_AUTH_VERSION=3
496   OS_IDENTITY_API_VERSION=3
497   OS_PASSWORD=da54c27ae0d10dfae5297e6f0d6be54ebdb9f58d0f9dfc
498   OS_AUTH_URL=http://10.1.0.9:5000/v3
499   OS_USERNAME=admin
500   OS_TENANT_NAME=admin
501   OS_ENDPOINT_TYPE=internalURL
502   OS_INTERFACE=internalURL
503   OS_NO_CACHE=1
504   OS_PROJECT_DOMAIN_NAME=Default
505
506
507 If the OpenStack command still does not show anything or complains
508 about connectivity issues, it could be due to an incorrect url given to
509 the OS_AUTH_URL environment variable. Check the deployment settings.
510
511 .. _`Proxy support`:
512
513 Proxy support
514 -------------
515 If your Jumphost node is operating behind a http proxy, then there are
516 2 places where some special actions may be needed to make operations
517 succeed:
518
519   #. Initial installation of docker engine First, try following the
520      official Docker documentation for Proxy settings. Some issues were
521      experienced on CentOS 7 based Jumphost. Some tips are documented
522      in section: :ref:`Docker Installation on CentOS behind http proxy`
523      below.
524
525 If that is the case, make sure the resolv.conf and the needed
526 http_proxy and https_proxy environment variables, as well as the
527 'no_proxy' environment variable are set correctly::
528
529   # Make double sure that the 'no_proxy=...' line in the
530   # 'env_file' file is commented out first. Otherwise, the
531   # values set into the 'no_proxy' environment variable below will
532   # be ovewrwritten, each time the command
533   # 'source ~/functest/conf/env_file' is issued.
534
535   cd ~/functest/conf/
536   sed -i 's/export no_proxy/#export no_proxy/' env_file
537   source ./env_file
538
539   # Next calculate some IP addresses for which http_proxy
540   # usage should be excluded:
541
542   publicURL_IP=$(echo $OS_AUTH_URL | grep -Eo "([0-9]+\.){3}[0-9]+")
543
544   adminURL_IP=$(openstack catalog show identity | \
545   grep adminURL | grep -Eo "([0-9]+\.){3}[0-9]+")
546
547   export http_proxy="<your http proxy settings>"
548   export https_proxy="<your https proxy settings>"
549   export no_proxy="127.0.0.1,localhost,$publicURL_IP,$adminURL_IP"
550
551   # Ensure that "git" uses the http_proxy
552   # This may be needed if your firewall forbids SSL based git fetch
553   git config --global http.sslVerify True
554   git config --global http.proxy <Your http proxy settings>
555
556 For example, try to use the **nc** command from inside the functest
557 docker container::
558
559   nc -v opnfv.org 80
560   Connection to opnfv.org 80 port [tcp/http] succeeded!
561
562   nc -v opnfv.org 443
563   Connection to opnfv.org 443 port [tcp/https] succeeded!
564
565 Note: In a Jumphost node based on the CentOS family OS, the **nc**
566 commands might not work. You can use the **curl** command instead.
567
568   curl https://www.opnfv.org/
569
570   <HTML><HEAD><meta http-equiv="content-type"
571   .
572   .
573   </BODY></HTML>
574
575   curl https://www.opnfv.org:443
576
577   <HTML><HEAD><meta http-equiv="content-type"
578   .
579   .
580   </BODY></HTML>
581
582   (Ignore the content. If command returns a valid HTML page, it proves
583   the connection.)
584
585 .. _`Docker Installation on CentOS behind http proxy`:
586
587 Docker Installation on CentOS behind http proxy
588 -----------------------------------------------
589 This section is applicable for CentOS family OS on Jumphost which
590 itself is behind a proxy server. In that case, the instructions below
591 should be followed **before** installing the docker engine::
592
593   1) # Make a directory '/etc/systemd/system/docker.service.d'
594      # if it does not exist
595      sudo mkdir /etc/systemd/system/docker.service.d
596
597   2) # Create a file called 'env.conf' in that directory with
598      # the following contents:
599      [Service]
600      EnvironmentFile=-/etc/sysconfig/docker
601
602   3) # Set up a file called 'docker' in directory '/etc/sysconfig'
603      # with the following contents:
604      HTTP_PROXY="<Your http proxy settings>"
605      HTTPS_PROXY="<Your https proxy settings>"
606      http_proxy="${HTTP_PROXY}"
607      https_proxy="${HTTPS_PROXY}"
608
609   4) # Reload the daemon
610      systemctl daemon-reload
611
612   5) # Sanity check - check the following docker settings:
613      systemctl show docker | grep -i env
614
615      Expected result:
616      ----------------
617      EnvironmentFile=/etc/sysconfig/docker (ignore_errors=yes)
618      DropInPaths=/etc/systemd/system/docker.service.d/env.conf
619
620 Now follow the instructions in [`Install Docker on CentOS`_] to download
621 and install the **docker-engine**. The instructions conclude with a
622 "test pull" of a sample "Hello World" docker container. This should now
623 work with the above pre-requisite actions.
624
625
626 .. _`dockerdocs`: https://docs.docker.com/
627 .. _`Proxy`: https://docs.docker.com/engine/admin/systemd/#http-proxy
628 .. _`Install Docker on CentOS`: https://docs.docker.com/engine/installation/linux/centos/
629 .. _`Functest User Guide`: http://docs.opnfv.org/en/stable-danube/submodules/functest/docs/testing/user/userguide/index.html
630 .. _`images/CentOS-7-x86_64-GenericCloud.qcow2`: https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2
631 .. _`images/cirros-0.4.0-x86_64-disk.img`: http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img
632 .. _`images/ubuntu-14.04-server-cloudimg-amd64-disk1.img`: https://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img