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 08:26] lphukungoane [Cloud Resources] |
guide:cloud [2025/10/12 12:31] (current) sfebruary [CHPC Cloud Resources] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======Cloud Resources====== | + | ======CHPC Cloud Resources====== |
| - | The **CHPC Cloud System** is a CentOS-based | + | |
| + | | ||
| + | | ||
| + | *[[guide:cloud: | ||
| + | *[[guide: | ||
| + | *[[guide:cloud: | ||
| + | *[[guide:cloud:faq|FAQs]] | ||
| - | The **Centre for high performance Computing (CHPC)** hosts an OpenStack cloud built on Supermicro server and storage systems, using the Supermicro TwinPro servers to provide 320cores/ | ||
| - | * **Compute Resource: | + | ======How can I use an OpenStack cloud? |
| - | + | ||
| - | * **Storage Resource:** Block & Object storage functionality based on the open source software ' | + | |
| - | + | ||
| - | * **Networking Resource:** provides 10Gbps Internet connectivity, | + | |
| + | As an OpenStack cloud end user, you can provision your own resources within the limits set by cloud administrators. | ||
| + | The examples in this guide show you how to perform tasks by using the following methods: | ||
| - | ^ | + | |
| - | | | + | |
| - | | ::: | ::: | ::: | + | * **OpenStack command-line clients:** Each core OpenStack project has a command-line client that you can use to run simple commands to view, create, and manage resources in a cloud and automate tasks by using scripts. |
| + | ---- | ||
| - | **Fees for using the CHPC cloud system** | ||
| - | The cloud resources are allocated on per project basis, then several instances are provisioned based on the available resources allocated to the project. The billing is calculated by allocation not by percentage of utilization. The current billing fees are calculated as follows: | ||
| - | * R0.23 per vCPU hour. | ||
| - | * R0.14 per GB hour of vMemory(vRAM). | ||
| - | * R0.0017 per GB hour of storage (volumes, | + | ===== Introduction - Volumes===== |
| + | Openstack | ||
| - | The Cloud is now open to a broader community of researchers. Apply today and start using our resources. | + | **1. Create Volume.** |
| - | A new project account creation on the Cloud user database can be requested through the [[ https:// | + | |
| - | Cloud users are expected | + | 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 and you can move on to the next step, ‘Attach a volume to an instance’. |
| - | * Make appropriate use of Cloud resources and use good social behavior. | + | |
| + | {{ : | ||
| - | * Do not share private ssh keys or login information. | + | ---- |
| - | | + | **2. Attach a volume to an Instance.** |
| - | | + | 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’.** |
| + | |||
| + | {{ :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 | |
| - | Already a Cloud user? Login to the [[https://openstack.chpc.ac.za | Cloud Console]] and get started with running | + | |
| ---- | ---- | ||
| - | ======How can I use an OpenStack cloud? | ||
| - | As an OpenStack cloud end user, you can provision your own resources | + | **3. Identify A volume |
| - | The examples in this guide show you how to perform tasks by using the following methods: | + | SSH into your instance, su to root and run **‘lsblk’** |
| - | | + | //**‘vda’** is the first disk of your Instance and contains one partition |
| - | + | ||
| - | * **OpenStack command-line clients:** Each core OpenStack project has a command-line client | + | |
| ---- | ---- | ||
| + | **4. Formatting the Volume.** | ||
| - | | + | Prerequisite: |
| - | 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. | + | As root: On Ubuntu based systems |
| - | For your convenience, | + | apt-get install xfsprogs -y |
| - | 1. First please open [[https:// | + | **Format |
| - | + | We are using **xfs** in this example because it is widely supported and supports extremely large volume sizes (9 exabytes) | |
| - | {{ : | + | |
| + | mkfs.xfs | ||
| ---- | ---- | ||
| - | 2. Launching | + | **5. Mounting |
| - | a) Provide the initial hostname for the instance, the availability zone where it will be deployed, | + | Create |
| - | {{ :guide: | + | As root: |
| - | 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. | + | "mkdir data1 |
| + | mount -t xfs /dev/vdc /data1 | ||
| + | df -hT / | ||
| - | {{ : | + | ---- |
| + | **6. Re-attaching the volume to a different Instance.** | ||
| - | // For this example. The instance is launched from the image source and a new volume | + | **a) Unmount |
| - | ---- | + | As root, use the command **" |
| + | umount /data1 | ||
| + | //NB Remove or comment out the line added in **/ | ||
| - | c) Decide on the flavor needed when launching the instance, Flavors manage the sizing for the compute, memory and storage capacity of the instance. | + | **b) Detach a volume.** |
| - | + | ||
| - | {{ : | + | |
| - | // For this example. The instance is launched with **m1.tiny flavor** selected from the list of available flavors. The m1.tiny flavor will allocate | + | 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’**. |
| - | 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.// | + | {{ : |
| + | From the Manage Volume Attachments form, Click **‘Detach Volume’** for the instance you wish to detach the volume from. | ||
| + | ---- | ||
| + | **7. Re-attach Volume.** | ||
| + | |||
| + | 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. | ||
| ---- | ---- | ||
| + | **8. Extend Volume (Grow)** | ||
| - | d) Select the network that your instance will connect | + | Volumes can also be extended in size. In order to Extend |
| - | {{ : | + | Note: Volumes cannot have their size reduced. |
| + | |||
| + | {{ : | ||
| + | |||
| + | Enter the new size of the volume and click **Extend Volume**. | ||
| - | //For this example. The instance is launched with **demo-vxlan** network selected | + | Re-attach the volume to your Instance, and remount the volume |
| + | As root: | ||
| + | | ||
| + | |||
| + | For more details, visit the openstack official pages: | ||
| ---- | ---- | ||
| + | ===== Upload and manage images ===== | ||
| + | A virtual machine image, referred to in this document simply as an image, is a single file that contains a virtual disk that has a bootable operating system installed on it. Images are used to create virtual machine instances within the cloud. For information about creating image files, see the [[https:// | ||
| - | e) Select the security groups to launch the instance in. | + | **1. Upload an image** |
| - | {{ :guide: | + | Follow this procedure to upload an image to a project: |
| - | //For this example. The instance is launched with **Default security group** | + | a) Log in to the dashboard. |
| + | b) Select the appropriate project | ||
| + | c) On the Project tab, open the Compute tab and click Images category. | ||
| + | d) Click Create Image. | ||
| + | |||
| + | Then Create An Image dialog box appears | ||
| - | ---- | + | {{ : |
| - | 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. | + | |
| - | {{ : | ||
| - | ---- | + | //Select **" |
| - | g) Optionally, You can customize your instance after it has launched using the options available here. " | + | |
| - | + | ||
| - | {{ : | + | |
| ---- | ---- | ||
| - | h) Finally, click the Launch button. It will take a few minutes for the instance | + | **How to deploy windows |
| - | ---- | + | Windows Image for OpenStack: For most Linux distributions, |
| - | ======How can I access | + | |
| + | Since Microsoft Windows is still a major component in many IT infrastructures, | ||
| - | * **OpenStack dashboard: | + | To upload Windows image, We suggest that you follow this tutorial for [[https:// |
| - | + | ||
| - | {{ :guide: | + | |
| + | 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 | ||
| + | | ||
| ---- | ---- | ||
| - | |||
| - | * **ssh into virtual machine:** When you started the VM and specified the name of your key pair, its public part was automatically added to the default user’s// | ||
| - | |||
| - | 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: | ||
| - | |||
| - | chmod 400 path_to_private_key | ||
| - | | ||
| - | Then, using the desired SSH client application, | ||
| - | ssh -i path_to_private_key ubuntu@X.X.X.X | + | ===== Access and security for instances ===== |
| - | | + | |
| - | //NB The X.X.X.X denotes to the IP address (use public IP allocated to the instance).// | + | |