(WIP) Update plugin to support Fuel-9.0

WORK IN PROGRESS

Update plugin to work properly under Fuel-9.0.

Change-Id: Ieca8eb26ec6ccbd36e23ca028275c52c8db7f89e
This commit is contained in:
Aleksandr Didenko 2016-07-13 16:59:22 +02:00
parent 618c9cbadc
commit ebc518be98
4 changed files with 25 additions and 18 deletions

View File

@ -12,12 +12,12 @@ def main(hostname):
with open(config_file, "r") as f:
config = yaml.safe_load(f)
for node in config["nodes"]:
if node["fqdn"] == hostname:
print config["network_metadata"]["nodes"]
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

View File

@ -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):

View File

@ -2,15 +2,19 @@
# Install/configure calico on the controller after cluster deployment
# but before starting the BGP Route Reflector.
- role: ['controller', 'primary-controller']
stage: post_deployment/50
- id: calico-controller
role: ['controller', 'primary-controller']
version: 2.0.0
requires: [post_deployment_start]
type: shell
parameters:
cmd: ./calico_controller.sh
timeout: 600
- role: ['controller', 'primary-controller']
stage: post_deployment/100
- 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
@ -25,8 +29,10 @@
# timeout: 60
# Install/configure calico on the compute nodes after cluster deployment.
- role: ['compute']
stage: post_deployment
- id: calico-compute
role: ['compute']
version: 2.0.0
requires: [post_deployment_start]
type: shell
parameters:
cmd: ./calico_compute.sh

View File

@ -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