Definisi Packstack
Packstack is a utility that uses Puppet modules to deploy various parts of OpenStack on multiple pre-installed servers over SSH
automatically. Currently only CentOS
, Red Hat Enterprise Linux (RHEL)
and compatible derivatives of both are supported (https://wiki.openstack.org/wiki/Packstack)
pada tutorial kali ini saya akan menginstall openstack versi ocata mengunakan tool deployment PackStack. packstack salah satu tool yang cukup simple untuk deploy openstack. namun kali ini saya akan membuat script bash untuk proses installasinya, supaya lebih cepet dan tidak mengulangi pekerjaan yang sama secara berulangkali jadi saya mencoba unutk membuat tool script automation.
Topologi LAB
pada lab ini saya akan menginstall openstack all in one mesin, sehingga semua service dari neutron,nova sampai horizon hanya dijalankan pada satu mesin, untuk lab ini hanya benar2 untuk kepentiangan lab saja, tidak di sarankan untuk kepentiangan production.
Konfigurasi Dasar mesin AIO Openstack
- Hostname = openstack
- IP address
- eth0 = 192.168.100.100/24 (network Managemen )
- eth1 = 192.168.122.100/24 (network publik untuk instance)
berikut adalah file bash script untuk deployment openstack dengan nama aio-openstack.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
#!/usr/bin/env bash ##### Host Resolver ##### grep openstack /etc/hosts > /dev/null 2>&1 || echo "192.168.100.100 openstack" >> /etc/hosts ##### Repositories ##### echo -n "Installing repo openstack ocata.... " && yum -y install centos-release-openstack-ocata.noarch > /dev/null 2>&1 && echo "done" echo -n "installing repo epel-7... " && yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm > /dev/null 2>&1 && echo "done" echo -n "Update Repo... " && yum -y update > /dev/null 2>&1 && echo "done" ##### NTP ##### echo -n "Installing chrony for NTP..." && yum -y install chrony > /dev/null 2>&1 && echo "done" systemctl enable chronyd.service systemctl restart chronyd.service systemctl status chronyd.service ##### Firewall ##### systemctl stop firewalld.service systemctl disable firewalld.service systemctl status firewalld.service ##### Disable NetworkManager ##### systemctl disable NetworkManager.service systemctl stop NetworkManager.service systemctl status NetworkManager.service systemctl enable network.service systemctl restart network.service systemctl status network.service ##### Paket Utilities ##### echo -n "Installing Packet Utilities" && yum -y install vim wget screen crudini htop > /dev/null 2>&1 && echo "done" ##### Paket Packstack ##### echo -n "Installing Packstack... " && yum -y install openstack-packstack > /dev/null 2>&1 && echo "done" rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc ##### Generate Answer File Packstack ##### echo -n "Generate answer file... " && packstack --gen-answer-file=aio-openstack.txt > /dev/null 2>&1 && echo "done" sed -i 's/CONFIG_CINDER_INSTALL\=y/CONFIG_CINDER_INSTALL\=n/g' aio-openstack.txt sed -i 's/CONFIG_SWIFT_INSTALL\=y/CONFIG_SWIFT_INSTALL\=n/g' aio-openstack.txt sed -i 's/CONFIG_HEAT_INSTALL\=n/CONFIG_HEAT_INSTALL\=y/g' aio-openstack.txt sed -i 's/CONFIG_LBAAS_INSTALL\=n/CONFIG_LBAAS_INSTALL\=y/g' aio-openstack.txt sed -i 's/CONFIG_NEUTRON_FWAAS\=n/CONFIG_NEUTRON_FWAAS\=y/g' aio-openstack.txt sed -i 's/CONFIG_NEUTRON_ML2_TYPE_DRIVERS\=vxlan,flat/CONFIG_NEUTRON_ML2_TYPE_DRIVERS\=vxlan,vlan,flat/g' aio-openstack.txt sed -i 's/CONFIG_NEUTRON_ML2_FLAT_NETWORKS\=\*/CONFIG_NEUTRON_ML2_FLAT_NETWORKS\=extnet/g' aio-openstack.txt sed -i 's/CONFIG_NEUTRON_OVS_BRIDGE_IFACES\=/CONFIG_NEUTRON_OVS_BRIDGE_IFACES\=br-ex:eth1/g' aio-openstack.txt sed -i 's/CONFIG_NEUTRON_OVS_BRIDGES_COMPUTE\=/CONFIG_NEUTRON_OVS_BRIDGES_COMPUTE\=br-ex/g' aio-openstack.txt sed -i 's/CONFIG_PROVISION_DEMO\=y/CONFIG_PROVISION_DEMO\=n/g' aio-openstack.txt sed -i 's/CONFIG_KEYSTONE_ADMIN_PW/#CONFIG_KEYSTONE_ADMIN_PW/g' aio-openstack.txt sed -i '338 i CONFIG_KEYSTONE_ADMIN_PW=rahasia' aio-openstack.txt packstack --answer-file=aio-openstack.txt #change enable_isolated_metadata dhcp agent with True sed -i 's/enable_isolated_metadata\ \=\ False/enable_isolated_metadata\ \=\ True/g' /etc/neutron/dhcp_agent.ini systemctl restart neutron-dhcp-agent systemctl status neutron-dhcp-agent #avtivated service virtlogd systemctl status virtlogd systemctl enable virtlogd systemctl restart virtlogd systemctl status virtlogd #change hypervisor to KVM if value vmx/svm on /proc/cpuinfo is greater 0 sed -i 's/virt_type\=qemu/virt_type\=kvm/g' /etc/nova/nova.conf systemctl restart openstack-nova-compute systemctl status openstack-nova-compute |
jika installasi sudah selesai maka tampilanya seperti ini
mungkin cukup sekain tutorial yang singkat ini, jika ada yang kurang paham, maka bisa ditanyakan melalui kolom komentar.
wassalamualaikum 🙂
System Engineer
Komentar