사전 조건으로는
1. Ubuntu 16.04 Openstack(Pike) Default 컴포넌트 설치
2. 단일 Controller Node에서 작업
3. 외부와 네트워크 통신이 가능
* 설치 단계
1) 네트워크 설정
Network Interface와 controller host name을 등록한다
$ ifconfig
$ vi etc/network/interfaces
# The loopback network interface auto lo iface lo inet loopback
# The primary network interface auto enpno03 iface eth0 inet static ## 상황에 따라 설정을 다르게 해준다. address 192.168.0.67 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameserver 8.8.8.8
$ vi /etc/hosts #controller ## 상황에 따라 설정을 다르게 해준다. 192.168.0.67 controller
$ reboot |
2) Openstack Package 설치
$ apt install software-properties-common
$ add-apt-repository cloud-archive:pike
$ apt-get update & apt-get disk-upgrade # 해당 작업을 안해주면 다른 버전의 Openstack Package가 설치 될 가능성이 있다.
$ apt install python-openstackclient
3) Mysql 설치
$ apt install mariadb-server python-pymysql
1. mysql config 설정
$ /etc/mysql/mariadb.conf.d/99-openstack.cnf
[mysqld] bind-address = #{server ip} default-storage-engine = innodb innodb_file_per_table = on max_connections = 4096 collation-server = utf8_general_ci character-set-server = utf8 |
$ service mysql restart
$ mysql_secure_installation
3) Message queue 설치
$ apt install rabbitmq-server
$ rabbitmqctl add_user openstack RABBIT_PASS
$ rabbitmqctl set_permissions openstack ".*" ".*" ".*"
4) Memcached 설치
$ apt install memcached python-memcache
# /etc/memcached.conf 변경 -l 127.0.0.1 또는 -l CONTROLLER_IP |
$ service memcached restart
5) Openstack Keystone 설치
1. keystone 데이터 베이스 생성
$ mysql
$ CREATE DATABASE keystone;
$ GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
$ GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
2. Keystone 설치
$ apt install keystone apache2 libapache2-mod-wsgi
3. Keystone config 파일 수정
# /etc/keystone/keystone.conf [database] # ... connection = mysql+pymysql://keystone:KEYSTONE_DBPASS@controller/keystone
[token] # ... provider = fernet |
1. Keystone 데이터 베이스 동기화
$ su -s /bin/sh -c "keystone-manage db_sync" keystone
2. Keystone 저장소 키 초기화
$ keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
$ keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
3. Keystone Bootstrap
$ keystone-manage bootstrap --bootstrap-password ADMIN_PASS \
--bootstrap-admin-url http://controller:35357/v3/ \
--bootstrap-internal-url http://controller:5000/v3/ \
--bootstrap-public-url http://controller:5000/v3/ \
--bootstrap-region-id RegionOne
4. Apache config 수정
# /etc/apache2/apache2.conf ServerName controller |
이후는 다음에..
'iaas > Openstack' 카테고리의 다른 글
devstack 서버 설치 방법 (0) | 2018.04.30 |
---|---|
Openstack API Access가 일반 IP 주소가 아닌 Controller로 되어 있는 경우 API 연결 방법 (0) | 2017.10.18 |