Execute the CVP - StackLight tests pipeline

Execute the CVP - StackLight tests pipeline

This section instructs you on how to perform the StackLight LMA verification using the CVP - StackLight tests Jenkins pipeline.

Note

For MCP versions prior the 2019.2.4 update, clone the release/2019.2.0 branch of the stacklight-pytest repository to your local Gerrit and use it locally to add new or adjust the existing tests.

To perform the StackLight LMA verification:

  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 - StackLight tests pipeline.

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

  5. Configure the following parameters as required:

    CVP - StackLight tests parameters
    Parameter Description
    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.
    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 Stacklight tests that can be either a Github URL or an internal Gerrit repository with custom tests. By default, it is http://gerrit.mcp.mirantis.com/mcp/stacklight-pytest -b release/2019.2.0 that clones the release/2019.2.0 branch of the stacklight-pytest repository.
    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 stacklight-pytest/stacklight_tests/tests/. Leave the field as is for a full test run or specify the test filename. For example, the <default_path>/test_logs.py will only run the test for Kibana.

    TESTS_SETTINGS Removed since 2019.2.4 update

    Includes additional environment variables that can be passed to the test framework to override the default configuration.

    Always specify the SL_AUTOCONF=True and PYTHONPATH="./stacklight-pytest" options. Use semicolon to separate variables.

    The export skipped_nodes=mtr01.local,log02.local string will force the pipeline to skip the mtr01 and log02 nodes.

    If you have the UPG nodes in your deployment, add them to the skip_nodes list. For example, skipped_nodes=upg01.<domain_name>.

    EXTRA_PARAMS Added since 2019.2.4

    Includes additional environment variables that can be passed to the test framework to override the default configuration. Always specify - SL_AUTOCONF=True.

    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.

  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 - StackLight pipeline tests results.

    • RED, FAILURE

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