GithubHelp home page GithubHelp logo

oslo-eventdriven-actions's Introduction

概要

OpenStackのメッセージング基盤であるoslo.messagingを使ってイベントドリブンに何かしらのアクションを実行するスクリプト。
といっても具体的に実行する何かを実装しているわけではないのでテンプレート的なやつ。アイディア次第で色んなことに流用可能。

使用方法

  • transport.confにMQ接続情報を指定
    • nova.confやneutron.confを見れば、それっぽい情報が書いてあるので、それをコピペ
$ cat transport.conf
[DEFAULT]
transport_url=rabbit://guest:[email protected]:5672
ssl=False
  • 補足したいイベントタイプを変更
    • デフォでは、インスタンス関連イベントをすべて捕まえる
    • インスタンス作成/削除/変更 etc.
  filter_rule = oslo_messaging.NotificationFilter(
    publisher_id=".*",
    event_type="compute.instance.*")
  • main.pyのsome actionsの部分にイベントに応じたアクションを実装

使いそうなシーン

  • インスタンスやポートの作成/削除に応じたDNS連携
    • Designateを使えばDNSaaSできるが、一部のイベントに対応しておらず、レコードのゴミが残置してしまうことがある
  • NW機器との連携
    • CiscoACIなどのようなSDNを導入している場合に有用かも
    • インスタンスへのFIP割り当てなどのイベントに応じて、SDNのAPIを叩いて必要なNW設定を行ったりなど

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.