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

·Red Hat Enterprise Linux (RHEL) 7is preferred. (e.g.CentOS-7-x86_64-Minimal-1611.iso, or the equivalent version of one of the
RHEL-based
Linux distributions such as CentOS, Scientific Linux, and so on. )
·x86_64 is currently the only supported architecture.
·VirtualBox 5.0.30

Hardware

·Machine: PC / Mac
·RAM: 6+GB
·Processors: 2 ~4(with hardware virtualization extensions)
·Network Adapter: 1+ (Cable MUST be connected to yourcomputer if using
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.

  1. Launch virtual instance we created just now.
  2. Install CentOS to the instance.
  3. 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

  1. Reboot virtual instance after installation
  2. Log into instance with the correct credential info, such as root/root
  3. vi /etc/environment
    LANG=en_US.utf-8
    LC_ALL=en_US.utf-8
  4. source /etc/environment
  5. 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

  1. yum install -y centos-release-openstack-newton

  2. yum update–y

  3. yum install -y openstack-packstack

  4. 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”
  5. 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

  1. 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
  2. Log into openstack dashboard viahttp://10.140.253.XXX/dashboard (admin/98a76dc776654792)
  3. Start your openstackjourney.

Step 5: Config to access external network

5.1 Create Bridge

  1. 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
  2. vi /etc/sysconfig/network-scripts/ifcfg-ethXXX
    DEVICE=ethXXX
    TYPE=OVSPort
    DEVICETYPE=ovs
    OVS_BRIDGE=br-ex
    ONBOOT=yes
  3. service network restart

5.2 Create External Network

  1. Log into dashboard via http://10.140.253.XXX/dashboard with
    your credential.

  2. Go to Admin->System->Networks

  3. Create a network with following info:

  4. Name:external_network

  5. Project:admin

  6. Provider Network Type: Flat

  7. Physical Network: extnet

  8. Segment ID: <any number>

  9. Admin State: UP

  10. Shared:checked

  11. External Network: checked

5.3 Create Subnet of External Network

  1. Subnet Name: <any string>
  2. Network Address: <any available range> e.g.10.140.253.100/28
  3. IP Version: IPv4
  4. Gateway IP: <same with your host gateway> e.g.
    10.140.253.1

  1. Uncheck DHCP
  2. Allocation Pools: <any avaliable range within your Network(10.140.253.100/28>
  3. DNS Name Servers: <your host DNS servers> e.g.123.123.123.123 , 8.8.8.8

5.4 Create Internal Network

  1. Name: private_network
  2. Project: admin
  3. Provider Network Type: VXLAN
  4. Physical Network: extnet
  5. Segment ID: <any number>.
  6. Admin State: UP
  7. Shared: checked
  8. External Network: unchecked

5.5 Create Subnet of Internal Network

  1. Subnet Name: <any string>
  2. Network Address: <any available range> e.g.192.168.100.0/24
  3. IP Version: IPv4

  1. Uncheck DHCP
  2. Allocation Pools: <any available range within your Network(192.168.100.0/24>
  3. DNS Name Servers: <your host DNS servers> e.g.123.123.123.123, 8.8.8.8

5.6 Create Router

  1. Router Name: <Any string>
  2. Admin State: UP
  3. External Network: external_network

5.7 Associate Networks

  1. Go back to Network Topology
  2. Click “Add Interface”

  1. IP Address: <gateway server ip of the internal network> e.g.192.168.100.1

5.8 Config Security Policy

  1. Go to Project -> Compute -> Access & Security
  2. Click“Manage Rules” button on “default” item.

  1. Remove all default rules.
  2. Recreate rules for protocals“ICMP”, “TCP” and “UDP” with both Ingress and Egress directions.

5.9 Create Instance

  1. Go back to Network Topology, you should see the external network and the private network are connected with a router
  2. Click“Launch Instance” button to create an vm

  1. Boot Source: Image
  2. Volume Size: <The min size of your image>
  3. Create New Volume: YES
  4. Delete Volume on Instance Delete:YES
  5. 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

  1. Click the instance drop-down list
  2. Click Associate Floating IP

  1. Click”+” button to creating an floating IP address in a specific Network.
  2. If it’s already done, you can also choose an
    avaliable IP address from the drop-down list.

  1. Choose the network you want to create an IP address on. (e.g. “External_network”)
  2. Click “Allocate IP”

  1. Choose the IP address we created just now.
  2. 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

  1. Click the Instance name and switch to “Console” tab. You could log into the instance.
  2. 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的更多相关文章

  1. Devstack single node Installation on VM

    Last three days, I want to install devstack on my virtual machine on Vmware Workstation.The VM'syste ...

  2. RDO Stack:VMs cannot access external network.

    Issue: There are many root causes to make your openstack vm instances cannot be reached from externa ...

  3. Hadoop MapReduce Next Generation - Setting up a Single Node Cluster

    Hadoop MapReduce Next Generation - Setting up a Single Node Cluster. Purpose This document describes ...

  4. Hadoop Single Node Setup(hadoop本地模式和伪分布式模式安装-官方文档翻译 2.7.3)

    Purpose(目标) This document describes how to set up and configure a single-node Hadoop installation so ...

  5. 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 ...

  6. [原]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 ...

  7. Installing Apache Hadoop Single Node

    转载请注明出处:http://www.cnblogs.com/wubdut/p/4681286.html platform: Ubuntu 14.04 LTS hadoop 1.2.1 1. inst ...

  8. 4.创建OpenStack的node环境脚本

    创建OpenStack的node环境脚本 使用source admin-openrc.sh来运行脚本 在任意目录下创建admin-openrc.sh文件 vim ~/admin-openrc.sh e ...

  9. 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: ...

随机推荐

  1. POJ-1573 Robot Motion模拟

    题目链接: https://vjudge.net/problem/POJ-1573 题目大意: 有一个N*M的区域,机器人从第一行的第几列进入,该区域全部由'N' , 'S' , 'W' , 'E' ...

  2. Java面试题—初级(1)

    1.一个".java"源文件中是否可以包括多个类(不是内部类)?有什么限制? 可以有多个类,但只能有一个public的类,并且public的类名必须与文件名相一致. 2.Java有 ...

  3. jquery中的attr()与prop()的区别

    根据官方的建议:具有 true 和 false 两个属性的属性,如 checked, selected 或者 disabled 使用prop(),其他的使用 attr()

  4. CodeForces 918D MADMAX(博弈+记忆化搜索)

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  5. java中IO操作

    File类 /** * 路径分隔符:public static final String separator; * 设置文件路径:public File(String pathName) ; * 创建 ...

  6. 对于IO流的个人理解

    Samuel 2018-04-21 在这之前,我给你们构造这样一个生活用水的场景: 人们日常生活需要生活用水,那么,水从哪里来呢? 大家都学过初中的物理常识,水在地表,通过蒸发,变成水蒸气去到空中,在 ...

  7. [HAOI 2006]旅行comf

    Description 题库链接 给你一个 \(n\) 个点, \(m\) 条边的无向图.并给出一个点对 \((s,t)\) ,求 \(s,t\) 间的一条路径,使得路径上最大边和最小边的比值最小. ...

  8. 【BZOJ3233】【tyvj1729】文艺平衡树

    原题传送门 解题思路:裸平衡树操作,支持区间翻转即可,这里写了无旋treap. 其实平衡树的区间操作就和线段树差不多,你用个标记搞一下就好了,,,,, #include <stdio.h> ...

  9. [BZOJ]4650: [Noi2016]优秀的拆分

    Time Limit: 30 Sec  Memory Limit: 512 MB Description 如果一个字符串可以被拆分为 AABBAABB 的形式,其中 AA 和 BB 是任意非空字符串, ...

  10. VK Cup 2017 - Round 1

    和FallDream组队瞎打一通--B两个人写的都挂了233,最后只剩下FallDream写的A和我写的C,最后我yy了个E靠谱做法结果打挂了,结束之后改了改就A了,难受. AC:AC Rank:18 ...