Openstack: Single node Installation and External Network Accessing Configuration Guide
Summary of installation
Step 0: Prerequisites
Step 1: Create Openstack hostsystem
Step 2: Config
Openstack host
system
: Install Openstackplatform
: Login Openstack
Step 5: Config to access external network
Step 0: Prerequisites
Software
RHEL-based Linux distributions such as CentOS, Scientific Linux, and so on. )
Hardware
Mac system.)
Step 1: Create Openstack host system
Make sure RAM size is bigger than 6GB
VDI is preferred.
Dynamically Allocation ispreferred.
Make sure Disk Size is greater than60GB.
2 ~ 4 processor is preferred.
Make sure following:
- Only one Adapter is needed.
- Adapter Type is “Bridge”.
- Promiscuous Mode is “Allow All”.
- Cable Connected is checked.
Make sure following:
- Load CentOS installation image to the driver.
- Launch virtual instance we created just now.
- Install CentOS to the instance.
- Most of configuration could be proceed by clicking “Next” button with one exception that Ethernet Card Connection needs to be turn on in manually.
Step 2: Config OpenStack host system
- Reboot virtual instance after installation
- Log into instance with the correct credential info, such as root/root
- vi /etc/environment
LANG=en_US.utf-8 LC_ALL=en_US.utf-8
- source /etc/environment
- Turn off firewall:
systemctl disable firewalld systemctl stop firewalld
(Note: Ignore the error message, such as “Failed to execute operation: Access denied”)
Step 3: Install Openstack platform
yum install -y centos-release-openstack-newton
yum update–y
yum install -y openstack-packstack
vi ~/.bash_profile
export LANG="en_US.UTF-8” export LC_COLLATE="en_US.UTF-8” export LC_CTYPE="en_US.UTF-8” export LC_MESSAGES="en_US.UTF-8” export LC_MONETARY="en_US.UTF-8” export LC_NUMERIC="en_US.UTF-8” export LC_TIME="en_US.UTF-8” export LC_ALL="en_US.UTF-8”
- packstack --allinone--provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex
--os-neutron-ovs-bridge-interfaces=br-ex:eth0--os-neutron-ml2-type-drivers=vxlan,flat,vlan
Note:
- Ensure “flat” and “vlan” have been added into ml2-type-drivers list.
- Ensure eth0 is not your current network card which is using for yourssh connection.
Step 4: Login Openstack
- cat keystonerc_admin
unset OS_SERVICE_TOKEN export OS_USERNAME=admin export OS_PASSWORD=98a76dc776654792 exportOS_AUTH_URL=http://10.140.253.44:5000/v2.0 export PS1='[\u@\h \W(keystone_admin)]\$' exportOS_TENANT_NAME=admin exportOS_REGION_NAME=RegionOne
- Log into openstack dashboard viahttp://10.140.253.XXX/dashboard (admin/98a76dc776654792)
- Start your openstackjourney.
Step 5: Config to access external network
5.1 Create Bridge
- vi /etc/sysconfig/network-scripts/ifcfg-br-ex
DEVICE=br-ex DEVICETYPE=ovs TYPE=OVSBridge BOOTPROTO=static IPADDR=10.140.253.XXX# Old eth0 IP since we want the network restart to not # kill the connection, otherwise pick something outside your dhcprange NETMASK=255.255.255.0 # your netmask GATEWAY=10.140.253.1 #yourgateway DNS1=123.123.123.XXX #yournameserver ONBOOT=yes
- vi /etc/sysconfig/network-scripts/ifcfg-ethXXX
DEVICE=ethXXX TYPE=OVSPort DEVICETYPE=ovs OVS_BRIDGE=br-ex ONBOOT=yes
- service network restart
5.2 Create External Network
Log into dashboard via http://10.140.253.XXX/dashboard with
your credential.Go to Admin->System->Networks
Create a network with following info:
Name:external_network
Project:admin
Provider Network Type: Flat
Physical Network: extnet
Segment ID: <any number>
Admin State: UP
Shared:checked
External Network: checked
5.3 Create Subnet of External Network
- Subnet Name: <any string>
- Network Address: <any available range> e.g.10.140.253.100/28
- IP Version: IPv4
- Gateway IP: <same with your host gateway> e.g.
10.140.253.1
- Uncheck DHCP
- Allocation Pools: <any avaliable range within your Network(10.140.253.100/28>
- DNS Name Servers: <your host DNS servers> e.g.123.123.123.123 , 8.8.8.8
5.4 Create Internal Network
- Name: private_network
- Project: admin
- Provider Network Type: VXLAN
- Physical Network: extnet
- Segment ID: <any number>.
- Admin State: UP
- Shared: checked
- External Network: unchecked
5.5 Create Subnet of Internal Network
- Subnet Name: <any string>
- Network Address: <any available range> e.g.192.168.100.0/24
- IP Version: IPv4
- Uncheck DHCP
- Allocation Pools: <any available range within your Network(192.168.100.0/24>
- DNS Name Servers: <your host DNS servers> e.g.123.123.123.123, 8.8.8.8
5.6 Create Router
- Router Name: <Any string>
- Admin State: UP
- External Network: external_network
5.7 Associate Networks
- Go back to Network Topology
- Click “Add Interface”
- IP Address: <gateway server ip of the internal network> e.g.192.168.100.1
5.8 Config Security Policy
- Go to Project -> Compute -> Access & Security
- Click“Manage Rules” button on “default” item.
- Remove all default rules.
- Recreate rules for protocals“ICMP”, “TCP” and “UDP” with both Ingress and Egress directions.
5.9 Create Instance
- Go back to Network Topology, you should see the external network and the private network are connected with a router
- Click“Launch Instance” button to create an vm
- Boot Source: Image
- Volume Size: <The min size of your image>
- Create New Volume: YES
- Delete Volume on Instance Delete:YES
- Allocated:<Your image> e.g. cirros
Choose appropriate flavor size.
e.g m1.tiny
Choose the network you want to create an instance on.
e.g. “private_network”
Choose the key pair which you want to used for logging into the instance later on.
Click “Launch Instance” to start instance.
Once the instance is created successfully, you should see the Power State is changed to “Running”.
5.10 Allocate Floating IP
- Click the instance drop-down list
- Click Associate Floating IP
- Click”+” button to creating an floating IP address in a specific Network.
- If it’s already done, you can also choose an
avaliable IP address from the drop-down list.
- Choose the network you want to create an IP address on. (e.g. “External_network”)
- Click “Allocate IP”
- Choose the IP address we created just now.
- Click “Associate” button
Now, you should see 2 IP address havebeen associated with the instance.
One is for
private_network;another one (Floating IP) is forexternal_network.
5.11 Instance Login
- Click the Instance name and switch to “Console” tab. You could log into the instance.
- Type your credential info to login. e.g.cirros/cubswin:)
5.12 IP Binding
If you check the network information, you would find that there is no any IPv4 address bind to the instance.
Neither192.168.100.11, nor 10.140.253.100
Execute following 2 commands:
sudo ifconfig eth0 192.168.100.11 netmask 255.255.255.0 sudo route add default gw 192.168.100.1
Now, the private IP address has been associated with the instance.
(We do not need to bind the public IP 10.140.253.100 here, because the HTTP requests will be transferred to the outside world by the router which is connected “private_network”
and “external_network”.
More importantly, that is why10.140.253.100 is an floating IP, and how does it work.)
Ping 8.8.8.8 is OK.
However, Ping by domain name is not working.
e.g. ping www.google.com
sudo vi /etc/resolv.conf
nameserver 123.123.123.123 nameserver 8.8.8.8
Ping www.google.comis OK.
Ping the instance from ”external_network” is pass as well.
6 Useful Tools
# show current network info
ip a
# show current gateway info
route netstat -rn
# show current network namespace
ipnet ns list
e.g. qrouter-bc826659-8f64-4f82-8f20-8fb76e3c5d9d
#execute command via specific network
ipnet ns exec qrouter-bc826659-8f64-4f82-8f20-8fb76e3c5d9d ping www.google.com
#bind specific ip to network interface
ifconfig eth0 192.168.100.11 netmask 255.255.255.0
#add default gateway route
route add default gw 192.168.100.1
Reference:
http://www.learnlinux.org.za/courses/build/net-admin/ch01s11.html
https://www.rdoproject.org/install/quickstart/
https://www.rdoproject.org/networking/neutron-with-existing-external-networ
Openstack: Single node Installation and External Network Accessing Configuration Guide的更多相关文章
- Devstack single node Installation on VM
Last three days, I want to install devstack on my virtual machine on Vmware Workstation.The VM'syste ...
- RDO Stack:VMs cannot access external network.
Issue: There are many root causes to make your openstack vm instances cannot be reached from externa ...
- Hadoop MapReduce Next Generation - Setting up a Single Node Cluster
Hadoop MapReduce Next Generation - Setting up a Single Node Cluster. Purpose This document describes ...
- Hadoop Single Node Setup(hadoop本地模式和伪分布式模式安装-官方文档翻译 2.7.3)
Purpose(目标) This document describes how to set up and configure a single-node Hadoop installation so ...
- Setting up a Single Node Cluster Hadoop on Ubuntu/Debian
Hadoop: Setting up a Single Node Cluster. Hadoop: Setting up a Single Node Cluster. Purpose Prerequi ...
- [原]openstack-kilo--issue(二十)External network cannot is not reachable associate Port
issue==== INFO neutron.api.v2.resource [req-79a36d02-114b--b9ed-0a10c6d69451 ] update failed (client ...
- Installing Apache Hadoop Single Node
转载请注明出处:http://www.cnblogs.com/wubdut/p/4681286.html platform: Ubuntu 14.04 LTS hadoop 1.2.1 1. inst ...
- 4.创建OpenStack的node环境脚本
创建OpenStack的node环境脚本 使用source admin-openrc.sh来运行脚本 在任意目录下创建admin-openrc.sh文件 vim ~/admin-openrc.sh e ...
- all rows from client_id can grow infinitely compared to a single node when hashing by client_id
all rows from client_id can grow infinitely compared to a single node when hashing by client_id Re: ...
随机推荐
- 谈谈spring-boot不同包结构下,同样的类名冲突导致服务启动失败解决方案
项目背景: 某日,有需求要在三天的时间内完成两个大项目的项目合并,因为之前两个项目的包结构和类名都很多相同,于是开始考虑使用加一级包进行隔离,类似于这种结构 但是在启动的过程中,抛出来这样的异常: C ...
- Android P新功能特性抢先看
2018年3月8日,Google推出了Android P Preview版本,并提供官方镜像下载. 为了让广大开发者能够及时了解Android P的新功能特性,提前为您的app进行良好适配,WeTes ...
- Opencv在mac系统的安装与试用
1.在mac终端内,使用brew安装opencv3,这时我的opencv被安装到/usr/local/Cellar/opencv3/3.2.0内. 2.新建xcode 项目,选择command lin ...
- JavaScript数据结构与算法(八) 集合(ECMAScript 6中定义的类似的Set类)
TypeScript方式实现源码 // 特性: // 1. 集合是由一组无序且唯一(即不能重复)的项组成的.这个数据结构使用了与有限集合相同的数学概念,但应用在计算机科学的数据结构中. // 2. 也 ...
- vue 2.0 路由切换以及组件缓存源代码重点难点分析
摘要 关于vue 2.0源代码分析,已经有不少文档分析功能代码段比如watcher,history,vnode等,但没有一个是分析重点难点的,没有一个是分析大命题的,比如执行router.push之后 ...
- [Codeforces 946F]Fibonacci String Subsequences
Description 题库链接 定义 \(F(x)\) 为 \(F(x-1)\) 与 \(F(x-2)\) 的连接(其中 \(F(0) = "0",F(1) = "1& ...
- python 中range numpy.arange 和 numpy.linspace 的区别
1.返回值不同 range返回一个range对象,numpy.arange和numpy.linspace返回一个数组. 2.np.arange的步长可以为小数,但range的步长只能是整数. 与Pyt ...
- Triangle(动态规划)
题目描述 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjac ...
- java集合之HashMap源码解读
源自:jdk1.8.0_121 HashMap继承自AbstractMap,实现了Map.Cloneable.Serializable. HashMap内部是由数组.链表.红黑树实现的 变量 // 默 ...
- 如何为分布式系统优雅的更换RPC
为啥需要更换RPC? 很多小伙伴都遇到过需要为分布式系统调用更换RPC的问题,为什么会遇到这种事呢?其实,在系统搭建初期,需求简单,架构简单,最重要的是请求量也少,所以很多系统都采用快速原型开发模式, ...