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