sbr://https://blog.linuxcoding.org/artikel/install-dasar-konfigurasi-openstack-havana-rdo-centos-6-5-part-1/
Dalam OpenStack banyak pilihan network topology ataupun network system yang dapat diterapkan, pada pembahasaan ini kita akan menggunakan dasar topologi dan sistem installasi AllInOne, yang artinya semua service diinstall dan berjalan pada satu host. Dan untuk network menggunakan sistemNeutron Networking.
ISTILAH DALAM OPENSTACK :
Controller Node : Host yang menjalankan service-service OpenStack
Compute Node : Host yang menjalankan virtualisasi
Controller Node : Host yang menjalankan service-service OpenStack
Compute Node : Host yang menjalankan virtualisasi
SISTEM YANG AKAN DIGUNAKAN :
– Virtualisasi menggunakan KVM
– Controller Node dan Compute Node dalam satu Host
– Virtualisasi menggunakan KVM
– Controller Node dan Compute Node dalam satu Host
KOMPONEN OPENSTACK :
Keystone (Identity Service)
Glance (Image Service)
Cinder (Volume Service)
Neutron (Networking Services)
Nova (Compute Services)
Horizon (OpenStack Frontend)
Ceilometer (Metering Service)
Swift (Object Strage Service)
Heat (Orchestration)
Keystone (Identity Service)
Glance (Image Service)
Cinder (Volume Service)
Neutron (Networking Services)
Nova (Compute Services)
Horizon (OpenStack Frontend)
Ceilometer (Metering Service)
Swift (Object Strage Service)
Heat (Orchestration)
PERSIAPAN HOST CONTROLLER NETWORK TOPOLOGI :
HOST NETWORK
– 2 Pisikal NIC/Ethernet
* eth0
* eth1
HOST BRIDGE NETWORK
* br-eth1
* br-ex
* br-int
HOST NETWORK
– 2 Pisikal NIC/Ethernet
* eth0
* eth1
HOST BRIDGE NETWORK
* br-eth1
* br-ex
* br-int
NEUTRON NETWORKING
– openvswitch
* router1
– public ip ranges
* 192.168.1.0/24
* net start 192.168.114 – 119
– private ip ranges
* 30.0.0.0/24
* net start 30.0.0.2 -254
– floating IP
* public network
– VLAN
* physnet1
* ranges 1000-2999
– openvswitch
* router1
– public ip ranges
* 192.168.1.0/24
* net start 192.168.114 – 119
– private ip ranges
* 30.0.0.0/24
* net start 30.0.0.2 -254
– floating IP
* public network
– VLAN
* physnet1
* ranges 1000-2999
PERSIAPAN INSTALLASI :
OpenStack repo : http://rdo.fedorapeople.org/rdo-release.rpm
EPEL Repo : http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Kita asumsikan CentOS 6.5 x64 telah terinstall dan masih fresh install/baru diinstall
OpenStack repo : http://rdo.fedorapeople.org/rdo-release.rpm
EPEL Repo : http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Kita asumsikan CentOS 6.5 x64 telah terinstall dan masih fresh install/baru diinstall
INSTALLASI OPENSTACK HAVANA :
#yum install -y http://rdo.fedorapeople.org/rdo-release.rpm #yum install -y http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#yum install -y openstack-packstack
#packstack --allinone
Installasi OpenStack selesai dan sukses, selanjutnya kita konfigurasikan Networking untuk menggunakan Neutron Networking dan vSwitch.
HAPUS DEFAULT NETWORK :
#ovs-vsctl show 17df3aee-adeb-4b1f-ba6f-3c977514ae6e Bridge br-ex Port br-ex Interface br-ex type: internal Port "qg-32712dd8-b7" Interface "qg-32712dd8-b7" type: internal Bridge br-int Port "qr-e3dd113d-05" tag: 1 Interface "qr-e3dd113d-05" type: internal Port br-int Interface br-int type: internal ovs_version: "1.11.0" #ovs-vsctl del-br br-ex #ovs-vsctl del-br br-int #ovs-vsctl show
KONFIGURASI NEUTRON NETWORK :
Konfigurasi Ethernet 2 (eth1)
Konfigurasi Ethernet 2 (eth1)
#vi /etc/sysconfig/network-scripts/ifcfg-eth1
Buat seperti ini :
DEVICE=eth1 BOOTPROTO=static NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet
Konfigurasi Bridge dan Bridge Port Ethernet 2 (eth1):
#ovs-vsctl add-br br-int #ifup eth1 #ovs-vsctl add-br br-eth1 #ovs-vsctl add-port br-eth1 eth1 #ovs-vsctl show
#vi /etc/sysconfig/network-scripts/ifcfg-br-ex
Buat seperti ini :
DEVICE=br-ex BOOTPROTO=static ONBOOT=yes IPADDR=192.168.1.113 NETMASK=255.255.255.0 GATEWAY=192.168.1.1
Konfigurasi Ethernet 1 (eth0)
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
Buat seperti ini :
DEVICE=eth0 TYPE=Ethernet ONBOOT="yes" NM_CONTROLLED=no BOOTPROTO=static
Konfigurasi Bridge dan Bridge Port Ethernet 1 (eth0):
#ovs-vsctl add-br br-ex #ovs-vsctl add-port br-ex eth0
Restart Network :
#service network restart Shutting down interface eth0: [ OK ] Shutting down interface eth1: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface br-ex: [ OK ] Bringing up interface eth0: [ OK ] Bringing up interface eth1: [ OK ]
Melihat hasil konfigurasi :
#ovs-vsctl show 17df3aee-adeb-4b1f-ba6f-3c977514ae6e Bridge "br-eth1" Port "eth1" Interface "eth1" Port "br-eth1" Interface "br-eth1" type: internal Bridge br-int Port br-int Interface br-int type: internal Bridge br-ex Port br-ex Interface br-ex type: internal Port "eth0" Interface "eth0" ovs_version: "1.11.0"
#neutron-server-setup
# openstack-config --set /etc/neutron/neutron.conf DEFAULT core_plugin neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2 # openstack-config --set /etc/neutron/neutron.conf DEFAULT ovs_use_veth True # openstack-config --set /etc/neutron/neutron.conf DEFAULT allow_overlapping_ips True # openstack-config --set /etc/neutron/neutron.conf DEFAULT rpc_backend neutron.openstack.common.rpc.impl_qpid # openstack-config --set /etc/neutron/neutron.conf DEFAULT qpid_hostname 192.168.1.113 # openstack-config --set /etc/neutron/neutron.conf DEFAULT qpid_port 5672 # openstack-config --set /etc/neutron/neutron.conf AGENT root_helper sudo neutron-rootwrap /etc/neutron/rootwrap.conf # openstack-config --set /etc/neutron/neutron.conf DEFAULT auth_strategy keystone # openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_host 192.168.1.113 # openstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_tenant_name services # openstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_user neutron # openstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_password b6400a8260d34c5f # openstack-config --set /etc/neutron/plugin.ini DATABASE sql_connection mysql://neutron:ce0d520bc46e4d12@192.168.1.113/ovs_neutron # openstack-config --set /etc/neutron/plugin.ini OVS tenant_network_type vlan # openstack-config --set /etc/neutron/plugin.ini OVS network_vlan_ranges physnet1:1000:2999 # openstack-config --set /etc/neutron/plugin.ini OVS bridge_mappings physnet1:br-eth1 # openstack-config --set /etc/neutron/plugin.ini SECURITYGROUP firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver # openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver # openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT handle_internal_only_routers True # openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT external_network_bridge br-ex # openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT use_namespaces True # cp /etc/neutron/dhcp_agent.ini /etc/neutron/l3_agent.ini
Catatan :
– Sesuaikan IP 192.168.1.113 dengan IP yang anda gunakan
– Sesuaikan Neutron MySQL Password : ce0d520bc46e4 dengan yang anda miliki (lihat dalam “packstack-answers-*.txt”)
– Sesuaikan Neutron Admin Password : b6400a8260d34c5f dengan yang anda miliki (lihat dalam “packstack-answers-*.txt”)
Setelah selesai reboot terlebih dahulu.
#source keystonerc_admin #keystone tenant-list | grep services | awk '{print $2;}' e1a8d1acc83c46e29c381f84da5546f5 #neutron net-create --tenant-id e1a8d1acc83c46e29c381f84da5546f5 ext --router:external=True
#neutron subnet-create --tenant-id e1a8d1acc83c46e29c381f84da5546f5 ext 192.168.1.0/24 --enable_dhcp=False --allocation-pool start=192.168.1.114,end=192.168.1.119 --gateway-ip 192.168.1.1
#source keystonerc_demo #neutron net-create int
#neutron subnet-create int 30.0.0.0/24 --dns_nameservers list=true 192.168.1.1
#neutron router-create router1
#neutron router-gateway-set router1 ext #neutron subnet-list
#neutron router-interface-add router1 8136e5a0-1c5c-4acf-80ac-9b3993afc383
MANAGEMENT DENGAN OPENSTACK DASHBOARD (HORIZON)
Login menggunakan username demo
Informasi username dan password terdapat pada file keystonerc_demo
Akses OpenStack Dashboard (Horizon) : http://192.168.1.113/dashboard
Login menggunakan username demo
Informasi username dan password terdapat pada file keystonerc_demo
Akses OpenStack Dashboard (Horizon) : http://192.168.1.113/dashboard
Oke, installasi, dasar konfigurasi network menggunakan Neutron Networking selesai. Pada pembahasan selanjutnya akan membahas bagaimana menambahkan instance/vm, menjalankan instance/vm, menambahkan floating IP pada instance/vm agar instance/vm dapat diakses dari external network.
See you next time