Bureaucrats, cc_docs_admin, cc_staff
2,915
edits
m (Rdickson moved page OpenStack VM Setups to Automating VM creation without leaving a redirect: Part of translatable page "OpenStack VM Setups") |
(Marked this version for translation) |
||
Line 7: | Line 7: | ||
To automate the creation of cloud VMs, volumes, etc. the [[OpenStack Command Line Clients | OpenStack CLI]], [[#Using Heat Templates|Heat]], [[Terraform]], or the [[OpenStack python API]] can be used. Both the OpenStack CLI and Terraform are command line tools. While Heat is used through the OpenStack web dashboard, horizon. To install and configure settings and software within the VM, [[#Using cloud-init | cloud-init]] is used. | To automate the creation of cloud VMs, volumes, etc. the [[OpenStack Command Line Clients | OpenStack CLI]], [[#Using Heat Templates|Heat]], [[Terraform]], or the [[OpenStack python API]] can be used. Both the OpenStack CLI and Terraform are command line tools. While Heat is used through the OpenStack web dashboard, horizon. To install and configure settings and software within the VM, [[#Using cloud-init | cloud-init]] is used. | ||
<!--T:19--> | |||
In addition to these tools to create and provision your VMs, you can also gain access to the Compute Canada software stack (CVMFS) that is availble on our general purpose computing clusters, within your VM. See the [[#Enabling CVMFS on your VM| Enabling CVMFS]] section below. | In addition to these tools to create and provision your VMs, you can also gain access to the Compute Canada software stack (CVMFS) that is availble on our general purpose computing clusters, within your VM. See the [[#Enabling CVMFS on your VM| Enabling CVMFS]] section below. | ||
Line 19: | Line 20: | ||
Cloud-init 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. Cloud-init can be used to setup other provisioning tools such as [https://docs.ansible.com/ ansible] or [https://puppet.com/ puppet] to continue with the software and VM configuration if desired. | Cloud-init 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. Cloud-init can be used to setup other provisioning tools such as [https://docs.ansible.com/ ansible] or [https://puppet.com/ puppet] to continue with the software and VM configuration if desired. | ||
<!--T:20--> | |||
Cloud-init configuration is specified using plain text in the [https://en.wikipedia.org/wiki/YAML YAML] format. To see how to create cloud-init files see the official cloud-init [https://cloudinit.readthedocs.io/en/latest/ documentation]. cloud-init files can be used with the Horizon dashboard (OpenStack's web GUI), Terraform, the CLI, or the Python API. Here we describe how to use a cloud-iinit file with Horizon. | Cloud-init configuration is specified using plain text in the [https://en.wikipedia.org/wiki/YAML YAML] format. To see how to create cloud-init files see the official cloud-init [https://cloudinit.readthedocs.io/en/latest/ documentation]. cloud-init files can be used with the Horizon dashboard (OpenStack's web GUI), Terraform, the CLI, or the Python API. Here we describe how to use a cloud-iinit file with Horizon. | ||
Line 44: | Line 46: | ||
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 cloud-init files, once Heat has created the VM it can pass a cloud-init file to that VM to perform setup tasks and even include information about other resources dynamically in the cloud-init files (e.g. floating IPs of other VMs). | 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 cloud-init files, once Heat has created the VM it can pass a cloud-init file to that VM to perform setup tasks and even include information about other resources dynamically in the cloud-init files (e.g. floating IPs of other VMs). | ||
<!--T:21--> | |||
As with cloud-init the creation of [https://wiki.openstack.org/wiki/Heat 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]. HOT files are also written in the [https://en.wikipedia.org/wiki/YAML YAML] format. 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 cloud-init the creation of [https://wiki.openstack.org/wiki/Heat 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]. HOT files are also written in the [https://en.wikipedia.org/wiki/YAML YAML] format. 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. | ||