Automating VM creation: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 12: Line 12:
Here is the instruction: [https://github.com/ComputeCanada/cvmfs/tree/main/cvmfs_on_cloud To enable CVMFS on CC Clouds].
Here is the instruction: [https://github.com/ComputeCanada/cvmfs/tree/main/cvmfs_on_cloud To enable CVMFS on CC Clouds].


==Using CloudInit== <!--T:3-->
==Using CloudInit== <!--T:4-->
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=== <!--T:4-->
===Specifying a CloudInit 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 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.
# 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 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.


===Checking CloudInit Progress=== <!--T:5-->
===Checking CloudInit 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 CloudInit on a VM, check the console log of the VM by:


<!--T:6-->
<!--T:7-->
# 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 29: Line 29:
# 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:


   <!--T:7-->
   <!--T:8-->
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
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-->
<!--T:9-->
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== <!--T:9-->
==Using Heat Templates== <!--T:10-->
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-->
<!--T:11-->
To create a stack using a HOT file:
To create a stack using a HOT file:


<!--T:11-->
<!--T:12-->
# Select ''Project''->''Orchestration''->''Stacks'' and click the ''Launch Stack'' button to start creating a new stack.
# Select ''Project''->''Orchestration''->''Stacks'' and click the ''Launch Stack'' button to start creating a new stack.
# Provide a HOT file by entering the URL, the File name, or by Direct Input. Here, we will use a HOT file from one of the links in section ''Available Setups'' below.
# Provide a HOT file by entering the URL, the File name, or by Direct Input. Here, we will use a HOT file from one of the links in section ''Available Setups'' below.
Line 52: Line 52:
# Click ''Launch'' to begin creating your stack.
# Click ''Launch'' to begin creating your stack.


<!--T:12-->
<!--T:13-->
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== <!--T:13-->
==Available Setups== <!--T:14-->


<!--T:14-->
<!--T:15-->
;[[Hadoop+Spark Heat Template]]
;[[Hadoop+Spark Heat Template]]
: Creates a Hadoop cluster with Spark configured to run ontop of HDFS and submit jobs using YARN.
: Creates a Hadoop cluster with Spark configured to run ontop of HDFS and submit jobs using YARN.
Line 65: Line 65:
: Sets up a mediawiki webserver.
: Sets up a mediawiki webserver.


<!--T:15-->
<!--T:16-->
[[Category:CC-Cloud]]
[[Category:CC-Cloud]]
</translate>
</translate>
cc_staff
10

edits

Navigation menu