¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 715°Ç
   
OpenStack JUNO - Ubuntu 14.04 #06 Compute Node
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2015-02-24 (È­) 14:53 Á¶È¸ : 3371
                                
Compute Node INSTALL

³×Æ®¿öÅ© ¼³Á¤
root@ubuntu:~# vim /etc/network/interfaces
auto eth0
iface eth0 inet static
address 115.XXX.XXX.7
gateway 115.XXX.XXX.1
netmask 255.255.255.0
dns-nameserver 115.XXX.XXX.XXX


1) È£½ºÆ® ¼öÁ¤
# vim /etc/hosts
115.XXX.XXX.6 controller
115.XXX.XXX.7 compute1

 2) È£½ºÆ®³×ÀÓ ¼öÁ¤
# vim /etc/hostname ¼öÁ¤
root@ubuntu:~# cat /etc/hostname 
compute1

3) apt-get Repositoy (ÀúÀå¼Ò) º¯°æ
 :: ½º¸¶Àϼ­ºê ¹Ì·¯·Î º¯°æ
root@ubuntu:~# sed -i 's/kr.archive.ubuntu.com/mirror.cloudv.kr/g' /etc/apt/sources.list
root@ubuntu:~# sed -i 's/security.ubuntu.com/mirror.cloudv.kr/g' /etc/apt/sources.list

4) apt-get upgrade
root@ubuntu:~# apt-get -y update
root@ubuntu:~# apt-get -y dist-upgrade
root@ubuntu:~# reboot


ntp ¼­¹ö¼³Ä¡
root@ubuntu:~# apt-get -y install ntp

/etc/ntp.conf ¼öÁ¤ 
¿ÜºÎ NTP¸¦ »ç¿ëÇÏÁö ¾Ê°í ÄÁÆ®·Ñ·¯ ¼­¹ö·Î ÁöÁ¤ÇÕ´Ï´Ù.
root@ubuntu:~# /etc/ntpd.conf
#server 0.ubuntu.pool.ntp.org     ### ÁÖ¼®Ã³¸®
#server 1.ubuntu.pool.ntp.org     ### ÁÖ¼®Ã³¸®
#server 2.ubuntu.pool.ntp.org     ### ÁÖ¼®Ã³¸®     
#server 3.ubuntu.pool.ntp.org     ### ÁÖ¼®Ã³¸®
server 115.XXX.XXX.6

µ¥¸ó½ÃÀÛ 
root@ubuntu:~# service ntp restart
 * Stopping NTP server ntpd [ OK ]
 * Starting NTP server ntpd [ OK ]

root@ubuntu:~# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 controller      216.229.0.179    2 u   58   64    7    0.079    1.658   1.017
 golem.canonical 131.188.3.220    2 u   55   64    7  278.071    5.207   0.316



DATABASE(mysql) ¼³Ä¡
ÄÄǻƮ³ëµå¿¡´Â python-mysqldb ¸¸ ¼³Ä¡ÇÏ¸é µÈ´Ù.
root@ubuntu:~# apt-get -y install python-mysqldb


Packages ¼³Ä¡
root@ubuntu:~# apt-get -y install python-software-properties
root@ubuntu:~# add-apt-repository cloud-archive:juno

apt-get upgrade
root@ubuntu:~# apt-get -y update
root@ubuntu:~# apt-get -y dist-upgrade
root@ubuntu:~# reboot

Compute Node ¼­¹ö °¡»óÈ­Áö¿ø¿©ºÎ È®ÀÎ
root@ubuntu:~# egrep -c '(vmx|svm)' /proc/cpuinfo
4

root@ubuntu:~# apt-get -y install nova-compute-kvm python-guestfs qemu-kvm

root@ubuntu:~# vim /etc/nova/nova.conf 
[DEFAULT]
auth_strategy = keystone
rpc_backend = rabbit
rabbit_host = 115.XXX.XXX.6      # Controller
rabbit_password = XXXXXXXXX
my_ip = 115.XXX.XXX.7     # ComputeNode
vnc_enabled=True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 115.XXX.XXX.7   # ComputeNode
novncproxy_base_url = http://115.XXX.XXX.7:6080/vnc_auto.html     # ComputeNode
glance_host = 115.XXX.XXX.6      # Controller

[database]
connection = mysql://nova:XXXXXXXXX@115.XXX.XXX.6/nova     # Controller

[keystone_authtoken]
auth_uri = http://115.XXX.XXX.6:5000   # Controller
auth_host =115.XXX.XXX.6   # Controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = XXXXXXXXX

root@ubuntu:~# rm -f /var/lib/nova/nova.sqlite 
root@ubuntu:~# service nova-compute restart
nova-compute stop/waiting
nova-compute start/running, process 15183


Nova-Network ¼³Ä¡
root@ubuntu:~# apt-get -y install nova-network nova-api-metadata
root@ubuntu:~# apt-get install -y nova-api nova-cert nova-conductor nova-consoleauth nova-novncproxy nova-scheduler python-novaclient nova-compute nova-console

root@ubuntu:~# apt-get install python-novaclient nova-novncproxy
root@ubuntu:~# vim /etc/nova/nova.conf
[DEFAULT]
network_api_class = nova.network.api.API
security_group_api = nova
firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver
network_manager = nova.network.manager.FlatDHCPManager
network_size = 254
allow_same_net_traffic = False
multi_host = True
send_arp_for_ha = True
share_dhcp_address = True
force_dhcp_release = True
flat_network_bridge = br100
flat_interface = eth0
public_interface = eth0

root@ubuntu:~# service nova-network restart
nova-network stop/waiting
nova-network start/running, process 15941

root@ubuntu:~# service nova-api-metadata restart
nova-api-metadata stop/waiting
nova-api-metadata start/running, process 15971


Nova-Network »ý¼º
root@controller:~# cat > /root/admin-openrc.sh 
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=XXXXXXXXX
export OS_AUTH_URL=http://115.XXX.XXX.6:35357/v2.0

root@ubuntu:~# source admin-openrc.sh


demo-net »ý¼º
root@ubuntu:~# source /root/admin-openrc.sh

root@ubuntu:~# nova image-list
+--------------------------------------+---------------------+--------+--------+
| ID                                   | Name                | Status | Server |
+--------------------------------------+---------------------+--------+--------+
| 14cb4b95-07c2-478a-88a6-fa1e7931f828 | cirros-0.3.2-x86_64 | ACTIVE |        |
+--------------------------------------+---------------------+--------+--------+

root@ubuntu:~# nova network-create demo-net --bridge br100 --multi-host T --fixed-range-v4 192.168.145.0/24

::: °øÀξÆÀÌÇÇ·Î ´ÙÀÌ·ºÆ®
root@ubuntu:~# nova network-create VMNET1 --bridge br100 --multi-host T --fixed-range-v4 115.XXX.XXX.128/25


root@compute1:~# nova net-list
+--------------------------------------+----------+-------------------+
| ID                                   | Label    | CIDR              |
+--------------------------------------+----------+-------------------+
| e49253b2-8c98-411a-81d4-bf88b1eebf3f | VMNET1 | 115.XXX.XXX.128/25 |
+--------------------------------------+----------+-------------------+

root@compute1:~# nova-manage network list
id   IPv4               IPv6           start address   DNS1           DNS2           VlanID         project         uuid           
1     115.XXX.XXX.128/25 None           115.XXX.XXX.130 8.8.4.4         None           None           None           e49253b2-8c98-411a-81d4-bf88b1eebf3f

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.