"Packstack으로 오픈스택 설치 실습 (2대 구성)"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(사용자 2명의 중간 판 35개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{테스트|VirtualBox, CentOS 7}}  
{{다른뜻|Packstack 설치 실습 (1대 구성)}}
{{테스트|VirtualBox, CentOS 7, Packstack}}  
==개요==
;OpenStack 설치 실습
;OpenStack 설치 실습
;오픈스택 설치 실습
;오픈스택 설치 실습
* [[packstack]] 실습...


==호스트 전용 네트워크==
==호스트 전용 네트워크==
42번째 줄: 45번째 줄:
==서버 네트워크 설정==
==서버 네트워크 설정==
*servera, serverb 동일한 방식으로 설정 (단, IP주소는 다름)
*servera, serverb 동일한 방식으로 설정 (단, IP주소는 다름)
<source lang='cli'>
*(Optional) firewalld도 stop, disable
<syntaxhighlight lang='console'>
[root@localhost ~]# systemctl disable NetworkManager
[root@localhost ~]# systemctl disable NetworkManager
[root@localhost ~]# systemctl stop NetworkManager
[root@localhost ~]# systemctl stop NetworkManager
51번째 줄: 55번째 줄:


Nov 12 07:32:14 serverb.pod1.example.com systemd[1]: Stopped Network Manager.
Nov 12 07:32:14 serverb.pod1.example.com systemd[1]: Stopped Network Manager.
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@localhost ~]# ll /etc/sysconfig/network-scripts/ifcfg*
[root@localhost ~]# ll /etc/sysconfig/network-scripts/ifcfg*
-rw-r--r--. 1 root root 102 Nov 12 07:19 /etc/sysconfig/network-scripts/ifcfg-eth0
-rw-r--r--. 1 root root 102 Nov 12 07:19 /etc/sysconfig/network-scripts/ifcfg-eth0
-rw-r--r--. 1 root root 104 Nov 12 07:19 /etc/sysconfig/network-scripts/ifcfg-eth1
-rw-r--r--. 1 root root 104 Nov 12 07:19 /etc/sysconfig/network-scripts/ifcfg-eth1
-rw-r--r--. 1 root root 254 Jan 15  2015 /etc/sysconfig/network-scripts/ifcfg-lo
-rw-r--r--. 1 root root 254 Jan 15  2015 /etc/sysconfig/network-scripts/ifcfg-lo
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
DEVICE=eth0
66번째 줄: 70번째 줄:
GATEWAY=172.25.10.1
GATEWAY=172.25.10.1
ONBOOT=yes
ONBOOT=yes
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
DEVICE=eth1
75번째 줄: 79번째 줄:
GATEWAY=192.168.0.1
GATEWAY=192.168.0.1
ONBOOT=yes
ONBOOT=yes
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@localhost ~]# systemctl start network
[root@localhost ~]# systemctl start network
[root@localhost ~]# systemctl status network
[root@localhost ~]# systemctl status network
90번째 줄: 94번째 줄:
Nov 12 07:27:57 servera.pod1.example.com network[8378]: Bringing up interface eth1:  [  OK  ]
Nov 12 07:27:57 servera.pod1.example.com network[8378]: Bringing up interface eth1:  [  OK  ]
Nov 12 07:27:57 servera.pod1.example.com systemd[1]: Started LSB: Bring up/down networking.
Nov 12 07:27:57 servera.pod1.example.com systemd[1]: Started LSB: Bring up/down networking.
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# ip addr | grep 'inet '
[root@servera ~]# ip addr | grep 'inet '
     inet 127.0.0.1/8 scope host lo
     inet 127.0.0.1/8 scope host lo
     inet 172.25.10.10/24 brd 172.25.10.255 scope global eth0
     inet 172.25.10.10/24 brd 172.25.10.255 scope global eth0
     inet 192.168.0.100/24 brd 192.168.0.255 scope global eth1
     inet 192.168.0.100/24 brd 192.168.0.255 scope global eth1
</source>
</syntaxhighlight>


==호스트명 변경 후 재부팅==
==호스트명 변경 후 재부팅==
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@localhost ~]# hostnamectl set-hostname servera.pod1.example.com
[root@localhost ~]# hostnamectl set-hostname servera.pod1.example.com
[root@localhost ~]# hostname -f
[root@localhost ~]# hostname -f
servera.pod1.example.com
servera.pod1.example.com
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@localhost ~]# reboot
[root@localhost ~]# reboot
</source>
</syntaxhighlight>


==서버 hosts 파일 설정==
==서버 hosts 파일 설정==
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# cat /etc/hosts
[root@servera ~]# cat /etc/hosts
127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
115번째 줄: 119번째 줄:
172.25.10.10 servera.pod1.example.com servera
172.25.10.10 servera.pod1.example.com servera
172.25.10.11 serverb.pod1.example.com serverb
172.25.10.11 serverb.pod1.example.com serverb
</source>
</syntaxhighlight>


==서버간 통신 확인==
==서버간 통신 확인==
*servera, serverb 둘다 동일하게 확인
*servera, serverb 둘다 동일하게 확인
<source lang='bash'>
<syntaxhighlight lang='bash'>
ping servera -c1 | egrep 'PING|0%'
ping servera -c1 | egrep 'PING|0%'
ping serverb -c1 | egrep 'PING|0%'
ping serverb -c1 | egrep 'PING|0%'
126번째 줄: 130번째 줄:
ping 8.8.8.8 -c1 | egrep 'PING|0%'
ping 8.8.8.8 -c1 | egrep 'PING|0%'
ping time.bora.net -c1 | egrep 'PING|0%'
ping time.bora.net -c1 | egrep 'PING|0%'
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# ping servera -c1 | egrep 'PING|0%'
[root@servera ~]# ping servera -c1 | egrep 'PING|0%'
PING servera.pod1.example.com (172.25.10.10) 56(84) bytes of data.
PING servera.pod1.example.com (172.25.10.10) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
1 packets transmitted, 1 received, 0% packet loss, time 0ms
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# ping serverb -c1 | egrep 'PING|0%'
[root@servera ~]# ping serverb -c1 | egrep 'PING|0%'
PING serverb.pod1.example.com (172.25.10.11) 56(84) bytes of data.
PING serverb.pod1.example.com (172.25.10.11) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
1 packets transmitted, 1 received, 0% packet loss, time 0ms
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# ping servera.pod1.example.com -c1 | egrep 'PING|0%'
[root@servera ~]# ping servera.pod1.example.com -c1 | egrep 'PING|0%'
PING servera.pod1.example.com (172.25.10.10) 56(84) bytes of data.
PING servera.pod1.example.com (172.25.10.10) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
1 packets transmitted, 1 received, 0% packet loss, time 0ms
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# ping serverb.pod1.example.com -c1 | egrep 'PING|0%'
[root@servera ~]# ping serverb.pod1.example.com -c1 | egrep 'PING|0%'
PING serverb.pod1.example.com (172.25.10.11) 56(84) bytes of data.
PING serverb.pod1.example.com (172.25.10.11) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
1 packets transmitted, 1 received, 0% packet loss, time 0ms
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# ping 8.8.8.8 -c1 | egrep 'PING|0%'
[root@servera ~]# ping 8.8.8.8 -c1 | egrep 'PING|0%'
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
1 packets transmitted, 1 received, 0% packet loss, time 0ms
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# ping time.bora.net -c1 | egrep 'PING|0%'
[root@servera ~]# ping time.bora.net -c1 | egrep 'PING|0%'
PING time.bora.net (203.248.240.140) 56(84) bytes of data.
PING time.bora.net (203.248.240.140) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
1 packets transmitted, 1 received, 0% packet loss, time 0ms
</source>
</syntaxhighlight>


==yum update==
==yum update==
{{참고|yum update}}
{{참고|yum update}}
*servera, serverb 둘다 동일하게 적용
*servera, serverb 둘다 동일하게 적용
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# yum repolist
[root@servera ~]# yum repolist
... (생략)
... (생략)
169번째 줄: 173번째 줄:
updates/7/x86_64                CentOS-7 - Updates                1,707
updates/7/x86_64                CentOS-7 - Updates                1,707
repolist: 10,634
repolist: 10,634
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# yum update -y
[root@servera ~]# yum update -y
... (생략)
... (생략)
181번째 줄: 185번째 줄:


Complete!
Complete!
</source>
</syntaxhighlight>


==openstack-liberty 저장소 추가==
==openstack-liberty 저장소 추가==
*여기부터는 servera만 적용 ★★
*여기부터는 servera만 적용 ★★
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# yum install https://www.rdoproject.org/repos/rdo-release.rpm -y
[root@servera ~]# yum install https://www.rdoproject.org/repos/rdo-release.rpm -y
...(생략)
...(생략)
192번째 줄: 196번째 줄:


Complete!
Complete!
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# yum repolist
[root@servera ~]# yum repolist
... (생략)
... (생략)
202번째 줄: 206번째 줄:
updates/7/x86_64              CentOS-7 - Updates                1,707
updates/7/x86_64              CentOS-7 - Updates                1,707
repolist: 11,357
repolist: 11,357
</source>
</syntaxhighlight>


==openstack-packstack 설치==
==openstack-packstack 설치==
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# yum install openstack-packstack -y
[root@servera ~]# yum install openstack-packstack -y
... (생략)
... (생략)
213번째 줄: 217번째 줄:


Complete!
Complete!
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# packstack --version
[root@servera ~]# packstack --version
packstack Liberty 2015.2.dev1654.gcbbf46e
packstack Liberty 2015.2.dev1654.gcbbf46e
</source>
</syntaxhighlight>


==packstack answer 파일 생성 및 수정==
==answer 파일 생성==
*answer.txt 파일 생성, 사본 보존
*answer.txt 파일 생성
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# packstack --gen-answer-file answer.txt
[root@servera ~]# packstack --gen-answer-file answer.txt
Packstack changed given value  to required value /root/.ssh/id_rsa.pub
Packstack changed given value  to required value /root/.ssh/id_rsa.pub
</source>
</syntaxhighlight>
<source lang='cli'>
* 사본 보존
<syntaxhighlight lang='console'>
[root@servera ~]# cp answer.txt answer.old
[root@servera ~]# cp answer.txt answer.old
</source>
</syntaxhighlight>
*answer.txt 파일 편집
 
<source lang='cli'>
==answer 파일 편집 #1==
<syntaxhighlight lang='console'>
[root@servera ~]# vi answer.txt
[root@servera ~]# vi answer.txt
</source>
</syntaxhighlight>
<source lang='autoconf'>
<syntaxhighlight lang='aconf'>
...
...
CONFIG_DEFAULT_PASSWORD=mypw
CONFIG_DEFAULT_PASSWORD=mypw
238번째 줄: 244번째 줄:
CONFIG_HEAT_INSTALL=y
CONFIG_HEAT_INSTALL=y
...
...
CONFIG_NTP_SERVERS=time.boar.net
CONFIG_NTP_SERVERS=time.bora.net
...
...
CONFIG_KEYSTONE_ADMIN_PW=mypw
CONFIG_KEYSTONE_ADMIN_PW=mypw
247번째 줄: 253번째 줄:
...
...
CONFIG_PROVISION_DEMO=n
CONFIG_PROVISION_DEMO=n
</source>
</syntaxhighlight>
* 확인
* 변경내용 확인
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# cat answer.txt | grep ^'##' -A1
[root@servera ~]# diff answer.old answer.txt
##CONFIG_DEFAULT_PASSWORD=
11c11
CONFIG_DEFAULT_PASSWORD=mypw
< CONFIG_DEFAULT_PASSWORD=
--
---
##CONFIG_HEAT_INSTALL=n
> CONFIG_DEFAULT_PASSWORD=mypw
CONFIG_HEAT_INSTALL=y
43c43
--
< CONFIG_HEAT_INSTALL=n
##CONFIG_NTP_SERVERS=
---
CONFIG_NTP_SERVERS=time.nist.gov
> CONFIG_HEAT_INSTALL=y
--
62c62
##CONFIG_KEYSTONE_ADMIN_PW=e5a8f329caa644a
< CONFIG_NTP_SERVERS=
CONFIG_KEYSTONE_ADMIN_PW=mypw
---
--
> CONFIG_NTP_SERVERS=time.bora.net
##CONFIG_HORIZON_SSL=n
303c303
CONFIG_HORIZON_SSL=y
< CONFIG_KEYSTONE_ADMIN_PW=efdd3c010d89439c
--
---
##CONFIG_HEAT_CFN_INSTALL=n
> CONFIG_KEYSTONE_ADMIN_PW=mypw
CONFIG_HEAT_CFN_INSTALL=y
1014c1014
--
< CONFIG_HORIZON_SSL=n
##CONFIG_PROVISION_DEMO=y
---
CONFIG_PROVISION_DEMO=n
> CONFIG_HORIZON_SSL=y
</source>
1077c1077
< CONFIG_HEAT_CFN_INSTALL=n
---
> CONFIG_HEAT_CFN_INSTALL=y
1090c1090
< CONFIG_PROVISION_DEMO=y
---
> CONFIG_PROVISION_DEMO=n
</syntaxhighlight>
 
== answer 파일 편집 #2==
*172.25.10.10 (eth0)을 기준으로 설정되어야 하는데 192.168.0 (eth1)을 기준으로 설정되어 있음
<syntaxhighlight lang='console'>
[root@servera ~]# cat answer.txt | grep 192.168.0
CONFIG_CONTROLLER_HOST=192.168.0.100
CONFIG_COMPUTE_HOSTS=192.168.0.100
CONFIG_NETWORK_HOSTS=192.168.0.100
CONFIG_STORAGE_HOST=192.168.0.100
CONFIG_SAHARA_HOST=192.168.0.100
CONFIG_AMQP_HOST=192.168.0.100
CONFIG_MARIADB_HOST=192.168.0.100
CONFIG_KEYSTONE_LDAP_URL=ldap://192.168.0.100
CONFIG_MONGODB_HOST=192.168.0.100
CONFIG_REDIS_MASTER_HOST=192.168.0.100
</syntaxhighlight>
* 사본2 보존
<syntaxhighlight lang='console'>
[root@servera ~]# cp answer.txt answer.old2
</syntaxhighlight>
* IP 바꿔치기
<syntaxhighlight lang='console'>
[root@servera ~]# sed -i 's/192.168.0.100/172.25.10.10/g' answer.txt
</syntaxhighlight>
<syntaxhighlight lang='console'>
[root@servera ~]# diff answer.old2 answer.txt
82c82
< CONFIG_CONTROLLER_HOST=192.168.0.100
---
> CONFIG_CONTROLLER_HOST=172.25.10.10
85c85
< CONFIG_COMPUTE_HOSTS=192.168.0.100
---
> CONFIG_COMPUTE_HOSTS=172.25.10.10
89c89
< CONFIG_NETWORK_HOSTS=192.168.0.100
---
> CONFIG_NETWORK_HOSTS=172.25.10.10
124c124
< CONFIG_STORAGE_HOST=192.168.0.100
---
> CONFIG_STORAGE_HOST=172.25.10.10
128c128
< CONFIG_SAHARA_HOST=192.168.0.100
---
> CONFIG_SAHARA_HOST=172.25.10.10
250c250
< CONFIG_AMQP_HOST=192.168.0.100
---
> CONFIG_AMQP_HOST=172.25.10.10
272c272
< CONFIG_MARIADB_HOST=192.168.0.100
---
> CONFIG_MARIADB_HOST=172.25.10.10
323c323
< CONFIG_KEYSTONE_LDAP_URL=ldap://192.168.0.100
---
> CONFIG_KEYSTONE_LDAP_URL=ldap://172.25.10.10
1148c1148
< CONFIG_MONGODB_HOST=192.168.0.100
---
> CONFIG_MONGODB_HOST=172.25.10.10
1152c1152
< CONFIG_REDIS_MASTER_HOST=192.168.0.100
---
> CONFIG_REDIS_MASTER_HOST=172.25.10.10
</syntaxhighlight>


==answer 파일 적용==
==answer 파일 적용==
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# packstack --answer-file answer.txt
[root@servera ~]# packstack --answer-file answer.txt
Welcome to the Packstack setup utility
Welcome to the Packstack setup utility
285번째 줄: 366번째 줄:
Setting up ssh keys                                  [ DONE ]
Setting up ssh keys                                  [ DONE ]
... (생략)
... (생략)
Copying Puppet modules and manifests                [ DONE ]
Applying 172.25.10.10_nagios.pp
Applying 192.168.0.27_prescript.pp
Applying 172.25.10.10_nagios_nrpe.pp
192.168.0.27_prescript.pp:                          [ DONE ]       
172.25.10.10_nagios.pp:                             [ DONE ]        
Applying 192.168.0.27_chrony.pp
172.25.10.10_nagios_nrpe.pp:                         [ DONE ]        
192.168.0.27_chrony.pp:                           [ ERROR ]      
Applying 172.25.10.10_postscript.pp
Applying Puppet manifests                        [ ERROR ]
172.25.10.10_postscript.pp:                          [ DONE ]         
 
ERROR : Error appeared during Puppet run: 192.168.0.27_chrony.pp
Error: /usr/sbin/ntpdate time.nist.gov returned 1 instead of one of [0]
You will find full trace in log /var/tmp/packstack/20151112-070612-eQyGc6/manifests/192.168.0.27_chrony.pp.log
Please check log file /var/tmp/packstack/20151112-070612-eQyGc6/openstack-setup.log for more information
Additional information:
* NOTE : A selfsigned CA certificate was generated to be used for ssl, you should still change it do subordinate CA cert. In any case please save the contents of /root/packstackca/.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.0.27. To use the command line tools you need to source the file.
* NOTE : A certificate was generated to be used for ssl, You should change the ssl certificate configured in /etc/httpd/conf.d/ssl.conf on 192.168.0.27 to use a CA signed cert.
* To access the OpenStack Dashboard browse to https://192.168.0.27/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* To use Nagios, browse to http://192.168.0.27/nagios username: nagiosadmin, password: c1b3215288ce45dc
</source>
 
==오류 로그 확인==
<source lang='cli'>
[root@servera ~]# cat  /var/tmp/packstack/20151112-070612-eQyGc6/manifests/192.168.0.27_chrony.pp.log
Error: NetworkManager is not running.
Notice: Compiled catalog for servera.pod1.example.com in environment production in 0.35 seconds
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
  (at /usr/share/ruby/vendor_ruby/puppet/type.rb:816:in `set_default')
Notice: /Stage[main]/Main/Package[chrony]/ensure: created
Notice: /Stage[main]/Main/Package[ntpdate]/ensure: created
Notice: /Stage[main]/Main/File[chrony_conf]/content: content changed '{md5}f9b03c5e44a754c3ffd8e135a0a3b35e' to '{md5}7280ea82060233a1abbaad0d0c592845'
Notice: /Stage[main]/Main/Exec[stop-chronyd]/returns: executed successfully
Notice: /Stage[main]/Main/Exec[ntpdate]/returns: 12 Nov 07:15:16 ntpdate[7888]: no server suitable for synchronization found
Error: /usr/sbin/ntpdate time.nist.gov returned 1 instead of one of [0]
Error: /Stage[main]/Main/Exec[ntpdate]/returns: change from notrun to 0 failed: /usr/sbin/ntpdate time.nist.gov returned 1 instead of one of [0]
Notice: /Stage[main]/Main/Service[chronyd]: Dependency Exec[ntpdate] has failures: true
Warning: /Stage[main]/Main/Service[chronyd]: Skipping because of failed dependencies
Notice: Finished catalog run in 37.44 seconds
</source>
<source lang='cli'>
[root@servera ~]# systemctl status NetworkManager
NetworkManager.service - Network Manager
  Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled)
  Active: inactive (dead)
</source>
<source lang='cli'>
[root@servera ~]# /usr/sbin/ntpdate time.nist.gov
12 Nov 07:28:23 ntpdate[10178]: adjust time server 129.6.15.28 offset 0.449533 sec
[root@servera ~]# echo $?
0
</source>
 
==재시도(성공)==
<source lang='cli'>
[root@servera ~]# packstack --answer-file answer.txt
... (생략)
Applying 192.168.0.27_postscript.pp
192.168.0.27_postscript.pp:                          [ DONE ]         
Applying Puppet manifests                            [ DONE ]
Applying Puppet manifests                            [ DONE ]
Finalizing                                          [ DONE ]
Finalizing                                          [ DONE ]
348번째 줄: 378번째 줄:


Additional information:
Additional information:
  * File /root/keystonerc_admin has been created on OpenStack client host 192.168.0.27. To use the command line tools you need to source the file.
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* NOTE : A certificate was generated to be used for ssl, You should change the ssl certificate configured in /etc/httpd/conf.d/ssl.conf on 192.168.0.27 to use a CA signed cert.
  * File /root/keystonerc_admin has been created on OpenStack client host 172.25.10.10. To use the command line tools you need to syntaxhighlight the file.
  * To access the OpenStack Dashboard browse to https://192.168.0.27/dashboard .
  * To access the OpenStack Dashboard browse to http://172.25.10.10/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
Please, find your login credentials stored in the keystonerc_admin in your home directory.
  * To use Nagios, browse to http://192.168.0.27/nagios username: nagiosadmin, password: c1b3215288ce45dc
  * To use Nagios, browse to http://172.25.10.10/nagios username: nagiosadmin, password: 9f93ebcf440a49cc
  * The installation log file is available at: /var/tmp/packstack/20151112-072553-TRk9OV/openstack-setup.log
  * The installation log file is available at: /var/tmp/packstack/20151112-080818-IA1k9X/openstack-setup.log
  * The generated manifests are available at: /var/tmp/packstack/20151112-072553-TRk9OV/manifests
  * The generated manifests are available at: /var/tmp/packstack/20151112-080818-IA1k9X/manifests
</source>
</syntaxhighlight>


==오픈스택 서비스 확인==
==오픈스택 서비스 확인==
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# openstack-status
[root@servera ~]# openstack-status
== Nova services ==
== Nova services ==
373번째 줄: 403번째 줄:
openstack-keystone:                    inactive  (disabled on boot)
openstack-keystone:                    inactive  (disabled on boot)
== Horizon service ==
== Horizon service ==
openstack-dashboard:                    301
openstack-dashboard:                    active
== neutron services ==
== neutron services ==
neutron-server:                        active
neutron-server:                        active
398번째 줄: 428번째 줄:
openstack-ceilometer-alarm-evaluator:  active
openstack-ceilometer-alarm-evaluator:  active
openstack-ceilometer-notification:      active
openstack-ceilometer-notification:      active
== Heat services ==
openstack-heat-api:                    active
openstack-heat-api-cfn:                active
openstack-heat-api-cloudwatch:          inactive  (disabled on boot)
openstack-heat-engine:                  active
== Support services ==
== Support services ==
mysqld:                                active    (disabled on boot)
mysqld:                                inactive  (disabled on boot)
openvswitch:                            active
openvswitch:                            active
dbus:                                  active
dbus:                                  active
411번째 줄: 436번째 줄:
memcached:                              active
memcached:                              active
== Keystone users ==
== Keystone users ==
Warning keystonerc not sourced
Warning keystonerc not syntaxhighlightd
</source>
</syntaxhighlight>


==브리지 네트워크 구성==
==브리지 네트워크 구성==
*ifcfg-eth0 보존 및 br-ex로 복사
*ifcfg-eth0 보존 및 br-ex로 복사
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /root/
[root@servera ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /root/
[root@servera ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-br-ex
[root@servera ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-br-ex
</source>
</syntaxhighlight>
*ifcfg-eth0 수정
*ifcfg-eth0 수정
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
[root@servera ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
</source>
</syntaxhighlight>
<source lang='autoconf'>
<syntaxhighlight lang='aconf'>
DEVICE=eth0
DEVICE=eth0
DEVICETYPE=ovs
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=br-ex
ONBOOT=yes
ONBOOT=yes
OVS_BRIDGE=br-ex
</syntaxhighlight>
TYPE=OVSPort
</source>
*ifcfg-br-ex 수정
*ifcfg-br-ex 수정
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# vi /etc/sysconfig/network-scripts/ifcfg-br-ex  
[root@servera ~]# vi /etc/sysconfig/network-scripts/ifcfg-br-ex  
</source>
</syntaxhighlight>
<source lang='autoconf'>
<syntaxhighlight lang='aconf'>
DEVICE=br-ex
DEVICE=br-ex
DEVICETYPE=ovs
DEVICETYPE=ovs
TYPE=OVSBridge
TYPE=OVSBridge
ONBOOT=yes
BOOTPROTO=static
BOOTPROTO=static
USERCTL=yes
IPADDR=172.25.10.10
IPADDR=172.25.10.10
NETMASK=255.255.255.0
NETMASK=255.255.255.0
GATEWAY=172.25.10.1
GATEWAY=172.25.10.1
DNS1=8.8.8.8
DNS1=8.8.8.8
</source>
ONBOOT=yes
</syntaxhighlight>
*네트워크 재시작
<syntaxhighlight lang='console'>
[root@servera ~]# systemctl restart network
</syntaxhighlight>
*확인
*확인
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# ovs-vsctl show | grep Bridge
[root@servera ~]# ovs-vsctl show | egrep 'br|eth'
    Bridge br-ex
        Port br-ex
            Interface br-ex
        Port "eth0"
            Interface "eth0"
     Bridge br-int
     Bridge br-int
    Bridge br-ex
        Port br-int
            Interface br-int
     Bridge br-tun
     Bridge br-tun
</source>
        Port br-tun
<source lang='cli'>
            Interface br-tun
</syntaxhighlight>
<syntaxhighlight lang='console'>
[root@servera ~]# ip addr show eth0
[root@servera ~]# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
     link/ether 08:00:27:66:75:be brd ff:ff:ff:ff:ff:ff
     link/ether 08:00:27:66:75:be brd ff:ff:ff:ff:ff:ff
     inet6 fe80::a00:27ff:fe66:75be/64 scope link  
     inet6 fe80::a00:27ff:fe66:75be/64 scope link  
       valid_lft forever preferred_lft forever
       valid_lft forever preferred_lft forever
</source>
</syntaxhighlight>
<source lang='cli'>
<syntaxhighlight lang='console'>
[root@servera ~]# ip addr show br-ex
[root@servera ~]# ip addr show br-ex
10: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN  
12: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN  
     link/ether 96:0a:88:8e:a9:45 brd ff:ff:ff:ff:ff:ff
     link/ether 08:00:27:66:75:be brd ff:ff:ff:ff:ff:ff
     inet 172.25.10.10/24 brd 172.25.10.255 scope global br-ex
     inet 172.25.10.10/24 brd 172.25.10.255 scope global br-ex
       valid_lft forever preferred_lft forever
       valid_lft forever preferred_lft forever
     inet6 fe80::940a:88ff:fe8e:a945/64 scope link  
     inet6 fe80::687b:61ff:fe8b:549/64 scope link  
       valid_lft forever preferred_lft forever
       valid_lft forever preferred_lft forever
</source>
</syntaxhighlight>
 
==기타==
*https://github.com/minektur/temp/raw/master/small.qcow2
 
==같이 보기==
* [[packstack]]
* [[Devstack 설치 실습]]
* [[Packstack 설치 실습 (1대 구성)]]
* [[OpenStack 설치 실습]]


==참고 자료==
==참고==
*https://www.rdoproject.org/install/quickstart/
*https://www.rdoproject.org/install/quickstart/
*http://arifzulfikarp.blogspot.kr/2015/06/openstack-menambah-compute-node.html
*http://arifzulfikarp.blogspot.kr/2015/06/openstack-menambah-compute-node.html
*http://community.redhat.com/blog/2015/01/rdo-quickstart-doing-the-neutron-dance/


[[분류: OpenStack]]
[[분류: OpenStack]]

2020년 11월 2일 (월) 00:56 기준 최신판

  다른 뜻에 대해서는 Packstack 설치 실습 (1대 구성) 문서를 참조하십시오.

1 개요[ | ]

OpenStack 설치 실습
오픈스택 설치 실습

2 호스트 전용 네트워크[ | ]

용도 네트워크명 IP 서브넷 마스크
사설 네트워크 VirtualBox Host-Only Ethernet Adpater 172.25.10.1 255.255.255.0
공중 네트워크 브리지 어댑터 · ·

3 네트워크 설정[ | ]

호스트명 어댑터1 어댑터 2
servera.pod1.example.com 호스트 전용 어댑터 브리지 어댑터
serverb.pod2.example.com 호스트 전용 어댑터 브리지 어댑터

4 IP 주소 예시[ | ]

호스트명 lo eth0 eth1
servera.pod1.example.com 127.0.0.1 172.25.10.10 192.168.0.100
serverb.pod1.example.com 127.0.0.1 172.25.10.11 192.168.0.101

5 서버 네트워크 설정[ | ]

  • servera, serverb 동일한 방식으로 설정 (단, IP주소는 다름)
  • (Optional) firewalld도 stop, disable
[root@localhost ~]# systemctl disable NetworkManager
[root@localhost ~]# systemctl stop NetworkManager
[root@localhost ~]# systemctl status NetworkManager
NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled)
   Active: inactive (dead)

Nov 12 07:32:14 serverb.pod1.example.com systemd[1]: Stopped Network Manager.
[root@localhost ~]# ll /etc/sysconfig/network-scripts/ifcfg*
-rw-r--r--. 1 root root 102 Nov 12 07:19 /etc/sysconfig/network-scripts/ifcfg-eth0
-rw-r--r--. 1 root root 104 Nov 12 07:19 /etc/sysconfig/network-scripts/ifcfg-eth1
-rw-r--r--. 1 root root 254 Jan 15  2015 /etc/sysconfig/network-scripts/ifcfg-lo
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=172.25.10.10
NETMASK=255.255.255.0
GATEWAY=172.25.10.1
ONBOOT=yes
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
IPADDR=192.168.0.100
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
ONBOOT=yes
[root@localhost ~]# systemctl start network
[root@localhost ~]# systemctl status network
network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: active (exited) since Thu 2015-11-12 07:27:57 EST; 59s ago
  Process: 8080 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
  Process: 8378 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)

Nov 12 07:27:51 servera.pod1.example.com systemd[1]: Starting LSB: Bring up/down networking...
Nov 12 07:27:51 servera.pod1.example.com network[8378]: Bringing up loopback interface:  [  OK  ]
Nov 12 07:27:54 servera.pod1.example.com network[8378]: Bringing up interface eth0:  [  OK  ]
Nov 12 07:27:57 servera.pod1.example.com network[8378]: Bringing up interface eth1:  [  OK  ]
Nov 12 07:27:57 servera.pod1.example.com systemd[1]: Started LSB: Bring up/down networking.
[root@servera ~]# ip addr | grep 'inet '
    inet 127.0.0.1/8 scope host lo
    inet 172.25.10.10/24 brd 172.25.10.255 scope global eth0
    inet 192.168.0.100/24 brd 192.168.0.255 scope global eth1

6 호스트명 변경 후 재부팅[ | ]

[root@localhost ~]# hostnamectl set-hostname servera.pod1.example.com
[root@localhost ~]# hostname -f
servera.pod1.example.com
[root@localhost ~]# reboot

7 서버 hosts 파일 설정[ | ]

[root@servera ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.25.10.10 servera.pod1.example.com servera
172.25.10.11 serverb.pod1.example.com serverb

8 서버간 통신 확인[ | ]

  • servera, serverb 둘다 동일하게 확인
ping servera -c1 | egrep 'PING|0%'
ping serverb -c1 | egrep 'PING|0%'
ping servera.pod1.example.com -c1 | egrep 'PING|0%'
ping serverb.pod1.example.com -c1 | egrep 'PING|0%'
ping 8.8.8.8 -c1 | egrep 'PING|0%'
ping time.bora.net -c1 | egrep 'PING|0%'
[root@servera ~]# ping servera -c1 | egrep 'PING|0%'
PING servera.pod1.example.com (172.25.10.10) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
[root@servera ~]# ping serverb -c1 | egrep 'PING|0%'
PING serverb.pod1.example.com (172.25.10.11) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
[root@servera ~]# ping servera.pod1.example.com -c1 | egrep 'PING|0%'
PING servera.pod1.example.com (172.25.10.10) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
[root@servera ~]# ping serverb.pod1.example.com -c1 | egrep 'PING|0%'
PING serverb.pod1.example.com (172.25.10.11) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
[root@servera ~]# ping 8.8.8.8 -c1 | egrep 'PING|0%'
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms
[root@servera ~]# ping time.bora.net -c1 | egrep 'PING|0%'
PING time.bora.net (203.248.240.140) 56(84) bytes of data.
1 packets transmitted, 1 received, 0% packet loss, time 0ms

9 yum update[ | ]

  • servera, serverb 둘다 동일하게 적용
[root@servera ~]# yum repolist
... (생략)
repo id                         repo name                         status
base/7/x86_64                   CentOS-7 - Base                   8,652
extras/7/x86_64                 CentOS-7 - Extras                   275
updates/7/x86_64                CentOS-7 - Updates                1,707
repolist: 10,634
[root@servera ~]# yum update -y
... (생략)
  xz-libs.x86_64 0:5.1.2-9alpha.el7                                     
  yum.noarch 0:3.4.3-125.el7.centos                                     
  yum-plugin-fastestmirror.noarch 0:1.1.31-29.el7                       

Replaced:
  NetworkManager.x86_64 1:0.9.9.1-13.git20140326.4dba720.el7            

Complete!

10 openstack-liberty 저장소 추가[ | ]

  • 여기부터는 servera만 적용 ★★
[root@servera ~]# yum install https://www.rdoproject.org/repos/rdo-release.rpm -y
...(생략)
Installed:
  rdo-release.noarch 0:liberty-2                                        

Complete!
[root@servera ~]# yum repolist
... (생략)
repo id                        repo name                          status
base/7/x86_64                  CentOS-7 - Base                    8,652
extras/7/x86_64                CentOS-7 - Extras                    275
openstack-liberty/x86_64       OpenStack Liberty Repository         723
updates/7/x86_64               CentOS-7 - Updates                 1,707
repolist: 11,357

11 openstack-packstack 설치[ | ]

[root@servera ~]# yum install openstack-packstack -y
... (생략)
  rubygem-psych.x86_64 0:2.0.0-25.el7_1                                 
  rubygem-rdoc.noarch 0:4.0.0-25.el7_1                                  
  rubygems.noarch 0:2.0.14-25.el7_1                                     

Complete!
[root@servera ~]# packstack --version
packstack Liberty 2015.2.dev1654.gcbbf46e

12 answer 파일 생성[ | ]

  • answer.txt 파일 생성
[root@servera ~]# packstack --gen-answer-file answer.txt
Packstack changed given value  to required value /root/.ssh/id_rsa.pub
  • 사본 보존
[root@servera ~]# cp answer.txt answer.old

13 answer 파일 편집 #1[ | ]

[root@servera ~]# vi answer.txt
...
CONFIG_DEFAULT_PASSWORD=mypw
...
CONFIG_HEAT_INSTALL=y
...
CONFIG_NTP_SERVERS=time.bora.net
...
CONFIG_KEYSTONE_ADMIN_PW=mypw
...
CONFIG_HORIZON_SSL=y
...
CONFIG_HEAT_CFN_INSTALL=y
...
CONFIG_PROVISION_DEMO=n
  • 변경내용 확인
[root@servera ~]# diff answer.old answer.txt
11c11
< CONFIG_DEFAULT_PASSWORD=
---
> CONFIG_DEFAULT_PASSWORD=mypw
43c43
< CONFIG_HEAT_INSTALL=n
---
> CONFIG_HEAT_INSTALL=y
62c62
< CONFIG_NTP_SERVERS=
---
> CONFIG_NTP_SERVERS=time.bora.net
303c303
< CONFIG_KEYSTONE_ADMIN_PW=efdd3c010d89439c
---
> CONFIG_KEYSTONE_ADMIN_PW=mypw
1014c1014
< CONFIG_HORIZON_SSL=n
---
> CONFIG_HORIZON_SSL=y
1077c1077
< CONFIG_HEAT_CFN_INSTALL=n
---
> CONFIG_HEAT_CFN_INSTALL=y
1090c1090
< CONFIG_PROVISION_DEMO=y
---
> CONFIG_PROVISION_DEMO=n

14 answer 파일 편집 #2[ | ]

  • 172.25.10.10 (eth0)을 기준으로 설정되어야 하는데 192.168.0 (eth1)을 기준으로 설정되어 있음
[root@servera ~]# cat answer.txt | grep 192.168.0
CONFIG_CONTROLLER_HOST=192.168.0.100
CONFIG_COMPUTE_HOSTS=192.168.0.100
CONFIG_NETWORK_HOSTS=192.168.0.100
CONFIG_STORAGE_HOST=192.168.0.100
CONFIG_SAHARA_HOST=192.168.0.100
CONFIG_AMQP_HOST=192.168.0.100
CONFIG_MARIADB_HOST=192.168.0.100
CONFIG_KEYSTONE_LDAP_URL=ldap://192.168.0.100
CONFIG_MONGODB_HOST=192.168.0.100
CONFIG_REDIS_MASTER_HOST=192.168.0.100
  • 사본2 보존
[root@servera ~]# cp answer.txt answer.old2
  • IP 바꿔치기
[root@servera ~]# sed -i 's/192.168.0.100/172.25.10.10/g' answer.txt
[root@servera ~]# diff answer.old2 answer.txt
82c82
< CONFIG_CONTROLLER_HOST=192.168.0.100
---
> CONFIG_CONTROLLER_HOST=172.25.10.10
85c85
< CONFIG_COMPUTE_HOSTS=192.168.0.100
---
> CONFIG_COMPUTE_HOSTS=172.25.10.10
89c89
< CONFIG_NETWORK_HOSTS=192.168.0.100
---
> CONFIG_NETWORK_HOSTS=172.25.10.10
124c124
< CONFIG_STORAGE_HOST=192.168.0.100
---
> CONFIG_STORAGE_HOST=172.25.10.10
128c128
< CONFIG_SAHARA_HOST=192.168.0.100
---
> CONFIG_SAHARA_HOST=172.25.10.10
250c250
< CONFIG_AMQP_HOST=192.168.0.100
---
> CONFIG_AMQP_HOST=172.25.10.10
272c272
< CONFIG_MARIADB_HOST=192.168.0.100
---
> CONFIG_MARIADB_HOST=172.25.10.10
323c323
< CONFIG_KEYSTONE_LDAP_URL=ldap://192.168.0.100
---
> CONFIG_KEYSTONE_LDAP_URL=ldap://172.25.10.10
1148c1148
< CONFIG_MONGODB_HOST=192.168.0.100
---
> CONFIG_MONGODB_HOST=172.25.10.10
1152c1152
< CONFIG_REDIS_MASTER_HOST=192.168.0.100
---
> CONFIG_REDIS_MASTER_HOST=172.25.10.10

15 answer 파일 적용[ | ]

[root@servera ~]# packstack --answer-file answer.txt
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20151112-070612-eQyGc6/openstack-setup.log

Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
... (생략)
Applying 172.25.10.10_nagios.pp
Applying 172.25.10.10_nagios_nrpe.pp
172.25.10.10_nagios.pp:                              [ DONE ]          
172.25.10.10_nagios_nrpe.pp:                         [ DONE ]          
Applying 172.25.10.10_postscript.pp
172.25.10.10_postscript.pp:                          [ DONE ]         
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]

 **** Installation completed successfully ******

Additional information:
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
 * File /root/keystonerc_admin has been created on OpenStack client host 172.25.10.10. To use the command line tools you need to syntaxhighlight the file.
 * To access the OpenStack Dashboard browse to http://172.25.10.10/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * To use Nagios, browse to http://172.25.10.10/nagios username: nagiosadmin, password: 9f93ebcf440a49cc
 * The installation log file is available at: /var/tmp/packstack/20151112-080818-IA1k9X/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20151112-080818-IA1k9X/manifests

16 오픈스택 서비스 확인[ | ]

[root@servera ~]# openstack-status
== Nova services ==
openstack-nova-api:                     active
openstack-nova-cert:                    active
openstack-nova-compute:                 active
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-conductor:               active
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:              active
== Keystone service ==
openstack-keystone:                     inactive  (disabled on boot)
== Horizon service ==
openstack-dashboard:                    active
== neutron services ==
neutron-server:                         active
neutron-dhcp-agent:                     active
neutron-l3-agent:                       active
neutron-metadata-agent:                 active
neutron-openvswitch-agent:              active
== Swift services ==
openstack-swift-proxy:                  active
openstack-swift-account:                active
openstack-swift-container:              active
openstack-swift-object:                 active
== Cinder services ==
openstack-cinder-api:                   active
openstack-cinder-scheduler:             active
openstack-cinder-volume:                active
openstack-cinder-backup:                active
== Ceilometer services ==
openstack-ceilometer-api:               active
openstack-ceilometer-central:           active
openstack-ceilometer-compute:           active
openstack-ceilometer-collector:         active
openstack-ceilometer-alarm-notifier:    active
openstack-ceilometer-alarm-evaluator:   active
openstack-ceilometer-notification:      active
== Support services ==
mysqld:                                 inactive  (disabled on boot)
openvswitch:                            active
dbus:                                   active
target:                                 active
rabbitmq-server:                        active
memcached:                              active
== Keystone users ==
Warning keystonerc not syntaxhighlightd

17 브리지 네트워크 구성[ | ]

  • ifcfg-eth0 보존 및 br-ex로 복사
[root@servera ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /root/
[root@servera ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-br-ex
  • ifcfg-eth0 수정
[root@servera ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=br-ex
ONBOOT=yes
  • ifcfg-br-ex 수정
[root@servera ~]# vi /etc/sysconfig/network-scripts/ifcfg-br-ex
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=172.25.10.10
NETMASK=255.255.255.0
GATEWAY=172.25.10.1
DNS1=8.8.8.8
ONBOOT=yes
  • 네트워크 재시작
[root@servera ~]# systemctl restart network
  • 확인
[root@servera ~]# ovs-vsctl show | egrep 'br|eth'
    Bridge br-ex
        Port br-ex
            Interface br-ex
        Port "eth0"
            Interface "eth0"
    Bridge br-int
        Port br-int
            Interface br-int
    Bridge br-tun
        Port br-tun
            Interface br-tun
[root@servera ~]# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
    link/ether 08:00:27:66:75:be brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a00:27ff:fe66:75be/64 scope link 
       valid_lft forever preferred_lft forever
[root@servera ~]# ip addr show br-ex
12: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 08:00:27:66:75:be brd ff:ff:ff:ff:ff:ff
    inet 172.25.10.10/24 brd 172.25.10.255 scope global br-ex
       valid_lft forever preferred_lft forever
    inet6 fe80::687b:61ff:fe8b:549/64 scope link 
       valid_lft forever preferred_lft forever

18 기타[ | ]

19 같이 보기[ | ]

20 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}