OpenStack:RDO
Install introduce
- CentOS를 설치한다. (LVM을 사용한다)
- CentOS7의 경우
/home
에 큰 용량이 할당되므로 해당 LVM파티션을 제거하여 root에 재할당한다: CentOS:ResizeLVM를 참조. - SELinux를 비활성화 한다.
- 만약 필요하다면 NVIDIA드라이버를 설치한다.
- RDOProject의 Answer파일을 생성한다.
- 설치한다. (설치할 때 root 계정의 ssh 접근을 시도한다. 따라서 ssh로 root접근이 가능한지 확인해야 한다.)
How to install
비 영어권에서는 아래의 로케일 설정을 진행한다. /etc/environment
SELinux 설정을 변경한다. /etc/sysconfig/selinux
파일의 enforcing
를 permissive
로 변경한다.
저장소를 설치한다.
## On RHEL:
$ sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
## On CentOS:
$ sudo yum install -y centos-release-openstack-mitaka
## Add repository
$ sudo yum update -y
$ sudo yum install -y openstack-packstack
네트워크 설정을 바꾸는 NetworkManager서비스를 종료한다.
$ sudo systemctl disable NetworkManager
$ sudo systemctl enable network
$ sudo systemctl stop NetworkManager.service
$ sudo systemctl start network.service
간단한 설치방법은 아래와 같다. (외부 네트워크를 사용하고 싶다면 건너뛴다)
Using external network
외부 네트워크와 연결하고 싶다면 아래와 같이 설치한다. (아래의 내용중, eth0
는 자신의 Ethernet device이름으로 변경한다. e.g. CentOS7의 경우 enp0s31와 같은 느낌.)
$ sudo packstack --allinone --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-interfaces=br-ex:eth0 --os-neutron-ml2-type-drivers=vxlan,flat
위에서 extnet
은 외부의 물리적 L2 세그먼트에 대한 논리적 이름이다. 나중에 외부네트워크를 정의할 때 이 이름을 참조하게 된다.
또한 위의 설치명령이 지원하는 네트워크 타입은 flat이다. 이 것은 Provider Network가 단순한 flat network일 경우 필요하다. (the most common setup for PoCs). 만약 외부 연결을 휘해 VLAN Segment를 사용할 경우 type driver에 vlan이 필요하다.2
the command is currently broken for Mitaka |
참조: Bug 1316856 - packstack fails to configure ovs bridge for CentOS |
만약 위 명령이 정상적으로 작동하지 않다면 |
After completion, given a single machine with a current IP of 192.168.122.212/24 via DHCP with gateway of 192.168.122.1: Make
The file above will move the network parameters from eth0 to br-ex. Make Note: if on Centos7, the file could be It is also possible to use a bond. In that case
This means, we will bring up the interface and plug it into br-ex OVS bridge as a port, providing the uplink connectivity. Restart the network service |
Neutron명령으로 외부 네트워크를 생성한다. (아래의 extnet
L2 segment 이름은 최초 설치시 --os-neutron-ovs-bridge-mappings
의 인자로 사용되었다.)
$ . keystonerc_admin
$ neutron net-create external_network --provider:network_type flat --provider:physical_network extnet --router:external
/etc/sysconfig/network-scripts/ifcfg-br-ex
설정에 주의하여, 서브넷을 생성한다.
$ neutron subnet-create --name public_subnet --enable_dhcp=False --allocation-pool=start=192.168.122.10,end=192.168.122.20 --gateway=192.168.122.1 external_network 192.168.122.0/24
데모를 위한 CirrOS를 Glance로 추가한다.
$ curl http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img | glance image-create --name='cirros image' --visibility=public --container-format=bare --disk-format=qcow2
관리를 위한 최소 설정은 이 것으로 완료되었다.
Testing
새로운 사용자를 추가하여 외부 네트워크를 테스트한다. 명령에 대한 자세한 설명은 배제한다.
$ openstack project create --enable internal
$ openstack user create --project internal --password foo --email [email protected] --enable internal
Now, let's switch to the newly created user:
Then create a router and set its gateway using the external network created by the admin in one of previous steps:
Now create a private network and a subnet in it, since demo provisioning has been disabled:
# neutron net-create private_network
# neutron subnet-create --name private_subnet private_network 192.168.100.0/24
Finally, connect your new private network to the public network through the router, which will provide floating IP addresses.
Easiest way to the network and to launch instances is via horizon, which was set up by packstack.
Command
-
packstack --gen-answer-file=/answer/file/path
- Answer 파일을 생성한다.
-
packstack --answer-file=/path/to/packstack_answers.txt
- Reuse an answer file.
-
packstack --allinone
- Shorthand for:
--install-hosts=
<local ipaddr>--novanetwork-pubif=
<dev>--novacompute-privif=lo --novanetwork-privif=lo --os-swift-install=y --nagios--install=y
- All in one command.
Configure
- CONFIG_CINDER_VOLUMES_SIZE
- how to resize cinder size
- Cinder 볼륨 크기를 설정한다.
- Size of Block Storage volumes group. Actual volume size will be extended with 3% more space for VG metadata. Remember that the size of the volume group will restrict the amount of disk space that you can expose to Compute instances, and that the specified amount must be available on the device used for
/var/lib/cinder
.
- CONFIG_PROVISION_DEMO
- Recommand value:
n
- Command-line flag:
--provision-demo=n
- 테스트 데모를 위한 설정적용 여부.
- CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS
- Recommand value: extnet:
br-ex
- Command-line flag:
--os-neutron-ovs-bridge-mappings=extnet:br-ex
- CONFIG_NEUTRON_OVS_BRIDGE_IFACES
- Recommand value:
br-ex:enp3s0
- Command-line flag:
--os-neutron-ovs-bridge-interfaces=br-ex:enp3s0
- CONFIG_NEUTRON_ML2_TYPE_DRIVERS
- Recommand value:
vxlan,flat
- Command-line flag:
--os-neutron-ml2-type-drivers=vxlan,flat
Horizon SSL
With the current (Oct. 2013) version of packstack the CONFIG_HORIZON_SSL=y
fails for both grizzly and havana. Here is a guide to setting up ssl after the installation.
install the ssl module for apache
copy the certificate and key files to /etc/httpd/conf.d
update /etc/httpd/conf.d/ssl.conf
update /etc/httpd/conf.d/openstack-dashboard.conf
sed -i '1 i\
#these lines force an ssl connection\
RewriteEngine On\
RewriteCond %{HTTPS} !on\
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]\
' /etc/httpd/conf.d/openstack-dashboard.conf
make a backup of the ssl.conf
file (in case packstack is re-run)
restart the web service
Troubleshooting
rdo cannot remove lib dracut hooks shutdown 30-dm-shutdown readonly file system
RDO설치 후 서버가 정상종료되지 않는 현상이 발생될 수 있다. 이 곳을 참조하면 된다.
Not working external network in VirtualBox
VirtualBox에서 브릿지 어댑터로 설정한 네트워크 어뎁터를 통하여 외부 네트워크와 통신이 안되는 현상이 발생할 수 있다. 이 경우 해당 네트워크 어뎁터를 무작위 모드 (Promiscuous mode)로 변경해야 한다.
See also
Favorite site
- RDO web site: Quickstart
- Github: naototty/centos7-rdo-icehouse
- Diving into OpenStack Network Architecture - Part 4 - Connecting to Public Network
- [추천] First install a Centos 7 minimal server and setup network
- My RDO installation procedure : Single Node using Neutron GRE
- Red Hat RDO - Single Node using Neutron GRE - Havana
- Evaluating OpenStack: Single-Node Deployment
Documentation
- [추천] Neutron with existing external network
- Packstack quickstart: Proof of concept for single node
- Networking
- Floating IP range
- Packstack Cookbook
- Adding a compute node
Guide
- [추천] Diving into OpenStack Network Architecture - Part 4 - Connecting to Public Network
- [추천] All-In-One Openstack using RDO Packstack with External Public IP’s
References
-
enp0s3를 eth0와 같은 방식으로 변경하고자 한다면 Ifconfig#CentOS7 : Change network interface name을 참조. ↩
-
대안으로,
packstack –allinone –provision-all-in-one-ovs-bridge=n
를 사용하는 대안이 있지만 이 방법은 더 복잡하다. ↩