Skip to content

Deploying a workload

This chapter covers the deployment process of the available workloads: CODESYS workloads, Virtual Machine workloads, Docker workloads and Docker Compose workloads. The process of deploying workloads is identical for all types of workloads. Therefore, the instructions below contain no specific information. Workloads can be deployed from the following areas in the Management System:

  • Deploy menu
  • Workloads menu

Note

To test a deployment first, select Deploy > Dry run in the navigation on the left and follow the steps below starting from step 3. However, note that a successful dry run does not guarantee a successful deployment as it is only a simulation.

Deploying a workload from the deploy menu

The deploy menu is a section of the Management System dedicated to deploying workloads to nodes.

  1. Select Deploy in the navigation on the left.

    Workload Icons

  2. Select one of the workload type icons. A list of corresponding workloads will appear below.

    Workload List

  3. Select a workload from the list. A list of versions of this workload will appear to the right.

    Workload Versions

  4. Select the version of the workload to deploy.

  5. Select Next in the bottom-right corner.

    Select next

  6. Tick the checkboxes on the left to select one or more nodes from the list for deployment.

    Note

    Automatic filtering of nodes is applied according to labels, online status and capabilities. The list of available nodes only displays nodes compatible for the workload.

  7. Select Next in the lower-right corner.

    Workload Icons

  8. Select Deploy to execute the deployment.
    Optional: Enter a Deploy name to make this deployment easy to identify. A timestamp is filled in automatically.

    Workload Icons

The Management System will continue to the log next. The current deployment is at the top of the list. The Deploy name chosen before is the name that identifies the deployment in the log.

Workload Icons

Select the log entry of the deployment to see a more detailed view. The progress of the current deployment is displayed here.

Workload Icons

The workload has been deployed and can be controlled in the node tree. Select Nodes in the navigation on the left and select the node tree tab on the right. Select the node with the deployed workload to find the deployed workload in the workload list.

Workload Icons

Reach the workload control area by selecting a workload. All workloads are started as soon as they are deployed. Note that CODESYS applications can only be controlled through the Local UI.

Deploying a workload from the workloads menu

It is also possible to deploy workloads from the workloads menu. A Deploy button is available for every workload version in the list of workload versions.

  1. Select Workloads in the navigation on the left.

    Select workloads menu

  2. Select a workload from the list.

  3. Select the Deploy icon from the Action column of the workload version that will be deployed.

    Select deploy icon

  4. Tick the checkboxes on the left to select one or more nodes from the list for deployment.

    Note

    Automatic filtering of nodes is applied according to labels, online status and capabilities. The list of available nodes only displays nodes compatible for the workload.

  5. Select Next in the lower-right corner.

    Workload Icons

  6. Select Deploy to execute the deployment.
    Optional: Enter a Deploy name to make this deployment easy to identify. A timestamp is filled in automatically.

    Workload Icons

The Management System will continue to the log next. The current deployment is at the top of the list. The Deploy name chosen before is the name that identifies the deployment in the log.

Workload Icons

Select the log entry of the deployment to see a more detailed view. The progress of the current deployment is displayed here.

Workload Icons

The workload has been deployed and can be controlled in the node tree. Select Nodes in the navigation on the left and select the node tree tab on the right. Select the node with the deployed workload to find the deployed workload in the workload list.

Workload Icons

Reach the workload control area by selecting a workload. All workloads are started as soon as they are deployed. Note that CODESYS applications can only be controlled through the Local UI.

Removing logical volumes after unsuccessful VM deployment

If a virtual machine workload fails in the download phase of the deployment process, it is possible that the logical volumes created for the workload stay behind. This does not negatively impact the system. However, the disk space reserved for the virtual machine workload will stay reserved unless it is removed. Follow the instructions below to find out the workload ID of the failed deployment and how to remove the logical volume.

Finding out the workload ID

Every workload has a unique ID that is used for naming the logical volume when it is created during the deployment process. This workload ID can be found in a JSON file when a workload is exported from the Management System.

  1. Access the Management System.
  2. Export the virtual machine workload the deployment of which has failed by following Exporting a workload. The workload is downloaded as a TAR file.
  3. Navigate to the folder where the TAR file is located.
  4. Extract the TAR file.
  5. Open the JSON file with a text editor. The TAR file only contains one JSON file.
  6. Look for "workloadId" in the file. It is the second entry in the file.

    Find Workload ID

  7. Note down the ID. It is required to identify the logical volume that needs to be removed.

Removing the logical volumes

With the workload ID of the unsuccessfully deployed workload, the logical volumes can be correctly identified and removed. For this, the workstation needs to be connected to the physical port of the Nerve Device associated with host access, and the network adapter IP address of the workstation needs to be configured in the correct range. This information is device specific. Refer to the device guide for information on the Nerve Device.

Note

The following instructions require access to the Linux host system of Nerve. Using host access requires expert Linux knowledge as system internal changes can be performed. Note that changes may impact the Nerve system.

  1. Open an SSH client like PuTTY.
  2. Enter the IP address for host access to the Nerve Device under Host Name (or IP address) to log in to the host of the Nerve Device.

    PuTTY Host Login

  3. Log in with the credentials for host access to the Nerve Device.

  4. Enter lsblk to display a list of volumes.
  5. Find the logical volume containing the workloadId from the JSON file.

    Find logical volume

  6. Enter the following command to remove the logical volumes:

    sudo lvremove /dev/nerve/<volume-name> -y
    

Note

Note that the steps above can also be performed through a remote connection. Refer to Configuring a remote tunnel to a node for more information.