VMware Hands-on Labs - HOL-1889-01-EMT


Lab Overview - HOL-1889-01-EMT - Internet of Things (IoT): VMware Pulse IoT Center & LIOTA (Little IoT Agent)

Lab Guidance


Note: It will take more than 90 minutes to complete this lab. You should expect to only finish 1-2 of the modules during your time.  The modules are independent of each other so you can start at the beginning of any module and proceed from there. You can use the Table of Contents to access any module of your choosing.

The Table of Contents can be accessed in the upper right-hand corner of the Lab Manual.

VMware Pulse IoT Center is an end to end infrastructure management solution that enables OT (Operational Technology) and IT organizations to onboard, manage, monitor and secure their IoT use cases. Liota, a component of the Pulse IoT Center agent, is an open source project offering convenience for IoT solution developers to create edge system data orchestration applications. In this lab, you will explore the features of VMware Pulse IoT Center as well as onboard an IoT gateway.  In addition, you will gain experience using Liota.

The objective of this lab to give an overview of VMware’s solution for Internet of Things (IoT) by showing the capabilities of VMware Pulse IoT Center and Liota. The lab will help the user become familiar with the console used to manage, monitor and secure IoT infrastructure.

Lab Module List:

 Lab Captains:

This lab manual can be downloaded from the Hands-on Labs Document site found here:

http://docs.hol.vmware.com

This lab may be available in other languages.  To set your language preference and have a localized manual deployed with your lab, you may utilize this document to help guide you through the process:

http://docs.hol.vmware.com/announcements/nee-default-language.pdf


 

Location of the Main Console

 

  1. The area in the RED box contains the Main Console.  The Lab Manual is on the tab to the Right of the Main Console.
  2. A particular lab may have additional consoles found on separate tabs in the upper left. You will be directed to open another specific console if needed.
  3. Your lab starts with 90 minutes on the timer.  The lab can not be saved.  All your work must be done during the lab session.  But you can click the EXTEND to increase your time up to 9 hours and 30 minutes. Each click gives you an additional hour.

 

 

Activation Prompt or Watermark

 

When you first start your lab, you may notice a watermark on the desktop indicating that Windows is not activated.  

One of the major benefits of virtualization is that virtual machines can be moved and run on any platform.  The Hands-on Labs utilizes this benefit and we are able to run the labs out of multiple datacenters.  However, these datacenters may not have identical processors, which triggers a Microsoft activation check through the Internet.

Rest assured, VMware and the Hands-on Labs are in full compliance with Microsoft licensing requirements.  The lab that you are using is a self-contained pod and does not have full access to the Internet, which is required for Windows to verify the activation.  Without full access to the Internet, this automated process fails and you see this watermark.

This cosmetic issue has no effect on your lab.  

 

 

Alternate Methods of Keyboard Data Entry

During this module, you will input text into the Main Console. Besides directly typing it in, there are two very helpful methods of entering data which make it easier to enter complex data.

 

 

Click and Drag Lab Manual Content Into Console Active Window

You can also click and drag text and Command Line Interface (CLI) commands directly from the Lab Manual into the active window in the Main Console.  

 

 

Look at the lower right portion of the screen

 

Please check to see that your lab is finished all the startup routines and is ready for you to start. If you see anything other than "Ready", please wait a few minutes.  If after 5 minutes you lab has not changed to "Ready", please ask for assistance.

 

 

Accessing the Online International Keyboard

 

You can also use the Online International Keyboard found in the Main Console.

  1. Click on the Keyboard Icon found on the Windows Quick Launch Task Bar.

 

 

Click once in active console window

 

In this example, you will use the Online Keyboard to enter the "@" sign used in email addresses. The "@" sign is Shift-2 on US keyboard layouts.

  1. Click once in the active console window.
  2. Click on the Shift key.

 

 

Click on the @ key

 

  1. Click on the "@ key".

Notice the @ sign entered in the active console window.

 

Introducing Pulse IoT Center & LIOTA (Little IoT Agent)



 

What is VMware Pulse IoT Center

 

What Is VMware Pulse IoT Center?

Here are some key terms you’ll be hearing often in IoT discussions. The more important ones that may be new to some people are Edge, and Edge System or Gateway, and OT. The Edge is a general term that describes computing systems performing data processing near the source of the data, inclusive of sensors, actuators, and devices interacting and communicating with real-time data from smart products and services. Fog is another term that you may hear referring to similar concepts.

Key IoT Terminology

 

 

Architecting an IoT Solution

 

An IoT architecture looks simple but is exponentially complicated by diversity, scale and bi-directionality.

In a 2 tiered example, powered IP cameras may be able to communicate via wired or wireless connections directly to compute resources and other datacenter components in non colocated environments. While it is simple, it also lacks control points, and doesn’t lend itself to great defense in depth security strategies. For instance, IoT bots and malware infecting hundreds of thousands of IP camera and DVR’s have launched DDoS attacks against service providers, resulting in massive outages.

 In the second example, many IoT devices are low powered and use diverse sets of network protocols. These devices often require colocated edge systems/gateways to communicate back to applications living in datacenters, creating a 3 tired architecture. This also offers a service insertion point for Pulse services and is the primary targeted architecture for current use cases.

 

 

Content and Control Plane

 

In an IoT application environment, it’s helpful to think of an IoT-ready architecture in terms of a content plane and a control plane. The “content plane” is where all the insight rich data from connected things is analyzed to drive business decisions and process efficiences. Whereas the “control plane” refers to the IoT infrastructure itself along with the capabilities to manage, monitor and secure it. Much focus is given to the data generated and analyzed from the things, which is used to solve critical problems among many other uses. However, what about the things themselves? Are they enterprise grade? How are these being managed and patched, and are they secure? There is a whole IoT infrastructure layer underneath which enables the “content” plane and is integral to any IoT implementation. Pulse IoT Center is primarily focused on solving these problems.

 

 

VMware Pulse IoT Center Blueprint

 

The high-level services breakdown is shown in this blueprint example. The Edge generally represents a non-datacenter or public cloud location such as a manufacturing facility, retail location, distribution center, or any place where IoT sensors and gateways would be located to facilitate business, operational, or other industrial processes. The Pulse IoT Center agents run on gateways in those locations. Management and analytical platforms may be in one or more locations in the cloud, datacenter, or edge location depending on requirements and constraints for data movement and processing. Bandwidth, power, processing time, and data volume all become major factors in an IoT deployment, and make the edge a strategic location for the distribution of compute services.

Pulse IoT Center Infrastructure Management Blueprint

A blueprint has emerged for functionality and capabilities necessary to manage the IoT control plane in enterprise-scale production environments. Key requirements include:

Support for diverse protocols

IoT infrastructure management tools should provide vendor neutral management for the wide variety of protocols and data formats. Through the LIOTA agent running on edge systems and gateways, and our VMware’s industry leading device management expertise, we can onboard heterogeneous IoT devices.

Automated detection, configuration, management of edge systems

IoT management solutions require automated onboarding, software updates and timely action according to preconfigured rules.

Ability to monitor, analyze, and orchestrate data

Providing complete control of data and managing it according to preset rules.

Security by design

Any IoT infrastructure management solution should provide security at all levels of the device and data lifecycle.

 

 

The Little IoT Agent (LIOTA)

 

The Little IoT Agent (LIOTA)

For a truly seamless, end-to-end connected experience, it is important to create an IoT app framework that supports interoperability. One step in this direction is to implement a 3-tier architecture which connects your devices to the data centers via intelligent gateways.

Although these gateways are excellent hubs, the problem of diverse IoT things in your organization being unable to speak the same language still persists.This is usually solved by creating different versions of an IoT application for different kinds of gateways/edge devices which can be a huge overhead. Liota was specifically created to simplify this task by providing a common model and building blocks for unified data acquisition and orchestration.

What is Liota?

Liota is a vendor-neutral, open source SDK for building IoT gateway applications for managing, monitoring and orchestrating data between things, gateways and the cloud/data center. Liota can help control where, when, and how to gather telemetry from connected devices and transfer it to the cloud/data center. It does this by providing complete abstractions to accelerate the development of IoT applications and simplify connection and control flows across the 3-tier architecture.

 

 

Requirements and Prerequisites

 

Prerequisites for Pulse IoT Center Installation

A basic installation of Pulse IoT Center will require 6 virtual machines and appliances

 

Module 1 - VMware Pulse IoT Center: Console Overview (30 minutes)

Introduction


This Module contains the following lessons:


 

Pulse IoT Center

 

The Internet of Things (IoT) is rapidly transforming traditional business models and operational processes to boost innovation and growth. An IoT-ready infrastructure has unique requirements with onboarding, configuring, managing and securing connected devices, and as a tidal wave of IoT use cases reaches your organization, your IT and Operational Technology (OT) departments may struggle to keep up. VMware can help organizations achieve IoT infrastructure excellence and deliver successful business outcomes that meet the needs of both your IT and OT organizations.

What Is VMware Pulse IoT Center?

VMware Pulse™ IoT Center™ is a secure, enterprise-grade, end-to-end IoT infrastructure management solution that allows OT and IT to have complete control over their IoT use cases, from the edge all the way to the cloud. It helps companies to onboard, manage, monitor, and secure all things and infrastructure for IoT.

Key Features

 

 

Key Components

 

Key Components

Pulse IoT Center  is composed of two primary components:

 

 

Pulse Services Overview

 

Pulse Services Overview

 

Overview of Pulse IoT Center: Walkthrough


In this lesson, you will walkthrough an overview of the Pulse IoT Center.


 

Login to Pulse IoT Center Console

 

You will begin by logging into the Pulse IoT Center Console.

  1. Double-Click on the Google Chrome shortcut on the desktop to launch the browser.

 

 

Login to Pulse IoT Center Console

 

You will begin by logging into the Pulse IoT Center Console. NOTE: When you start the Chrome browser, a couple of browser tabs may open by default. This is expected.

  1. Click on the VMware Pulse bookmark from the Bookmarks Toolbar.
  2. Under Username, enter sysadmin. This is the default admin username for VMware Pulse IoT Center.
  3. Under Password, enter VMware1!
  4. Click on the Login button to continue.

 

 

Dashboard

 

This is an overview of the Pulse IoT Solution. 

  1. This left hand column is our main navigation pane. As you can see, there’s various different sections of the console you are seeing.
    • Main Dashboard, 
    • Alert Definitions, 
    • Notifications, 
    • OTA Updates, 
    • Admin, 
    • Org Groups and 
    • Settings.
  2. The next thing you’re looking at is the main dashboard. In this view, you see several module and columns that display different statistics about your IoT deployment. In the main view, you have 8 managed devices: 7 connected devices and 1 edge system.
  3. The far right column is a modular view that can be switched between Managed Objects and Alerts.
  4. There are several ways to search and filter devices including:
    • A Search Box,
    • Organization Groups
    • Direct Device Filtering

 

 

Managed Objects

 

You are going to start by drilling into an individual device.

  1. On the right column, select the drop-down menu of Active Alerts and change it to All Managed Objects
  2. Click on the first Edge System to view its details.

 

 

Edge System

 

Selecting the device record in the managed objects view will bring that (device / edge system) into focus, allowing you to view its details:

  1. Including the number of Managed Objects associated with this Edge System. You have one Edge system and 7 Connected Devices. Zero Active Alerts.
  2. Over time, I have zero Alert Trends.
  3. Let's scroll the scrollbar down further to view the rest of the managed objects' details.

 

 

Edge System

 

You can now view that Gateway's properties and system metrics.

  1. Properties are relatively static value that will change infrequently over time.
  2. Metrics are much more real-time set of data, time-series based data.
  3. Here you can turn on additional charts for Memory utilization.
  4. By simply scrolling the mouse over the chart, you can go into the time-series data at tighter frequency. Below that you have a spanning tree map of the gateway on the far left and all the connected device in the middle.
  5. Let's scroll the scrollbar down further to view the spanning tree map and all its connected devices.

 

 

Edge System

 

You have a spanning tree map (Child Hierarchy) of the gateway on the far left and all the connected devices in the middle.

  1. Select the TemperatureSensor device. The Simulator01BuildingTermostat should appear.
  2. Click on the Simulator01BuildingTermostatVMW16Sim003 device to drill in further.

 

 

Connected Device

 

By drilling into a category and its attached device, you now can view that particular thing's data.

  1. Let's scroll the scrollbar down further to view the rest of the Connected Device data.

 

 

Connected Device

 

Here you see a very similar dashboard of Connected Device Properties and Connected Device Metrics. In this case, you are viewing Temperature data. Here again, you see that time-series data.

  1. Try scrolling your mouse while inside the timed window to zoom in or out.

 

 

Connected Device Metrics

 

You can also filter this based off of initial time windows:

  1. Select Last 1 day from the drop-down menu. NOTE: Depending on when this lab environment was created for you, you may not have much historical data. So, when you choose Last 1 Day the graph may not have enough historical data to show more details. Your graph may look the same as the graph for Last 1 hour.
  2. As you move it to broader time/data, instead of seeing individual time-series data it displays us the Minimum / Maximum values to make it easier to comprehend. NOTE: Again, you may not have enough historical data if the environment was just created for you.
  3. Select the Edge System link to step up a level, back to our Edge System.

 

 

Edge System

 

Back at the Edge System,

  1. Scroll the scrollbar down further to view the spanning tree map (Child Hierarchy) and all its connected devices again. You can see several categories all at the same time. As an administrator, you can get a holistic view of all devices that are connected and what the impact would be if this edge gateway goes offline for any particular reason.
  2. Select the Elevator device. The Simulator01BuildingElevatorVMW16Sim003 should appear.
  3. Select the Glass device. The Simulator01BuildingGlasVMW16Sim003s should appear.
  4. Select the TemperatureSensor device. The Simulator01BuildingTermostatVMW16Sim003 should appear.
  5. Select All Managed Objects to continue.

 

Create and Save a Filter


In this lesson, you are going to create and save a Filter, so you can later find a particular Gateway much easier.


 

Resource Filters

 

  1. Click on the Filter icon next to the title Dashboard.
  2. Click and set the Resource Filters to Edge Systems.
  3. Select the Property "State" to filter on.
  4. You will enter the state california since this device exists in California.
  5. Click Add to add the property state as a filter.

 

 

Resource Filters

 

You will add a second filter to indicate the floor number. You can continue to add additional filters to narrow the scope as required.

  1. Select the Property "floor_no" to filter on from the drop-down.
  2. Enter the number 3 to filter on the 3rd floor.
  3. Click Add to add the property floor_no to the filter. You now have 2 filters: State and floor_no defined.
  4. Scroll down the scrollbar to continue.

 

 

Save Filter

 

You can add additional Alert Filters. You can apply filter immediately or save the filter for future use.

  1. Enter 3rd floor devices as the Filter name.
  2. Click Save to save this filter.
  3. You will also click Apply Filter to immediately apply this filter.

 

 

Filter Objects

 

With this filter applied, you see the Filter Objects view is going to update to reflect just a single Edge System.

  1. On the right hand column, select Filtered Objects and you will see the 1 Edge System listed.
  2. Select the Edge System to drill into the Edge System.

 

 

Filter Objects

 

The Edge System is now displayed and you need to determine this is indeed the Edge System you are looking for.

  1. Scroll down the scrollbar down to the Edge Systems Properties section.

 

 

Filter Objects

 

  1. You can see this is indeed the Edge System you are looking for and it has been correctly filtered by State - california and floor_no - 3.

 

Alerts and Notifications


In this lesson, you will walkthrough creating an alert and notification.


 

Alert Definitions

 

Still logged in as sysadmin, you will now add a new Alert.

  1. You will start by selecting ALERT DEFINITIONS.
  2. Click on Add New to add a new Alert.

NOTE: If for some reason you are not seeing the side navigation bar where you can select the Alert Definitions, then your screen resolution may be too low. You can either increase the resolution or choose ALERT DEFINITIONS from the drop-down menu to the left of the vmware logo.

 

 

Alert Definition Details

 

Here you will define the Alert details:

  1. Start by giving it a Name: CPU Utilization
  2. Set Object Type to Edge System.
  3. Set Alert Type to Health.
  4. Set Alert Severity to Warning.
  5. Wait Cycles and Cancel Cycles are number of consecutive, above/below the threshold values to trigger an alert. You will set the Wait Cycles to 1.
  6. Set the Cancel Cycles to 2.
  7. Click Next to continue.

 

 

Symptoms

 

Now you will define a Symptom.

  1. Click Create Symptom.

 

 

Create Symptom

 

The Symptom you are defining is the threshold for an Excessive CPU utilization percentage.

  1. Enter the Name: Excessive CPU.
  2. Select Severity of Warning.
  3. Leave the defaults for Wait Cycles.
  4. Leave the defaults for Cancel Cycles.
  5. Select default Type of Metric.
  6. Select default Threshold of Static.
  7. Under Condition, Select CPU Utilization. NOTE: You may see another CPUUtilization with no spaces. That is expected, because you have another Alert with such name created in a Sample Alert. So, make sure you select the Condition with CPU Utilization with a space, the one you just named.
  8. Select  Greater than > from the drop-down menu.
  9. Enter 2.0 as the threshold trigger. Note: There is very light load in this lab, so you want it to trigger above the 2% threshold.
  10. Click Save to continue.

 

 

Symptoms

 

  1. Make sure that the Excessive CPU Symtom is defined and checked, click Next to continue. NOTE: You can safely ignore the unchecked Sample Symptom. That is just there as an example.

 

 

Recommendations

 

For Recommendations, when an alert goes off automatically you will have someone check for stuck processes.

  1. Click on Create Recommendation.

 

 

Create Recommendations

 

  1. Under description, you will enter Check for stuck processes.
  2. Click Save to Continue.

 

 

Recommendation Selected

 

  1. Make sure our new recommendation is defined and checked. Click Next to Continue. NOTE: You can safely ignore the unchecked Sample Recommendation Description. That is just there as an example.

 

 

Review & Save

 

  1. Now you will review the new alert definition and click Save to continue.

 

 

Notifications

 

To send an email notification when an alert is triggered, you will create a new Notification.

  1. Select Notifications from the left navigation pane.
  2. Click on Add New to add a new notification.

 

 

Add Notification

 

  1. You will name this CPU Alert.
  2. Under Description, enter Alert for excessive CPU utilization.
  3. Select Object Type of Edge System.
  4. Select Serverity of Warning. Deselect the other severities.
  5. Select Type of Health. Deselect the other types.
  6. Under Email, you will enter alertadmin@corp.loc
  7. Click Save to continue.

 

 

Notifications

 

Now you have a notification configured. When an alert is triggered, an email alert will be sent to your Administrator. Currently, you see it has not been triggered yet so you will continue to the next couple of steps and you should see the alert later.

 

Admin Users


In this lesson, you will walkthrough adding a "Consoleadmin" User.


 

Admin

 

  1. On the left navigation pane, select Admin.
  2. Click on Create Admin.

 

 

Create Admin

 

Now you are going to create a new Admin to login to the system.

  1. You will give this user a Username of holuser.
  2. Enter the Password: VMware1!
  3. Confirm Password: VMware1!
  4. Leave the Prompt User to change password on first login selected.
  5. Enter First Name of HOL.
  6. Enter Last Name of User.
  7. Select Group Name of VMware from the drop-down menu.
  8. Enter Email Address of holuser@corp.loc
  9. Select Save to continue.

 

 

Admin

 

Now you will elevate the role of the Username holuser to a Consoleadmin.

  1. Click on the Pencil icon to edit Username holuser.

 

 

Update Role

 

  1. Change our Role Name to Consoleadmin.
  2. Click Save to continue.

 

 

Logout

 

Now you will logout from user sysadmin and log back in as holuser.

  1. Select from the sysadmin menu, the Logout option to logout.

 

 

Login

 

Now you will login as holuser.

  1. Enter Username holuser
  2. Enter Password VMware1!
  3. Click Login

 

 

Change Password

 

You are prompted to change the password since you left the default to change the password on first login.

  1. Enter Old Password: VMware1!
  2. Enter New password: VMware1!VMware1!
  3. Confirm new password: VMware1!VMware1!
  4. Click Update to Continue.

 

 

End User License Agreement

 

You will agree to the End User License Agreement.

  1. Check the I Agree to the Terms of Service checkbox.
  2. Check the I Agree to the Terms of Service checkbox again on the bottom.
  3. Select the bottom Accept button to Continue.

 

 

Active Alerts

 

Now that you are logged in and enough time has passed, you have actually trapped an alert. One of our devices has gone above the CPU threshold that we configured earlier.

  1. You can see you have 1 Health related alert.
  2. Scroll down the scrollbar to see the Alert Trend.

 

 

 

 

You can see the Alert Trend is starting to populate.

  1. Let's drill into the 1 Health Alert by clicking on the CPU Utilization Alert that was triggered.

 

 

Acknowledge Alert

 

You can see all the data here. The red line is where you set the threshold at 2.0%. You can see that the CPU has been above that threshold enough times consistently to trigger this alert.

  1. You can clear the Alert by selecting the Acknowledge button or if it then drops below the threshold enough consecutive times that it will clear itself.

 

 

Alert Cleared

 

You now see the Alerts have been cleared.

 

Conclusion


In this module, we have provided a quick overview of the Pulse Console. Navigating, searching, filtering devices, viewing device properties and metrics. You have created an alert and notification and seeing an alert being triggered and clearing the alerts.


 

You've finished Module 1

 

Congratulations on completing  Module 1.

If you are looking for additional information on Pulse IoT Center, please take a look on our website: https://www.vmware.com/products/pulse.html

Proceed to any module below which interests you the most: 

 

 

 

How to End Lab

 

To end your lab click on the END button.  

 

Module 2 - VMware Pulse IoT Center: Onboard and Update IoT Gateway (30 minutes)

Introduction


This module provides a basic introduction on how to enroll an edge device into Pulse IoT. In this module you will be registering a simulated edge device on a  simulated gateway. This installation normally is done targeting a physical device however due to lab-constraints both the edge device and the gateway are Virtual Machines. The procedures used are exactly the same as those which would be used on physical hardware.

This Module contains the following lessons:


 

Pulse IoT Center Architecture

 

Gateway / Edge System Overview

Gateway connections to Pulse services 

Onboarding 

Certification 

 

Login to The Pulse IoT Console


 

You will begin by logging into the Pulse IoT Center Console. If the Google Chrome browser is not open from the previous session then open a Google Chrome window.

  1. Double-Click on the Google Chrome shortcut on the desktop to launch the browser.

 

Start the Pulse IoT Dashboard

 

There will be 2 tabs at the top of the Chrome Browser window:

  1. Pulse IoT Dashboard
  2. Pulse Administrative Dashboard (which we will open in future steps)
  3. The Pulse Administrative Console window should be open

 

 

Login to the Pulse IoT Center Administrative Console

 

Login to the Pulse IoT Center Administrative Console.

Note: In this lesson you will toggle between two Pulse consoles which will look very similar, the Administrative Console which you are opening now and a second, Lifecycle Management Console. Note the Usernames are different the Pulse console uses "sysadmin" and Lifecycle Management Console uses "administrator"  however the passwords are the same (VMware1!)

  1. Under Username, enter sysadmin. This is the default admin username for VMware Pulse IoT Administrative Center.
  2. Under Password, enter VMware1!.
  3. Click on the Login button to continue. This may take a little while to open, please be patient.

 

 

Pulse Administrative Dashboard

 

This is the Pulse Administrative Dashboard, feel free to explore by clicking on any of the icons in the dashboard. When you are done browsing here click on the second browser tab highlighted above (1). This is the Lifecycle Management Console.

 

 

 

Login to the Lifecycle Management Console as Administrator

 

  1. Under Username, enter administrator. This is the default admin username for VMware Pulse IoT Lifecycle Dashboard.
  2. Under Password, enter VMware1!.
  3. Click on the Login button to continue. This may take a little while to open, please be patient.

 

 

Explore The Lifecycle Dashboard

 

This is the Pulse Lifecycle Management Dashboard, feel free to explore by clicking on any of the icons in the dashboard. When you are done browsing:

  1. If not already selected click "Devices" on the left side menu.
  2. Expand "Staging and Provisioning".
  3. Select  "Staging".

NOTE: If you do not see the vertical dashboard on the left hand side click the three horizontal bars next to VMWARE as shown below to expand the dashboard.

 

 

 

Initiate the Generation of the Sideload Package

 

Here you are generating a Linux tar archive file which will be sideloaded to the IoT device.

  1. Click the sideload button to initiate the generation of the tar archive (the sideload button is highlighted in YELLOW) .

 

 

Generate The Sideload Package

 

  1. Enter a passphrase which will be used in a later PuTTY session for authentication, you can use any passphrase but it is recommended to use VMware1! for consistency. Make note of the passphrase since it cannot be reset. Note that the Organization name is filled in for you already.
  2. Hit "Download" to initiate the download of the tar archive to the server.

 

 

Archive Creation

 

  1. Do not proceed to the next section until the download of the tar archive is complete, the download will show in the bottom left of the Sideload Staging Package window. Note the message "Please be patient" will remain, when you see the "SideLoadStaging...tar..." appear then the operation is complete.
  2. Once the download is complete you can  close this browser window and move to the next section.

 

 

Sideload Image to IoT Device


In this session you will be using WinSCP and PuTTY to migrate the tar archive to the IoT device which you will be registering with Pulse. You will use WinSCP to create a temporary download directory on the device which you are registering and use PuTTY for the  installation of  the Liota agent. You will then complete the process  and register the device with the Pulse server.


 

Open WinSCP

 

  1. Open the desktop shortcut "gateway1" by double-clicking it  to initiate a  WinSCP session.

 

 

Select "Create New Folder"

 

On the right hand side of the WinSCP Window (under /tmp) :

  1. Click the folder icon to open the "create a new folder " window (if you hover over the folder it will say create new directory).

 

 

Create A Download Directory

 

 

  1. Name the folder "pulse", by default this window will have the default folder name of  "new folder" clear the new folder name by either hitting the delete key or by  backspacing and enter "pulse" for the folder name.
  2. Click "OK" to create the "/tmp/pulse" folder.

 

 

Change Directory to "Pulse"

 

  1. Double click on the "pulse" folder you just created to change directory to "/tmp/pulse".

 

 

Copy the Tar Archive

 

 

  1. Drag the SideLoadStagingfileofgateway file from under "Downloads" on the left to the "pulse" directory on the right .
  2. You should now see the file under "/tmp/pulse".

 

 

 

Close WinSCP

 

  1. You can close WinSCP as you no longer need this open.

 

 

Terminate The WinSCP Session

 

  1. Click OK to terminate the WinSCP session.

 

 

Begin a PuTTY Session

 

  1. Open PuTTY from the taskbar.

 

 

Open A PuTTY Session For Gateway1

 

  1. Select "gateway1" by clicking on it.
  2. Click "Open" to initiate a PuTTY session with the Linux Gateway1 server.

 

 

Login to Gateway1

 

  1. Login as "holuser". There is no password.

 

 

Switch to the Pulse Download Directory

 

  1. Type "cd /tmp/pulse" to change directory to the "pulse" directory you created previously using WinSCP.

 

 

Validate The Files Copied to "/tmp/pulse"

 

  1. Type "ls" to validate the files.
  2. Verify the SideLoadStaging file you copied previously  with WinSCP is present.

 

 

Unpack the Tar Archive File

 

Unpack the archive using the Linux tar command.

  1. Enter "tar -xvzf  ./SideLoadStaging_Stagingfileforgateway_VMware.tar.gz.

Note that you can:

  1. drag the text above to the PuTTY window .
  2. Type "tar -xvzf ./Side* " (and Linux will expand the file name for you).
  3. You can use the tab complete feature to complete the command, type "./Side followed by TAB

 

 

Verify the Unpacked Files

 

After the tar command completes type "ls" to verify the files which were un-archived, you should see the files in BLUE and RED in the window above.

 

 

Switch Directory to the Agent Installation Directory

 

  1. type "cd agent" to change to the agent directory where the tar files were unpacked.
  2. type "ls" to show the install files, you should see the two files listed above in GREEN.

 

 

Install the Pulse Agent

 

Initiate the installation of the Pulse agent by invoking the ice-client shell installation script. The command requires administrative privilege so it will require the "sudo" command to be used in conjunction with the installation shell.

Type : sudo ./ice-client-Linux-x86_64-1.0.994.sh

You can drag and drop the command into the PuTTY window or type "sudo ./ice" , followed by the  "tab" key to fill out part of the installation shell file name, then type "-" followed by the "tab" key again.

Then hit enter to begin the installation.

 

 

Enter The Passphrase

 

Ignore the "Failed to execute operation" message, this is a normal part of the install script.

The passphrase was the one set previously in  the "Sideload Staging" step. Enter whatever Passphrase you entered during the "Sideload Staging" step.

Hint: The suggested passphrase when you created the sideload archive was "VMware1!".

Note that no text will appear when you type.

After typing the Passphrase hit "enter".

 

 

 

Successful Install Of the Liotd Agent

 

If you entered the correct passphrase you  will see "Installation Successful" and a message to run the iotcc command to register the edge system.  If the Liotd Agent was successfully installed ( Installation successful message) then skip the next step

 

 

 

Install Of LiotD Failed

 

If you see the message highlighted  above in YELLOW you most likely entered a incorrect passphrase. in this case simply re-run the installer from the step above (sudo ./ice-client-Linux-x86_64-1.0.994.sh).and enter the passphrase you set when you created the sideload package. Once you have successfully installed the Liotd Agent proceed to the next step.

 

 

INITIATE THE IOTCC CLIENT

 

  1. Enter the command "sudo /opt/ice-client/iotcc", this will initiate the session to register the appliance with the gateway.

The command requires administrative privilege so make sure you prefix the command with "sudo". Do not enter anything for User ID yet.

Please Read Before Proceeding : The next steps will require switching between the PuTTY session and the Pulse Dashboard where you will copy a one-use User ID and Password from the Pulse console to the PuTTY window, these are required to connect to the gateway. You will be getting  these credentials from the Pulse Dashboard as shown in the following steps. The credentials are one-time use only and are unique to this session. Please take careful note in the following steps as you switch back and forth between the PuTTY session and the Pulse console.

 

 

RESUME THE PULSE CONSOLE

 

  1. Re-open the Chrome Browser  by clicking "Staging & Provisioning"

 

 

Select The "VMware Pulse" tab

 

  1. For the next steps you will be resuming the Pulse Administrative console. Return to the Pulse console by clicking the "VMware Pulse" browser tab

 

 

Open The Administrator View

 

  1. Open the Administrator view by clicking on the "ADMIN" icon on the left hand menu.

 

 

Open The Onboarding Credentials Window

 

  1. Click "Onboarding Credentials"

 

 

GENERATE ONBOARDING CREDENTIALS

 

  1. Click "Generate Onboarding Credentials" to generate a one-time use set of credentials to register the appliance with the gateway

 

 

COPY THE CREDENTIALS to The PuTTY Session

 

In the following steps a one-time use User ID and Password will be generated, please follow the instructions exactly. You cannot use click-cut & click-paste, you must use the copy function as highlighted above. The credentials will be copied one at a time.

Again be careful to use the "Copy" button and Do Not use cut/paste to copy these credentials, you must use the "Copy" button highlighted above to copy the Login and Password, one at a time to the PuTTY console.The one-time use credentials fior logging into the Liotd agent will  be generated as shown above.

Note: It is important to make sure you use the "Copy" button to copy the Login and Password to the Putty window, if you attempt to use cut/paste or drag and drop the authentication will fail and you wil have to repeat this step.

 

 

Copy The One-time Use Login

 

Hitting the "Copy" key will cause the text to be highlighted in BLUE, again use the DO NOT use cut/paste use the (2) "Copy" button.

 

 

Paste The Login Credentials Into The PuTTY Window

 

Switch back to the PuTTY window, RIGHT click your mouse on "User ID" line, the User ID copied from the Pulse Administrator console should appear. Hit the enter key.Note the User ID is unique to your session and will differ from the User ID displayed above.

 

 

User ID Entered Successfully

 

 

 

Copy The One-time Use Password From The Pulse Console

 

Return to the Pulse Administrator console, again use the "Copy" key to copy the password

Hitting the "Copy" key will cause the text to be highlighted in BLUE, again use theDO NOT use cut/paste use the (1) "Copy" button.

 

 

Paste The One-time Use Password Into The PuTTY Window

 

  1. As with "User ID" you will Right Click after "Password". Note you will not see any text copied, Linux does not display password text. Hit enter after you copy the password.
  2. In a few minutes  you will see a message "Liotad started" this indicates that the process to start the daemon on the appliance has started. This will take from 1-3 minutes, please be patient.

 

 

Liotd Started

 

  1. The connection to the gateway has been initiated. Please be patient the connection to the gateway can take between 4-7 minutes please be patient.

 

 

Liotd Registration Successful

 

  1. If successful, you will see the message "Registration Successful".

If you received this message, this concludes this chapter and you can proceed to the next chapter to validate the Liotd registration. If you did not receive this message and more then 5-7 minutes have elapsed then there was a problem with the registration with the gateway.

If the registration with the gateway was not successful you have three  options:

  1. You can proceed with the "Troubleshooting" chapter of this module ,
  2. You can leave this module and proceed with module Three (Module Three is not dependent on this module) or,
  3. You can quit  and re-start the lab.

Note if you choose to restart this lab you do not have to start at Chapter One, you can resume the lab at Chapter Two.

 

Validate Liotd Client Registration



 

Close The Credentials Window

 

Close the Credentials window as it's no longer needed. Click "Close"

 

 

Return to The Staging And Provisioning Console

 

Return to the Staging and Provisioning Console by clicking the Staging & Provisioning tab.

 

 

Verify Registration

 

  1. Click "Devices" in the left hand menu
  2. The Linux Gateway is now registered with Pulse IoT
  3. Click the name of the device which was just registered

 

 

Review Device Information

 

Review information abou the device.

 

 

Check Proxy Relationships

 

Scroll down to "Proxy Relationships" and click on "Child Count"

 

 

 

Review The Sensors Associated With The Device

 

These are sensors which are reporting data to the IoT device.

 

 

Return to The Pulse Dashboard

 

The new devices can also be viewed from the Pulse dashboard

  1. Click the "VMware Pulse" tab to refresh the Pulse Dashboard
  2. Go to the search bar on the far right and type "vmwarehol" you will see 'hol_gateway1" appear. This is the gateway you added.
  3. Click on the gateway which appears under the searchbar

 

 

Review Device Information From The Edge Systems Dashboard

 

The Edge Systems dashboard displays information on the edge devices being managed, location , state and other metrics. Scroll down to review information on the devices.

 

 

Review Device Hierarchy Relationships

 

  1. Scroll down to "Child Hierarchy"
  2. Click "SimulatedDevices"

 

 

Device Hierarchy Relationships Displayed

 

This displays the hierarchy of the devices from the Gateway device to the individual sensors.

This completes the mandatory part of Module 2. Optionally you can unregister the device you installed in this step. This is optional and is not required for Module 3. You can proceed with the unregistration process or skip ahead to module 3.

 

Unenroll IoT Device


This section is optional, the unenrollment of the device is not required for this lab however if you wish to unenroll the device you have just registered in this module then proceed with the following steps.


 

Restore PuTTY Session

 

if the PuTTY session window from earlier in this module is not still open on the student desktop, go to the taskbar and restore the PuTTY session.

 

 

 

Unenroll The Device Using PuTTY

 

Unenroll the IoT device by typing the command "sudo /opt/ice-client/agent unenroll"

 

 

Delete The Installation Files

 

Uninstall the installation files.

Type the command "sudo /opt/ice-client/agent uninstall".

 

 

Continue With Uninstall

 

Ignore this error if it appears, the uninstall should have cleaned up the install files, running the "sudo /opt/ice-client/agent uninstall" command merely confirms that the cleanup from the "sudo /opt/ice-client/agent unenroll" command was successful.

 

 

Verify the Unenrollemnt in the AirWatch/Pulse Console

 

  1. Return to the AirWatch/Pulse Lifecycle Management Console. It may be in the system tray from the previous steps.

If it is not still open from previous steps, return to the Chrome browser and click the second tab for the AirWatch/Pulse  Lifecycle Management Console. You may need to login again as the session may have timed out. The login is "administrator" and the password is "VMware1!"

 

 

Select The AirWatch Console Tab

 

 

 

Select Details View

 

  1. Select "details view"

 

 

Open The Device List View

 

  1. Click on "List View"

 

 

Verify The Device Is Unenrolled

 

The device is now reporting that is has been unenrolled

 

 

 

Select The Gateway

 

Click on the device name "VMwarehol_gateway1_70077"

 

 

Verify Device Unenrollment

 

You will see the device has been unenrolled it will remain in this state until it is reenrolled or deleted.

This concludes this optional step and concludes Module 2.

 

Troubleshooting


If you do not receive the message "Registration Successful" and more than 5 minutes have elapsed then there is a problem with the Liota Agent.  This is likely because the copy of the UserID/ password was not successful.  Since the password is not visible to the user if the copy operaton fails and the password is not copied the authentication of the device to the Pulse server will not be successful.

You will preform the following steps.

  1. If the PuTTY window is not open, reopen the putty window.
  2. Enter "CTRL-C" to terminate the current iotcc process.
  3. Repeat all of the steps from "Initiate the Iotcc Client" with one exception, the Onboarding Credentials window will still be open, as depicted in the screen shot below. You will click on (2) "Generate Another Onboarding Credential" and then proceed with the rest of the steps listed under "Initiate the Iotcc Client"
  4. If the registration of Liotd is successful skip ahead to "Verify Devices Were Registered" otherwise proceed to "Uninstall the Mis-generated Client"

 

Restore the PuTTY window

 

If the PuTTY session window is not currently active, restore the PuTTY session by clicking on the link on the toolbar.

In the PuTTY session window Enter "CTRL-C" to terminate the current iotcc process.

 

 

 

Return to The Pulse Dashboard

 

Return to the AirWatch/Pulse console to generate a new set of user/password credentials, click "ADMIN" on the left hand side menu.

 

 

Generate Another Set of One-time Use Credentials

 

Click "Generate Another Onboarding Credentials".

The credentials generated previously are no longer valid, these are one time credentials.

 

 

Initiate The Copy of The One-time Use Credentials

 

As you did previously, you will be copying a new set of credentials to the PuTTY window. Again tale care to use the "Copy" button and not cut/paste or drag and drop.

 

 

Copy The One-time Use Login

 

Hitting the "Copy" key will cause the text to be highlighted in BLUE, again use the DO NOT use cut/paste use the (2) "Copy" button.

 

 

Paste The One-time Use Login to PuTTY

 

Switch back to the PuTTY window, RIGHT click on "User ID" line, the User ID copied from the Pulse Administrator console should appear. Hit the enter key. Note the User ID is unique to your session and will differ from the User ID displayed above, the User ID generated will also differ from the one generated in the previous steps. the credentials are one-use and unique per registration.

 

 

Password Prompt

 

The Password prompt now appears

 

 

Copy The One-time Use Password

 

Return to the Pulse Administrator console, again use the "Copy" key to copy the password

Hitting the "Copy" key will cause the text to be highlighted in BLUE,again use the DO NOT use cut/paste use the (1) "Copy" button.

 

 

Paste The One-time Use Password to PuTTY

 

  1. As with "User ID" you will Right Click after "Password" .Note you will not see any text copied, Linux does not display password text.Hit enter after you copy the password.
  2. In a minute or so you will see a message "Liotad started" this indicates the process to start the daemon on the appliance has started.This will take from 1-5 minutes, be patient.
  3. If successful, you will see the message "Registration Successful"
  4. Minimize do not close the Putty session as it will be required at the end of this Module

If you do not receive the message "Registration Successful" and more than 5 minutes have elapsed then it is likely that the tar archive generated during the sideload generation steps was not successful. At this point you can repeat the steps to generate a new sideload file, copy the tar archive, unpack the tar archive and repeat the registration or you may choose to end this lab and start over.

 

Conclusion


In this lesson you learned to :

  1. Login to the Pulse IoT console.
  2. Set the Organizational View.
  3. Generate and download standard sideload package .
  4. Install and register a edge device.

In the next chapter you will learn how to customize a sideload package.


 

You've finished Module 2

 

Congratulations on completing  Module 2.

If you are looking for additional information on IoT, try one of these:

 Proceed to any module below which interests you most.

 

 

How to End Lab

 

To end your lab click on the END button.  

 

Module 3 - VMware Pulse IoT Center: LIOTA (45 minutes)

Introduction


This Module contains the following lessons:


 

Project LIOTA

 

PROJECT LIOTA - The Smart Little Agent for Big IoT

For a truly seamless, end-to-end connected experience, it is important to create an IoT app framework that supports interoperability. One step in this direction is to implement a 3-tier architecture which connects your devices to the data centers via intelligent gateways.

Although these gateways are excellent hubs, the problem of diverse IoT things in your organization being unable to speak the same language still persists.This is usually solved by creating different versions of an IoT application for different kinds of gateways/edge devices which can be a huge overhead.  Liota was specifically created to simplify this task by providing a common model and building blocks for unified data acquisition and orchestration.

What is Liota?

Liota is a vendor-neutral, open source SDK for building IoT gateway applications for managing, monitoring and orchestrating data between things, gateways and the cloud/data center. Liota can help control where, when, and how to gather telemetry from connected devices and transfer it to the cloud/data center. It does this by providing complete abstractions to accelerate the development of IoT applications and simplify connection and control flows across the 3-tier architecture.

Why should I use Liota?

Liota is functionally useful on any IoT edge system, and any of its connected devices, that require management. Liota (written in Python) resides primarily on IoT gateways/edge systems, and provides a common way for enterprises to manage and leverage multi-vendor gateways within their IoT infrastructures.It allows interaction between any device and any data-center component, over any transport, and through any IoT gateway/edge system. It is easy-to-use and has been successfully tested with many gateway and cloud components from both VMware and the community, such as AWS IoT, ThingWorx, IBM Bluemix, the open-source tool Graphite, and, of course VMware Pulse™ IoT Center™.

 

 

Key Components

Key Components

Liota applications are comprised of six basic abstractions that represent a complete data flow from a device attached to the edge system to an application in a data-center. They are loaded and unloaded with a Package Manager.

Liota Dynamic Packages

Package Manager allows the loading and unloading of Liota packages.A liota package is a Python class having:

LIOTA on Github

https://github.com/vmware/liota

Contributing to Liota

Want to hack on Liota and add your own DCC component? Awesome! Just fork the project in order to start contributing the code.

 

Liota with VMware Pulse Quick Start


In this lesson, you will modify some configuration files, upload to Pulse to generate a new Sideload package which you will use to enroll gateway2.


 

Login to Pulse IoT Center Console

 

You will begin by logging into the Pulse IoT Center Console.

  1. Double-Click on the Google Chrome shortcut on the desktop to launch the browser.

 

 

Login to Pulse IoT Center Console

 

  1. Click on the VMware Pulse bookmark from the Bookmarks Toolbar.
  2. Under Username, enter sysadmin. This is the default admin username for VMware Pulse IoT Center.
  3. Under Password, enter VMware1!
  4. Click on the Login button to continue.

 

 

Dashboard

 

From the Dashboard, you are going to launch the Lifecycle Management Console.

  1. Click on OTA Updates from the left navigation pane.

 

 

Lifecycle Management Console

 

  1. Click PROCEED to continue.

 

 

Lifecycle Management Console

 

  1. For User name, enter administrator
  2. For Password, enter VMware1!
  3. Click Log In to continue.

 

 

Configuration Files

 

Now you are in the organization named VMware.

  1. Verify that the top header says VMware.
  2. Double-click on the folder named Liota on the Desktop to open it. NOTE:  You may have to make the browser window smaller to see the Desktop.
  3. In this folder, you have several files related to LIOTA. You are going to modify one of its files. Right-click on general_edge_system.py and select Open with Edit with Notepad++.

The sample package contains specifications of GeneralEdgeSystem, replace the "EdgeSystemName" with the logic to auto-generate the unique name everytime this package is loaded based on the user flow. Unique identifier can be from the system(MAC address) or devices to generate the unique name.

 

 

Edit general_edge_system.py

 

In this example, you are going to change the name of the EdgeSystem you will enroll with Pulse IoT Center. Feel free to use your own name in the format of FirstnameLastname1.

  1. Edit the name of the GeneralEdgeSystem to be FirstnameLastname1.
  2. Click the Save icon up top to save the file.
  3. Close the Notepad++ editor by clicking on the Red X.

 

 

Files/Actions

 

Back on the Lifecycle Management Console, you will now Add the Files/Actions.
NOTE: If at any point during the lab your login session to the Lifecycle Management Console expires, you can re-login to the Lifecycle Management Console using the username/password: administrator/VMware1!

  1. With the Devices menu selected on the left, select Staging & Provisioning to expand its submenus.
  2. Under Staging & Provisioning, select Components.
  3. Under Components, select Files/Actions.
  4. Now you are at the Files/Actions page, click on Add Files/Actions to continue.

 

 

Add Files/Actions

 

  1. Select Linux to continue.

 

 

Add Files/Actions

 

  1. Here you will give this Files/Actions a name. Feel free to use your own name in the format of FirstName LastName. This name will be used later when you select it to be included in the Sideload Package. NOTE: The EdgeSystem name you will use is in the format of FirstnameLastname1, which is different from this name.
  2. Leave the rest as defaults and click the Files tab to continue.

 

 

Add Files/Actions

 

Now you will add the edited general_edge_system.py file into the system.

  1. Under the Files Tab, click on Add Files.

 

 

Add Files/Actions

 

  1. Click on Choose Files button to choose the file.

 

 

Add Files/Actions

 

  1. From the Open file dialog within the Desktop folder, click on the Liota folder. NOTE: You may have to click on the Desktop folder on the left if you are not already in the Desktop folder.

 

 

Add general_edge_system.py

 

  1. Click on general_edge_system.py to select this file to add. Remember, this is the file that you modified.
  2. Click Open to continue.

 

 

Add Files/Actions

 

  1. Now that you have chosen the file, click Save to continue.

 

 

Add Files/Actions

 

You will provide the Download Path (the path on the gateway where you want to upload this file to) in this window.

  1. For Download Path, enter the path /opt/liota-packages/
  2. Click Save to continue.

 

 

Add Files/Actions

 

Now you will add one more file.

  1. Click on Add Files again.

 

 

Add Files/Actions

 

  1. Click on Choose Files button to choose the file.

 

 

Add iotcc_mqtt.py

 

  1. Click on iotcc_mqtt.py to select this file to add.
  2. Click Open to continue.

This is a sample user package which creates a IoTControlCenter DCC object and registers edge system on IoTCC over MQTT Protocol to acquire "registered edge system", i.e. iotcc_edge_system. This package has dependency on credentials package which is pre-loaded during the installation in order to provide the required credentials and configuration parameters in the liota package manager registry. The properties for the edge system can be set as 'key:value' pair, you can also set the location by passing the 'latitude:value' and 'longitude:value' as properties in the user package. If the unregister call is included in the clean up method then the resource will be unregistered and the entire history will be deleted from Pulse IoT Control Center so comment the logic if the unregsitration of the resource is not required to be done on the package unload. The retry mechanism has been implemented for important calls like registration, create_relationship or set_property in case of exception. User Configurable Retry and Delay Settings can be tweaked by user as per the targeted scale.

 

 

Add Files/Actions

 

  1. Now that you have chosen the file, click Save to continue.

 

 

Add Files/Actions

 

You will provide the Download Path (the path on the gateway where you want to upload this file to) in this window.

  1. For Download Path, enter the path /opt/liota-packages/
  2. Click Save to continue.

 

 

Add Files/Actions

 

  1. Click Save to Add these files.

 

 

Staging

 

Now you are going to the Staging section. In Staging, you are going to create a Sideload Package which will Add Files of the name FirstName LastName that you just defined in the last few steps.

  1. Under Staging & Provisioning, select Staging to continue.

 

 

Staging

 

  1. Click the Add Staging button.

 

 

Add Staging

 

  1. Click Linux to continue.

 

 

Add Staging

 

Under the General tab:

  1. For Name, enter FirstName LastName. Again, feel free to use your own name if you would like.
  2. For Agent, select from the drop-down menu Pulse-Linux-x86_64 - 1.0.994. Note: If the version number is higher, it is ok. Select the one with x86_64 in the name.
  3. Click on the top Manifest tab to continue.

 

 

Add Staging

 

You are now going to add a couple of Files/Actions to create the Sideload package.

  1. Click Add.

 

 

Add Staging

 

In this first action, you will tell it to install a root cert.

  1. For Action(s) To Perform, select Install Profile.
  2. For Profile, click in the text box and select root cert
  3. Click on Save to continue.

 

 

Add Staging

 

  1. Click Add to add another Action.

 

 

Add Staging

 

For this second action, you will tell it to add the Add File named FirstName LastName that you created in the previous section.

  1. For Action(s) To Perform, select Install Files / Actions from the drop-down menu.
  2. For Files/Actions, Start typing FirstName LastName and select the name FirstName LastName. Note: If you used your own name for this, make sure you type in the corresponding name.
  3. Click Save to continue.

 

 

Add Staging

 

You now have the two actions defined. This will be the Sideload package that you will generate which will install the root cert and add the corresponding files that you defined.

  1. Click Save to continue.

 

 

Sideload

 

Now that you have the Staging named FirstName LastName defined, you will use it to generate a Sideload Staging Package.

  1. In the FirstName LastName row, click on the Sideload icon to generate a Sideload Staging Package.

 

 

Generate Sideload Staging Package

 

The default Organization Group should be listed as VMware by default.

  1. For Passphrase, you will enter VMware1!
  2. Click Download to continue. This will generate a tar.gz file to your local Downloads directory.

 

 

SCP Sideload Staging Package to gateway2

 

With the tar.gz file download completed, you will now launch SCP to gateway2 to copy the Sideload Package to gateway2.

  1. Double-click on the gateway2 icon on the Desktop.

 

 

SCP Sideload Staging Package to gateway2

 

This launches the WinSCP app, you will now use this to SCP the tar.gz file up to gateway2.

  1. Click the SideLoadStaging_FirstNameLastName_VMware.tar.gz file and drag it to the default /tmp directory on gateway2.

 

 

SCP Sideload Staging Package to gateway2

 

  1. Verify the SideLoadStaging_FirstNameLastName_VMware.tar.gz file is now in the /tmp directory.
  2. Close WinSCP by clicking on the Red X button.
  3. Click OK to terminate the session and close WinSCP.

 

 

SSH to gateway2

 

Now you will SSH to gateway to unpack the Sideload Package and install the Client.

  1. Click on the PuTTy icon from the taskbar to launch it.

 

 

SSH to gateway2

 

  1. Click on gateway2.
  2. Click Open to continue.

 

 

Login to gateway2

 

  1. Login as holuser, no password is required.

 

 

Extract SideLoadStaging File

 

Now you will extract the tar.gz file.

  1. Enter cd /tmp
  2. Enter ls to display the files. The SideLoadStaging_FirstNameLastName_VMware.tar.gz file should be there.
  3. Enter tar -xvzf SideLoadStaging_FirstNameLastName_VMware.tar.gz to untar the file.

 

 

Client Install

 

You will now install the Client.

  1. Enter cd agent
  2. Enter ls to see the ice-client-Linux-x86_64-1.0.994.sh file exists.
  3. Enter sudo ./ice-client-Linux-x86_64-1.0.994.sh to execute the script. Continue in the next step.

 

 

Enter the Passphrase

 

  1. Enter the Passphrase: VMware1! Note: This should match what you defined from the console.

 

 

Installation successful

 

  1. You should get an Installation successful message.

 

 

Register the Edge System

 

Notice it states to run /opt/ice-client/iotcc to register the Edge System. That is what you will execute next.

  1. Enter sudo /opt/ice-client/iotcc. See the next few steps for the Onborading Credentials (User ID and Password).

 

 

Generate Onboarding Credentials

 

You will go to the console to generate the Onboarding Credentials.

  1. Select your first browser tab, VMware Pulse. This should be your Pulse IoT Console.
  2. On the left navigation pane, click on ADMIN.
  3. Click on the Onboarding Credentials button on the upper-right.

 

 

Generate Onboarding Credentials

 

  1. Click on the Generate Onboarding Credentials button.

 

 

Generate Onboarding Credentials

 

From this Onborading Credentials screen, you see the Login User ID and Password provided. There are Copy buttons available to use to copy the long text into the Clipboard.

  1. Click on the Copy button next to the Login User ID.

 

 

Generate Onboarding Credentials

 

Back in the gateway2 PuTTy session you will now paste the User ID.

  1. Right-click on the mouse to Paste the User ID to the terminal.

 

 

Generate Onboarding Credentials

 

You will now repeat the same for the Password.

  1. Click on the Copy button next to the Password.

 

 

Registration successful

 

Back in the gateway2 PuTTy session you will now paste the Password. Note: This time you will not see the hidden password, but it should be pasted. If it does not work the first time, you may want to try again.

  1. Right-click on the mouse to Paste the Password to the terminal. You should see the Liotad (Liota Daemon) started and Registration of the EdgeGateway to the Pulse IoT Center successful.

 

 

Registration successful

 

  1. Back to the Pulse IoT Console, you can now click the Close button.

 

 

Dashboard

 

  1. Again, verify you are on the first browser tab, VMware Pulse. This is the Pulse IoT Console.
  2. Select Dashboard from the left navigation pane if it is not already selected.
  3. On the right search box, start entering the text FirstnameLastname1 to search for the EdgeGateway. NOTE: Your EdgeGateway name may be your own name and should be in the format FirstnameLastname1.
  4. Select the FirstnameLastName1 EdgeGateway to view its Dashboard.

 

 

Validate

 

  1. Validate the FirstnameLastname1 Edge System Dashboard appears.

 

 

Validate

 

  1. Back on the second browser tab, Lifecycle Management Console - Staging & Provisioning.
  2. Click Cancel to continue.

 

 

Validate

 

  1. Under DEVICES -> List View, you should now see the list of devices.
  2. The List View should show the new EdgeGateway FirstnameLastname1.

 

Add Product for Metric Collection


In this lesson, you will create a new software package that will be deployed to the gateway. This will then publish some new metrics to the Pulse IoT Console.


 

Files/Actions

 

Note: You may have to re-login again if your session has ended. The username/password for this Lifecycle Management Console is administrator/VMware1!
You will now Add some Files and Actions to perform to gather some metrics from our EdgeGateway.

  1. Make sure you are on the second browser tab which is the Lifecycle Management Console.
  2. DEVICES should be selected on the left navigation pane.
  3. Select Staging & Provisioning.
  4. Select Components.
  5. Click on Files/Actions.
  6. Click on the Add Files/Actions button.

 

 

 

Add Files/Actions

 

  1.  Click Linux to continue.

 

 

 

General

 

  1.  In the General tab, for Name enter Metric Collection.
  2. Select the Files tab to continue.

 

 

 

Files

 

  1.  Under the Files tab, you will now click on Add Files.

 

 

 

Add Files

 

  1. Click on Choose Files button to choose the file.

 

 

 

Add Files

 

  1. Click on iotcc_mqtt_edge_system_stats.py to select this file to add.
  2. Click Open to continue.

This is a sample user package to publish the basic edge system stats which we believe are required to monitor the health status of the edge system from Pulse IoT Control Center. Optional mechanism: If the device raises an intermittent exception during metric collection process it will be required to be handled in the user code otherwise if an exception is thrown from user code the collection process will be stopped for that metric. If the None value is returned by User Defined Method(UDM) then metric value for that particular collector instance won't be published.

 

 

 

Add Files

 

  1. Now that you have chosen the file, click Save to continue.

 

 

 

Add Files

 

You will provide the Download Path (the path on the gateway where you want to upload this file to) in this window.

  1. For Download Path, enter the path /usr/lib/liota/packages
  2. Click Save to continue.

 

 

 

Manifest

 

  1. Select the Manifest tab.
  2. Click Add Action to Install a Manifest.

 

 

 

Add Manifest: Action to Perform: Run

 

 Under Add Manifest, you will now select an Action(s) to Perform.

  1. From the Action(s) to Perform drop-down menu, select Run.

 

 

 

Add Manifest Command Line and Arguments to run

 

  1.  The Command Line and Arguments to run will be in the format of

    /usr/lib/liota/packages/liotad/liotapkg.sh load filename hashvalue 

    Filename will be iotcc_mqtt_edge_system_stats (without the .py extension) and you will need to find the hash value of the file in the next step and it will be 57f065963021cb2b15148d86b2e7f2c451f74b9d You can leave this field blank for now. You will enter it once you find the hash value in the next step.

  2. Click on the Windows Command Prompt icon to launch a prompt so you can find out the hash value of this file.

 

 

 

Find the hash value of iotcc_mqtt_edge_system_stats.py file

 

  1.  At the Windows Command Prompt, type cd Desktop\Liota
  2. Type dir at the prompt to see a directory listing to verify the file iotcc_mqtt_edge_system_stats.py exists in the folder.
  3. Type certutil -hashfile iotcc_mqtt_edge_system_stats.py SHA1 This SHA1 hash value of 57f065963021cb2b15148d86b2e7f2c451f74b9d is what you need for the Manifest Command Line argument.

 

 

 

Add Manifest Command Line and Arguments to run

 

  1. You will now enter the full command: /usr/lib/liota/packages/liotad/liotapkg.sh load iotcc_mqtt_edge_system_stats 57f065963021cb2b15148d86b2e7f2c451f74b9d NOTE: You may select the text from this manual and drag the text into the lab environment textbox as a shortcut instead of typing this.
  2. Click Save to continue.

 

 

 

Save

 

 You now have an Action defined to load the file.

  1. Click Save to continue.

 

 

 

Add Product

 

 Now you are going to add a new product.

  1. Select Product List View.
  2. Click on Add Product.

 

 

 

Add Product

 

  1.  Click Linux to continue.

 

 

 

Add Product: General

 

  1. Enter the Name: Metric Collection
  2. Under Assignment Groups, start typing VMware and select the VMware (VMware) group that pops up.
  3. Select Manifest tab to continue.

 

 

 

Add Manifest

 

  1. Click on Add button to add a Manifest.

 

 

 

Add Manifest

 

  1. For Action(s) to Perform, select Install Files / Actions
  2. For Files/Actions, start typing Metric Collection and select the Metric Collection Files/Actions that you defined in an earlier step.
  3. Click Save to continue.

 

 

 

Activate

 

 Now that you have the new Product named Metric Collection defined, you are now ready to Activate it.

  1. Click on Activate button to activate this product.

 

 

 

View Device Assignment

 

 In this screen, you can see the devices that you can assign to.

  1. Click on Activate button to assign the Product Metric Collection to the device(s).

 

 

 

SSH to gateway2

 

 Now that you have activated the new product, you are going to see if it is publishing the metrics to the Pulse IoT Center.

  1. Click on the PuTTy icon to launch the PuTTY Client to SSH to gateway2.

 

 

 

SSH to gateway2

 

  1. Click on gateway2.
  2. Click Open to continue.

 

 

 

tail liota.log

 

  1. Login as holuser
  2. At the prompt, type tail -f /var/log/liota/liota.log You should see some metrics being published to Pulse IoT Center. NOTE: Although you see the metrics here, there may be a 5-10 minutes delay before it will show up on the console.

 

 

 

Dashboard

 

  1. Click on the the first browser tab, and this should take you to the main Pulse IoT Console.
  2. Click on Dashboard if it is not already showing the main Dashboard view.
  3. From the drop down menu on the left column, select All Managed Objects.
  4. You should see the Edge System named FirstNameLastname1 on the list. Click on this Edge System to continue.

 

 

 

Edge System Dashboard

 

 You are now at the Edge System Dashboard.

  1. Click the scroll bar to get to the Edge System Metrics section.

 

 

 

Edge System Metrics

 

This is where you will see the new metrics published shortly. You will not see the Edge System Metrics right away. If you are willing to wait and refresh the screen after about 5-10 minutes, you will see the Edge System Metrics being captured in this dashboard view. You know the metrics are being published when you reviewed the liota.log a few steps before this.

 

 

Conclusion


In this module you modified some LIOTA configuration files, Added Files to Pulse IoT to generate a new Sideload package which you then used to enroll gateway2. You then created a new software package that you deployed and activated to the gateway to publish some new metrics to the Pulse IoT Console.


 

You've finished Module 3

 

Congratulations on completing  Module 3.

If you are looking for additional information on Pulse IoT and LIOTA, try one of these:

Proceed to any module below which interests you most.

 

 

 

How to End Lab

 

To end your lab click on the END button.  

 

Conclusion

Thank you for participating in the VMware Hands-on Labs. Be sure to visit http://hol.vmware.com/ to continue your lab experience online.

Lab SKU: HOL-1889-01-EMT

Version: 20180805-131734