OpenStack Kilo 인스톨을 위한 준비
OpenStack Install을 위하여 기본적인 설정을 알아보고자 한다.
본 포스팅은 OpenStack Kilo 버전을 Multi Node 형식으로 설치하는 내용으로 준비과정에 대한 내용이다.
OpenStack 관련 인스톨을 위한 시스템 사양은 아래와 같다.
- Control Node
- Ubuntu 14.04.3
- Network Interface
- eth0: External Network
- eth1: Management Network
- 10.0.0.11 (controlnode01)
- Network Node
- Ubuntu 14.04.3
- Network Interface
- eth0: External Network
- eth1: Management Network
- 10.0.0.21 (networknode01)
- eth2: Data Network (Tunnel)
- Compute Node
- Ubuntu 14.04.3
- Network Interface
- eth0: External Network
- eth1: Management Network
- eth2: Data Network (Tunnel)
네트워크 관점의 Architecture는 다음과 같다.
- Data Network
- Network Node와 Compute Node 사이의 Tunnel이 생성됨
- 추후 OpenFlow Switch로 구성함
- OpenFlow Switch는 SDN Controller와 연결
- Management Network
- OpenStack을 구성하는 모든 Node 사이의 Management Network
- OpenStack CLI 또는 Horizon(Dashboard)를 통한 가상네트워크 구성 및 VM 적용
- 추후 SDN Controller와 연결
OpenStack Kilo 공통 Install
1. Network 설정
1-1. Control Node
# interfaces(5) file used by ifup(8) and ifdown(8)
# Public Network
auto eth0
iface eth0 inet static
address <Public IP>
gateway <GW IP>
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4
# Management Network
auto eth1
iface eth1 inet static
address 10.0.0.11
gateway 10.0.0.1
netmask 255.255.255.0
- /etc/hosts (127.0.1.1 관련 부분은 comment 처리 하여야 함)
127.0.0.1 localhost
#127.0.1.1 networknode01
# controlnode
10.0.0.11 controlnode01
# networknode
10.0.0.21 networknode01
10.0.0.22 networknode02
# computenode
10.0.0.31 compute01
10.0.0.32 compute02
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
1-2. Network Node
- /etc/network/interface (eth0는 추후 OVS 설정 후 대체됨)
- OpenvSwitch가 설치되면 br-ex 활성화
# interfaces(5) file used by ifup(8) and ifdown(8)
# Public Network
auto br-ex
iface br-ex inet static
address <Public IP>
gateway <GW IP>
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4
auto eth0
iface eth0 inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down
# Management Network
auto eth1
iface eth1 inet static
address 10.0.0.21
gateway 10.0.0.1
netmask 255.255.255.0
# Data Network
auto eth2
iface eth2 inet static
address 10.0.1.21
netmask 255.255.255.0
- /etc/hosts (127.0.1.1 관련 부분은 comment 처리 하여야 함)
127.0.0.1 localhost
#127.0.1.1 networknode01
# controlnode
10.0.0.11 controlnode01
# networknode
10.0.0.21 networknode01
10.0.0.22 networknode02
# computenode
10.0.0.31 compute01
10.0.0.32 compute02
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
1-3. Compute Node
# interfaces(5) file used by ifup(8) and ifdown(8)
# Public Network
auto eth0
iface eth0 inet static
address <Public IP>
gateway <GW IP>
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4
# Management Network
auto eth1
iface eth1 inet static
address 10.0.0.31
gateway 10.0.0.1
netmask 255.255.255.0
# Data Network
auto eth2
iface eth2 inet static
address 10.0.1.31
netmask 255.255.255.0
- /etc/hosts (127.0.1.1 관련 부분은 comment 처리 하여야 함)
127.0.0.1 localhost
#127.0.1.1 networknode01
# controlnode
10.0.0.11 controlnode01
# networknode
10.0.0.21 networknode01
10.0.0.22 networknode02
# computenode
10.0.0.31 compute01
10.0.0.32 compute02
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
2. NTP Install
sudo apt-get install -y ntp
2-1. Control Node
$ sudo vi /etc/ntp.conf
[파일수정]-------------------------------
# NTP_SERVER는 ControlNode 이름 또는 IP
server controlnode01 iburst
restrict
-4
default kod notrap nomodify
restrict
-6
default kod notrap nomodify
-----------------------------------------
$ sudo service ntp restart
2-2. Network/Compute Node
$ sudo vi /etc/ntp.conf
[파일수정]-------------------------------
# NTP_SERVER는 ControlNode 이름 또는 IP
server controlnode01 iburst
-----------------------------------------
$ sudo service ntp restart
3. OpenStack Repository Add
3-1. Control/Network/Compute 공통
$ sudo apt-get install ubuntu-cloud-keyring
$ sudo su
$ echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" "trusty-updates/kilo main" > /etc/apt/sources.list.d/cloudarchive-kilo.list
$ apt-get update && apt-get dist-upgrade
4. Database 설치
4-1. Control Node
$ sudo apt-get install mariadb-server python-mysqldb
$ sudo vi /etc/mysql/conf.d/mysqld_openstack.cnf
[신규파일 생성]----------------------------------------
[mysqld]
bind-address = 10.0.0.11
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
---------------------------------------------------------
$ sudo service mysql restart
$ mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
5. Message Queue 설치
5-1. Control Node
$ sudo apt-get install rabbitmq-server
$ sudo rabbitmqctl add_user openstack RABBIT_PASS
$ sudo rabbitmqctl set_permissions openstack ".*" ".*" ".*"