From ea092e29bfef67c527eecea2ba129df52f7bc404 Mon Sep 17 00:00:00 2001 From: Aleksandr Didenko Date: Wed, 13 Jul 2016 16:59:22 +0200 Subject: [PATCH] (WIP) Update plugin to support Fuel-9.0 WORK IN PROGRESS Update plugin to work properly under Fuel-9.0. Change-Id: Ieca8eb26ec6ccbd36e23ca028275c52c8db7f89e --- deployment_scripts/calico_compute.sh | 5 +++-- deployment_scripts/get_node_ip.py | 7 +++---- deployment_scripts/pluginutils.py | 6 +++--- tasks.yaml => deployment_tasks.yaml | 18 ++++++++++++------ metadata.yaml | 11 ++++++----- 5 files changed, 27 insertions(+), 20 deletions(-) rename tasks.yaml => deployment_tasks.yaml (65%) diff --git a/deployment_scripts/calico_compute.sh b/deployment_scripts/calico_compute.sh index 6ec65fa..7d73ac9 100755 --- a/deployment_scripts/calico_compute.sh +++ b/deployment_scripts/calico_compute.sh @@ -67,6 +67,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 +75,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. diff --git a/deployment_scripts/get_node_ip.py b/deployment_scripts/get_node_ip.py index 2b47fb5..4ae5e85 100755 --- a/deployment_scripts/get_node_ip.py +++ b/deployment_scripts/get_node_ip.py @@ -12,12 +12,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 diff --git a/deployment_scripts/pluginutils.py b/deployment_scripts/pluginutils.py index 71efa77..151db14 100755 --- a/deployment_scripts/pluginutils.py +++ b/deployment_scripts/pluginutils.py @@ -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): diff --git a/tasks.yaml b/deployment_tasks.yaml similarity index 65% rename from tasks.yaml rename to deployment_tasks.yaml index 6e628c7..62d67c3 100644 --- a/tasks.yaml +++ b/deployment_tasks.yaml @@ -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 diff --git a/metadata.yaml b/metadata.yaml index 76381eb..1d79ccc 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -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