Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Clone the validation repo

    Code Block
    ubuntu@jumpserver:~$ git clone http://gerrit.akraino.org/r/validation


  2. Customize the blueprint - Optional step

    In case your blueprint yaml file is not already in the validation repo inside the bluval folder, or you want to run a subset of the tests, you can create your own bluval yaml file and mount it later in the container. Below is an example of a demo blueprint that will call just the k8s conformance tests.

    Code Block
    ubuntu@jumpserver:~$ cat validation/bluval/bluval-demo.yaml 
    blueprint:
        name: demo
        layers:
            - k8s
    
        k8s: &k8s
            -
                name: conformance
                what: conformance
                optional: "False"


  3. Fill in volumes.yaml file

    Fill in the file validation/bluval/volume.yaml with the data that applies to your setup. The volumes that don’t have a local value set will be ignored. In the example below, only the following volumes are set: 

    • Location to the kube config files needed for access to the cluster
    • Location to the customized blueprint file
    • Location to where to store the results
    Code Block
    ubuntu@jumpserver:~$ cat validation/bluval/volumes.yaml |tail -n +23
    
    volumes:
        # location of the ssh key to access the cluster
        ssh_key_file:
            local: ''
            target: '/root/.ssh'
        # location of the k8s access files (config file, certificates, keys)
        kube_config_dir:
            local: '/home/ubuntu/kube'
            target: '/root/.kube/'
        # location of the customized variables.yaml
        custom_variables_file:
            local: ''
            target: '/opt/akraino/validation/tests/variables.yaml'
        # location of the bluval-<blueprint>.yaml file
        blueprint_dir:
            local: '/home/ubuntu/validation/bluval'
            target: '/opt/akraino/validation/bluval'
        # location on where to store the resulst on the local jumpserver
        results_dir:
            local: '/home/ubuntu/results'
            target: '/opt/akraino/results'
    
    


    Note

    Do not modify the target part of each volume. These paths will be automatically created inside the container when started, and are fixed paths that the tools inside the container expect to exist as is.


    Depending on which tool is used for connecting to the cluster (ssh, kubectl, etc), the corresponding volume needs to be mounted inside the container. To see which are the specific containers for each layer, check the second section in the same volumes.yaml file

    Code Block
    ubuntu@jumpserver:~$ cat validation/bluval/volumes.yaml |tail -n +45
    
    # parameters that will be passed to the container at each layer
    layers:
        # volumes mounted at all layers; volumes specific for a different layer are below
        common:
            - custom_variables_file
            - blueprint_dir
            - results_dir
        hardware:
            - ssh_key_file
        os:
            - ssh_key_file
        networking:
            - ssh_key_file
        k8s:
            - ssh_key_file
            - kube_config_dir
        k8s_networking:
            - ssh_key_File
            - kube_config_dir
    
    


  4. Update variables.yaml

    Fill in the file with your confidential information like IP address/username/passwords and environment specific information. This file grows along with no of testcases.

    Code Block
    ubuntu@jumpserver:~$ cat validation/tests/variables.yaml
    ## ... snippet
    
    ### Input variables cluster's master host
    host: 172.28.17.206             # cluster's master host address
    username: cloudadmin            # login name to connect to cluster
    ssh_keyfile: /root/.ssh/id_rsa  # Identity file for authenticatio
    
    ... 


  5. Run the tests
Code Block
ubuntu@jumpserver:~$ sh validation/blucon.sh [-l <LAYER>] [-o] [-n host] <Bluprint Name>

...