`

expreimenting-openstack-essex-ubuntu-1204-lts-under-virtualbox(转载)

 
阅读更多

原文:http://www.tikalk.com/alm/expreimenting-openstack-essex-ubuntu-1204-lts-under-virtualbox

 

The best way to get an insight into OpenStack is playing with a live installation, but OpenStack's simplest configuration requires 2 network interfaces, e.g. 2 machines, each equipped with 2 network cards and an additional ethernet hub. Using VirtualBox we can set up a full OpenStack installation on a single laptop or desktop.

--openstack最少需要两个机器,每个提供两个网中。通过使用VirtualBox可在单机模拟这种拓扑。

This approach is very appealing and there's a number of guides that describe it. This guide is a compilation of those sources (credited below) with the neccessary updates and fixes.  

--针对一些安装作者进行了整理

OpenStack is evolving fast and the recent release, Essex, came out by the end of April 2012 - at about the same time Ubuntu released 12.04 LTS “Precise Pangolin” (LTS stands for Long Term Support). OpenStack's development is mostly carried out on Ubuntu so this is the easiest platform to get it running on. Ubuntu's repositories for 12.04 provide all the necessary packages to support OpenStack's Essex so a POC based on this combination is supposed to be the easiest to set up.

--示例使用的是OpenStack的Essex版,对应的Ubuntu是12.04 LTS Server版。

 

Quick Overview of The Installation

 

We will install VirtualBox on whatever host OS you have (provided it runs VirtualBox, even Windows). After configuring VirtualBox's host-only network adapetrs, we will create a VM (named essex1) in which a fresh ISO of Ubuntu 12.04 will be installed. All subsequent actions are performed inside essex1. We will grab Kevin's script (credits below) which will do most of the installation and configuration work. Then we will download a tiny(很小的) cloud-ready image, from which we will create our “cloud instance”. OpenStack's Dashboard will be used to launch this instance, we will end the session logging into the cloud instance.

--安装VirtualBox

--配置VirtualBox的网络中Host-only network adapter.

--创建一个虚拟机,叫essex1,在其上安装Ubuntu 12.04。

--使用Kevin's script 执行安装和配置工作

--下载一个小的cloud-ready 镜像,在其上创建我们的cloud instance

--openstack的Dashboard用来加载这个实例,然后就可以登陆这个cloud instance了。

 

Ingredients(准备材料)

Host PC

recommended 8GB RAM, at least 30GB free disk space, internet connection, VT-X enabled in BIOS.

The host OS can be any Linux, windows, Mac supporting VirtualBox

(建议8G内存,30G硬盘,网络,VT-X支持)

VirtualBox 4

I'm using 4.1.12-dfsg-2 (from “universe”)

Ubuntu 12.04 LTS Precise Pangolin ISO image

Most guides use the “server” edition; since a lot of work is performed inside the VM guest, I use (and highly recommend) the “desktop”.

Choose 32 or 64 bits according to your host

(作者建议使用桌面版)

Kevin Jackson's Osinstall.sh script

is obtained by git-cloning Kevin's repository [inline below]

Tiny cloud image

 

is downloaded by another script (written by Kevin)

 

Estimated time

About 1h30, including VM installation and OpenStack setup (not including the ubuntu ISO download time).

-------------------------------------激动人心的时刻到了..................................................

Step 1: VirtualBox Install & Setup - performed on Host PC 

 

  • Verify  VT-X enabled in your host PC's BIOS
  • Download  Ubuntu 12.04 ISO (i'm using the 64 bits desktop)
  • install  VirtualBox [apt-get or here]
  • Configure VirtualBox's Host-Only Networks

start VirtualBox [on ubuntu prior to Unity it's in Applications → Accessories]

open File → Preferences → Network tab

Add host-only netwok for vboxnet0 – this will be the Public interface

set IP to 172.16.0.254, mask 255.255.0.0, dhcp disbaled

 

Add host-only netwok for vboxnet1 – this will be the Private (VLAN) interface

set IP to 11.0.0.1, mask 255.0.0.0, dhcp disbaled

 

Note1: In Kevin's screencast, vboxnet1 is set to 10.0.0.1 which is also used by the default D-Link router (from Bezeq). There shouldn't be IP addressing issues since VirtualBox is supposed to take care of isolation – but I had IP clashes and therefore suggest 11.0.0.0/8 instead.

Note2: In my screenshots vboxnet0 is assigned to another test, so I use vboxnet1 and vboxnet2 respectively

 

 

Step 2: Create Guest - performed in VirtualBox

click the “New” button 

Create a VM with the following settings:

Name: Essex1 (or whatever, not really important)

OS type: Linux

Version: Ubuntu (or Ubuntu 64, in accordance with the ISO downloaded above)

Memory: 1536MB

Hard Disk: accept all the defaults, size 20GB

(创建第一个虚拟机)

 

Configure the newly created VM(配置它)

Now modify the guest as follows: (performed from the right panel in VirtualBox's main window, where the new VM is selected on the left).

System tab:

Processor (optional, but recommended): Increase CPU from 1 set to 2

Acceleration: make sure VT-x and nested paging are checked

Network tab: see figure above 

Adapter 1: attached to NAT – eth0 will connect here; 

Adapter 2: attached to Host-Only Adapter, vboxnet0 - eth1 will connect here ;

Adapter 3: attached to Host-Only Adapter, vboxnet1 - eth2 will connect here;

Audio tab: may be disabled

Shared Folders: optional

if you want to copy files around (from/to the host PC and the VM) that's handy.

 

Power the newly created VM(增强配置)

VirtualBox should popup a wizard to connect the ISO file as boot device.

 

Note: If this doesnt happen (e.g. this isn't your first attmept to boot the VM), you may use the Storage tab to hook the ISO to the virtual CD drive. Alternatively, use the VM window's Devices menu to do the same.

(VB会弹出个向导来连接ISO文件,如果没有,点击启动的时候,会提供选择ISO)

 

Step 3: Guest Install & Initial Configuration

 

Install the guest (from the iso image), use the suggested defaults.

 

Create a user with a quick password such as 0000 (you'll soon have to retype it many times).

Choose eth0 as your default network interface.

 when prompted to reboot, disconnect the ISO from the CD 

 

 

Verify internet access after reboot (mandatory to continue)

You should have internet access through eth0. If it doesn't work, copy the setup for /etc/network/interfaces from the snippet below.

Normally, eth0 will get an IP address of 10.0.2.15

 

 Configure network interfaces

Become root (from now till the end):

sudo -i

Edit /etc/network/interfaces, make it look like this:

auto lo
iface lo inet loopback

  

# The primary network interface
auto eth0
iface eth0 inet dhcp

  

#Public Interface
auto eth1
iface eth1 inet static

address 172.16.0.1
netmask 255.255.0.0
network 172.16.0.0
broadcast 172.16.255.255

 

#Private VLAN interface
auto eth2
iface eth2 inet manual

 up ifconfig eth2 up

 then run:(执行下面的命令)

ifup eth1 #after this, ifconfig shows inet addr:172.16.0.1 Bcast:172.16.255.255 Mask:255.255.0.0

ifup eth2 #after this, ifconfig doesnt report ipv4 addr for eth1

or reboot

 

------------------------------不再抄了,因为这个安装的openstack版本是essex,但是cf官网说支持openstack的版本(Note that only Folsom and Grizzly OpenStack releases are supported.)

详细声明

所以,不参照这个搞了。

 

  • 大小: 29.5 KB
  • 大小: 225.8 KB
  • 大小: 18.1 KB
  • 大小: 118.6 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics