The VM bootstrap script functionality varies between public cloud and private cloud. In private cloud, the bootstrap script can be used to add a configuration for cloud init and configuration drive, and you will need templates that support cloud-init services or cloudbase-init services or similar. In public cloud, you can add a bash script or other UNIX bootstrap script.
To automate configuration at first boot in private cloud, add a configuration definition for your virtual machine. Abiquo will add the configuration definition to an ISO disk on your virtual machine, making it available to configuration systems on first boot for use with cloud-init templates and similar. You can use this feature if you have the "Edit virtual appliance details" privilege.
Abiquo versions 3.10.5 and 4.0.2 introduce support for adding a fully qualified domain name (FQDN) using configuration drive and cloud-init. The user can edit the virtual machine and enter the FQDN on the General tab. If Abiquo detects that first boot automation is available, it may automatically set the FQDN using the name attribute of the virtual machine obtained from the Abiquo API, with the format ABQ-uuid and the domain of the virtual machine's networks, or the localhost domain.
The virtual machine templates determine the support for the bootstrap format and the virtual machine configuration. Check your provider's documentation before working with this feature
If your platform supports the bootstrap feature:
meta_data.json: Abiquo VirtualMachineIdentifier. The meta_data.json file is in the following format:
If DHCP is not used in your environment, the network configuration of the VM will be placed in network_data.json file
Edit the virtual machine, and open the Bootstrap tab. Paste your configuration definition in the text box.
You can also add VM variables on the Variables tab and Abiquo will add them to the vm-variables.rc file. And Abiquo will automatically add metadata for the virtual machine, but you can overwrite this in the Bootstrap data.
In Abiquo you can insert UNIX bootstrap scripts to execute on first boot of your UNIX VMs in public cloud. You can use this feature if you have the "Edit virtual appliance details" privilege. The bootstrap script feature is available in all public cloud providers supported by Abiquo.
UNIX VMs support bootstrap scripts
Windows VMs do not support bootstrap scripts yet
On AWS the platform adds the bootstrap script to the VM with user data. On providers that do not support user data, supply a reachable (e.g. public) IP address and open port 22 on the VM. In the cloud providers that support firewalls (such as Google Compute Engine), you can use the Abiquo firewalls feature to allow access.
The platform will use connect to the VM via SSH and upload the bootstrap script before running it. If you have a public SSH key configured in your user account, the platform will also install it on the VM.
Depending on the features supported by the cloud provider, Abiquo might create a key pair to be used to access the VM, or might use the default (well known) credentials for the image.
Edit the VM, and open the Bootstrap script tab. Paste your script in the text box.
Do not use any headers, such as #!/bin/sh, because your script will be included in an Abiquo wrapper bash script
With this feature you can use your own scripts or tools such as Ansible to configure your virtual infrastructure. See also http://www.abiquo.com/2014/05/14/abiquo-dynamic-inventory-plugin-for-ansible/
Abiquo will wrap the user's bootstrap script in another bash script. This is done to provide a way to store the output and the errors that the script might generate, so users can troubleshoot it if something does not work as expected. Therefore you should not include script headers because they are already included in the wrapper script. Abiquo names the wrapper script "abiquo-bootstrap". Abiquo will upload the script to the VM and leave a symbolic link to the script location in the user's home directory.
From your home directory, use the following commands to see the output and status of the script: