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