Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
260 lines (174 sloc) 6.11 KB

Support scripts

The script helps to update latest version of our cloud agent(gulpd) and its configuration(gulp.conf) file in the virtual machine images that VirtEngine provides automatically.

To use the

mkdir /virtengine

cd /virtengine


chmod 755

In the template update nsqd and cassandra ipaddress

The script must be modified to work with your VirtEngine Installation.

  ### Welcome to the Gulpd configuration file.
  ### [meta]
  ### Controls the parameters for the Raft consensus group that stores metadata
  ### about gulp.
    user = "root"
    vertice_api = "" #Change to your public VirtEngine API location
    nsqd = [""] #Change to your public VirtEngine NSQD location

Support for RDNS

The RDNS is the resolution of an IP address to its designated domain name.

In the opennebula template add the following


If the expected hostname is not set in the vm to check in the terminal

    host <ip>

The resolvable names of these name servers should be in the NS resource records of the zone.

Resolving an IP address uses the pointer DNS record type (PTR record)

In the template update gulpupd to use the correct repo

The is preconfigured to assume you are running testing and 1.5 version of repository.

You can search and change the below lines.

This is needed to get timely updates on fixes to our cloud agent(gulpd) posted periodically in S3.

The supported branches are testing, stable.

true "${version:=1.5}"
true "${branch:=testing}"

Use this common template

Please use the usual process to create a template in OpenNebula and its beyond the scope of this doc.

Make sure that the Files = "/virtengine/ is configured correctly.

 FILES = "/virtengine/",
 CPU = "0.5"
 CPU_COST = "5"
 NAME = "virtengine"
 DESCRIPTION = "common template for all images"
 DISK = [
 IMAGE = "",
 IMAGE_UNAME = "oneadmin" ]
 LISTEN = "",
 TYPE = "VNC" ]
 MEMORY = "1024"
 NIC = [
 NETWORK = "ipv4-pri",
 NETWORK_UNAME = "oneadmin" ]
 OS = [
 ARCH = "x86_64" ]
 VCPU = "1"

This template when invoked by virtengine, we configure the following parameters automatically to correct behaviour as chosen by the user and in configuration files like vertice.conf

CPU = "0.5"
NAME = "virtengine"
DISK = [
 IMAGE = ""]
MEMORY = "1024"
NIC = [
 NETWORK = "ipv4-pri",
 NETWORK_UNAME = "oneadmin" ]

The will be executed when ever the virtual machine boots.

internally we use, gulpupd

This script is bundled into as OpenNebula wants the script to be in-line and loads the full script as base64 into its memory. Hence the below copy is already there for you in

The gulpupd script helps customers to keep the shipped images Up-to-date with the latest version of our cloud agent (gulpd)

# updates the 1.5 version, testing repo
gulpupd --version 1.5.2 --branch testing

# updates the 1.5 version, stable repo
gulpupd --version 1.5.2 --branch stable


hook_virtengine.rb triggers VirtEngine when the virtual machine hits the following states.

delete, suspend, poweroff, boot_suspend

To use the hook_virtengine.rb

  1. In your OpenNebula installation, edit the /etc/one/oned.conf with the following
 name      = "poweroff_hook",
 on        = "CUSTOM",
 state     = "ACTIVE",
 lcm_state = "SHUTDOWN_POWEROFF",
 command   = "hook_virtengine.rb",
 arguments = "$ID $TEMPLATE poweroff stopped" ]

 name      = "delete_hook",
 on        = "DONE",
 command   = "hook_virtengine.rb",
 arguments = "$ID $TEMPLATE destroyed destroyed" ]

 name      = "suspend_hook",
 on        = "CUSTOM",
 state     = "SUSPENDED",
 lcm_state = "LCM_INIT",
 command   = "hook_virtengine.rb",
 arguments = "$ID $TEMPLATE suspended suspended" ]

 name      = "boot_suspend_hook",
 on        = "CUSTOM",
 state     = "BOOT_SUSPENDED",
 lcm_state = "RUNNING",
 command   = "hook_virtengine.rb",
 arguments = "$ID $TEMPLATE running running" ]
 name      = "running_hook",
 on        = "CUSTOM",
 state     = "ACTIVE",
 lcm_state = "RUNNING",
 command   = "hook_virtengine.rb",
 arguments = "$ID $TEMPLATE running running" ]
  1. Copy the hook_virtengine.rb file into the location /var/lib/one/remotes/hooks


cp hook_virtengine.rb /var/lib/one/remotes/hooks

chmod 755 hook_virtengine.rb

chown oneadmin:oneadmin /var/lib/one/remotes/hooks/hook_virtengine.rb

  1. Create master_key file into the location /var/lib/detio
cat >master_key << EOF

VirtEngine WHMCS Addon

  1. Copy the post_billing_transaction_hook in to directory /var/www/html/whmcs/include/hooks
$ cd /var/www/html/whmcs/include/hooks

$ wget

$ sudo service apache2 restart
  1. Change the script to point to your gateway


LetsEncrypt is a certificate authority that provides free X.509 certificates via an automated process.

We provide a LetsEncrypt wrapper shell script which can be downloaded into any directory.

Please make sure you have a valid public domain and public ip address.


chmod 0755 letsencrypt

# install the letsencrypt certificate
letsencrypt --install  <domainame> <domainip>

# remove the letsencrypt certificate
letsencrypt --remove <domainname>

# renewal the letsencrypt certificate
letsencrypt --autorenew <domainname>