Rabu, 21 September 2016

Openstack add instance part1


Installasi & Dasar Konfigurasi OpenStack Havana (RDO) – CentOS 6.5 – Part 1


Bagikan
1
0

openstack1
Perkembangan teknologi dalam dunia komputerisasi memang sudah sangat pesat perkembangannya, salah satunya dalam hal Cloud Computing. Pembahasan kali ini akan membahas salah satu Software Cloud Computing OpenStack.
What is OpenStack ?
OpenStack OpenStack is a global collaboration of developers and cloud computing technologists producing the ubiquitous open source cloud computing platform for public and private clouds. The project aims to deliver solutions for all types of clouds by being simple to implement, massively scalable, and feature rich. The technology consists of a series of interrelated projects delivering various components for a cloud infrastructure solution.
Who’s behind OpenStack? Founded by Rackspace Hosting and NASA, OpenStack has grown to be a global software community of developers collaborating on a standard and massively scalable open source cloud operating system. Our mission is to enable any organization to create and offer cloud computing services running on standard hardware.
Who uses OpenStack? Corporations, service providers, VARS, SMBs, researchers, and global data centers looking to deploy large-scale cloud deployments for private or public clouds leveraging the support and resulting technology of a global open source community.
Why open matters: All of the code for OpenStack is freely available under the Apache 2.0 license. Anyone can run it, build on it, or submit changes back to the project. We strongly believe that an open development model is the only way to foster badly-needed cloud standards, remove the fear of proprietary lock-in for cloud customers, and create a large ecosystem that spans cloud providers.
Sumber : http://www.openstack.org

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
SISTEM YANG AKAN DIGUNAKAN :
– 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)
DASAR TOPOLOGI OPENSTACK :
openstack2
openstack3
PERSIAPAN HOST CONTROLLER NETWORK TOPOLOGI :
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
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
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
openstack4
openstack5
#yum install -y openstack-packstack
openstack6
#packstack --allinone
openstack7
openstack8
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
openstack9
KONFIGURASI NEUTRON NETWORK :
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
openstack11
openstack12
#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"
openstack12
#neutron-server-setup
Catatan : MySQL root password bisa dilihat didalam file “packstack-answers-*.txt”
openstack13
# 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
openstak15
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
openstack16
#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
openstack17
openstack18
#source keystonerc_demo
#neutron net-create int
openstack19
#neutron subnet-create int 30.0.0.0/24 --dns_nameservers list=true 192.168.1.1
openstack20
#neutron router-create router1
openstack21
#neutron router-gateway-set router1 ext
#neutron subnet-list
openstack22
#neutron router-interface-add router1 8136e5a0-1c5c-4acf-80ac-9b3993afc383
openstack23
Konfigurasi Neutron Networking selesai
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
openstack24
openstack25
openstack26
openstack27
openstack28
openstack29
openstack30
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 …

Tidak ada komentar:

Posting Komentar