3. Virtual Box 구성도
Virtualbox
Controller: NAT 10.0.0.0/24
External : NAT(masquerade) 203.0.113.0/24
Tunnel : Host-only 10.0.1.0/24
Controller
SQL Database
Message Queue
Identity
Image Service
Compute Management
Dashboard
Networking
management
Networking
ML2 Plugin
Network
Open vSwitch
Networking
ML2 Plug-in
Networking
Open vSwitch Agent
Networking
L3 Agent
Networking
DHCP Agent
Networking
Metadata Agent
Compute1
Hypervisor
Open vSwitch
Compute
Networking
ML2 Plug-in
Networking
Open vSwitch Agent
Networking
L3 Agent( 추가 )
Networking
Metadata Agent( 추가 )
Compute2
Hypervisor
Open vSwitch
Compute
Networking
ML2 Plug-in
Networking
Open vSwitch Agent
Networking
L3 Agent( 추가 )
Networking
Metadata Agent( 추가 )
10.0.0.11
10.0.1.21
unnumbered
unnumbered
10.0.0.21
10.0.1.31
unnumbered
unnumbered
10.0.0.31
10.0.1.32
unnumbered
unnumbered
10.0.0.32
PC - - 10.0.1.1 -
VLAN : Host-only(masquerade) N/A
4. 1. 구성방법
• 설치환경 : Virtualbox 5.0.10 + Extention pack
• 설치방법 :
– 1. script 실행용 VM 1 대 , openstack 설치용 VM 3 대구성
– 2. git Fork or Script file download : (
https://github.com/yoonsungwon/study_devops)
– 3. IP Setting (Controller, Network, Compute)
– 4. User 생성 (Student), ssh-keygen
– 5. 스크립트 실행 (kilo-step-01.sh ~ kilo-step-07.sh)
– 6. Compute node 복제하여 compute2 생성 및 설정변경
– 7. 환경설정 검토
– 8. DVR 설치
5. 2. 특이사항 및 남은과제
• 콘솔 접속 시 한 개 VM 만 컨트롤 가능
• neutron router-port-list demo-router 명령시 예제와 상이
– 예제 : 192.168.1.1 / 203.0.113.101
– 2 팀 : 192.168.1.1(router), 192.168.1.3(snat) / 203.0.113.101(ext-net)
• DHCP 구성 확인
• CentOS Image 구성
• DBMS 설치 및 AWS 연동
13. #3. IP Settings
controller
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.11 netmask 255.255.255.0 broadcast 10.0.0.255
enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.1.11 netmask 255.255.255.0 broadcast 10.0.1.255
network
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.21 netmask 255.255.255.0 broadcast 10.0.0.255
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::a00:27ff:fe80:5875 prefixlen 64 scopeid 0x20<link>
enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.1.21 netmask 255.255.255.0 broadcast 10.0.1.255
enp0s10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::a00:27ff:fe7f:53e1 prefixlen 64 scopeid 0x20<link>
compute
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.31 netmask 255.255.255.0 broadcast 10.0.0.255
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::a00:27ff:fef6:b720 prefixlen 64 scopeid 0x20<link>
enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.1.31 netmask 255.255.255.0 broadcast 10.0.1.255
enp0s10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::a00:27ff:fe1f:c78b prefixlen 64 scopeid 0x20<link>
14. #4. User 생성 , ssh-keygen
User 생성 : Controller, Network, Compute
[root@centos Scripts]# useradd student
[root@centos Scripts]# passwd student
Changing password for user student.
New password: [type passwd]
Retype new password: [retyped passwd]
passwd: all authentication tokens updated successfully.
[root@centos Scripts]# grep student /etc/passwd
student:x:1000:1000::/home/student:/bin/bash
[root@centos Scripts]# grep student /etc/group
student:x:1000:
SSH-KEY 생성
[root@centos Scripts]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): [enter]
Enter passphrase (empty for no passphrase): [enter]
Enter same passphrase again: [enter]
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
74:4e:17:a5:58:d3:66:46:38:1e:b4:c0:72:e8:89:02 root@centos
The key's randomart image is:
+--[ RSA 2048]----+
| o..==o |
| E o o++== |
| . o.++.+* |
| . ..o+ .. |
| . S . |
| |
| |
+-----------------+
15. #6. compute 복제 , config
변경
1. Compute Node 복제
2. Hostname 변경
3. IP 변경
4. Neutron 설정 변경
[root@compute2 neutron]# grep local_ip plugins/ml2/ml2_conf.ini
local_ip = 10.0.1.32
16. #7. 환경설정 검토
1. Virtual machine 종류 확인 ( egrep 결과가 0 일경우 qemu 사용 )
[root@compute2 neutron]# egrep -c '(vmx|svm)' /proc/cpuinfo
0
[root@compute2 neutron]# crudini --set /etc/nova/nova.conf libvirt virt_type qemu
[root@compute2 neutron]# crudini --get /etc/nova/nova.conf libvirt virt_type
qemu
17. #8. DVR 설치
1. Controller 설치 : sh -x DVR.controller.sh
확인 : sh -x DVR.controller_verify.sh
2. Network 설치 : sh -x DVR.network.sh
확인 : sh -x DVR.network_verify.sh
3. Compute 설치 : sh -x DVR.compute.sh compute, sh -x DVR.compute.sh compute2
확인 : sh -x DVR.compute_verify.sh compute, sh -x DVR.compute_verify.sh compute2
특이사항 : openvswitch 추가 (br-ex, br-vlan), service 추가 (L3 agent, metadata agent)
4. 설치 검토 (Controller Node 에서 수행 ) – 스크립트 확인 후 대문자로 된 변수 확인 (ex. Instance Name)
sh -x DVR.verify.sh
특이사항 : 홈페이지에 게시된 Demo subnet 추가 명령어 오류
– Before : neutron subnet-create demo-net --name demo-subnet --gateway 192.168.1.1 192.168.1.0/24
– after : neutron subnet-create --name demo-subnet --gateway 192.168.1.1 demo-net 192.168.1.0/24
1. Cirros 기동 시 DHCP IP 를 받아오지 못해 수동으로 설정 필요 ( 설정상 오류 파악중 )
ifconfig eth0 192.168.1.x
route add default gw 192.168.1.1