This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
guide:cloud [2020/08/19 23:20] lphukungoane [Using OpenStack dashboard] |
guide:cloud [2025/10/12 12:31] (current) sfebruary [CHPC Cloud Resources] |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| *[[guide: | *[[guide: | ||
| *[[guide: | *[[guide: | ||
| + | | ||
| *[[guide: | *[[guide: | ||
| *[[guide: | *[[guide: | ||
| Line 29: | Line 30: | ||
| Openstack volumes are logical block devices that can be attached to a single instance to provide a persistent location for data storage. Unlike a virtual machine' | Openstack volumes are logical block devices that can be attached to a single instance to provide a persistent location for data storage. Unlike a virtual machine' | ||
| - | 1. First please open [[https:// | + | **1. Create Volume.** |
| + | |||
| + | From the Openstack dashboard, click **Compute > Volumes > Create Volume**, fill out the form by providing a meaningful name, description and size. Once this is done, click **‘Create Volume’**. Your volume will be created | ||
| - | {{ : | + | {{ : |
| ---- | ---- | ||
| - | 2. Launching | + | **2. Attach |
| - | a) Provide | + | From the Openstack dashboard, click **Compute > Volumes** |
| + | |||
| + | {{ :guide: | ||
| - | {{ : | + | //From the Manage Volume Attachments form, select the Instance you wish to attach to and click **‘Attach Volume’**. This will dynamically attach the volume as a new logical block device to your instance. Move on to the next section of identifying the block device from within your Instance.// |
| + | ---- | ||
| - | b) Select the instance source, the template used to create an instance. You can use an image, a snapshot of an instance (image snapshot), a volume or a volume snapshot (if enabled). You can also choose to use persistent storage by creating a new volume. | ||
| - | {{ : | + | **3. Identify A volume within Instance.** |
| - | // For this example. The instance | + | SSH into your instance, su to root and run **‘lsblk’** |
| + | |||
| + | //**‘vda’** | ||
| ---- | ---- | ||
| + | **4. Formatting the Volume.** | ||
| + | Prerequisite: | ||
| - | c) Decide on the flavor needed when launching the instance, Flavors manage the sizing for the compute, memory and storage capacity of the instance. | + | As root: On Ubuntu based systems |
| - | + | ||
| - | {{ :guide: | + | |
| - | // For this example. The instance is launched with **m1.tiny flavor** selected from the list of available flavors. The m1.tiny flavor will allocate the instance with 2x vCPU, 5GB of vRAM and 20GB of root disk. | + | apt-get install xfsprogs -y |
| - | In order to carefully manage our compute resources, Only allocate what you are expecting to use, This is the total compute resources allocated to the instance created.// | + | **Format using xfs** |
| + | We are using **xfs** in this example because it is widely supported and supports extremely large volume sizes (9 exabytes) | ||
| + | |||
| + | mkfs.xfs -f /dev/vdc | ||
| ---- | ---- | ||
| - | d) Select the network that your instance will connect to. The network provide the communication channels for instances in the cloud. | + | **5. Mounting a Volume.** |
| - | {{ : | + | Create a directory to mount the volume (example ‘data1’), |
| - | //For this example. The instance is launched with **demo-vxlan** network selected from the list of available networks. The network provide the communication channel for instance/s in the cloud.// | + | As root: |
| + | "mkdir data1 | ||
| + | mount -t xfs /dev/vdc /data1 | ||
| + | df -hT / | ||
| ---- | ---- | ||
| + | **6. Re-attaching the volume to a different Instance.** | ||
| + | **a) Unmount the volume.** | ||
| - | e) Select | + | As root, use the command **" |
| - | {{ : | + | umount /data1 |
| - | //For this example. The instance is launched with **Default security group** | + | //NB Remove or comment out the line added in **/etc/fstab** if applicable.// |
| + | **b) Detach a volume.** | ||
| + | |||
| + | From the Openstack dashboard, click **Compute > Volumes** and then on the Actions drop down for the volume you want to attach to an Instance, click **‘Manage Attachments’**. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | From the Manage Volume Attachments form, Click **‘Detach Volume’** for the instance you wish to detach the volume from. | ||
| ---- | ---- | ||
| - | f) Select an existing key pair, import a key pair, or generate a new key pair. A key pair allows you to SSH into your newly created instance. | + | **7. Re-attach Volume.** |
| - | {{ :guide:file.jpeg? | + | Follow the steps at the beginning of this guide to attach the volume to a desired instance. **DO NOT Format the volume from the new instance.** Skip that step and go directly to mounting. The volume is now mounted on a different Instance and the data is preserved. |
| ---- | ---- | ||
| - | g) Optionally, You can customize your instance after it has launched using the options available here. " | + | **8. Extend Volume (Grow)** |
| - | {{ : | + | Volumes can also be extended in size. In order to Extend the volume it must be unmounted and detached from an Instance. |
| + | Note: Volumes cannot have their size reduced. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Enter the new size of the volume and click **Extend Volume**. | ||
| + | |||
| + | Re-attach the volume to your Instance, and remount the volume from within the instance. You will need to grow the xfs filesystem before it will make the new space available. | ||
| + | |||
| + | As root: | ||
| + | |||
| + | | ||
| + | |||
| + | For more details, visit the openstack official pages: | ||
| ---- | ---- | ||
| - | h) Finally, click the Launch button. It will take a few minutes for the instance | + | ===== Upload and manage images ===== |
| + | |||
| + | A virtual machine image, referred | ||
| + | |||
| + | **1. Upload an image** | ||
| + | |||
| + | Follow this procedure | ||
| + | |||
| + | a) Log in to the dashboard. | ||
| + | b) Select the appropriate project from the drop down menu at the top left. | ||
| + | c) On the Project tab, open the Compute tab and click Images category. | ||
| + | d) Click Create Image. | ||
| + | |||
| + | Then Create An Image dialog box appears | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | |||
| + | //Select **" | ||
| ---- | ---- | ||
| - | i) Associate a floating/ | + | **How to deploy windows on openstack** |
| - | {{ :guide: | + | Windows Image for OpenStack: For most Linux distributions, |
| - | //By default, the VM will receive | + | Since Microsoft Windows is still a major component in many IT infrastructures, there may be a need to run Windows-based instances on OpenStack. |
| - | Because public IPv4 addresses are limited and there is an inherent security risk when connecting to the Internet, it is recommended | + | To upload Windows image, We suggest that you follow this tutorial for [[https:// |
| + | Note: CHPC does not provide licenses, Appropriate licenses for any software run on the service by | ||
| + | users must be sought and applied by the users, including any licenses that may be required to run | ||
| + | | ||
| ---- | ---- | ||
| + | ===== Access and security for instances ===== | ||
| + | work in progess...! | ||