(WIP) Update plugin to support Fuel-9.0
WORK IN PROGRESS Update plugin to work properly under Fuel-9.0. TODO: - fix rr on controller nodes - don't install unneeded neutron agents (ovs) Change-Id: Ieca8eb26ec6ccbd36e23ca028275c52c8db7f89e
This commit is contained in:
parent
618c9cbadc
commit
80ad5c74d4
14
README.md
14
README.md
|
@ -31,7 +31,7 @@ None.
|
|||
Compatible versions:
|
||||
--------------------
|
||||
|
||||
Mirantis Fuel 7.0
|
||||
Mirantis Fuel 9.0
|
||||
|
||||
To build the plugin:
|
||||
--------------------
|
||||
|
@ -50,7 +50,7 @@ To build the plugin:
|
|||
|
||||
fpb --build .
|
||||
|
||||
- Check that the file calico-fuel-plugin-2.0-2.0.0-0.noarch.rpm was created.
|
||||
- Check that the file calico-fuel-plugin-2.1-2.1.0-1.noarch.rpm was created.
|
||||
|
||||
|
||||
To install the plugin:
|
||||
|
@ -60,13 +60,13 @@ To install the plugin:
|
|||
|
||||
- Copy the plugin onto the fuel master node:
|
||||
|
||||
scp calico-fuel-plugin-2.0-2.0.0-0.noarch.rpm root@<Fuel_Master_Node_IP>:/tmp
|
||||
scp calico-fuel-plugin-2.1-2.1.0-1.noarch.rpm root@<Fuel_Master_Node_IP>:/tmp
|
||||
|
||||
- Install the plugin on the fuel master node:
|
||||
|
||||
cd /tmp
|
||||
|
||||
fuel plugins --install calico-fuel-plugin-2.0-2.0.0-0.noarch.rpm
|
||||
fuel plugins --install calico-fuel-plugin-2.1-2.1.0-1.noarch.rpm
|
||||
|
||||
- Check the plugin was installed:
|
||||
|
||||
|
@ -81,7 +81,7 @@ OpenStack cluster in the usual way, with the following guidelines:
|
|||
|
||||
- Create a new OpenStack environment, selecting:
|
||||
|
||||
Kilo on Ubuntu Trusty
|
||||
Mitaka on Ubuntu 14.04
|
||||
|
||||
"Neutron with VLAN segmentation" as the networking setup
|
||||
|
||||
|
@ -91,14 +91,14 @@ OpenStack cluster in the usual way, with the following guidelines:
|
|||
|
||||
"Use Calico Virtual Networking"
|
||||
|
||||
- Under the network tab, configure the 'Public' settings (leaving all of the
|
||||
- Under the network tab, configure the 'Public' settings (leaving all of the
|
||||
other sections with their default values). For example (exact values will
|
||||
depend on your setup):
|
||||
|
||||
- IP Range: 172.18.203.60 - 172.18.203.69
|
||||
- CIDR: 172.18.203.0/24
|
||||
- Use VLAN tagging: No
|
||||
- Gateway: 172.18.203.1
|
||||
- Gateway: 172.18.203.1
|
||||
- Floating IP range: 172.18.203.70 - 172.18.203.79
|
||||
|
||||
- Add nodes (for meaningful testing, you will need at least two compute nodes
|
||||
|
|
|
@ -23,9 +23,15 @@ curl -L http://binaries.projectcalico.org/repo/key | apt-key add -
|
|||
|
||||
rm -f /etc/apt/preferences.d/calico-fuel-plugin-2.0.0 /etc/apt/sources.list.d/calico-fuel-plugin-2.0.0.list
|
||||
|
||||
cat > /etc/apt/sources.list.d/calico.list <<EOF
|
||||
deb http://binaries.projectcalico.org/fuel7.0 ./
|
||||
EOF
|
||||
# Install some extra packages with proper deps
|
||||
rm -f /etc/apt/sources.list.d/calico.list
|
||||
apt-get update
|
||||
apt-get -y install nova-api
|
||||
|
||||
## DISABLED
|
||||
#cat > /etc/apt/sources.list.d/calico.list <<EOF
|
||||
#deb http://binaries.projectcalico.org/fuel7.0 ./
|
||||
#EOF
|
||||
|
||||
cat << PREFS >> /etc/apt/preferences.d/calico-fuel
|
||||
Package: *
|
||||
|
@ -37,11 +43,11 @@ PREFS
|
|||
# binaries.projectcalico.org so that we get the fuel versions of the calico
|
||||
# packages.
|
||||
|
||||
apt-add-repository -y ppa:project-calico/kilo
|
||||
apt-add-repository -y ppa:project-calico/calico-1.4
|
||||
|
||||
cat > /etc/apt/preferences.d/calico-etcd <<EOF
|
||||
Package: *
|
||||
Pin: release o=LP-PPA-project-calico-kilo
|
||||
Pin: release o=LP-PPA-project-calico-calico-1_4
|
||||
Pin-Priority: 1175
|
||||
EOF
|
||||
|
||||
|
@ -67,6 +73,7 @@ exec /usr/bin/etcd -proxy on
|
|||
-listen-client-urls http://127.0.0.1:4001 \\
|
||||
-advertise-client-urls http://127.0.0.1:7001 \\
|
||||
-initial-cluster ${initial_cluster}
|
||||
|
||||
EXEC_CMD
|
||||
service etcd start
|
||||
|
||||
|
@ -74,8 +81,8 @@ service etcd start
|
|||
# bring in Calico-specific updates to the OpenStack packages and to
|
||||
# dnsmasq.
|
||||
|
||||
apt-get -y upgrade
|
||||
apt-get -y dist-upgrade
|
||||
apt-get -y --force-yes upgrade
|
||||
apt-get -y --force-yes dist-upgrade
|
||||
|
||||
# Open /etc/nova/nova.conf and remove the linuxnet_interface_driver line.
|
||||
|
||||
|
@ -84,22 +91,8 @@ cp /etc/nova/nova.conf /etc/nova/nova.conf.pre-calico
|
|||
sed -i "/^linuxnet_interface_driver/d" /etc/nova/nova.conf
|
||||
service nova-compute restart
|
||||
|
||||
# Install some extra packages.
|
||||
|
||||
apt-get -y install neutron-common neutron-dhcp-agent nova-api
|
||||
|
||||
# Open /etc/neutron/dhcp_agent.ini in your preferred text editor. In
|
||||
# the [DEFAULT] section, add the following line:
|
||||
#
|
||||
# interface_driver = neutron.agent.linux.interface.RoutedInterfaceDriver
|
||||
|
||||
cp /etc/neutron/dhcp_agent.ini /etc/neutron/dhcp_agent.ini.pre-calico
|
||||
|
||||
sed -i "/^interface_driver/d" /etc/neutron/dhcp_agent.ini
|
||||
|
||||
sed -i "/^\[DEFAULT\]/a\
|
||||
interface_driver = neutron.agent.linux.interface.RoutedInterfaceDriver
|
||||
" /etc/neutron/dhcp_agent.ini
|
||||
# Install calico-dhcp-agent
|
||||
apt-get -y install calico-dhcp-agent
|
||||
|
||||
# Allow BGP connections through the Fuel firewall. We do this before
|
||||
# installing calico-compute, so that they will be included when the
|
||||
|
|
|
@ -23,9 +23,10 @@ curl -L http://binaries.projectcalico.org/repo/key | apt-key add -
|
|||
|
||||
rm -f /etc/apt/preferences.d/calico-fuel-plugin-2.0.0 /etc/apt/sources.list.d/calico-fuel-plugin-2.0.0.list
|
||||
|
||||
cat > /etc/apt/sources.list.d/calico.list <<EOF
|
||||
deb http://binaries.projectcalico.org/fuel7.0 ./
|
||||
EOF
|
||||
# DISABLED
|
||||
#cat > /etc/apt/sources.list.d/calico.list <<EOF
|
||||
#deb http://binaries.projectcalico.org/fuel7.0 ./
|
||||
#EOF
|
||||
|
||||
cat << PREFS >> /etc/apt/preferences.d/calico-fuel
|
||||
Package: *
|
||||
|
@ -37,11 +38,11 @@ PREFS
|
|||
# binaries.projectcalico.org so that we get the fuel versions of the calico
|
||||
# packages.
|
||||
|
||||
apt-add-repository -y ppa:project-calico/kilo
|
||||
apt-add-repository -y ppa:project-calico/calico-1.4
|
||||
|
||||
cat > /etc/apt/preferences.d/calico-etcd <<EOF
|
||||
Package: *
|
||||
Pin: release o=LP-PPA-project-calico-kilo
|
||||
Pin: release o=LP-PPA-project-calico-calico-1_4
|
||||
Pin-Priority: 1175
|
||||
EOF
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@ def main(hostname):
|
|||
with open(config_file, "r") as f:
|
||||
config = yaml.safe_load(f)
|
||||
|
||||
for node in config["nodes"]:
|
||||
if node["fqdn"] == hostname:
|
||||
for node in config["network_metadata"]["nodes"]:
|
||||
if config["network_metadata"]["nodes"][node]["fqdn"] == hostname:
|
||||
# Get the IP address that other OpenStack nodes can use to address
|
||||
# services on this node, rather than the node's public IP address.
|
||||
this_node_ip = node["internal_address"]
|
||||
this_node_ip = config["network_metadata"]["nodes"][node]["network_roles"]["mgmt/vip"]
|
||||
break
|
||||
else:
|
||||
this_node_ip = None
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
notice('MODULAR: calico/neutron-networks.pp')
|
||||
|
||||
$access_hash = hiera_hash('access', {})
|
||||
$tenant_name = try_get_value($access_hash, 'tenant', 'admin')
|
||||
|
||||
# From docs:
|
||||
# neutron net-create --shared --provider:network_type local calico
|
||||
# neutron subnet-create --gateway 10.65.0.1 --enable-dhcp --ip-version 4 --name calico-v4 calico 10.65.0/24
|
||||
|
||||
# TODO(adidenko): we can pull config info from plugin settings via Hiera
|
||||
# instead of hardcode
|
||||
$net = 'calico'
|
||||
$subnet = 'calico-v4'
|
||||
$subnet_cidr = '10.65.0.0/24'
|
||||
$subnet_gw = '10.65.0.1'
|
||||
|
||||
neutron_network { $net :
|
||||
ensure => 'present',
|
||||
provider_network_type => 'local',
|
||||
shared => true,
|
||||
tenant_name => $tenant_name,
|
||||
} ->
|
||||
neutron_subnet { $subnet :
|
||||
ensure => 'present',
|
||||
cidr => $subnet_cidr,
|
||||
network_name => $net,
|
||||
gateway_ip => $subnet_gw,
|
||||
enable_dhcp => true,
|
||||
ip_version => '4',
|
||||
tenant_name => $tenant_name,
|
||||
}
|
||||
|
|
@ -12,9 +12,9 @@ NODES_CONFIG = "/etc/hiera/astute.yaml"
|
|||
# a greater range of information, including settings and network config. They
|
||||
# are also created on the system earlier in the deployment process, so are
|
||||
# good sources of initial node information during Calico setup.
|
||||
PRIMARY_CONTROLLER_CFG = "/etc/primary-controller.yaml"
|
||||
CONTROLLER_CFG = "/etc/controller.yaml"
|
||||
COMPUTE_CFG = "/etc/compute.yaml"
|
||||
PRIMARY_CONTROLLER_CFG = NODES_CONFIG
|
||||
CONTROLLER_CFG = NODES_CONFIG
|
||||
COMPUTE_CFG = NODES_CONFIG
|
||||
|
||||
def get_config_file_for_node_type():
|
||||
if os.path.isfile(PRIMARY_CONTROLLER_CFG):
|
||||
|
|
|
@ -10,8 +10,8 @@ source /root/openrc
|
|||
|
||||
# Details of the default networks/routers created on Fuel deployment of a
|
||||
# Mirantis OpenStack environment.
|
||||
DEFAULT_NET=net04
|
||||
DEFAULT_NET_EXT=net04_ext
|
||||
DEFAULT_NET=admin_internal_net
|
||||
DEFAULT_NET_EXT=admin_floating_net
|
||||
DEFAULT_ROUTER=router04
|
||||
|
||||
# DEFAULT_NET_EXT is set as the gateway for DEFAULT_ROUTER, we must clear that
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
# Copyright 2015 Metaswitch Networks
|
||||
|
||||
# Install/configure calico on the controller after cluster deployment
|
||||
# but before starting the BGP Route Reflector.
|
||||
- id: calico-controller
|
||||
role: ['controller', 'primary-controller']
|
||||
version: 2.0.0
|
||||
requires: [post_deployment_start]
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: ./calico_controller.sh
|
||||
timeout: 600
|
||||
|
||||
- id: calico-route-reflector
|
||||
role: ['controller', 'primary-controller']
|
||||
version: 2.0.0
|
||||
requires: [post_deployment_start, calico-controller]
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: ./calico_route_reflector.sh
|
||||
timeout: 60
|
||||
|
||||
- id: calico-networks
|
||||
role: ['primary-controller']
|
||||
version: 2.0.0
|
||||
requires: [post_deployment_start, calico-controller]
|
||||
type: puppet
|
||||
parameters:
|
||||
timeout: 180
|
||||
puppet_manifest: neutron-networks.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
|
||||
|
||||
# Remove default OpenStack network configuration which doesn't work with Calico.
|
||||
#- role: ['primary-controller']
|
||||
# stage: post_deployment/150
|
||||
# type: shell
|
||||
# parameters:
|
||||
# cmd: ./remove_default_networks.sh
|
||||
# timeout: 60
|
||||
|
||||
# Install/configure calico on the compute nodes after cluster deployment.
|
||||
- id: calico-compute
|
||||
role: ['compute']
|
||||
version: 2.0.0
|
||||
requires: [post_deployment_start]
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: ./calico_compute.sh
|
||||
timeout: 600
|
||||
|
||||
# Disable tasks that create neutron router and networks
|
||||
- id: openstack-network-networks
|
||||
type: skipped
|
||||
|
||||
- id: openstack-network-routers
|
||||
type: skipped
|
||||
|
||||
- id: primary-openstack-network-agents-dhcp
|
||||
type: skipped
|
||||
|
||||
- id: openstack-network-agents-dhcp
|
||||
type: skipped
|
|
@ -3,11 +3,11 @@ name: calico-fuel-plugin
|
|||
# Human-readable name for your plugin
|
||||
title: Use Calico Virtual Networking
|
||||
# Plugin version
|
||||
version: 2.0.0
|
||||
version: 2.1.0
|
||||
# Description
|
||||
description: Layer 3 Virtual Networking for Highly Scalable Data Centers
|
||||
# Required fuel version
|
||||
fuel_version: ['7.0']
|
||||
fuel_version: ['9.0']
|
||||
# Plugin authors
|
||||
authors: ['Emma Gordon']
|
||||
# Plugin license
|
||||
|
@ -20,10 +20,11 @@ groups: ['network']
|
|||
# The plugin is compatible with releases in the list
|
||||
releases:
|
||||
- os: ubuntu
|
||||
version: 2015.1-7.0
|
||||
mode: ['ha', 'multinode']
|
||||
version: mitaka-9.0
|
||||
mode: ['ha']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/ubuntu
|
||||
|
||||
# Version of plugin package
|
||||
package_version: '2.0.0'
|
||||
package_version: '4.0.0'
|
||||
is_hotpluggable: false
|
||||
|
|
33
tasks.yaml
33
tasks.yaml
|
@ -1,33 +0,0 @@
|
|||
# Copyright 2015 Metaswitch Networks
|
||||
|
||||
# Install/configure calico on the controller after cluster deployment
|
||||
# but before starting the BGP Route Reflector.
|
||||
- role: ['controller', 'primary-controller']
|
||||
stage: post_deployment/50
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: ./calico_controller.sh
|
||||
timeout: 600
|
||||
|
||||
- role: ['controller', 'primary-controller']
|
||||
stage: post_deployment/100
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: ./calico_route_reflector.sh
|
||||
timeout: 60
|
||||
|
||||
# Remove default OpenStack network configuration which doesn't work with Calico.
|
||||
#- role: ['primary-controller']
|
||||
# stage: post_deployment/150
|
||||
# type: shell
|
||||
# parameters:
|
||||
# cmd: ./remove_default_networks.sh
|
||||
# timeout: 60
|
||||
|
||||
# Install/configure calico on the compute nodes after cluster deployment.
|
||||
- role: ['compute']
|
||||
stage: post_deployment
|
||||
type: shell
|
||||
parameters:
|
||||
cmd: ./calico_compute.sh
|
||||
timeout: 600
|
Loading…
Reference in New Issue