Howto openstack kolla: Difference between revisions

From Vidalinux Wiki
Jump to navigation Jump to search
No edit summary
Line 79: Line 79:
start virtual machines using the script:
start virtual machines using the script:
  openstack start
  openstack start
= configure nodes =
configure networking on node1 edit /etc/network/interfaces:
auto lo eth0 eth1 eth2 eth3
iface lo inet loopback
# eth0
iface eth0 inet manual
up ip link set dev eth0 up
down ip link set dev eth0 down
# eth1
iface eth1 inet static
address 192.168.88.58/24
gateway 192.168.88.1
dns-nameservers 192.168.88.64
# eth2
iface eth2 inet static
address 10.10.88.58/24
# eth3
iface eth3 inet manual
up ip link set dev eth3 up
down ip link set dev eth3 down


= references =
= references =
* https://docs.openstack.org/project-deploy-guide/kolla-ansible/zed/quickstart.html
* https://docs.openstack.org/project-deploy-guide/kolla-ansible/zed/quickstart.html

Revision as of 01:50, 17 May 2023

setup hosts

enable nested kvm edit /etc/modprobe.d/kvm.conf:

# For Intel
options kvm_intel nested=1
#
# For AMD
#options kvm_amd nested=1

if using rhel9 as host install the following repo:

dnf copr enable ligenix/enterprise-qemu-spice 

then install libvirt and qemu-kvm:

yum install -y libvirt qemu-kvm guestfs-tools

enable and start libvirtd daemon:

systemctl enable libvirtd && systemctl start libvirtd

create the following directory under /var/lib/libvirt/images:

mkdir /var/lib/libvirt/images/openstack 
cd /var/lib/libvirt/images/openstack

download debian bullseye:

wget https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2

for baremetal download the iso:

http://mirrors.ocf.berkeley.edu/debian-cd/11.7.0/amd64/iso-cd/debian-11.7.0-amd64-netinst.iso

resize cloud image:

cp debian-11-generic-amd64.qcow2 debian-11-generic-amd64_100G.qcow2
qemu-img resize debian-11-generic-amd64_100G.qcow2 +98G

set root password for image:

virt-sysprep -a debian-11-generic-amd64_100G.qcow2 -q --root-password password:livinglavidalinux

create storage images for openstack nodes:

cp debian-11-generic-amd64_100G.qcow2 openstack-node1.qcow2
cp debian-11-generic-amd64_100G.qcow2 openstack-node2.qcow2
cp debian-11-generic-amd64_100G.qcow2 openstack-node3.qcow2
cp debian-11-generic-amd64_100G.qcow2 openstack-node4.qcow2
cp debian-11-generic-amd64_100G.qcow2 openstack-node5.qcow2

create storage images for ceph cluster:

qemu-img create -f qcow2 ceph_storage_server1_1.img 100G 
qemu-img create -f qcow2 ceph_storage_server1_2.img 100G
qemu-img create -f qcow2 ceph_storage_server1_3.img 100G
qemu-img create -f qcow2 ceph_storage_server1_4.img 100G
qemu-img create -f qcow2 ceph_storage_server2_1.img 100G
qemu-img create -f qcow2 ceph_storage_server2_2.img 100G
qemu-img create -f qcow2 ceph_storage_server2_3.img 100G
qemu-img create -f qcow2 ceph_storage_server2_4.img 100G
qemu-img create -f qcow2 ceph_storage_server3_1.img 100G
qemu-img create -f qcow2 ceph_storage_server3_2.img 100G
qemu-img create -f qcow2 ceph_storage_server3_3.img 100G
qemu-img create -f qcow2 ceph_storage_server3_4.img 100G

download virtual machines xml:

wget https://img.vidalinux.com/files/openstack/XML/openstack-node1-debian10-2023-05-16.xml
wget https://img.vidalinux.com/files/openstack/XML/openstack-node2-debian10-2023-05-16.xml
wget https://img.vidalinux.com/files/openstack/XML/openstack-node3-debian10-2023-05-16.xml
wget https://img.vidalinux.com/files/openstack/XML/openstack-node4-debian10-2023-05-16.xml
wget https://img.vidalinux.com/files/openstack/XML/openstack-node5-debian10-2023-05-16.xml

import virtual machines:

virsh define openstack-node1-debian10-2023-05-16.xml
virsh define openstack-node2-debian10-2023-05-16.xml
virsh define openstack-node3-debian10-2023-05-16.xml
virsh define openstack-node4-debian10-2023-05-16.xml
virsh define openstack-node5-debian10-2023-05-16.xml

copy and pasted the following on your shell:

cat > /usr/local/bin/openstack << "EOF"
#!/bin/bash 

VMS="openstack-node1-debian10
openstack-node2-debian10
openstack-node3-debian10 
openstack-node4-debian10
openstack-node5-debian10"

if [ $1 = start ]; 
then
for u in ${VMS}; do virsh start $u; done
fi  

if [ $1 = shutdown ];
then
for u in ${VMS}; do virsh shutdown $u; done
fi
EOF

fix permissions:

chmod +x /usr/local/bin/openstack

start virtual machines using the script:

openstack start

configure nodes

configure networking on node1 edit /etc/network/interfaces:

auto lo eth0 eth1 eth2 eth3
iface lo inet loopback
# eth0
iface eth0 inet manual
up ip link set dev eth0 up
down ip link set dev eth0 down
# eth1
iface eth1 inet static
address 192.168.88.58/24
gateway 192.168.88.1
dns-nameservers 192.168.88.64
# eth2
iface eth2 inet static
address 10.10.88.58/24
# eth3
iface eth3 inet manual
up ip link set dev eth3 up
down ip link set dev eth3 down


references