노드별로 접근이 가능하면 본격적인 설치전에 사전작업을 한다.

일단 hostname 및 ip hosts 설정을 한다.

ip 설정은 management network쪽도 원래 설정해야 하지만 해당 가이드에선 host 시스템에서 dhcp로 설정해주었으니 생략하고

public network쪽만 설정하겠음 public network는 아키텍처에서 보이는 것 처럼 컨트롤러 노드와 컴퓨트 노드만 설정함

추가로 원활한 설정을 위해 모든 노드의 방화벽을 중지 및 부팅시 시작 서비스에서 제외시킨다.

 

 

### controller 노드 ###

[root@localhost ~]# ssh 10.0.0.11
Last login: *** *** ** **:**:** 2016

[root@localhost ~]# hostnamectl set-hostname controller

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1

TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none

 

[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@localhost ~]# exit

logout
Connection to 10.0.0.11 closed.

 

### compute 노드 ###

[root@localhost ~]# ssh 10.0.0.31
Last login: *** *** ** **:**:** 2016
[root@localhost ~]# hostnamectl set-hostname compute

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none

[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@localhost ~]# exit

logout
Connection to 10.0.0.31 closed.

 

### block1 노드 ###

[root@localhost ~]# ssh 10.0.0.41
Last login: *** *** ** **:**:** 2016
[root@localhost ~]# hostnamectl set-hostname block1

[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@localhost ~]# exit

logout
Connection to 10.0.0.41 closed.

 

### object1 노드 ###

[root@localhost ~]# ssh 10.0.0.51
Last login: *** *** ** **:**:** 2016
[root@localhost ~]# hostnamectl set-hostname object1

[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@localhost ~]# exit

logout
Connection to 10.0.0.51 closed.

 

### object2 노드 ###

[root@localhost ~]# ssh 10.0.0.52
Last login: *** *** ** **:**:** 2016
[root@localhost ~]# hostnamectl set-hostname object2

[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@localhost ~]# exit

logout
Connection to 10.0.0.51 closed.

 

 

[root@localhost ~]# vi /etc/hosts

### 아래의 내용 추가 후 저장###

10.0.0.11       controller
10.0.0.31       compute
10.0.0.41       block1
10.0.0.51       object1
10.0.0.52       object2

 

[root@localhost ~]# scp /etc/hosts controller:/etc/hosts
The authenticity of host 'controller (10.0.0.11)' can't be established.
ECDSA key fingerprint is **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:.

Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'controller' (ECDSA) to the list of known hosts.
hosts                                         100%  252     0.3KB/s   00:00
[root@localhost ~]# scp /etc/hosts compute:/etc/hosts
The authenticity of host 'compute (10.0.0.31)' can't be established.
ECDSA key fingerprint is **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:.

Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'compute,10.0.0.31' (ECDSA) to the list of known hosts.
hosts                                         100%  252     0.3KB/s   00:00
[root@localhost ~]# scp /etc/hosts block1:/etc/hosts
The authenticity of host 'block1 (10.0.0.41)' can't be established.
ECDSA key fingerprint is **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'block1,10.0.0.41' (ECDSA) to the list of known hosts.
hosts                                         100%  252     0.3KB/s   00:00
[root@localhost ~]# scp /etc/hosts object1:/etc/hosts
The authenticity of host 'object1 (10.0.0.51)' can't be established.
ECDSA key fingerprint is **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:.

Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'object1,10.0.0.51' (ECDSA) to the list of known hosts.
hosts                                         100%  252     0.3KB/s   00:00
[root@localhost ~]# scp /etc/hosts object2:/etc/hosts
The authenticity of host 'object2 (10.0.0.52)' can't be established.
ECDSA key fingerprint is **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'object2,10.0.0.52' (ECDSA) to the list of known hosts.
hosts                                         100%  252     0.3KB/s   00:00

 

 

 

 

NTP 설정

- 우선 controller 노드부터

[root@controller ~]# yum install chrony -y
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base                                                     | 3.6 kB     00:00
extras                                                   | 3.4 kB     00:00
updates                                                  | 3.4 kB     00:00
(1/2): extras/7/x86_64/primary_db                          | 101 kB   00:00
(2/2): updates/7/x86_64/primary_db                         | 3.1 MB   00:00

...(중략)...

Installed:
  chrony.x86_64 0:2.1.1-1.el7.centos

Complete!
[root@controller ~]# vi /etc/chrony.conf

### 아래의 내용처럼 추가 ###

server 10.0.0.1 iburst              # 외부 NTP 서버의 IP를 설정, 기존의 "server 1.centos.pool.ntp.org iburst"등은 주석 처리 또는 삭제

 

allow 10.0.0.0/24                   # 다른 노드들이 접근을 허용할수 있게 해당 내용 추가

 

### 서비스 등록 및 활성화 ###

[root@controller ~]# systemctl enable chronyd.service
[root@controller ~]# systemctl start chronyd.service

### sync가 잘되었는지 확인 ###

[root@controller ~]# chronyc sources                 
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^? 10.0.0.1                      0   8     0   10y     +0ns[   +0ns] +/-    0ns

 

- controller 외의 노드들은 공통

[root@compute ~]# yum install chrony -y
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast

...(중략)...

Installed:
  chrony.x86_64 0:2.1.1-1.el7.centos

Complete!
 [root@compute ~]# vi /etc/chrony.conf

### 아래의 내용처럼 추가 ###

server controller iburst           # controller 노드의 시간과 sync 시킨다. 기존의 "server 1.centos.pool.ntp.org iburst"등은 주석 처리 또는 삭제

 

### 서비스 등록 및 활성화 ###

[root@compute ~]# systemctl enable chronyd.service
[root@compute ~]# systemctl start chronyd.service

### sync가 잘되었는지 확인 ###

[root@compute ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^? controller                    0   8     0   10y     +0ns[   +0ns] +/-    0ns 


+ Recent posts