Sharing

2011年8月9日 星期二

OpenStack Scripted Installation


Ubuntu 灌好後,我就開始著手灌OpenStack,研究了一下他有幾個安裝方式

http://docs.openstack.org/bexar/openstack-compute/admin/content/ch03s02.html

http://wiki.openstack.org/InstallInstructions/Nova

其中兩個方法很有意思

一個是裝在VitualBox 內,這真的是太有趣了,能想像在Virtual Machine 裡面又再開Virtual Machine 嗎?這是要像 Interception (全面啟動)不斷的長下去嗎:P或許未來會有一種防毒的技術是開兩層Virtual Machine 或是兩層SandBox 。還有一個是用 Puppet 來幫助快速佈署多台機器,這個可以作為我們快速建構資料中心的參考。不過這次我先選用比較單純 script installation來練習。

http://docs.openstack.org/cactus/openstack-compute/admin/content/scripted-ubuntu-installation.html

整個過程和這篇網誌幾乎一樣,我就不重覆紀錄,反正是一堆設定和一堆 script 跑的過程

http://gooooooa.blogspot.com/2011/04/script-nova.html

不過設定的選項中有幾個我還不是很明白會用在那一邊,先紀錄下來

################################################################
Project Network Configuration
################################################################

Here you will set the network range that ALL of your projects will reside in,
and the number of IP addresses in that block that should be available for use.
After that, you'll create a project administrator and a new project.

Network range for ALL projects (normally x.x.x.x/12): 10.0.0.0/12
Total amount of usable IPs for ALL projects: 8

New project creation
####################

User name for the project administrator: dub
Name for the project: dubproject

Desired network range for the 'dubproject' project (normally x.x.x.x/24): 192.168.0.0/24
How many networks for the 'dubproject' project: 1
How many available IPs per 'dubproject' project network: 255




有一篇回答
https://answers.launchpad.net/nova/+question/145820

或許要等到我真的開始 create VM 後才會了解這些 network 的設定

----------

另外在安裝過程中,因為曾經設定錯誤而需要重灌OpenStack,結果就遇到一些問題,我把我的處理方法分享出來,未必是正解,但至少讓我有辦法重灌

Database Nova 己存在
mysql -u root -p xxxxxxx;


Database 無法再連進去
sudo apt-get autoremove

Generating and extracting novacreds.zip 卡住
sudo rm -rf /root/creds

另外是灌好後可以執行
mysql -uroot -pxxxxxxx nova -e 'select * from services;'


來看一下是否有裝成功以及和Compute node 是否有連結起來
+---------------------+---------------------+------------+---------+----+-----------------+----------------+-----------+--------------+----------+-------------------+
| created_at          | updated_at          | deleted_at | deleted | id | host            | binary         | topic     | report_count | disabled | availability_zone |
+---------------------+---------------------+------------+---------+----+-----------------+----------------+-----------+--------------+----------+-------------------+
| 2011-08-09 08:26:11 | 2011-08-10 02:17:45 | NULL       |       0 |  1 | ubuntu1104-64-5 | nova-network   | network   |         6406 |        0 | nova              |
| 2011-08-09 08:26:11 | 2011-08-10 02:17:50 | NULL       |       0 |  2 | ubuntu1104-64-5 | nova-compute   | compute   |         6405 |        0 | nova              |
| 2011-08-09 08:26:14 | 2011-08-10 02:17:45 | NULL       |       0 |  3 | ubuntu1104-64-6 | nova-compute   | compute   |         6406 |        0 | nova              |
| 2011-08-09 08:26:21 | 2011-08-10 02:17:45 | NULL       |       0 |  4 | ubuntu1104-64-5 | nova-scheduler | scheduler |         6404 |        0 | nova              |
+---------------------+---------------------+------------+---------+----+-----------------+----------------+-----------+--------------+----------+-------------------+


沒有留言: