YUMSERV
반응형

※ ubuntu20.04 설치 후 진행

 

0. hosts 설정

각 노드에 설정

root@controller:~# cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

 

192.168.198.100 controller

192.168.198.101 network

192.168.198.102 compute

root@controller:~# hostnamectl set-hostname controller
root@network:~# hostnamectl set-hostname network
root@compute:~# hostnamectl set-hostname compute

 

1. Time 설정(NTP설정) - 모든 서버 동일하게 설정

root@controller:~# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-04-29 19:51:07 KST; 32min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 654 (systemd-timesyn)
Status: "Initial synchronization to time server 91.189.89.198:123 ([ntp.ubuntu.com](http://ntp.ubuntu.com/))."
Tasks: 2 (limit: 9418)
Memory: 2.1M
CGroup: /system.slice/systemd-timesyncd.service
└─654 /lib/systemd/systemd-timesyncd


4월 29 19:51:07 ubuntu systemd[1]: Starting Network Time Synchronization...
4월 29 19:51:07 ubuntu systemd[1]: Started Network Time Synchronization.
4월 29 19:51:38 ubuntu systemd-timesyncd[654]: Initial synchronization to time server 91.189.89.198:123 ([ntp.ubuntu.com](http://ntp.ubuntu.com/)).

 

root@controller:~# vi /etc/systemd/timesyncd.conf
[Time]
NTP=time.bora.net

root@controller:~# systemctl restart systemd-timesyncd
root@controller:~# timedatectl timesync-status
Server: 203.248.240.140 (time.bora.net)
Poll interval: 1min 4s (min: 32s; max 34min 8s)
Packet count: 0

 

 

 

2. Openstack 저장소 활성화(모든 서버 동일하게 진행)

root@controller:~# apt -y install software-properties-common
root@controller:~# add-apt-repository cloud-archive:victoria
root@controller:~# apt-get upgrade -y

root@controller:~# apt install python3-openstackclient

 

 

3. SQL 서버 설치(Controller 에서 진행)

Openstack 서비스들의 경우, SQL 데이터 베이스를 통해서 정보를 저장합니다.

Mariadb 말고도 다른 SQL데이터베이스도 지원한다고 Doc에 나와있습니다. 다른걸로 설치해도 됩니다.

 

root@controller:~# apt-get install mariadb-server

root@controller:~# 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:
Sorry, passwords do not match.

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!

 

root@controller:~# cat /etc/mysql/mariadb.conf.d/99-openstack.cnf
[mysqld]
bind-address = 192.168.198.100
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8

 

 

4. 메시지 큐 설치(Controller 에서 진행)

메시지 큐를 통해서 각 서비스간의 통신을 하기 위해 메시지 큐를 사용합니다.

메시지 서비스란 서비스를 이용하는 사용자의 중간에 임시저장장치가 위치하는데, 이 장치를 경유해서 통신되는 서비스를 의미하며 임시 저장장치가 바로 큐이다.

오픈스택은 메시지 큐 서비스를 위해 백엔드에서 동작하는 RabbitMQ, Qpid, ZeroMQ 프로그램을 지원한다.

RabbitMQ, Qpid는 AMQP(Advanced Message Queuing Protocol)로서 사용자간의 직접 통신을 위해 메시지 큐를 제공하는 역할을 합니다.

 

root@controller:~# apt-get -y install rabbitmq-server

 

openstack 사용자를 추가해줍니다. 뒤에는 암호설정

openstack 사용자에 대한 설정, 쓰기, 읽기 설정 모두 허용합니다.

첫번째는 설정, 두번째는 쓰기, 세번째는 읽기

root@controller:~# rabbitmqctl add_user openstack [password] 
Adding user "openstack" ...
root@controller:~# rabbitmqctl set_permissions openstack "." "." ".*"
Setting permissions for user "openstack" in vhost "/" ...   

 

 

5. memcached 설치(Controller 에서 진행)

분산 메모리 캐싱 시스템으로,  Keystone이 인증에 사용되는 토큰과 임시 데이터를 캐시에 저장하기 위해 사용됩니다.

 

root@controller:~# apt-get -y install memcached

root@controller:~# vi /etc/memcached.conf

-l 0.0.0.0

Memcached 방화벽 : tcp port 11211 열어줘야 합니다.

 

 

6. 설치한 시스템 재시작

root@controller:~# systemctl restart mariadb rabbitmq-server memcached

 

 

반응형

'OpenStack' 카테고리의 다른 글

[Victoria] Glance 설치  (0) 2020.09.20
[정리] Glance 이론  (0) 2020.09.20
[Victoria] Keystone 설치  (0) 2020.09.17
[정리] KeyStone 이론  (0) 2020.09.15
OpenStack 개요  (0) 2020.08.30
profile

YUMSERV

@lena04301

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!