How to: Create and apply configurations to your device using ZPE Cloud

How to: Create and apply configurations to your device using ZPE Cloud

Overview

ZPE Cloud profiles enable to perform operations to your Nodegrid devices, such as: configurations, custom scripts, backups, software upgrades, and cellular modem firmware upgrades. In this document, we are focusing on the configuration section of the profiles tab. 

Configuration

First, we need to create the configuration profile. Login to ZPE Cloud as admin, navigate to Profiles :: Configuration. This section lists the configuration profiles available. Click on "+Add". 
A configuration, edited, looks like: 


Define the profile name and give a description. Under Type, you have two options: Configuration and Script. The Configuration options must be chosen when using Nodegrid CLI commands. The Script option must be chosen when using Linux/Shell. 

Examples:

1st CLI example
cd /settings/zpe_cloud/
set enable_remote_access=yes
commit

Shell example
#!/bin/bash
echo "I'm a Bash script"

2nd CLI example
In the screen shot above, the config code sets: the hostname, the banner, the timezone and the revision tag. Please note that we can mix the parameters with fixed and with variables. 

After defining the type, you can select a few conditions and options to your script. The available checkboxes are: 
Apply on Device Enrollment: It will be triggered when enrolling a new device to ZPE Cloud.
Apply to Devices Reconnect Events: Applies to enrolled devices reestablishing connection to ZPE Cloud. 
Dynamic Template:  A dynamic template can be used to apply a dynamic configuration/script to one or more devices, using the Jinja2 format.
Password Protected: Sets a password for the profile. 
Custom Command : Creates a button under the devices' tab.  

Example of a Custom Command button
Note that this is optional. 


Example of Dynamic Template
Note that this is optional. 
Go to Profiles -> Custom Fields. Click on New. 
Define the name of the Custom Field, its Value, and its Scope (Site A , Device X, ...): 

Click Save. 

Now, in the list, we can see: 

In our example, it enables us to a have a hostname and a revision tag, with different values, depending on the Site.  On the other hand, the rest of the config -pushed from the Cloud to the devices, will be common to all the Sites.

Applying the templates to a device
Navigate to the Devices tab -> Enrolled, select one or multiple devices and click on Apply Configuration: 


Select the Configuration. Select when to apply: Now, On First Connection or Schedule (You make it recurrent). Click on Save: 


To check the current state of your profiles and scheduled tasks, navigate to Profiles :: Operations. You can see the current running profiles under Jobs and the Scheduled tasks under Schedules: 


On the Nodegrid device, the configuration has been applied successfully, as we can see, for instance, on its hostname: 


    • Related Articles

    • How to: Create and Use Dynamic Templates in ZPE Cloud

      ZPE Cloud Dynamic Template can be used to apply a dynamic configuration/script to one or more devices. It can contain variables which have different values depending on the device it is applied to. Variables are defined under "Custom Fields" tab in ...
    • How to: Create and Use Custom Fields in ZPE Cloud

      Custom fields is a way to make your profiles/templates more dynamic. A custom field is similar to a variable in that it can have different values depending on the scope of the field. You can create a custom field under "Profiles::Custom Fields". ...
    • How to: Software Upgrade a Nodegrid device using ZPE Cloud

      How to: Update a Nodegrid device using ZPE Cloud ZPE cloud enables managing on-demand and scheduled software updates of your Nodegrid devices. 1. Login to ZPE Cloud 2. Go to Devices :: Enrolled 3. Select the device you want to update and then click ...
    • How to: Backup a Nodegrid device using ZPE Cloud

      ZPE cloud enables managing on-demand and scheduled backups of your Nodegrid devices. Login to ZPE Cloud Go to Devices :: Enrolled Select the devices you want to backup and then click Backup. You can backup multiples devices at once. Select the File ...
    • How to: Enable ZPE Cloud Remote Access...Remotely

      You just got your ZPE Nodegrid up and running and it is connected and enrolled in your ZPE Cloud. But you can't access it remotely because the remote access buttons are grayed out. It is online, but no access available. The way to get remote access ...