Kembali ke Beranda
Networking

Deploy OpenStack dengan Juju dan MAAS

Instalasi Juju, konfigurasi cloud MAAS, penambahan credential, bootstrap controller, pembuatan model OpenStack, deployment bundle OpenStack, konfigurasi Keystone dan console Nova, akses Horizon, penambahan machine/unit, penghapusan machine/unit, cleanup environment, hingga command operasional Juju untuk model, controller, cloud, dan service machine.

Tutorial ini merapihkan catatan deploy OpenStack berbasis Juju charm dan MAAS.

1. Disable IPv6 Ubuntu

Edit /etc/sysctl.conf:

BASH
sudo nano /etc/sysctl.conf

Tambahkan:

TEXT
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Apply konfigurasi:

BASH
sudo sysctl -p

2. Install Juju

BASH
sudo snap install juju --classic

3. Tambahkan Cloud MAAS ke Juju

BASH
juju add-cloud --local

Input contoh:

TEXT
select cloud type : maas
Enter a name.... : maas
End Point : http://<MAAS_IP>:5240/MAAS

Ambil API key MAAS:

BASH
sudo maas apikey --username=admin

Tambahkan credential:

BASH
juju add-credential maas

Input contoh:

TEXT
Enter credential name: maas
Replace local credential? (y/N): y
Select region [any region, credential is not region specific]: default
Using auth-type "oauth1".

4. Bootstrap Controller Juju

BASH
nohup juju bootstrap maas maas-controller --debug --bootstrap-series=jammy --credential maas &

Alternatif:

BASH
juju bootstrap maas maas-controller --debug

5. Buat Model OpenStack

BASH
juju add-model openstack
juju add-model --config default-series=jammy openstack

6. Deploy OpenStack Bundle

Deploy dari charm store:

BASH
juju deploy cs:bundle/openstack-base-80
juju deploy cs:bundle/openstack-base-79
juju deploy cs:bundle/openstack-base-65

Deploy dari repository bundle:

BASH
git clone https://github.com/openstack-charmers/openstack-bundles
cd /home/<USER>/openstack-bundles/stable/openstack-base
juju add-model openstack
juju deploy ./bundle.yaml --debug

7. Konfigurasi Awal Keystone dan Console

BASH
juju config keystone admin-password=<PASSWORD>
juju config nova-cloud-controller console-access-protocol=novnc

Cek password admin:

BASH
juju run --unit keystone/0 leader-get admin_passwd

8. Akses Horizon

TEXT
http://<HORIZON_IP>/horizon

9. Tambah Machine dan Unit

Tambah machine by hostname dari MAAS:

BASH
sudo juju add-machine node10.maas --series="bionic"
juju add-machine node05.maas --series="jammy"
juju add-machine node06.maas --series="jammy"
juju add-machine node06.maas --series="focal"
sudo juju add-machine node13.maas --series="bionic" --debug

Tambah unit Ceph OSD dan Nova Compute:

BASH
sudo juju add-unit --to 28 ceph-osd
sudo juju add-unit --to 28 nova-compute
juju add-unit --to 4 ceph-osd
juju add-unit --to 5 ceph-osd
juju add-unit --to 28 nova-compute
juju add-unit --to 4 nova-compute
sudo juju add-unit --to 8 ceph-osd
sudo juju add-unit --to 8 nova-compute
sudo juju add-unit --to 2 ceph

10. Remove Machine dan Unit

BASH
sudo juju remove-machine 27 --force
sudo juju remove-machine 28 --force
sudo juju remove-machine 31 --force
juju remove-machine 5 --force
juju remove-unit postgresql/2
sudo juju remove-unit ceph-osd/10
sudo juju remove-unit ceph/3
sudo juju remove-machine 21
juju remove-unit ceph-osd/1

11. Clean OpenStack/Juju Environment

SSH ke controller:

BASH
ssh -i .local/share/juju/ssh/jujuidrsa ubuntu@<CONTROLLER_IP>

Hapus controller, credential, dan cloud:

BASH
juju kill-controller maas-controller
juju remove-credential maas maas
juju remove-cloud maas

12. Command Operasional Model dan Controller

BASH
juju models
juju destroy-model [nama model]
juju controllers
juju destroy-controller [nama controller]
juju clouds
juju remove-cloud [nama cloud]

13. Menyalakan Service Juju Machine Manual

BASH
sudo systemctl start jujud-machine-1/lxd/2*
sudo systemctl start jujud-machine-1/lxd/1*
sudo systemctl start jujud-machine-1/lxd/0*
sudo systemctl start jujud-machine-1*
openstackjujumaascloud deploymentubuntubare metalbootstrap controllerjuju modelopenstack bundlekeystonenovahorizonceph osdnova computeprovisioningcloud infrastructuretroubleshootingsystemctl