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 12:44] kevin |
guide:cloud [2025/10/12 12:31] (current) sfebruary [CHPC Cloud Resources] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | =====CHPC Cloud Resources====== | + | ======CHPC Cloud Resources====== |
| Line 5: | Line 5: | ||
| *[[guide: | *[[guide: | ||
| *[[guide: | *[[guide: | ||
| + | | ||
| *[[guide: | *[[guide: | ||
| *[[guide: | *[[guide: | ||
| Line 23: | Line 24: | ||
| - | ===== Using OpenStack dashboard===== | ||
| - | As a cloud end user, you can use the OpenStack dashboard to provision your own resources within the limits set by administrators. You can modify the examples provided in this section to create other types and sizes of server instances. | ||
| - | For your convenience, | ||
| - | 1. First please open [[https:// | + | ===== Introduction - Volumes===== |
| + | 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. 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 |
| - | f) Select an existing key pair, import | + | |
| + | From the Openstack dashboard, click **Compute > Volumes** and then on the Actions drop down for the volume | ||
| - | {{ :guide:file.jpeg? | + | {{ :guide:screenshot_2020-08-20_volumes_-_openstack_dashboard_3_.png? |
| + | From the Manage Volume Attachments form, Click **‘Detach Volume’** for the instance you wish to detach the volume from. | ||
| ---- | ---- | ||
| - | g) Optionally, You can customize your instance after it has launched using the options available here. " | + | **7. Re-attach Volume.** |
| - | {{ :guide: | + | 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. |
| ---- | ---- | ||
| - | h) Finally, click the Launch button. It will take a few minutes for the instance to start, depending on how large the base image you chose was, and if it was already cached or not on the physical server where the VM will be scheduled to start. | + | **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. |
| - | i) Associate a floating/ | + | |
| - | + | ||
| - | {{ : | + | |
| - | //By default, | + | Note: Volumes cannot have their size reduced. |
| + | |||
| + | {{ : | ||
| + | |||
| + | Enter the new size of the volume and click **Extend Volume**. | ||
| - | Because public IPv4 addresses are limited | + | Re-attach the volume to your Instance, |
| + | As root: | ||
| + | | ||
| + | |||
| + | For more details, visit the openstack official pages: | ||
| ---- | ---- | ||
| + | ===== Upload and manage images ===== | ||
| - | =====How can I access the instance or virtual machine | + | A virtual machine |
| + | **1. Upload an image** | ||
| - | 1. **OpenStack dashboard: | + | 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 | ||
| + | {{ : | ||
| - | ---- | ||
| - | + | // | |
| - | 2. **ssh into virtual machine:** When you started | + | |
| - | From your laptop, first change the permissions for the private SSH key, so your SSH client doesn’t complain when you will try to use the key: | + | ---- |
| + | **How to deploy windows on openstack** | ||
| - | chmod 400 path_to_private_key | + | Windows Image for OpenStack: For most Linux distributions, it is possible to download a generic QCOW2 file for the purposes of running instances in a cloud environment. However, Microsoft does not provide such instances for any Cloud platform other than Azure. |
| - | + | ||
| - | Then, using the desired SSH client application, run: | + | |
| - | ssh -i path_to_private_key ubuntu@X.X.X.X | + | Since Microsoft Windows is still a major component in many IT infrastructures, |
| - | + | ||
| - | //NB The X.X.X.X denotes to the IP address (use public IP allocated to the instance).// | + | |
| - | 3. Customize your virtual machine, upgrade the package index and existing packages, and it’s especially important | + | 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...! | ||