cc_staff
1,486
edits
No edit summary |
(Marked this version for translation) |
||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<translate> | <translate> | ||
<!--T:1--> | |||
''Parent page: [[OpenStack]]'' | ''Parent page: [[OpenStack]]'' | ||
<!--T:2--> | |||
The below virtual machine (VM) setup files are intended to be used to quickly create VMs and clusters of VMs. The files come in two forms, [https://wiki.openstack.org/wiki/Heat Heat] templates, and [https://cloudinit.readthedocs.io/en/latest/ CloudInit] files; both use the [https://en.wikipedia.org/wiki/YAML YAML] file format. CloudInit files are used to initialize a particular VM and run within that VM. They can be thought of as a way to automate tasks you would perform at the command line while logged into your VM. They can be used to perform tasks such as updating the operating system, installing and configuring applications, creating files, running commands, and create users and groups. Heat templates are even more powerful, they can be used to automate tasks performed in the OpenStack dashboard such as creating multiple VMs at once, configuring security groups, creating and configuring networks, and creating and attaching volumes to VMs. Heat templates can be used in conjunction with CloudInit files, once Heat has created the VM it can pass a cloudInit file to that VM to perform setup tasks and even include information about other resources dynamically in the CloudInit files (e.g. floating IPs of other VMs). | The below virtual machine (VM) setup files are intended to be used to quickly create VMs and clusters of VMs. The files come in two forms, [https://wiki.openstack.org/wiki/Heat Heat] templates, and [https://cloudinit.readthedocs.io/en/latest/ CloudInit] files; both use the [https://en.wikipedia.org/wiki/YAML YAML] file format. CloudInit files are used to initialize a particular VM and run within that VM. They can be thought of as a way to automate tasks you would perform at the command line while logged into your VM. They can be used to perform tasks such as updating the operating system, installing and configuring applications, creating files, running commands, and create users and groups. Heat templates are even more powerful, they can be used to automate tasks performed in the OpenStack dashboard such as creating multiple VMs at once, configuring security groups, creating and configuring networks, and creating and attaching volumes to VMs. Heat templates can be used in conjunction with CloudInit files, once Heat has created the VM it can pass a cloudInit file to that VM to perform setup tasks and even include information about other resources dynamically in the CloudInit files (e.g. floating IPs of other VMs). | ||
==Using CloudInit== | ==Using CloudInit== <!--T:3--> | ||
The creation of CloudInit YAML files is not covered here, instead see the official CloudInit [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 CloudInit [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. | ||
===Specifying a CloudInit File=== | ===Specifying a CloudInit File=== <!--T:4--> | ||
* 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. | * '''Before''' clicking ''Launch'', select the ''Post-Creation'' tab. | ||
Line 15: | Line 17: | ||
* It may take some time for CloudInit to complete depending on what has been specified in the CloudInit YAML file. | * It may take some time for CloudInit to complete depending on what has been specified in the CloudInit YAML file. | ||
===Checking CloudInit Progress=== | ===Checking CloudInit Progress=== <!--T:5--> | ||
To see the progress of CloudInit on a VM, check the console log of the VM by: | To see the progress of CloudInit on a VM, check the console log of the VM by: | ||
<!--T:6--> | |||
* Selecting ''Project''->''Compute''->''Instances'' in the left hand menu. | * Selecting ''Project''->''Compute''->''Instances'' in the left hand menu. | ||
* 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. | ||
Line 23: | Line 26: | ||
* When CloudInit has finished running the following line will appear near or at the end of the log: | * When CloudInit has finished running the following line will appear near or at the end of the log: | ||
Cloud-init v. 0.7.5 finished at Wed, 22 Jun 2016 17:52:29 +0000. Datasource DataSourceOpenStack [net,ver=2]. Up 44.33 seconds | <!--T:7--> | ||
Cloud-init v. 0.7.5 finished at Wed, 22 Jun 2016 17:52:29 +0000. Datasource DataSourceOpenStack [net,ver=2]. Up 44.33 seconds | |||
<!--T:8--> | |||
* The log must be refreshed manually by clicking the ''Go'' button | * The log must be refreshed manually by clicking the ''Go'' button | ||
==Using Heat Templates== | ==Using Heat Templates== <!--T:9--> | ||
As with CloudInit the creation of Heat Orchestration Template (HOT) files is not covered here, instead see the official [http://docs.openstack.org/developer/heat/template_guide/hot_guide.html documentation]. Heat allows automation of operations performed in the OpenStack dashboard (Horizon) as well as the ability to pass information into the embedded CloudInit files, such as an IP of another server. Before using a Heat template there is usually no need to create any resources in advance. In fact it is often good practice to remove any resources you are not currently using before hand, as using a Heat template consumes resources towards your quota and will fail if it tries to exceed your quota. | As with CloudInit the creation of Heat Orchestration Template (HOT) files is not covered here, instead see the official [http://docs.openstack.org/developer/heat/template_guide/hot_guide.html documentation]. Heat allows automation of operations performed in the OpenStack dashboard (Horizon) as well as the ability to pass information into the embedded CloudInit files, such as an IP of another server. Before using a Heat template there is usually no need to create any resources in advance. In fact it is often good practice to remove any resources you are not currently using before hand, as using a Heat template consumes resources towards your quota and will fail if it tries to exceed your quota. | ||
<!--T:10--> | |||
To use a HOT file: | To use a HOT file: | ||
<!--T:11--> | |||
* Select ''Project''->''Ochestration''->''Stacks'' | * Select ''Project''->''Ochestration''->''Stacks'' | ||
* Click the ''Launch Stack'' button to start creating a new stack | * Click the ''Launch Stack'' button to start creating a new stack | ||
Line 41: | Line 48: | ||
* Click ''Launch'' to begin creating your stack. | * Click ''Launch'' to begin creating your stack. | ||
<!--T:12--> | |||
To graphically see the progress of your stack creation click on the ''Stack Name'' and select the ''Topology'' tab. Gray nodes indicate that creation is in progress, green nodes have finished being created, and red nodes indicate failures. Once the stack has completed successfully click the ''Overview'' tab to see any information that the stack may provide (e.g. a URL to access a service or website). | To graphically see the progress of your stack creation click on the ''Stack Name'' and select the ''Topology'' tab. Gray nodes indicate that creation is in progress, green nodes have finished being created, and red nodes indicate failures. Once the stack has completed successfully click the ''Overview'' tab to see any information that the stack may provide (e.g. a URL to access a service or website). | ||
==Available Setups== | ==Available Setups== <!--T:13--> | ||
<!--T:14--> | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 58: | Line 67: | ||
See [[CC-Cloud Resources]] for the OpenStack versions running on the CC clouds. | See [[CC-Cloud Resources]] for the OpenStack versions running on the CC clouds. | ||
<!--T:15--> | |||
[[Category:CC-Cloud]] | [[Category:CC-Cloud]] | ||
</translate> | </translate> |