Skip to content

hector-vido/openstack-aio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Openstack Ansible

Following the instructions on https://docs.openstack.org/openstack-ansible/2024.2/user/aio/quickstart.html.

Preparing the Virtual Machine

Since I work on Red Hat, I will use CentOS:

cd /var/lib/libvirt/images
wget https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-x86_64-9-latest.x86_64.qcow2 -O centos9.qcow2
virt-customize -a centos9.qcow2 --root-password password:centos --uninstall cloud-init --install vim,git
qemu-img create -f qcow2 -F qcow2 -b centos9.qcow2 openstack.qcow2 100G

Preparing the environment

Increase disk size, configure static network and allow ssh access:

growpart /dev/vda 4
xfs_growfs /dev/vda4

nmcli con
nmcli con modify 'System eth0' ipv4.method static ipv4.address 172.27.11.10/24 ipv4.gateway 172.27.11.1 ipv4.dns 172.27.11.1

sed -i 's,#PermitRootLogin.*,PermitRootLogin yes,' /etc/ssh/sshd_config 
sed -i 's,#PasswordAuthentication.*,PasswordAuthentication yes,' /etc/ssh/sshd_config
systemctl restart sshd

Install Openstack stuff:

git clone https://opendev.org/openstack/openstack-ansible /opt/openstack-ansible
cd /opt/openstack-ansible
git checkout stable/2024.2
git describe --abbrev=0 --tags
git checkout 30.0.1

scripts/bootstrap-ansible.sh

export INSTALL_METHOD=distro
export SCENARIO='aio_metal'

scripts/bootstrap-aio.sh
openstack-ansible openstack.osa.setup_hosts
openstack-ansible openstack.osa.setup_infrastructure
openstack-ansible openstack.osa.setup_openstack

Interacting with Openstack

source /root/openrc
openstack user list

Persisting Network

Since Networkmanger is masked after the baremetal distro installation, we should create a file for systemd-networkd, in this case the network is 172.27.11.0/24:

cat > /etc/systemd/network/0-eth0.network <<EOF
[Match]
Name = eth0

[Network]
Address = 172.27.11.10/24
Gateway = 172.27.11.1
DNS = 172.27.11.1
EOF

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published