Execute the CVP - Sanity checks pipeline

Execute the CVP - Sanity checks pipeline

This section instructs you on how to perform the sanity testing of your deployment using the CVP - Sanity checks Jenkins pipeline.

To perform the sanity testing of your deployment:

  1. In a web browser, open http://<ip_address>:8081 to access the Jenkins web UI.

    Note

    The IP address is defined in the classes/cluster/<cluster_name>/cicd/init.yml file of the Reclass model under the cicd_control_address parameter variable.

  2. Log in to the Jenkins web UI as admin.

    Note

    To obtain the password for the admin user, run the salt "cid*" pillar.data _param:jenkins_admin_password command from the Salt Master node.

  3. In the global view, find the CVP - Sanity checks pipeline.

  4. Select the Build with Parameters option from the drop-down menu of the pipeline.

  5. Configure the following parameters as required:

    CVP - Sanity checks parameters

    Parameter

    Description

    DEBUG_MODE Removed since 2019.2.4 update

    If checked, keeps the container (if the IMAGE parameter is defined) after the test is performed for the debugging purposes. This option is deprecated and ignored starting the Q4`18 MCP release.

    IMAGE

    Specifies the cvp-sanity Docker image (with all dependencies) that will be used during the test run. For offline mode, use the URL from the local artifactory or offline image.

    PROXY Removed since 2019.2.4 update

    If an environment uses HTTP or HTTPS proxy, verify that you specify it in this field as this proxy address will be used to clone the required repositories and install the Python requirements. This option is deprecated and ignored starting the Q4`18 MCP release.

    SALT_MASTER_CREDENTIALS

    Specifies the credentials to Salt API stored in Jenkins, included by default. See View credentials details used in Jenkins pipelines.

    SALT_MASTER_URL

    Specifies the reachable IP address of the Salt Master node and port on which Salt API listens. For example, http://172.18.170.28:6969.

    To determine on which port Salt API listens:

    1. Log in to the Salt Master node.

    2. Search for the port in the /etc/salt/master.d/_api.conf file.

    3. Verify that the Salt Master node is listening on that port:

      netstat -tunelp | grep <PORT>
      

    TESTS_REPO Removed since 2019.2.4 update

    Specifies the repository with the sanity tests that can be either a Github URL or an internal Gerrit repository with custom tests. By default, the value for this parameter is empty. Since this option is deprecated and ignored starting the Q4`18 release, Mirantis recommends leaving this field empty.

    TESTS_SET Removed since 2019.2.4 update

    Specifies the name of the test to perform or directory to discover tests. By default, it is cvp-sanity/cvp_checks/tests. Leave the field as is for a full test run or specify the test filename. For example, the <default_path>/test_repo_list.py will only run the test for repositories.

    If a custom image is used and the TESTS_REPO field is empty, provide the full path to the folder with tests.

    TESTS_SETTINGS Removed since 2019.2.4 update

    Specifies additional environment variables that can be passed to the framework. You can override configuration values with these variables. For example, export skipped_nodes=mtr01.local,log02.local will force the job to skip the specified nodes in all tests. See global_config.yaml for details.

    EXTRA_PARAMS Added since 2019.2.4 update

    Specifies additional environment variables in the YAML format using the envs key. For example:

    envs:
      - tests_set=tests/test_drivetrain.py
      - skipped_nodes=mtr01.local,log02.local
    

    You can override configuration values with these variables. For example, skipped_nodes=mtr01.local,log02.local will force the job to skip the specified nodes in all tests. See global_config.yaml for details. Do not use quotes and spaces in the values of parameters.

    Added since 2019.2.5 Use the force_pull parameter to enable or disable the pull operation for an image before running the container. Set force_pull=false if image pulling is impossible or not required. In this case, the image may be manually uploaded to the target node.

    Added since 2019.2.7 You can override the configuration values using the override_config variable. For example:

    override_config:
      skipped_nodes:
        - log02
        - apt03
    

    Note

    To perform the DriveTrain sanity testing:

  6. Click Build.

  7. Verify the job status:

    • GREEN, SUCCESS

      Testing has beed performed successfully, no errors found.

    • YELLOW, UNSTABLE

      Some errors occurred during the test run. Proceed to Review the CVP sanity test results.

    • RED, FAILURE

      Testing has failed due to issues with the framework or/and pipeline configuration. Review the console output.