You can check my old posts:
How to deploy OpenStack HA cluster using Ceph storage.
How to deploy a single node using local storage.
Deploying Single node Openstack with S3 as a Cinder Backup driver: –
Requirements: –
OS – CentOS/RHEL.
At least two NIC cards. One is for management, and one for the Cloud network (note: – for the second NIC, don’t assign any IP). (You can refer to the following link to understand the network and requirements – https://docs.openstack.org/install-guide/launch-instance-networks-provider.html)
One dedicated Raw disk for Cinder
One VIP
One Network CIDR for OpenStack Provider/External network (ex: – 172.16.24.0/24)
Internet Access
MinIO IP/FQDN and Bucket, access and secret key details.
Please check my post –
How to deploy and create a bucket in MinIO. –
Deploying Openstack single node using a script :-
I Deploy CentOS Stream 9 VM on vSphere.
A 350GB disk (sda)is attached to the VM for cinder storage. I attached a second NIC without assigning any IP.
Install git
$ dnf install git -y
Clone git Repository – https://github.com/Dineshk1205/aio
$ git clone https://github.com/Dineshk1205/aio
Switch to the aio directory.
Assign execute permission to the aio.sh file.
$ chmod +x aio.sh
Run script file.
$ ./aio.sh
Press Enter. Press TAB, select ok, and press Enter.
Enter VIP. Press TAB, select ok, and press Enter.
Enter Primary NIC name. Press TAB, select ok, and press Enter.
Enter the Second NIC name. Press TAB, select ok, and press Enter.
Choose Network Plugin based on your requirements. Press TAB, select ok, and press Enter.
Enter the Disk name used for Cinder storage (ex: – my disk name is – /dev/sda: you can check screenshot1). Press TAB, select ok, and press Enter.
Determine whether your compute node supports hardware acceleration for virtual machines.
$ egrep -c ‘(vmx|svm)’ /proc/cpuinfo
If this command returns a value of one or greater, your compute node supports hardware acceleration – Choose – KVM.
If this command returns a value of zero, your compute node does not support hardware acceleration
– Choose – Qemu.
Select and press enter.
Enter the Keystone admin password (Using the Keystone admin password, you have to log in to OpenStack Dashboard). Press TAB, select ok, and press Enter.
Enter the MinIO URL with port number 9000. Press TAB, select ok, and press Enter.
Enter the MinIO bucket name. Press TAB, select ok, and press Enter.
Enter the MinIO access key. Press TAB, select ok, and press Enter.
Enter MinIO Secret Key. Press TAB, select ok, and press Enter.
Enter the OpenStack Provider/External CIDR range, for example, 172.16.24.1/23. Press TAB, select ok, and press Enter.
Enter the provider/external network CIDR start and end IP range, for example, start=172.16.25.198,end=172.16.25.204. Press TAB, select ok, and press Enter.
Enter Provider/External Network Gateway IP. Press TAB, select ok, and press Enter.
Deployment may take 15 to 25 minutes, depending on your environment.
Once deployment is completed successfully on the screen, you will get a successfully deployed message.
Open a web browser. Enter URL – http://IP/FQDN to access Openstack Dashboard.
After logging in, you can check whether all the OpenStack service states are up or down.
OpenStack Cinder Volume Backup and Restore: –
First, Deploy an Instance.
Click on the Launch Instance option.
Enter the Instance name, and Click on Next.
Select Centos9 Image. ( I am not using cinder volume as the root disk; I selected to create a new disk as a NO). Click on Next.
Select Flavor (for testing purposes, you can select m1. medium)
Only one provider network is available, so it selects the provided network automatically. Using Configuration, you can pass a username and password to the instance.
#cloud-config
user: cloud
password: Cloud@123
chpasswd: {expire: False}
ssh_pwauth: True
Click on launch.
The instance was created successfully.
For testing the Cinder Volume backup and restore.
First, create a new volume and attach it to the instance.
In the volume section. Volumes > Click on Create a volume.
Enter the Volume name. Enter Size and click on create a volume.
Volume created successfully.
Attaché Volume to Instance. Click on the Manage attachment option.
Select Instance and click on attach volume.
Volume attached to instance.
Login to the instance. Check the attached disk. Vdb disk added.
Before mounting the volume, format the disk.
Make a file system. And mount disk.
Create backuptest directory
$ mkdir /backuptest
Mounted disk
$ mount /dev/vdb1 /backuptest
For testing purposes, add some data/files into backuptest directory.
To generate dummy data, use the below command
$ fallocate -l 500M test.txt
Backup attached volume.
$ openstack volume backup create –name backupname –container bucketname VOLUMEID/NAME –force
For attached volumes, Use –force; otherwise, the backup will fail because the volume is attached to the instance.
Backup successfully created. (you can see the below screenshot is_incremntal is False Because we are not taking incremental backups)
You can check in MinIO; Backup objects are created.
For testing the backup restore. Unmount the disk from the instance.
$ umount /backuptest
Detach the volume from the instance.
Detach completed successfully from the instance.
Delete Volume: we can restore volume from the backup.
Volume deleted successfully.
Next, we can volume from the back and check whether data is available. Restore volume.
Click on the Restore backup option.
Click on Restore Backup to a Volume option. The new volume will be created. You can restore backup data to existing volume also (note: disk will be in available state)
A new Volume was created from the backup.
Attach the volume to the Instance.
Got to instance CLI and mount volume.
Backup restoration will restore the partition table and partition schema as well as the filesystem and files.
You can see the test.txt in the backuptest directory.
Cinder Volume Backup and Restore are working fine.
You can also configure incremental backups for cinder volumes. While creating a backup, use –incremental for creating incremental backups.
You can also check in MinIO. Incremental backup objects were created.
Kubernetes (often shortened to “K8s”) is an open-source system for automating the deployment, scaling, and…
Ceph is an open-source, distributed storage platform that provides object, block, and file storage in…
Prerequisites Red Hat OpenShift cluster deployed and operational You can refer to my earlier post…
Agent-Based Installation The Agent-based installation method provides the flexibility to boot your on-premise servers in…
You can check the earlier post regarding cluster setup and ODF setup https://kdinesh.in/deployment-of-openshift-4-20-with-using-the-assistant-installer/ https://kdinesh.in/openshiftodf/ Login…
You can check the earlier post regarding cluster setup https://kdinesh.in/deployment-of-openshift-4-20-with-using-the-assistant-installer/ 1.Install nm state operator 2.…
View Comments
does this script works on ubuntu 22.04?
Hi Syed Usman Ali,
On Ubuntu, the script won't work. It works on Centos/RHEL. Tested on Centos9.