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.
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 examplecd /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: