From Ubuntu iso to openstack (All-In-One)
Ubuntu installation
Keyboard configuration
Use your favorite keyboard layout
Here: fr/fr
Choose type of install
Select Ubuntu Server (minimized) without checking “Search for third-party drivers”
Network configuration
ens18 can be dhcp or manual
ens19 must be disabled for now
Configure proxy
If you have a proxy to use, configure it, but here nope
Configure Ubuntu archive mirror
If you have a mirror @ home or cache, you can use it. Here we’ll use default mirror
Guided storage configuration
Do as you want, here I use default configuration without encryption
Storage configuration
ubuntu-lv must be resized to maximum size.
Profile setup
Do as you want
Upgrade to Ubuntu Pro
Do as you want, here I skip for now
SSH Setup
Install OpenSSH Server
You can import your ssh keys from GitHub or Launchpad.
Featured Server Snaps
DO NOT CHECK ANYTHING
Install complete
Wait for system update before reboot
After that, you can reboot and remove your bootable media.
Configure lvm partition
Fdisk
sudo fdisk /dev/<disk>n
p
ENTER
ENTER
t
L
Look at 8e, it must be LVM (if not, search for “Linux LVM”)
Type 8e or new code
p
Look if it’s marked as “Linux LVM”
w
Create cinder-volumes
sudo pvcreate -f /dev/<disk>1
sudo vgcreate -f cinder-volumes /dev/<disk>1
Verify if all is ok with: sudo vgs
User rights
As default user, when you need privilege escalation, you need to type a password.
Ansible cannot know the password without telling him OR by modifying sudoers file.
sudo visudoPut this:
leo ALL=(ALL:ALL) NOPASSWD:ALLNetworking
In /etc/netplan/00-installer-config.yaml:
# This is the network config written by 'subiquity'
network:
ethernets:
ens18:
dhcp4: true
ens19:
dhcp4: false
dhcp6: false
version: 2Install Kolla-Ansible
Install dependencies
sudo apt update && sudo apt install ufw python3-dev git libffi-dev gcc libssl-dev && sudo apt install python3-pip && sudo pip3 install -U pipInstall Kolla-Ansible
sudo pip3 install git+https://opendev.org/openstack/kolla-ansible@master && sudo mkdir -p /etc/kolla && sudo chown $USER:$USER /etc/kolla && cp -r /usr/local/share/kolla-ansible/etc_examples/kolla/* /etc/kolla && cp /usr/local/share/kolla-ansible/ansible/inventory/* .Install Ansible dependencies
kolla-ansible install-depsPrepare installation
Generate passwords
kolla-genpwdEdit configuration (/etc/kolla/globals.yml)
kolla_base_distro: "ubuntu"
openstack_release: "zed"
network_interface: "ens18"
neutron_external_interface: "ens19"
kolla_internal_vip_address: "10.1.2.250"
openstack_region_name: "eu-west" # Can be anything in one word
enable_openstack_core: "yes"
enable_heat: "yes"
enable_cinder: "yes"
enable_cinder_backend_lvm: "yes"
cinder_volume_group: "cinder-volumes"
neutron_plugin_agent: "openvswitch"
enable_neutron_provider_networks: "yes"
enable_neutron_qos: "yes"
nova_compute_virt_type: "kvm"Deployment
kolla-ansible -i ./all-in-one bootstrap-servers && kolla-ansible -i ./all-in-one prechecks && kolla-ansible -i ./all-in-one deploySetup openstack cli
sudo pip install python-openstackclient -c https://releases.openstack.org/constraints/upper/masterkolla-ansible post-deploy && sudo cp /etc/kolla/clouds.yaml /etc/openstack && mkdir ~/.config && sudo cp /etc/kolla/clouds.yaml ~/ && sudo chown $USER:$USER clouds.yamlCreate “default” flavor
openstack --os-cloud kolla-admin flavor create --vcpus 1 --ram 512 --disk 1 m1.tiny && \
openstack --os-cloud kolla-admin flavor create --vcpus 1 --ram 2048 --disk 20 m1.small && \
openstack --os-cloud kolla-admin flavor create --vcpus 2 --ram 4096 --disk 40 m1.medium && \
openstack --os-cloud kolla-admin flavor create --vcpus 4 --ram 8192 --disk 80 m1.large && \
openstack --os-cloud kolla-admin flavor create --vcpus 8 --ram 16384 --disk 160 m1.xlargeReboot
Reboot after installation is better but not mandatory
Setup Network
Create basic public router
openstack --os-cloud kolla-admin router create router && \
openstack --os-cloud kolla-admin network create local-net && \
openstack --os-cloud kolla-admin subnet create --subnet-range 10.0.0.0/16 --network local-net --gateway 10.0.0.1 --dns-nameserver 8.8.8.8 local-subnet && \
openstack --os-cloud kolla-admin router add subnet router local-subnet && \
openstack --os-cloud kolla-admin network create --external --provider-physical-network physnet1 --provider-network-type flat public1 && \
openstack --os-cloud kolla-admin subnet create --allocation-pool start=10.1.2.150,end=10.1.2.199 --network public1 --subnet-range 10.1.2.0/24 --gateway 10.1.2.1 public1-subnet && \
openstack --os-cloud kolla-admin router set --external-gateway public1 routerEnable packet forwarding
Edit /etc/sysctl.conf
net.ipv4.ip_forward=1
net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.all.rp_filter=0iptables command
sudo iptables -t nat -A POSTROUTING -o ens18 -j MASQUERADEIf you did not reboot your server, please enable the ens19 interface
sudo ip link set dev ens19 upTesting installation
Import Cirros image
wget https://download.cirros-cloud.net/0.6.0/cirros-0.6.0-x86_64-disk.img
openstack --os-cloud kolla-admin image create --container-format bare \
--disk-format qcow2 --file cirros-0.6.0-x86_64-disk.img cirrosImport Ubuntu 22.04 image
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
openstack --os-cloud kolla-admin image create --container-format bare \
--disk-format qcow2 --file jammy-server-cloudimg-amd64.img ubuntu-22.04Create security groupe allowing ssh
openstack --os-cloud kolla-admin security group create ssh && \
openstack --os-cloud kolla-admin security group rule create --protocol tcp --remote-ip 0.0.0.0/0 --ingress --dst-port 22 ssh