10 September 2016

Latihan Pasang Single Node OpenStack dengan DevStack di openSUSE Leap 42

Referensi:
http://docs.openstack.org/developer/devstack/index.html


Kebutuhan:
  1. VirtualBox atau QEMU+KVM+VirtManager
  2. VM openSUSE Leap 42 instalasi minimal (RAM 6 GB, partisi / 12 GB, partisi swap 6 GB)
  3. Koneksi internet dengan kuota tanpa batas

Topologi:



Langkah-langkah:

1. Konfigurasi jaringan:
# vim /etc/sysconfig/network/ifcfg-eth0 
BOOTPROTO='static'
IPADDR='10.10.10.10/24'
NAME='eth0'
STARTMODE='auto'

# vim /etc/sysconfig/network/routes
default 10.10.10.1 - - 

# vim /etc/resolv.conf
nameserver 10.10.10.1

# wicked ifup all
# ip link
# ip add
# ip route
# ping yahoo.com

# zypper -n in openvswitch-switch
# systemctl enable openvswitch
# systemctl start openvswitch
# systemctl status openvswitch

# vim /etc/sysconfig/network/ifcfg-eth1
BOOTPROTO='none'
NAME='eth1'
STARTMODE='auto'

# vim /etc/sysconfig/network/ifcfg-br-ex
STARTMODE='auto'
BOOTPROTO=static
IPADDR='172.16.10.10/24'
OVS_BRIDGE='yes'
OVS_BRIDGE_PORT_DEVICE='eth1'

# wicked ifup all
# ip link
# ip add
# hostnamectl set-hostname openstack
# echo "10.10.10.10 openstack" >> /etc/hosts


2. Pasang manual paket rabbitmq-server
# zypper -n in --no-recommends rabbitmq-server
# systemctl enable epmd.service
# systemctl restart epmd.service
# systemctl status epmd.service
# systemctl enable rabbitmq-server.service
# systemctl restart rabbitmq-server.service
# systemctl status rabbitmq-server.service


3. Pasang manual MySQL
# zypper -n in mysql-community-server mysql-community-server-client
# systemctl enable mysql.service
# systemctl restart mysql.service
# systemctl status mysql.service
# /usr/bin/mysqladmin -u root password 'rahasia'
# mysql -prahasia -e "SET PASSWORD FOR 'root'@'openstack' = PASSWORD('rahasia');"


4. Pasang paket git
# zypper -n in git python-virtualenv python-pip


5. Membuat user sudoer stack
# useradd -d /home/stack -m stack
# passwd stack

# echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers


6. Konfigurasi dan eksekusi DevStack
# su - stack
$ git clone https://git.openstack.org/openstack-dev/devstack
$ cd devstack
$ git checkout stable/mitaka
$ git branch
$ vim local.conf
[[local|localrc]]
FORCE=yes
HOST_IP=10.10.10.10
SERVICE_HOST=10.10.10.10
MYSQL_HOST=10.10.10.10
RABBIT_HOST=10.10.10.10
GLANCE_HOSTPORT=10.10.10.10:9292
PUBLIC_INTERFACE=eth1
ADMIN_PASSWORD=rahasia
MYSQL_PASSWORD=rahasia
RABBIT_PASSWORD=rahasia
SERVICE_PASSWORD=rahasia

## Neutron options
Q_USE_SECGROUP=True
PHYSICAL_NETWORK=provider
OVS_PHYSICAL_BRIDGE=br-ex
Q_USE_PROVIDER_NETWORKING=True

## Do not use Nova-Network
disable_service n-net

## Neutron
ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,n-cpu,rabbit

## Neutron Networking options used to create Neutron Subnets
FIXED_RANGE="172.16.10.0/24"
NETWORK_GATEWAY=172.16.10.1
PROVIDER_SUBNET_NAME="subnet-provider"
PROVIDER_NETWORK_TYPE="flat"

$ ./stack.sh


7. Test tampilkan layanan OpenStack
$ vim openrc
export OS_PASSWORD=${ADMIN_PASSWORD:-rahasia}

$ source openrc admin admin
$ openstack service list

8. Akses dashboard dengan peramban web di alamat http://10.10.10.10/dashboard/

No comments: