Deploy Virtlet

Deploy VirtletΒΆ

You can deploy Virtlet on either new or existing MCP cluster using the procedure below. By default, Virtlet is deployed on all Kubernetes Nodes (cmp).

To deploy Virtlet on a new MCP cluster:

  1. When generating a deployment metadata model using the ModelDesigner UI, select the Virtlet enabled check box in the Kubernetes Product parameters section.

  2. Open your Git project repository.

  3. In classes/cluster/<cluster-name>/kubernetes/compute.yml, modify the kubernetes:common:addons:virtlet: parameters as required to define the Virtlet namespace and image path as well as the number of compute nodes on which you want to enable Virtlet. For example:

    parameters:
      kubernetes:
        common:
          addons:
            virtlet:
              enabled: true
              namespace: kube-system
              image: mirantis/virtlet:latest
    
  4. If your networking system is OpenContrail, add the following snippet to classes/cluster/<cluster-name>/opencontrail/compute.yml:

    kubernetes:
      pool:
        network:
          hash: 77169cdadb80a5e33e9d9fe093ed0d99
    

Proceed with further MCP cluster configuration. Virtlet will be automatically deployed during the Kubernetes cluster deployment.

To deploy Virtlet on an existing MCP cluster:

  1. Open your Git project repository.

  2. In classes/cluster/<cluster-name>/kubernetes/compute.yml, add the following snippet:

    parameters:
      kubernetes:
        common:
          addons:
            virtlet:
              enabled: true
              namespace: kube-system
              image: mirantis/virtlet:latest
    

    Modify the kubernetes:common:addons:virtlet: parameters as required to define the Virtlet namespace and image path as well as the number of compute nodes on which you want to enable Virtlet.

  3. If your networking system is OpenContrail, add the following snippet to classes/cluster/<cluster-name>/opencontrail/compute.yml:

    kubernetes:
      pool:
        network:
          hash: 77169cdadb80a5e33e9d9fe093ed0d99
    
  4. Commit and push the changes to the project Git repository.

  5. Log in to the Salt Master node.

  6. Update your Salt formulas and the system level of your repository:

    1. Change the directory to /srv/salt/reclass.
    2. Run the git pull origin master command.
    3. Run the salt-call state.sls salt.master command.
    4. Run the salt-call state.sls reclass command.
  7. Apply the following states:

    salt -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons
    salt -C 'I@kubernetes:pool' state.sls kubernetes.pool
    salt -C 'I@kubernetes:master' state.sls kubernetes.master.setup