Overview
The HyperCloud™ Platform (HCP) lets you create and execute scripts on Virtual Machines (VMs.) These scripts are called Plugins on the HCP portal. The HCP portal supports these interpreters:
Bash
Python
Perl
Ruby
PowerShell
Puppet
To run a Plugin on a VM, you’ll need to install the HCP agent. You can install the HCP agent on the VM using a Blueprint or the Free-from wizard.
Note
Out of all the Blueprint types, only VMs have Plugin support.
Create your Plugin
Plugins are Docker containers that perform pre-defined tasks and are configured as steps in your pipeline. Plugins can be used to deploy code, publish artifacts, send notification, and more.
To create a plugin:
Login to the HyperCloud™ Platform(HCP) with your credentials.
Click on Services Orchestration > Click Appstore > Click on Plugins > Click on New > Select plugin type e.g. Shell.
Enter the following details for your new shell script plugin:
Enter the name.
Click on the +Advance Configuration
Enter the Version.
Enter a brief description for your new shell script plugin.
Select the License from the drop-down list.
Enter the Timeout
In the scripts text box enter the command as
#!/bin/bash
To update your packages:
echo "Updating OS packages"
sudo apt-get update && sudo apt-get upgrade -y || yum update -y
echo "Ping Test to Google DNS Server"
ping $IP_ADDRESS -c 8|
Click on Arguments+ to enter the arguments for your shell script plugin.
The arguments key is:
IP_ADDRESS
Value: 8.8.8.8
To your entitled users are:
To allow all users within the same tenant to access this Blueprint, Click on Everyone
To allow all users in all tenants (current or future) to access this Blueprint, Click on All Tenants
To allow specific users to access this blueprint, Click on Users & Groups
In the users Text Box: Type the first alphabet of a username you would like to add & select the user
In the Groups Text Box: Type the first alphabet of a group name you would like to add and select the group.
Click Save Changes.
Note: HyperCloud will replace all occurrence of $IP_ADDRESS in the plugin with the value 8.8.8.8. However, HyperCloud will ignore ${IP_ADDRESS} if used in the plugins.
Now you have created your new plugin with a unique REFERENCE ID for e.g. Q5G9A
In the same way plugins can be created for running Perl, python, ruby scripts as well as puppet automation.
Run plugins on demand
Users can run plugins on-demand any of their own existing Virtual Machines without the need of connecting to the VM. Use the following steps to run an existing plugin on an existing VM.
Note: Running plugins on an existing VM requires the HyperCloud™ Agent to be installed on the Virtual Machine. The Agent Status must be Connected.
Login to the HyperCloud™ Platform with your credentials Click on Services Orchestration Tab Services
Click on VMs Locate and click on the target VM. Click on Plugins Tab
In the Add Plugins Drop-Down scroll or search the plugin name Select the plugin
Note: If the plugin has been created with Arguments, then text fields will appear under the selected plugin.
To Add more plugins, click on the Add Plugins and scroll or Type and search the name of another plugin
For each plugin, click on +Advance Configuration button and provide the following information
Valid Exit Codes: These Exit codes will be ignored. If none provided, then the default value is 0.
Order: Sequence number to define the order of execution of the plugin.
Note: If no order number is mentioned, all plugins will run at the same time
Click on Run Plugin
Click on the Timeline Tab Wait for a few minutes to see the result of the plugin execution