back to index

virtualbox VM

final setting

install ubuntu

basic setting

/etc/default/locale

LANG="en_US.utf8"
LANGUAGE="en_US:en"

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.89.252
        netmask 255.255.255.0
        gateway 192.168.89.1

auto eth1
iface eth1 inet static
        address 192.168.67.252
        netmask 255.255.255.0

auto eth2
iface eth2 inet static
        address 192.168.45.252
        netmask 255.255.255.0


dns-nameservers 192.168.67.253 8.8.8.8
dns-search icehouse

/etc/hosts

127.0.0.1       localhost
192.168.67.252	network.icehouse

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

/etc/hostname

network.icehouse

/etc/dhcp/dhclient.conf

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

send host-name = gethostname();

supersede domain-search "icehouse";
prepend domain-name-servers 192.168.67.253;

request subnet-mask, broadcast-address, time-offset, routers,
	domain-name, domain-name-servers, domain-search, host-name,
	dhcp6.name-servers, dhcp6.domain-search,
	netbios-name-servers, netbios-scope, interface-mtu,
	rfc3442-classless-static-routes, ntp-servers,
	dhcp6.fqdn, dhcp6.sntp-servers;
  • reboot
  • apt-get -y update
  • apt-get -y upgrade
  • apt-get -y install ntp
  • apt-get -y install ubuntu-cloud-keyring
  • apt-get -y dist-upgrade
  • reboot

/etc/ntp.conf

driftfile /var/lib/ntp/ntp.drift

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

server controller.icehouse

restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

restrict 127.0.0.1
restrict ::1
  • service ntp restart

Openvswitch (2.3.2)

  • apt-get -y install git
  • git clone git://github.com/mininet/mininet
  • mininet/util/install.sh -V 2.3.2
  • ovs-vsctl set-manager ptcp:6634:192.168.45.252

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-ovs br-ex
iface br-ex inet static
        ovs_type OVSBridge
        ovs_ports eth0
        address 192.168.89.252
        netmask 255.255.255.0
        gateway 192.168.89.1
        ovs_extra set-fail-mode ${IFACE} standalone -- set bridge ${IFACE} other-config:disable-in-band=true -- set bridge ${IFACE} protocols=OpenFlow13

allow-br-ex eth0
iface eth0 inet manual
        ovs_type OVSPort
        ovs_bridge br-ex
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE down

auto eth1
iface eth1 inet static
        address 192.168.67.252
        netmask 255.255.255.0

allow-ovs br-int
iface br-int inet static
        ovs_type OVSBridge
        ovs_ports eth2
        address 192.168.45.252
        netmask 255.255.255.0
        ovs_extra set-fail-mode ${IFACE} standalone -- set bridge ${IFACE} other-config:disable-in-band=true -- set bridge ${IFACE} protocols=OpenFlow13 -- set-controller ${IFACE} tcp:192.168.45.252:6633

allow-br-int eth2
iface eth2 inet manual
        ovs_type OVSPort
        ovs_bridge br-int
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE down


dns-nameservers 192.168.67.253 8.8.8.8
dns-search icehouse

/etc/default/openvswitch-switch

# This is a POSIX shell fragment                -*- sh -*-

# FORCE_COREFILES: If 'yes' then core files will be enabled.
# FORCE_COREFILES=yes

# OVS_CTL_OPTS: Extra options to pass to ovs-ctl.  This is, for example,
# a suitable place to specify --ovs-vswitchd-wrapper=valgrind.
OVS_CTL_OPTS='--delete-bridges'
  • reboot

Neutron

  • apt-get -y install python-mysqldb
  • apt-get -y install neutron-server
  • apt-get -y install neutron-metadata-agent
  • apt-get -y install neutron-dhcp-agent
  • apt-get -y install neutron-l3-agent
  • apt-get remove --purge neutron-plugin-ml2
  • apt-get -y install neutron-plugin-ryu

/etc/neutron/neutron.conf

[DEFAULT]
debug = true
verbose = true
bind_host = 192.168.67.252
bind_port = 9696

auth_strategy = keystone
core_plugin = neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2
rabbit_host = controller.icehouse
nova_url = http://controller.icehouse:8774/v2
nova_admin_auth_url = http://keystone-api.icehouse:5000/v2.0

[quotas]
quota_driver = neutron.quota.ConfDriver
quota_items = network,subnet,port
quota_network = 4
quota_subnet = 8
quota_port = 50
quota_router = 8
quota_floatingip = 12

[database]
backend = sqlalchemy
connection = mysql://ryuUser:ryuPass@controller.icehouse/ryu

[keystone_authtoken]
auth_uri = http://keystone-api.icehouse:5000/v2.0
#identity_uri = http://controller.icehouse:35357/
auth_protocol = http
auth_host = controller.icehouse
auth_port = 35357
auth_version = 2.0
admin_tenant_name = service
admin_user = neutron
admin_password = service_pass

/etc/neutron/plugins/ryu/ryu.ini

[ovs]
openflow_rest_api = network.icehouse:8080

[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = True

[agent]

/etc/neutron/dhcp_agent.ini

[DEFAULT]
ryu_api_host = network.icehouse:8080
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
ovs_use_veth = True
use_namespaces = True
dhcp_agent_manager = neutron.agent.dhcp_agent.DhcpAgent
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
ovs_integration_bridge = br-int

/etc/neutron/l3_agent.ini

[DEFAULT]
ryu_api_host = network.icehouse:8080
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
ovs_use_veth = True
use_namespaces = True
l3_agent_manager = neutron.agent.l3_agent.L3NATAgent
external_network_bridge = br-ex
enable_metadata_proxy = True
metadata_port = 
metadata_proxy_socket = 

/etc/neutron/metadata_agent.ini

[DEFAULT]
auth_url = http://keystone-api.icehouse:5000/v2.0
admin_tenant_name = service
admin_user = neutron
admin_password = service_pass

nova_metadata_ip = controller.icehouse
nova_metadata_port = 
metadata_proxy_shared_secret = 
metadata_proxy_socket = 

RYU

  • apt-get -y install python-pip
  • apt-get -y install python-lxml
  • apt-get -y install python-crypto
  • apt-get -y install python-msgpack
  • pip install --upgrade netaddr
  • pip install --upgrade six
  • pip install ecdsa
  • pip install ryu

/usr/local/etc/ryu/ryu.conf

[DEFAULT]
app_lists = ryu.app.rest,ryu.app.rest_quantum,ryu.app.rest_tunnel,ryu.app.quantum_adapter,ryu.app.simple_switch_13
wsapi_host = network.icehouse
wsapi_port = 8080
ofp_listen_host = 192.168.45.252
ofp_tcp_listen_port = 6633
neutron_url = http://network.icehouse:9696
neutron_admin_auth_url = http://controller.icehouse:35357/v2.0
neutron_admin_tenant_name = service
neutron_admin_username = neutron
neutron_admin_password = service_pass
neutron_auth_strategy = keystone
neutron_controller_addr = tcp:192.168.45.252:6633

/etc/init/ryu-manager.conf

description "RYU Manager"
author "Chuck Short <zulcss@ubuntu.com>"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

chdir /var/run

pre-start script
  mkdir -p /var/run/neutron
  chown neutron:root /var/run/neutron
end script

exec start-stop-daemon --start --chuid neutron --exec /usr/local/bin/ryu-manager -- --config-file=/usr/local/etc/ryu/ryu.conf --log-file=/var/log/neutron/ryu-manager.log

  • neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ryu/ryu.ini upgrade head
  • service ryu-manager restart
  • service neutron-server restart
  • service neutron-dhcp-agent restart
  • service neutron-l3-agent restart
  • service neutron-metadata-agent restart
  • rm -f /var/lib/neutron/neutron.sqlite