기존 오픈스택 설치 시 자료가 빈약하여 힘들었기에 회사에 요청하여 책을 구매 했는데..
아뿔싸... 두둥칫...
2014년 10월... 초판 발행... 개정판은 없고...
하 뭔가 싶음... 절대 저자의 말대로 진행되지 않으며, 수정에 필요한 파일도 없다 ㅜㅜ...
구글링을 통해 설치 방법을 찾아 설치를 진행하였는데
해당 방법을 펌질을 해보겠다 ㅋ
+
서버 또는 가상머신에 이미 CentOS 7이 설치되어 있음을 가정하에 진행하겠습니다.
* 설치된 서버(가상머신)에 CentOS 버전 확인
[root@openstack ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
- CentOS 7.1 버전임을 확인 하였다.
1) yum을 통하여 Update 및 git과 yum utils을 설치한다.
[root@openstack ~]# yum update
[root@openstack ~]# yum install -y git yum-utils
2) Openstack 사용자 계정을 추가한다
[root@openstack ~]# useradd -d /opt/stack -m -s /bin/bash stack
[root@openstack ~]# echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
3) 추가한 stack 사용자로 로그인 하여 openstack의 devstack을 내려 받는다.
[root@openstack ~]# su - stack
[stack@openstack ~]# git clone https://git.openstack.org/openstack-dev/devstack
4) devstack을 받으면 devstack 폴더가 생성 될 것입니다.
해당 폴더로 들어가 local.conf를 설정해주도록 하겠습니다.
[stack@openstack ~]# cd ./devstack
[stack@openstack devstack]# cp -R samples/local.conf local.conf
5) local.conf를 vi 또는 vim을 이용하여 Open 후 필요 정보를 수정합니다.
[stack@openstack devstack]# vi local.conf
# Sample ``local.conf`` for user-configurable variables in ``stack.sh``
# NOTE: Copy this file to the root DevStack directory for it to work properly.
# ``local.conf`` is a user-maintained settings file that is sourced from ``stackrc``.
# This gives it the ability to override any variables set in ``stackrc``.
# Also, most of the settings in ``stack.sh`` are written to only be set if no
# value has already been set; this lets ``local.conf`` effectively override the
# default values.
# This is a collection of some of the settings we have found to be useful
# in our DevStack development environments. Additional settings are described
# in http://devstack.org/local.conf.html
# These should be considered as samples and are unsupported DevStack code.
# The ``localrc`` section replaces the old ``localrc`` configuration file.
# Note that if ``localrc`` is present it will be used in favor of this section.
[[local|localrc]]
# Minimal Contents
# ----------------
# While ``stack.sh`` is happy to run without ``localrc``, devlife is better when
# there are a few minimal variables set:
# If the ``SERVICE_TOKEN`` and ``*_PASSWORD`` variables are not set
# here you will be prompted to enter values for them by ``stack.sh``
# and they will be added to ``local.conf``.
SERVICE_TOKEN=azertytoken
ADMIN_PASSWORD=자신의 희망하는 비밀번호
MYSQL_PASSWORD=stackdb
RABBIT_PASSWORD=stackqueue
SERVICE_PASSWORD=$ADMIN_PASSWORD
# ``HOST_IP`` and ``HOST_IPV6`` should be set manually for best results if
# the NIC configuration of the host is unusual, i.e. ``eth1`` has the default
# route but ``eth0`` is the public interface. They are auto-detected in
# ``stack.sh`` but often is indeterminate on later runs due to the IP moving
# from an Ethernet interface to a bridge on the host. Setting it here also
# makes it available for ``openrc`` to include when setting ``OS_AUTH_URL``.
# Neither is set by default.
#HOST_IP=w.x.y.z <- 해당 부분 # 제거 후 자신의 아이피를 입력
#HOST_IPV6=2001:db8::7
# Logging
# -------
# By default ``stack.sh`` output only goes to the terminal where it runs. It can
# be configured to additionally log to a file by setting ``LOGFILE`` to the full
# path of the destination log file. A timestamp will be appended to the given name.
LOGFILE=$DEST/logs/stack.sh.log
# Old log files are automatically removed after 7 days to keep things neat. Change
# the number of days by setting ``LOGDAYS``.
LOGDAYS=2
# Nova logs will be colorized if ``SYSLOG`` is not set; turn this off by setting
# ``LOG_COLOR`` false.
#LOG_COLOR=False
6) devstack을 설치하기로 하겠습니다
[stack@openstack devstack]# ./stack.sh
- 약 10~30분 정도면 설치가 완료 됩니다.
- 설치가 완료되면 아래와 같은 메세지가 표기 됩니다.
2015-09-03 06:15:14.665 | + echo -e Skip setting lvm filters for non Ubuntu systems
This is your host IP address: 입력한 아이피
This is your host IPv6 address: ::1
Horizon is now available at http://입력한 아이피/dashboard
Keystone is serving at http://입력한 아이피:5000/
The default users are: admin and demo
The password: 입력한 비밀번호
7) root로 재로그인 하여 방화벽을 종료 시킨다.
[stack@openstack devstack]# exit
[root@openstack ~]# sudo systemctl stop firewalld
8) 설치가 완료 되면 Explorer을 이용하여 openstack management site에 접속 할 수 있습니다.
접속 주소는 http://설정IP/ 이며, 접속 계정은 admin계정과 demo계정이 생성되는데
아까 local.conf에서 설정한 패스워드로 접속이 가능합니다.
로그인 이후 아래와 같은 사이트를 확인 할 수 있습니다.
Note: 특정 사이트에서는 devstack이 설치되고 환경설정이 끝난 서버를 절대 재부팅 하지 말라고 경고하고 있다.
아래는 특정 블로그에서 퍼온 작성자의 노트이다.
Note: Once your DevStack environment is setup, DO NOT REBOOT!!!!! I have yet to find a reliable way to bring the system back to a functional state after a reboot. It might be worthwhile to set all of this up on a virtual machine, on the physical server, and take a running snapshot of it. That way, you can reboot and just restore that running snapshot. If you have any insight on bringing DevStack back online after a reboot, please let me know in the comments.
다음편에서는 Devstack을 이용하여 인스턴스를 생성 및 조회해보도록 하겠습니다. :-)
참고URL : https://blog.davelindon.me/install-openstack-devstack-on-centos-7/
http://www.serenity-networks.com/linux/installing-an-entire-openstack-environment-on-a-single-server/
'Web' 카테고리의 다른 글
Centos6 darkstat 설치 (0) | 2015.09.09 |
---|---|
Centos rsync 동기화 (0) | 2015.09.08 |
pear 오류 (0) | 2015.02.28 |
Alteon L4 Switch 초기화 (0) | 2015.02.24 |
JSP-setRequest 한글 깨짐현상시 (0) | 2013.06.11 |