0%

This is a note on setting up kolla ansible openstack develop envrionment in your working machine.

I referred to this document: https://docs.openstack.org/kolla-ansible/latest/contributor/vagrant-dev-env.html

I had done this in 2020 May on my old mac mini with Catalina ;-). With 20 GiB disk and 6GiB RAM assigned to one Vagrant spawned (virtualbox), the OpenStack Cluster is running pretty well, comparing to my previous setups ( multi-VMs based manually deployment and VM based Mirantis Fuel 9.0 deployment), it’s obviously more reponsive with the help of the single node setup.

Here I leave the notes as a reference for you to have a playground easier.

Preparation

Install vagrant and plugins needed

Below is an example to do this on a macOS machine, to do that from other OS, refer to here

1
2
3
4
5
6
7
8
brew cask install virtualbox vagrant

vagrant plugin install vagrant-hostmanager vagrant-vbguest

# if we need to resize disks after vagrant up
vagrant plugin install vagrant-disksize
# if we need to make vagrant VM behind a proxy
vagrant plugin install vagrant-proxyconf

Clone kolla repo

We need to clone below three repositories.

1
2
3
git clone https://opendev.org/openstack/kolla-cli
git clone https://opendev.org/openstack/kolla-ansible
git clone https://opendev.org/openstack/kolla

Customise Vagrant scripts

I found the configuration file out-of-box is no longer working/ out of repair for some time, below changes on Vagrantfile, Vagrantfile.custom, and bootstrap.sh are needed.

For Vagrantfile.custom, we need to use Ubuntu 18.04 instead of 16.04, which comes with python3.6+ in apt repo.

Read more »

This is the note on serving your Ubuntu server from iPadOS/ iOS with UTM, I am running 0.8 now.

Download image

1
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img

Configure Password for the image, here we use chroot instead of config drive, the reason is at bottom.

Use chroot to set password for the cloud image as follow:

1
2
3
4
5
6
7
8
9
$sudo modprobe nbd max_part=1
$sudo qemu-nbd --connect=/dev/nbd0 bionic-server-cloudimg-amd64.img
$mkdir -p /mnt/nbd
$sudo mount /dev/nbd0p1 /mnt/nbd/ -o noatime
$chroot /mnt/nbd
ubuntu# passwd
ubuntu# exit
$sudo qemu-nbd --disconnect /dev/nbd0
$sudo umount /dev/nbd0p1
Read more »

Enable cobbler provisioning via L3 DHCP relay

I would like to setup a minimal PoC for Cobbler provisioning via DHCP relay, I will use virtualbox to spawn:

Three VMs:

  • Cobbler server in subnet A, let’s call it cobbler_server.
  • A machine to be provisioned in subnet B, it’s named as machine_0.
  • vRouter wired above machines in two subnets, it’s named as vrouter.

To create two subnets:

  • subnet_A, vboxnet0: 192.168.56.0/24
  • subnet_B, vboxnet1: 192.168.57.0/24

And it should be like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
+-------------+        +-------------+        +-------------+
| | | vRouter | | machine_0 |
| | |192.168.56.10| | |
| +-+ +-+ | | |
| | |00000000| rr | | |
| +-+ +-+r | | |
|192.168.56.11| | r | | |
| | | r | | |
| | | r | | |
| | | r +-+ +-+ |
| Cobbler | | rrrrrrrrr| |11111111| | |
| Server | | +-+ +-+ |
| | |192.168.57.10| | |
+-------------+ +-------------+ +-------------+


0000000 subnet A: vboxnet0 +-+
| | network interface
1111111 subnet B: vboxnet1 +-+

rrrrrrr DHCP Relay

Then we could use cobbler_server to provision a OS to machine_0.

Read more »