24
Copyright © 2016 Mirantis, Inc. All rights reserved www.mirantis.com Fuel Plugins The best way to integrate your project with FUEL@OPNFV

Fuel Plugins

Embed Size (px)

Citation preview

Copyright © 2016 Mirantis, Inc. All rights reserved

www.mirantis.com

Fuel Plugins

The best way to integrate your project with FUEL@OPNFV

Copyright © 2016 Mirantis, Inc. All rights reserved

software.mirantis.com

Michał [email protected]

Sr. OpenStack Deployment EngineerFuel@OPNFV commiterFuel ODL plugin author

Copyright © 2016 Mirantis, Inc. All rights reserved

Agenda

● How the Fuel deployment works?● Fuel Plugin capabilities● Create your own plugin● FUEL@OPNFV plugins● Questions

Copyright © 2016 Mirantis, Inc. All rights reserved

Deployment phases

Provisioning Deployment

MAINMAINMAIN

MAINPRE DEPLOYMENT

MAIN

POST DEPLOYMENT

Puppet modules: https://github.com/openstack/fuel-library

OS

Copyright © 2016 Mirantis, Inc. All rights reserved

Task-Based deployment

Provisioning

Primary Controller

Controller Controller ComputeCinder

...

ComputeCinder

Task 1

Task 2

Task 3

Task N

...

Task 1

Task 2

Task 3

Task N

...

Task 1

Task 2

Task 3

Task N

...

Task 1

Task 2

Task 3

Task N

...

Task 1

Task 2

Task 3

Task N

...

Source: https://docs.google.com/presentation/d/1jZCFZlXHs_VhjtVYS2VuWgdxge5Q6sOMLz4bRLuw7YE

Copyright © 2016 Mirantis, Inc. All rights reserved

What you can do with Plugins?

Fuel plugin capabilities

Copyright © 2016 Mirantis, Inc. All rights reserved

Fuel plugins capabilities

● Install your own software● Create new node role

● Assign tasks to new role● Manage disk partition scheme● Define compatibility with other roles

● Modify OpenStack installation● Add your own tasks● Skip or modify existing tasks

Copyright © 2016 Mirantis, Inc. All rights reserved

How to start?

Create your own plugin

Copyright © 2016 Mirantis, Inc. All rights reserved

Plugin developer environment

Fuel plugins: https://github.com/openstack/fuel-plugins

Install dependencies:

Create plugin directory:

# apt-get install build-essential python-pip git rpm createrepo dpkg-dev ruby-dev

# pip install fuel-plugin-builder

# gem install fpm

# fpb --create my_plugin

Copyright © 2016 Mirantis, Inc. All rights reserved

Plugin structure

# tree my_pluginmy_plugin├── components.yaml├── deployment_scripts│ └── deploy.sh├── deployment_tasks.yaml├── environment_config.yaml├── my_plugin-1.0-1.0.0-1.noarch.rpm├── LICENSE├── metadata.yaml├── network_roles.yaml├── node_roles.yaml├── pre_build_hook├── README.md├── repositories│ ├── centos│ └── ubuntu├── tasks.yaml└── volumes.yaml

Fuel UI wizard componentsDirectory for plugin tasks' codeExample shell scriptDefinition of plugin tasksFuel UI plugin specific parametersA plugin package created after you build a plugin.Standard Apache 2.0 license fileInformation about pluginNetwork roles specific dataDefinition of new node roles created by a pluginActions to run on plugin buildFree-form description of pluginDirectory for plugin specific packages for centos packages for ubuntu packagesDeprecated, use deployment_tasks.yaml insteadMapping between node roles and volume allocation

Copyright © 2016 Mirantis, Inc. All rights reserved

metadata.yaml

Describe pluginSupported types of environments:releases:

- os: ubuntu

version: mitaka-9.0

mode: ['ha']

deployment_scripts_path: deployment_scripts/

repository_path: repositories/ubuntu

Copyright © 2016 Mirantis, Inc. All rights reserved

nodes_role.yaml and volumes.yaml

Define your own role for nodes:

nodes_role.yaml:opendaylight:

name: "OpenDaylight controller"

description: "OpenDaylight

SDN controller"

public_ip_required: false

limits:

max: 1

min: 1

volumes.yaml:volumes: []volumes_roles_mapping: opendaylight:

- {allocate_size: "min", id: "os"}

Copyright © 2016 Mirantis, Inc. All rights reserved

environment_config.yaml

Create configuration of pluginDefine Web UI fields

enable_l3_odl:

weight: 12

type: "checkbox"

value: false

label: "Use ODL to manage L3 traffic"

restrictions:

- networking_parameters:segmentation_type == 'vlan': Use tunneling segmentation type.

Configuration stored in hiera:

# hiera plugin_name

Copyright © 2016 Mirantis, Inc. All rights reserved

environment_config.yaml

Copyright © 2016 Mirantis, Inc. All rights reserved

pre_build_hook

Bash script run before plugin compilation

Can be used to fetch / build custom packages

Use fpm gem to create deb packages:

fpm -s dir -t deb --prefix /opt/opendaylight --deb-upstart "service" --name opendaylight -d "openjdk-8-jre-headless" -C "src_directory"

Copyright © 2016 Mirantis, Inc. All rights reserved

deployment_tasks.yaml

Add your own tasks- id: odl_dashboard_registration

type: puppet

role: [primary-controller]

required_for: [post_deployment_end]

requires: [post_deployment_start]

version: 2.0.0

parameters:

puppet_manifest: puppet/manifests/odl-dashboard.pp

puppet_modules: puppet/modules:/etc/puppet/modules

timeout: 180

Copyright © 2016 Mirantis, Inc. All rights reserved

deployment_tasks.yaml

When my task should run?

PRE DEPLOYMENT

MAIN

POST DEPLOYMENT

role: [compute]

[post_deployment_start]

[post_deployment_end]

groups: [controller,compute]requires: [openstack-network-startrequired_for: [openstack-network-end]

role: [master][pre_deployment_start][pre_deployment_end]

Copyright © 2016 Mirantis, Inc. All rights reserved

deployment_tasks.yaml

Task graph

# fuel graph --env 1 --download > graph.gv# fuel graph --render graph.gv --tred

Copyright © 2016 Mirantis, Inc. All rights reserved

Deployment scripts

Put your puppet manifest in deployment_scripts/puppet

To simplify troubleshooting start manifest with:notice('MODULAR: my_plugin/new_task')

To fetch your plugin configuration inside puppet manifests:my_plugin = hiera('my_plugin', {})

Copyright © 2016 Mirantis, Inc. All rights reserved

Build and install plugin

# fpb --build my_plugin

# fuel plugins --install my_plugin-1.0-1.0.0-1.noarch.rpm

# fuel plugins listid | name | version | package_version | releases---+-----------+---------+-----------------+--------------1 | my_plugin | 1.0.1 | 4.0.0 | ubuntu (mitaka-9.0)

Transfer compiled plugin to fuel master

Copyright © 2016 Mirantis, Inc. All rights reserved

OPNFV Fuel plugins

Userspace OVS support, OpenvSwitch with DPDKMark Gray, Billy MahonyIntelhttps://gerrit.opnfv.org/gerrit/#/admin/projects/ovsnfv

ONOS SDN controllerWu WenbinHuaweihttp://git.openstack.org/cgit/openstack/fuel-plugin-onos/

Copyright © 2016 Mirantis, Inc. All rights reserved

OPNFV Fuel plugins

OVS with NSHLing Yu, Ruijing GuoIntelhttps://github.com/openstack/fuel-plugin-ovs

BGPVPN and OpenDaylight pluginsNikolas Hermanns, Ferenc Cserepkei, Manuel BuilEricssonMichal Skalski, Mirantishttps://github.com/openstack/fuel-plugin-bgpvpnhttps://github.com/openstack/fuel-plugin-opendaylight

Copyright © 2016 Mirantis, Inc. All rights reserved

Other resources

Fuel Plugins Handbook: https://goo.gl/d6y8ct

Fuel plugins wiki:https://wiki.openstack.org/wiki/Fuel/Plugins

Copyright © 2016 Mirantis, Inc. All rights reserved

Thank you

Questions?