Selasa, 23 September 2025

Deploying Red Hat OpenStack Platform (RHOSP) - Bahasa Indonesia

 Halo guys, Ridwan here..
Come again with new notes update!

Sebagai Cloud Consulant yang bekerja pada salah satu partner untuk Red Hat, dengan status "Certified Red Hat Delivery Partner". Kita harus lebih memahami mendalam pada semua produk dari Red Hat, salah satunya Red Hat OpenStack® Platform (RHOSP)

Jadi tulisan kali ini, kita akan membahas Red Hat® OpenStack® Platform (RHOSP).



Mari.. Kita pahami terlebih dahulu Apa itu "Openstack" ?
Openstack Merupakan Platform open-source berupa kumpulan service yang menyediakan infrastruktur layanan Cloud / IaaS, untuk membangun dan mengelola cloud privat, publik, dan hybrid. Lengkapnya kalian dapat baca di link berikut :
https://www.redhat.com/en/topics/openstack
https://www.redhat.com/en/services/training/cl010-red-hat-openstack-technical-overview

Why Red Hat OpenStack?
Seperti info sebelumnya bahwa bahwa Openstack Platform merupakan OpenSource Project, 
Kemudian Red Hat hadir untuk memberikan layanan-layanan Enterprise seperti menyediakan packages yang lebih stable, patch, support, dan lainnya. Sehingga memberikan "Peace of Mind" untuk client enterprise yang ingin menggunakan Openstack Platform.
Lengkapnya kalian dapat baca di link berikut : 
https://www.redhat.com/en/topics/cloud-computing/why-choose-red-hat-cloud

Sebelum kita jauh membahas teknis instalasi, ada beberapa hal yang menjadi "Prerequisite" untuk Engineer :

  • Memahami konsep Virtualisasi
  • Memahami konsep Clustering
  • Memahami konsep Networking (Virtual, Physical Networking)
  • Memahami konsep PXE-Boot
  • Familiar dengan BMC (Baseboard Management Controller) 
  • Familiar dengan RHEL (Red Hat Enterprise Linux)
  • Familiar dengan Automation Tool Ansible
  • Familiar dengan Container & Podman

Ok, mungkin itu minimal "prerequisite" yang harus dipahami oleh engineer sebelum melakukan instalasi.
Sudah mulai pusing ? Tenang.. ini baru permulaan !

Sebelum kita lanjut, ini adalah contoh Jaringan minimal yang akan kita gunakan untuk melakukan instalasi RHOSP Cluster

Mari kita lanjut ke langkah selanjutnya yang lebih pusing ~

Installation of Red Hat OpenStack.

Untuk proses instalasi ini akan sangat panjang, dan ta coba bikin menjadi beberapa part.
Mudah2an semua nya akan sesuai dengan tuntunan dokumentasi, agar tidak tersesat & menjadi bid'ah. 

Pada step ini, kita harus memastikan semua baremetal server yang akan kita gunakan status nya ready to use & dapat di akses BMC (Baseboard Management Controller) nya : 

  • Director 
  • Controller
  • Compute
  • Compute-HCI (*)
  • External-Storage (*)

01. Director  Installation & Undercloud Preaparation

Untuk melakukan proses & metode instalasi yang ditawarkan oleh Red Hat OpenStack® Platform (RHOSP) adalah menggunakan metode TripleO (OpenStack On OpenStack) melalui Director. 

Apa itu Director ?
Lengkapnya kalian dapat baca di link berikut : 
https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.0/html/director_installation_and_usage/assembly_introduction-to-director

"With Director, you can install a fully operational, lean, and robust RHOSP environment that can provision and control bare metal systems to use as RHOSP nodes."

Setelah berhasil install Operating System RHEL pada Director Node, lakukan beberapa config untuk prepare Undercloud : 

1. Add User "stack" & Set Hostname :

[root@director ~]# useradd stack
[root@director ~]# echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack
[root@director ~]# chmod 0440 /etc/sudoers.d/stack
[root@director ~]# su - stack
[stack@director ~]$

2. Create directories for system images and heat templates

[stack@director ~]$ mkdir ~/images
[stack@director ~]$ mkdir ~/templates

3. Set Hostname

[stack@director ~]$ sudo hostnamectl set-hostname undercloud.example.com

4. Register Subscription & Enable Repositories.

# Register subscription.
[stack@director ~]$ sudo subscription-manager register
[stack@director ~]$ sudo subscription-manager release --set=9.2

# Enable Repositories.
[stack@director ~]$ sudo subscription-manager repos \
--enable=rhel-9-for-x86_64-baseos-e4s-rpms          \
--enable=rhel-9-for-x86_64-appstream-e4s-rpms       \
--enable=rhel-9-for-x86_64-highavailability-e4s-rpms \
--enable=openstack-17.1-for-rhel-9-x86_64-rpms \
--enable=fast-datapath-for-rhel-9-x86_64-rpms

5. Perform an Update & Install, the command line tools for director installation

[stack@director ~]$ sudo dnf update -y && sudo dnf install -y python3-tripleoclient

Ref Link : 
https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/html-single/installing_and_managing_red_hat_openstack_platform_with_director/index#assembly_preparing-for-director-installation

02. Undercloud Installation

The undercloud installation requires an environment file to determine where to obtain container images and how to store them. Generate and customize the environment file that you can use to prepare your container images.

01. Preparing Container Images

[stack@director ~]$ openstack tripleo container image prepare default \
  --local-push-destination \
  --output-env-file containers-prepare-parameter.yaml

Notes..
Pada file "containers-prepare-parameter.yaml" pastikan parameter berikut sudah sesuai :

  ContainerImageRegistryCredentials:
    registry.redhat.io:

Create Token Service Account
"Registry service accounts are named tokens that can be used in environments where credentials will be shared, such as deployment systems."  pada ulr berikut > https://access.redhat.com/terms-based-registry/

02.  Configure the Undercloud
You must configure the undercloud before installing director. You configure the undercloud in the undercloud.conf file, which director reads from the home directory of the stack user.

[stack@director ~]$ cp \
  /usr/share/python-tripleoclient/undercloud.conf.sample \
  ~/undercloud.conf

Edit file "undercloud.conf" tersebut sesuai dengan kondisi kalian environment kalian, 
Jangan takut salah karena ada sample nya pada "/usr/share/python-tripleoclient/undercloud.conf.sample"

[stack@director ~]$ vim ~/undercloud.conf

03.  Install the Undercloud

This command launches the director configuration script. Director installs additional packages, configures its services according to the configuration in the undercloud.conf, and starts all the RHOSP service containers. This script takes several minutes to complete.

[stack@director ~]$ openstack undercloud install

Validate the installation process, and make sure (healthy) :

[stack@director ~]$ sudo podman ps -a --format "{{.Names}} {{.Status}}"

03. Overcloud Images Preparation


01.
Installing the Overcloud Images

 Red Hat OpenStack Platform (RHOSP) installation includes packages that provide you with the overcloud-hardened-uefi-full.qcow2 overcloud image for director. This image is necessary for deployment of the overcloud with the default CPU architecture, x86-64. Importing this image into director also installs introspection images on the director PXE server.

# Source the stackrc file:
[stack@director ~]$ source ~/stackrc

# Install Packages 
(undercloud) [stack@director ~]$ sudo dnf install rhosp-director-images-uefi-x86_64 rhosp-director-images-ipa-x86_64

02. Create the images directory in the home directory of the stack user, /home/stack/images:

(undercloud) [stack@director ~]$ mkdir /home/stack/images
(undercloud) [stack@director ~]$ cd ~/images

03. Extract the images archives to the images directory:

(undercloud) [stack@director images]$ for i in /usr/share/rhosp-director-images/ironic-python-agent-latest.tar /usr/share/rhosp-director-images/overcloud-hardened-uefi-full-latest.tar; do tar -xvf $i; done

04. Import the images into director:

(undercloud) [stack@director images]$ openstack overcloud image upload --image-path /home/stack/images/

05. Verify that the files are copied :

  • /var/lib/ironic/images/
  • /var/lib/ironic/httpboot

04. Overcloud Network Preparation

Pada step ini kita akan mendifinisikan semua terkait network yang akan digunakan oleh node & platform openstack. 
Sama hal nya dengan config file sebelumnya, semuanya sudah ada sample nya..
untuk network config ini, sample nya tersedia pada directory /usr/share/openstack-tripleo-heat-templates/network-data-samples.

[stack@director network-data-samples]$ pwd && ll
/usr/share/openstack-tripleo-heat-templates/network-data-samples

total 56
-rw-r--r--. 1 root root 1554 Feb  9  2024 default-network-isolation-ipv6.yaml
-rw-r--r--. 1 root root 1181 Feb  9  2024 default-network-isolation.yaml
-rw-r--r--. 1 root root 1126 Feb  9  2024 ganesha-ipv6.yaml
-rw-r--r--. 1 root root 1100 Feb  9  2024 ganesha.yaml
-rw-r--r--. 1 root root 3556 Feb  9  2024 legacy-routed-networks-ipv6.yaml
-rw-r--r--. 1 root root 2929 Feb  9  2024 legacy-routed-networks.yaml
-rw-r--r--. 1 root root  383 Feb  9  2024 management-ipv6.yaml
-rw-r--r--. 1 root root  290 Feb  9  2024 management.yaml
-rw-r--r--. 1 root root  136 Feb  9  2024 no-networks.yaml
-rw-r--r--. 1 root root 2725 Feb  9  2024 routed-networks-ipv6.yaml
-rw-r--r--. 1 root root 2033 Feb  9  2024 routed-networks.yaml
-rw-r--r--. 1 root root  943 Feb  9  2024 vip-data-default-network-isolation.yaml
-rw-r--r--. 1 root root  848 Feb  9  2024 vip-data-fixed-ip.yaml
-rw-r--r--. 1 root root 1050 Feb  9  2024 vip-data-routed-networks.yaml

Semua file ini silakan dibaca-baca semua filenya~ 

[stack@director ~]$ cat /usr/share/openstack-tripleo-heat-templates/network-data-samples/*.yaml

Dan.. Let's create your own config environment!

## Network Data
[stack@director ~]$ vim ~/templates/depyloyment_network_data.yaml

## Network Virtual IP (VIP) 
[stack@director ~]$ vim ~/templates/depyloyment_network_vip.yaml

Setelah dibuat dua file config tersebut. lakukan register config network tersebut !

## Register Network Data
(undercloud) [stack@director ~]$ openstack overcloud network provision \
~/templates/deployment_network_data.yaml \ 
--output ~/templates/overcloud_deployed_networks.yaml 

## Register Network VIP
(undercloud) [stack@director ~]$ openstack overcloud network vip provision \
--stack overcloud --output ~/templates/overcloud_deployed_vips.yaml \
~/templates/00-vip_data.yaml

Setelah proses register / provision berhasil, agar tergenerate file baru untuk overcloud, sesuai --output kalian ! 
Dan make Everything works fine !

(undercloud)$ openstack network list
(undercloud)$ openstack network show <network-id>
==
(undercloud)$ openstack subnet list
(undercloud)$ openstack subnet show <subnet-id>
===
(undercloud)$ openstack port list
(undercloud)$ openstack port show <port-id>

05. Overcloud Node Preparation

Pada step ini kita akan mendifinisikan server baremetal yang kita miliki, pada dokumentasi terdapat 2 jenis file type yg dapat digunakan .json atau .yaml, disini kita menggunakan example yaml berikut :

nodes:
  - name: "node01"
    ports:
      - address: "aa:aa:aa:aa:aa:aa"
        physical_network: ctlplane
        local_link_connection:
          switch_id: "52:54:00:00:00:00"
          port_id: p0
    cpu: 4
    memory: 6144
    disk: 40
    arch: "x86_64"
    pm_type: "ipmi"
    pm_user: "admin"
    pm_password: "p@55w0rd!"
    pm_addr: "192.168.24.205"
    pm_port: '443'
 - name: "node02"
   ..... (Typical Config)
 - name: "node03"
   ..... (Typical Config)

Dsini saya membuat 2 file yaml, sesuai dengan role yaitu Node-Compute & Node-Controller

[stack@director ~]$ ll /home/stack/nodes
-rw-r--r--. 1 stack stack 1321 Sep XX 02:40 node-compute.yaml
-rw-r--r--. 1 stack stack 1338 Sep XX 02:50 node-controller.yaml

Jika sudah yakin pada file nodes yang kalian buat, lakukan validate & register nodes.

## Validate & Test File
(overcloud) [stack@director ~]$ openstack overcloud node import ~/nodes/node-compute.yaml --validate-only

## Apply Node
(overcloud) [stack@director ~]$ openstack overcloud node import ~/nodes/node-compute.yaml

Register the nodes !

(overcloud) [stack@director ~]$ openstack overcloud node introspect --all-manageable --provide

Reff Link :
https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/html-single/installing_and_managing_red_hat_openstack_platform_with_director/index#proc_registering-nodes-for-the-overcloud_ironic_provisioning

06. Overcloud Bare Metal Provisioning

Pada step ini kita akan melakukan perform install semua node yang terdaftar, seperti install OS, Packages, Config, lainnya. Tapi sebelum lanjut semua step di atas harus sudah berhasil dilewati !

  • The undercloud is installed.
  • The bare metal nodes are registered, introspected, and available for provisioning and deployment. 

Sesuai dengan dokumentasi kita akan membuat file overcloud deploy "overcloud_deployed_baremetal.yaml" , Tapi file ini harus digenerate dari file baremetal_deployment berikut 

## Original sample
[stack@director ~]$ cat /usr/share/openstack-tripleo-heat-templates/baremetal-samples/baremetal_deployment.yaml

## Create your File
[stack@director ~]$ cp /usr/share/openstack-tripleo-heat-templates/baremetal-samples/baremetal_deployment.yaml ~/templates/depyloyment_baremetal.yaml

notes..
Pada sample file baremetal deployment di atas, terdapat parameter "network_config: template" untuk memanggil config template network nic, kalian dapat menggambil sample nya pada /usr/share/ansible/roles/tripleo_network_config/templates

Jika sudah yakin, Let's Provision the overcloud nodes !

(undercloud) [stack@director ~]$ openstack overcloud node provision --stack <overcloud>		
~/templates/depyloyment_baremetal.yaml \
--network-config \
--output ~/templates/overcloud_deployed_baremetal.yaml 

Monitor the provisioning progress

# When provisioning is successful, the node state changes from available to active.
(undercloud)$ openstack baremetal node list

# Use the metalsmith tool to obtain a unified view of your nodes, including allocations and ports:
(undercloud)$ metalsmith list

07. Overcloud Deploy !

Setelah berhasil melakukan provisioned menggunakan heat-template untuk network, baremetal resource, & lainnya..
Sekarang kita bisa melakukan tahap final, yaitu "overcloud deploy" !
Dengan syarat :
You have provisioned the network resources and bare-metal nodes required for your overcloud.

Pastikan file overcloud config yang sudah berhasil kita generate pada step-step sebelumnya, sudah siap & ready to use !

  • overcloud_deployed_baremetal.yaml 
  • overcloud_deployed_networks.yaml
  • overcloud_deployed_networks_vip.yaml 

kita baca dulu dokumentasinya,  Reff Link :
https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/html-single/installing_and_managing_red_hat_openstack_platform_with_director/index#assembly_configuring-and-deploying-the-overcloud

https://docs.redhat.com/en/documentation/red_hat_openstack_platform/17.1/html-single/installing_and_managing_red_hat_openstack_platform_with_director/index#proc_creating-your-overcloud_ironic_provisioning

Sebelum kita jalankan perintah overcloud deploy, pastikan semua file file yg digunakan ready to use :

(undercloud) $ openstack overcloud deploy --timeout 460 --templates /usr/share/openstack-tripleo-heat-templates \
-r /home/stack/templates/roles_data.yaml \
-n /home/stack/templates/deployment_network_data.yaml \
-e /home/stack/templates/configure-domain.yaml \
-e /home/stack/containers-prepare-parameter.yaml \
-e /home/stack/templates/overcloud_deployed_baremetal.yaml \
-e /home/stack/templates/overcloud_deployed_networks.yaml \
-e /home/stack/templates/overcloud_deployed_networks_vip.yaml  \
-e /home/stack/templates/rhsm.yaml \
-e /home/stack/templates/external-ceph.yaml 

Pada command di atas, ada beberapa file yang mungkin tidak diterangkan pada tulisan ini seperti :

  • configure-domain
    tujuan file ini untuk mengconfig FQDN (Fully Qualified Domain Name) pada node, overcloud.
    untuk sample file nya kalian dapat lihat pada /usr/share/openstack-tripleo-heat-templates/environments/predictable-placement/custom-domain.yaml
  • ceph-client
    Tujuan ini file ini untuk mengconfig overcloud agar terhubung ke ceph server yang akan digunakan sebagai back-end storage, untuk sample file nya kalian dapat lihat pada  /usr/share/openstack-tripleo-heat-templates/deployment/cephadm/ceph-client.yaml
  • rhsm
    Tujuan file ini untuk menconfig Red Hat Subscription, yang digunakan oleh overcloud, untuk sample file nya kalian dapat lihat pada : /usr/share/openstack-tripleo-heat-templates/deployment/rhsm/rhsm-baremetal-ansible.yaml

Share: