Playing Tricircle with Virtualbox
来源:互联网 发布:肇庆学院网络自助中心 编辑:程序博客网 时间:2024/05/05 04:00
Playing Tricircle with Virtualbox
1 Preparation
1 server with Linux kernel (demo is Ubuntu 14.04 LTS)
2 Install softwares
2.1 Install virtualbox
Follow the steps in virtualbox downloads
First, Add the following line to your /etc/apt/sources.list:
deb http://download.virtualbox.org/virtualbox/debian trusty contrib
According to your distribution, replace ‘vivid’ by ‘utopic’, ‘trusty’, ‘raring’, ‘quantal’, ‘precise’, ‘lucid’, ‘jessie’, ‘wheezy’, or ‘squeeze’.
Then, add The Oracle public key for apt-secure:
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Next, install with apt-get method:
sudo apt-get updatesudo apt-get install virtualbox-5.0
2.2 Connect to the virtualbox with x11
First, copy your public key to the ~/authorized_keys
Then, connect with -X command
ssh -X root@HostIP
Next, input the virtualbox to start install virtual machine
virtualbox
Then you can see the virtualbox graph interface:
3 Install Virtual Machines
For playing Tricircle, we need to install 3 nodes for devstack.One for the Top OpenStack, Two for cross pod bottom OpenStacks.
3.1 Configuration of VMs
The most important is to set up networks for use
In order to make the VMs with multiple VLAN networks, then add 2 network devices for bridge use.
eth0
The eth0 is the default network with NAT methods.
eth1
The eth1 is the VLAN external network,and using bridge method, in my environment, I attached to the eth1.
[attention] The Promiscuous Mode must to set “Allow All”.And be in use after reboot.
Otherwise, The Ping test with VLAN tag from Node1 to Node2 will be blocked.
eth2
The same setting as the above, the Promiscuous Mode must be set to “Allow All”. And be in use after reboot.
3.2 Installation the VMs
Download a ios for installation
There are many mirror sites in the world. I download a ubuntu-14.04-LTS in the Ali-OSM(Alibaba Open Source Mirror Site). Because it’s very fast in China.
Install the Operating System
Follow the steps while installing, because it’s easy, so it will be ignored.
After installation, you will see the console like this:
3.3 Running in the backgroud
After installation of the VMs, we can login from SSH. So we need to let’s these VMs running in the background.
And so when we close the VMs, we need to choose the option:
4 Playing tricircle with devstack
The detailed methods can be seen in the OpenStack/Tricircle.
4.1 In Top OpenStack
Configure the network
Install the openvswitch for creating bridges.
apt-get install openvswitch-switch
Create the stack user
adduser stack
Give the stack user sudo privileges:
apt-get install sudo -yecho "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
Download the devstack
sudo apt-get install git -ygit clone https://git.openstack.org/openstack-dev/devstackcd devstack
#### Configure the local.conf
Change the local.conf to fit your environment.
The example is in the Tricircle Project. such as local.conf.sample.
Install the devstack with Tricircle project
./stack.sh
After installing the devstack with tricircle, the next step is verifying the installation.
Verifying the installation
Before verifying, It should create the client environment variables to import, such as :
admin-openrc.sh
export OS_PROJECT_DOMAIN_ID=defaultexport OS_USER_DOMAIN_ID=defaultexport OS_PROJECT_NAME=adminexport OS_TENANT_NAME=adminexport OS_USERNAME=adminexport OS_PASSWORD=password #change password as you set in your own environmentexport OS_AUTH_URL=http://127.0.0.1:5000export OS_IDENTITY_API_VERSION=3#It's very important to set region name to the top openstack, because tricircle has different API urls.export OS_REGION_NAME=RegionOne
Modify the verify install scripts as your own environment.
And run:
cd tricircle/devstackchmod +x verify_top_install.sh./verify_top_install.sh 2>&1 | tee logs
It will save the outputs in the logs, you can check if it’s installed correct.
I pasted one copy in my environments as this.
4.2 Cross pods OpenStack
Installing
First, in the node1 install the tricircle, and then in the node2 install the tricircle.
As the above:
Verifying the tricircle
Before verifying, It should create the client environment variables to import, such as :
admin-openrc.sh
export OS_PROJECT_DOMAIN_ID=defaultexport OS_USER_DOMAIN_ID=defaultexport OS_PROJECT_NAME=adminexport OS_TENANT_NAME=adminexport OS_USERNAME=adminexport OS_PASSWORD=password #change password as you set in your own environmentexport OS_AUTH_URL=http://127.0.0.1:5000export OS_IDENTITY_API_VERSION=3#It's very important to set region name to the top openstack, because tricircle has different API urls.export OS_REGION_NAME=RegionOne
Modify the verify install scripts as your own environment.
And run:
cd tricircle/devstackchmod +x verify_top_install.sh./verify_cross_pod_install.sh 2>&1 | tee logs
One copy logs like this.
Ping test
Using the VNC to login the instances in Node1 and Node2.
And Ping with each other.
VM1: IP 10.0.1.3/24
ping -c 4 10.0.2.3
VM2: IP 10.0.2.3/24
ping -c 4 10.0.1.3
So the cross pod networking has been verified.
And more?
Follow me @fai92 on Weibo :)
- Playing Tricircle with Virtualbox
- Playing with DataGrid Control
- Playing with ptrace
- Playing with the Stack
- Playing with the Stack
- Playing with the stack
- playing with ptrace
- Playing with Virtual Memory
- FZU_1017 Playing with Calculator
- 10067 - Playing with Wheels
- Playing with Virtual Memory
- 110902 Playing with Wheels
- A. Playing with Dice
- codeforces Playing with Dice
- sgu153:Playing with matches
- A. Playing with Paper
- A. Playing with Paper
- Playing with Paper
- JAVA Swing
- OnTouch(),onTouchEvent(),onClick()的区别
- 51Nod 1021 石子归并v1
- JsonCpp的使用方法
- POJ 1007
- Playing Tricircle with Virtualbox
- Activity周期与Intent跳转活动的关系
- Quartz2D - 图片裁剪为正圆形
- hdu 1198 Farm Irrigation(并查集强大无比的位运算)
- ubuntu 14.04 "子进程 已安装 post-removal 脚本 被信号(已终止) 终止了“解决方法
- 超级台阶
- 欢迎使用CSDN-markdown编辑器
- 632A.Gradma Laura and Apples
- 珠链分割