OpenStack

Q:安裝OpenStack?

目前有用 Mirantis, Redhat, HP 這三家推出的openstack。

Mirantis 我沒實際裝過,不過看同事都是用web ui安裝的。

而Redhat 的有command line和 web UI安裝兩種,但web UI架好之前仍需要用command line安裝。

而HP最新版本的Openstack有提供UI,但先前就我知道都只能用command line。

三種以 Mirantis 的Fuel安裝是最簡單的。

 
 
CODE NAME SERVICE   DESCRIPTION
Horizon Dashboard Provides a web-based self-service portal to interact with underlying OpenStack services, such as launching an instance, assigning IP addresses and configuring access controls.
Nova Compute Manages the lifecycle of compute instances in an OpenStack environment. Responsibilities include spawning, scheduling and decommissioning of virtual machines on demand.
Neutron Networking Enables Network-Connectivity-as-a-Service for other OpenStack services, such as OpenStack Compute. Provides an API for users to define networks and the attachments into them. Has a pluggable architecture that supports many popular networking vendors and technologies.
Swift Object Storage Stores and retrieves arbitrary unstructured data objects via a RESTful, HTTP based API. It is highly fault tolerant with its data replication and scale-out architecture. Its implementation is not like a file server with mountable directories. In this case, it writes objects and files to multiple drives, ensuring the data is replicated across a server cluster.
Cinder Block Storage Provides persistent block storage to running instances. Its pluggable driver architecture facilitates the creation and management of block storage devices.
Keystone Identity Service Provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
Glance Image Service Stores and retrieves virtual machine disk images. OpenStack Compute makes use of this during instance provisioning.
Ceilometer Telemetry Monitors and meters the OpenStack cloud for billing, benchmarking, scalability, and statistical purposes.
Heat Ochestration Orchestrates multiple composite cloud applications by using either the native HOT template format or the AWS CloudFormation template format, through both an OpenStack-native REST API and a CloudFormation-compatible Query API.
Trove Database N/A
Ironic Bare Metal Provisioning N/A
Zaqar Multiple Tenant Cloud Messaging Queue Management
Sahara Elastic Map Reduce OpenStack Data Processing
Manilla Shared File System

 

  • Users log into Horizon and initiate a VM create
  • Keystone authorizes
  • Nova initiates provisioning and saves state to DB
  • Nova Scheduler finds appropriate host
  • Neutron configures networking
  • Cinder provides block device
  • Image URI is looked up through Glance
  • Image is retrieved via Swift
  • VM is rendered by Hypervisor

 


 
OpenStack integrated projects
Kilo release 2015.1.0:

  • Ceilometer (OpenStack Telemetry)
  • Cinder (OpenStack Block Storage)
  • Glance (OpenStack Image Service)
  • Heat (OpenStack Orchestration)
  • Horizon (OpenStack Dashboard)
  • Keystone (OpenStack Identity)
  • Neutron (OpenStack Networking)
  • Nova (OpenStack Compute)
  • Sahara (OpenStack Data Processing)
  • Swift (OpenStack Object Storage)

 
Operating systems

  • CentOS 6.6 (x86_64 architecture only, master node only)
  • Ubuntu 14.04 (x86_64 architecture only, OpenStack environment only)

 
Hypervisor

  • Ubuntu: KVM, libvirt 1.2.9; QEMU 2.0.0

 
Networking backend

  • Open vSwitch 2.3.1

 
Other

  • Puppet 3.4.2
  • MCollective 2.3.3
  • Cobbler 2.4.4
  • HA Proxy 1.5.3
  • Galera 25.3.10
  • RabbitMQ 3.5.4
  • Pacemaker 1.1.12
  • Corosync 2.3.4
  • MongoDB 2.6.10
  • Ceph 0.80.9 Firefly
  • MySQL 5.6.23 (Ubuntu)

 

 
Note:
 Deployment of Mirantis OpenStack 7.0 onto CentOS for host operating system is not supported due to incompatibility between CentOS 6.6 and
 OpenStack Kilo. Mirantis is actively working on updating support for CentOS-based deployments.
 

 


 

0. Install VirtualBox

Step 1 – Add Required Yum Repositories

vim /etc/yum.repos.d/virtualbox.repo
[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
rpm -Uvh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

 
Step 2 – Install Required Packages
wget http://140.92.24.6/mirror/CentOS/7.1.1503/os/x86_64/Packages/kernel-devel-3.10.0-229.el7.x86_64.rpm
rpm -Uvh kernel-devel-3.10.0-229.1.2.el7.x86_64.rpm

 
Step 3 – Setup Environment Variable
export KERN_DIR=/usr/src/kernels/3.10.0-229.el7.x86_64

 
Step 4 – Install Oracle VirtualBox and Setup
yum install VirtualBox-5.0
/usr/lib/virtualbox/vboxdrv.sh setup

 
Step 5 - Install VirtualBox Extension Pack (optional)
wget http://download.virtualbox.org/virtualbox/5.0.12/Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack

 

1. QuickStart - Mirantis OpenStack

Using the Mirantis VirtualBox Scripts

1. 下載MOS image & Mirantis VirtualBox scripts
 
2.

cd ~
unzip vbox-scripts-7.0.zip 

mv MirantisOpenStack-7.0.iso ~/vbox-scripts-7.0/virtualbox/iso

 
3.
cd ~/vbox-scripts-7.0/virtualbox/
chmod 755 *.sh

cd actions
chmod 755 *.sh

 
4.
yum install expect

 
5. 安裝VirtualBox Extension Pack
 
6. 更改config.sh (optional)
cd ~/vbox-scripts-7.0/virtualbox/
vim config.sh

 
7.
cd ~/vbox-scripts-7.0/virtualbox/
./launch.sh

執行lauch.sh之前,確認Virtualbox VMs目錄位置空間足夠(預設是在/root底下)

 
8. Installing Fuel
當執行完 launch.sh 之後,會自動更改 virtualbox 設定值
並且deploy fuel-master VM
安裝完fuel-master之後自動重啟,會進入configuration screen
如果沒有要更改任何東西就直接按「F8」吧
 
Loading docker images. (This may take a while)
真的等很久
 
9.
Fuel Master Node

Default administrator login: root
Default administrator password: r00tme

Default Fuel UI login: admin
Default Fuel UI password: admin

 
Fuel Slave Node
Default bootstrap login: root
Default bootstrap password: r00tme

 
10. Log in to the Fuel UI
https://10.20.0.2:8443
admin / admin

 

2. Start Fuel

1. Log in to the Fuel UI

https://10.20.0.2:8443
admin / admin

 
2. Create a OpenStack env.

Note. 開機順序
先開啟controller node,在開啟compute node,這樣各個服務才能找到他的服務器進行通訊

Note.
預設192.168.x.x 網段是給雲主機內部使用的,僅限於虛擬機內部通訊,無法對外
172.16.0.x網段則是對外網路(可在Fuel Network設定裡面查看),也可以拿來分配給雲主機做floating IP使用

Note.
Q: Is there any command to check the health of openstack setup and the status of its services?
A: You can use command `openstack-status` if you are running OpenStack on RHEL-based Linux distributions.

除非特別註明,本頁內容採用以下授權方式: Creative Commons Attribution-ShareAlike 3.0 License