-
서비스가 가능한 오픈스택 설치11편 - 컴퓨트 노드 설치2openstack 2014. 12. 20. 13:26728x90
안녕하세요~!!
지난시간에 우리는 컴퓨트 노드의 인스턴스 생성을 담당하는 Nova-compute를 설치하였습니다. 이번시간에는 네트워크를 담당하는 Neutron과 블록 스토리지를 관리하는 Cinder를 설치해보도록 하겠습니다.
Neutron 컴퓨트 설치
컴퓨트 노드에 생성되는 인스턴스의 IP를 할당하고 다른 컴퓨트 노드간의 인스턴스들이 서로 통신할 수 있도록 Neutron 컴퓨트를 설치하겠습니다.
1. /etc/sysctl.conf 파일을 열어 다음과 같은 내용을 추가합니다. 네트워크 노드와 달리 컴퓨트 노드에서는 IP를 포워딩 할 일이 없으므로 rp_filter만 설정합니다.
$ sudo vi /etc/sysctl.conf net.ipv4.conf.all.rp_filter=0 net.ipv4.conf.default.rp_filter=0
2. 수정된 sysctl.conf 파일의 내용을 sysctl 명령을 이용해서 시스템에 적용합니다.
$ sudo sysctl –p net.ipv4.conf.all.rp_filter=0 net.ipv4.conf.default.rp_filter=0
3. Neutron, ML2, OpenvSwitch를 설치합니다.
$ sudo apt-get install neutron-common neutron-plugin-ml2 neutron-plugin-openvswitch-agent \n openvswitch-datapath-dkms
4. 설치가 완료되면 /etc/neutron/neutron.conf 파일을 열어 다음과 같이 RabbitMQ, Neutron 플러그인 정보, Keystone 정보를 수정합니다.
$ sudo vi /etc/neutron/neutron.conf [DEFAULT] ... auth_strategy = keystone ... rpc_backend = neutron.openstack.common.rpc.impl_kombu rabbit_host = 10.10.15.11 rabbit_password = rabbitpass ... core_plugin = ml2 service_plugins = router allow_overlapping_ips = True [keystone_authtoken] ... auth_uri = http://10.10.15.11:5000 auth_host = 10.10.15.11 auth_protocol = http auth_port = 35357 admin_tenant_name = service admin_user = neutron admin_password = neutronpass
5. /etc/neutron/plugins/ml2/ml2_conf.ini 파일에 네트워크 타입과 메커니즘 드라이버 정보를 다음과 같이 입력합니다.
$ sudo vi /etc/neutron/plugins/ml2/ml2_conf.ini [ml2] type_drivers = gre tenant_network_types = gre mechanism_drivers = openvswitch [ml2_type_gre] tunnel_id_ranges = 1:1000 [ovs] local_ip = eth1 tunnel_type = gre enable_tunneling = True [securitygroup] firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver enable_security_group = True
6. 환경설정이 완료되면 openvswitch을 재시작합니다.
$ sudo service openvswitch-switch restart
7. 서로 다른 컴퓨트 노드간의 인스턴스 네트워킹을 담당할 br-int를 Openvswitch에 추가합니다.
$ sudo ovs-vsctl add-br br-int
8. Neutron은 인스턴스에 네트워크 IP를 할당 해야 하는 밀접한 관련이 있으므로 /etc/nova/ nova.conf를 열어 다음과 같이 Neutron 정보를 추가합니다.
$ sudo vi /etc/nova/nova.conf [DEFAULT] ... network_api_class = nova.network.neutronv2.api.API neutron_url = http://10.10.15.11:9696 neutron_auth_strategy = keystone neutron_admin_tenant_name = service neutron_admin_username = neutron neutron_admin_password = neutronpass neutron_admin_auth_url = http://10.10.15.11:35357/v2.0 linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver firewall_driver = nova.virt.firewall.NoopFirewallDriver security_group_api = neutron
9. Neutron 정보를 추가했으면 이번에는 nova-compute와 neutron-plugin을 재시작합니다.
$ sudo service nova-compute restart nova-compute stop/waiting nova-compute start/running, process 23167 $ sudo service neutron-plugin-openvswitch-agent restart neutron-plugin-openvswitch-agent stop/waiting neutron-plugin-openvswitch-agent start/running, process 23346
Cinder 볼륨 설치
컨트롤러 노드에서 Cinder 서버를 설치했다면 컴퓨트 노드에서는 Cinder 볼륨을 설치합니다. Cinder 볼륨은 블록 스토리지용 디스크가 별도로 있는 노드에서도 설치가 가능합니다.
1. 먼저 lvm을 설치합니다.
$ sudo apt-get install lvm2
2. Fdisk 명령을 이용해서 스토리지용 디스크가 있는지 확인합니다.
$ sudo fdisk -l Disk /dev/sda: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000d9e26 Device Boot Start End Blocks Id System /dev/sda1 * 2048 37974015 18985984 83 Linux /dev/sda2 37976062 41940991 1982465 5 Extended /dev/sda5 37976064 41940991 1982464 82 Linux swap / Solaris Disk /dev/sdb: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdb doesn't contain a valid partition table
3. 확인된 디바이스로 물리 볼륨(Physical Volume)을 생성합니다.
$ sudo pvcreate /dev/sdb
4. 물리 볼륨 생성이 완료되면 볼륨 그룹(Volume Group)을 cinder-volumes라는 이름으로 다음과 같이 생성합니다.
$ sudo vgcreate cinder-volumes /dev/sdb Physical volume "/dev/sdb" successfully created
5. 볼륨 그룹을 생성한 후 /etc/lvm/lvm.conf 파일을 열어 LVM이 기존 디바이스에 접근하지 못하도록 다음과 같이 Filter을 설정합니다.
$ sudo vi /etc/lvm/lvm.conf devices { ... filter = [ "a/sda1/", "a/sdb/", "r/.*/"] ... }
6. 이제 cinder 볼륨을 설치합니다.
$ sudo apt-get install cinder-volume
7. /etc/cinder/cinder.conf 파일을 열어 RabbitMQ 정보, Keystone 정보, Database 정보를 입력합니다.
$ sudo vi /etc/cinder/cinder.conf [DEFAULT] rpc_backend = cinder.openstack.common.rpc.impl_kombu rabbit_host = 10.10.15.11 rabbit_port = 5672 rabbit_userid = guest rabbit_password = rabbitpass glance_host = 10.10.15.11 … [keystone_authtoken] auth_uri = http://10.10.15.11:5000 auth_host = 10.10.15.11 auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = cinder admin_password = cinderpass ... [database] connection = mysql://cinder:cinderdbpass@10.10.15.11/cinder
8. 환경설정이 끝나면 마지막으로 cinder 볼륨과 tgt를 재시작합니다.
$ sudo service cinder-volume restart cinder-volume stop/waiting cinder-volume start/running, process 8358 $ sudo service tgt restart tgt stop/waiting tgt start/running, process 8383
이렇게 해서 Neutron과 Cinder를 설치해 보았습니다. 다음시간에는 오브젝트 스토리지인 Swift와 미터링 서비스인 Ceilometer를 설치해보도록 하겠습니다. 그럼 다음 시간에 만나요~~~
출처 - http://naleejang.tistory.com/142'openstack' 카테고리의 다른 글
[OpenStack Class] 제41강 CentOS에서 설치해 보는 오픈스택 1편 - CentOS 설치하기 (0) 2016.02.01 서비스가 가능한 오픈스택 설치12편 - 컴퓨트 노드 설치3 (0) 2014.12.23 서비스가 가능한 오픈스택 설치10편 - 컴퓨트 노드 설치1 (0) 2014.12.18 서비스가 가능한 오픈스택 설치9편 - 네트워크노드 설치 (0) 2014.12.18 서비스가 가능한 오픈스택 설치8편 - 컨트롤러 노드 설치6 (0) 2014.12.18