Automating VM creation: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 21: Line 21:


==Using cloud-init== <!--T:4-->
==Using cloud-init== <!--T:4-->
The creation of CloudInit YAML files is not covered here, instead see the official cloud-init [https://cloudinit.readthedocs.io/en/latest/ documentation] . When you are creating a new VM a CloudInit file can be used to describe how the VM is to be configured after the selected image has been loaded. CloudInit files can be used with the Horizon dashboard (OpenStack's web GUI), the CLI, or the Python API. Here we describe how to use a CloudIinit file with Horizon.
The creation of CloudInit YAML files is not covered here, instead see the official cloud-init [https://cloudinit.readthedocs.io/en/latest/ documentation] . When you are creating a new VM a Cloud-init file can be used to describe how the VM is to be configured after the selected image has been loaded. CloudInit files can be used with the Horizon dashboard (OpenStack's web GUI), the CLI, or the Python API. Here we describe how to use a CloudIinit file with Horizon.


===Specifying a CloudInit File=== <!--T:5-->
===Specifying a Cloud-init File=== <!--T:5-->
# Start as normal when launching an instance, by clicking [[File:Launch-Instance-Button-Kilo.png|125px]] under ''Project''->''Compute''->''Instances'' and specifying your VM's configuration as described in [[Cloud Quick Start#Launching a VM | Launching a VM]].
# Start as normal when launching an instance, by clicking [[File:Launch-Instance-Button-Kilo.png|125px]] under ''Project''->''Compute''->''Instances'' and specifying your VM's configuration as described in [[Cloud Quick Start#Launching a VM | Launching a VM]].
# '''Before''' clicking ''Launch'', select the ''Post-Creation'' tab and specify your ''Customization Script Source'', in this case a CloudInit YAML file, by either copying and pasting into a text box (''Direct Input'' method) or uploading from a file from your desktop computer (''File'' method). Older versions of OpenStack, in particular IceHouse, only provide a text box to copy and past your CloudInit file into.
# '''Before''' clicking ''Launch'', select the ''Post-Creation'' tab and specify your ''Customization Script Source'', in this case a Cloud-init YAML file, by either copying and pasting into a text box (''Direct Input'' method) or uploading from a file from your desktop computer (''File'' method). Older versions of OpenStack, in particular IceHouse, only provide a text box to copy and past your CloudInit file into.
# Once the usual selections for your VM, as described in [[Cloud Quick Start#Launching a VM | Launching a VM]], have been made and the CloudInit YAML file is included, click ''Launch'' to create the VM. It may take some time for CloudInit to complete depending on what has been specified in the CloudInit YAML file.
# Once the usual selections for your VM, as described in [[Cloud Quick Start#Launching a VM | Launching a VM]], have been made and the Cloud-init YAML file is included, click ''Launch'' to create the VM. It may take some time for CloudInit to complete depending on what has been specified in the Cloud-init YAML file.


===Checking CloudInit Progress=== <!--T:6-->
===Checking Cloud-init Progress=== <!--T:6-->
To see the progress of CloudInit on a VM, check the console log of the VM by:
To see the progress of Cloud-init on a VM, check the console log of the VM by:


<!--T:7-->
<!--T:7-->
Line 35: Line 35:
# Click on the ''Instance Name'' of the VM. This will provide more information about the particular VM.
# Click on the ''Instance Name'' of the VM. This will provide more information about the particular VM.
# Select the ''Log'' tab and look for lines containing 'clout-init' for information about the various phases of CloudInit.
# Select the ''Log'' tab and look for lines containing 'clout-init' for information about the various phases of CloudInit.
# When CloudInit has finished running the following line will appear near or at the end of the log:
# When Cloud-init has finished running the following line will appear near or at the end of the log:


   <!--T:8-->
   <!--T:8-->
cc_staff
1,486

edits

Navigation menu