Writing an ML2 mechanism driver from scratch - openstack

I'm trying to implement an ML2 mechanism driver in order to be able to integrate a RINA stack implementation within OpenStack.
I'm struggling a bit to get started with the driver implementation, mainly because I'm quite a newbie with the openstack suite, and I am not able to find good documentation about implementing an ML2 from scratch. The only thing I found is this (old) book Openstack Networking Cookbook where on Chapter 10 it tackles the implementation of an ML2 mechanism driver from scratch. However, this book is based on openstack kilo (2015) and following the tutorial it just breaks the whole openstack installation.
So the main issue here is:
How should I get started? Should I just see how open source mechanism drivers are implemented and just try to guess how they work and start (slowly) to implement mine?
Is out there any good documentation or boilerplate code to implement an ML2 driver from scratch?

I only found these resources that seem relevant to the topic of writing ML2 drivers:
"Openstack Networking Cookbook" by Sriram Subramanian & Chandan Dutta Chowdhury (out of date).
"Writing your own OpenStack Neutron ML2 Driver for Cisco UCS" by Muhammad Afzal (Cisco Employee).
Neutron / ML2 on the OpenStack Wiki. Has links to a number of ML2 driver implementations / projects.
So to answer your questions:
How should I get started? Should I just see how open source mechanism drivers are implemented and just try to guess how they work and start (slowly) to implement mine?
That's probably the best approach. There are a few examples to look at.
You could also ask for suggestions and ask technical questions on the Neutron developer mailing list.
But you should expect to do most of the research for yourself; e.g. reading books, papers, specifications to get a deep understanding of networking, deep-diving the existing Neutron and ML2 codebase, etc.
Is out there any good documentation or boilerplate code to implement an ML2 driver from scratch?
Apart from what I have found, I doubt it.

Related

How to setup the infrastructure with blade servers for OpenStack

We have 24 Huawei CH242 V3 blade servers and want to setup a private cloud with OpenStack, but we're very new to OpenStack and very lack of experiences about infrastructures. Could somebody kindly give us some useful information about the following question:
What kind of OS is more suitable for those blade servers? Is Linux like CentOS a good choice?
Is it OK(or encouraged) to directly use blade servers as OpenStack controller/compute/storage nodes? Or do we need to use one hypervisor to create many VMs and install OpenStack services on top of VMs?
What're the best practices or suggestions will you want to give beginners?
Maybe some questions are very silly but we're really stuck on the first step, thanks in advance for any information.
Below is my suggestions and there can be more good answers too
What kind of OS is more suitable for those blade servers? Is Linux like CentOS a good choice?
You can try any Linux flavours (OpenSUSE/CentOS/Ubuntu) mentioned in the openstack official site. I personally used Ubuntu for installing openstack.
There are openly available JuJu charms that works on Ubuntu for installing Openstack services. So it will be easy for you to edit the charms and deploy.
Is it OK(or encouraged) to directly use blade servers as OpenStack controller/compute/storage nodes? Or do we need to use one hypervisor to create many VMs and install OpenStack services on top of VMs?
I will prefer VM based installation from your list of choices. I personally suggest you to use containers to deploy your openstack services for better performance.
For compute service, you can go for bare metal installation, but it is upto you.
What're the best practices or suggestions will you want to give beginners?
a. Try installing the same topology/setup as mentioned in the openstack documentation
b. Use recommended databases and AMQP brokers
What kind of OS is more suitable for those blade servers? Is Linux like CentOS a good choice?
I use CentOS7.2, its very stable for openstack. and Ubuntu is also stable which is tried.
Is it OK(or encouraged) to directly use blade servers as OpenStack controller/compute/storage nodes? Or do we need to use one hypervisor to create many VMs and install OpenStack services on top of VMs?
Yes, I do like this, use bare machine as controller/compute/storage, performance good for me, I did not use container like docker.
What're the best practices or suggestions will you want to give beginners?
Because you are new to openstack, I recommend you begin with install openstack, see more logs when you install it. read official website docs is necessary. but you need to notice there are also some errors in the docs, and the configuration also is not optimized, that is just for experiment of private cloud.
If you are skilled at install openstack, then you can read the source code on github, try to contribute the code for it, from fix docs typo.

OpenFlow - what controller should I use

I used the Floodlight for some openflow testing but I am not totally convinced by this and I saw that OpenDaylight is sustained by Linux Foundation and some of the major industry companies.
Can someone point some strong features that OpenDaylight have and FloodLight don't ? And if someone worked with OpenDaylight could point me to some good tutorials ?
have you checked out the Wiki? There is a lot of topics there. It is still getting sorted out and what not so you may need to use the search engine to find specifics more times then not.
We have some images that are pre-built OpenStack builds. The latest is from a couple of weeks ago for the upcoming OpenStack IceHouse release.
ODL and Icehouse Integration
All in all it is still rough around the edges and has a ton of development happening still.
There are some basic mininet examples using OpenFlow and the OVSDB plugin here:
OpenFlow and Mininet
OVSDB ODL plugin:
ODL and OVSDB Plugin with Mininet
For API related apps, Fred Hsu's blog while a bit dated now has some great examples:
OpenDaylight Api App usage
If you have any other specific interests the IRC channel is a good place to interact at irc.freenode.net #opendaylight or ping us in #opendaylight-ovsdb
Cheers,
This is the best one from the opensource available
http://sdnhub.org/releases/floodlight-plus-openflow13-support/
http://www.projectfloodlight.org/projects/
Hope this will help

Where to start with Xen?

I am a newbie with Xen.I want to know how does Xen work.
It's really a puzzle when facing the code and I don't know where to start.
Are there some easy articles for me?
Since you mention looking at the code, I assume you want to understand the technical details of Xen and not just merely how to start a VM.
As with all problems, start with something simple and then work your way up. Some pointers:
Be sure to have the prerequisite experience under your belt. In particular, strong C and Linux affinity, but also x86 paging and virtualized memory workings.
Make sure you have a sound grasp of the general Xen architecture. For instance, paravirtualized versus hardware-supported virtualization, the special role of the management domain (Dom0) compared to unprivileged domains (DomU), etc.
Investigate the the Xen components running in Dom0:
The Xen control library (libxc) which implements much of the logic relating to hypercalls and adds sugar around these (look in tools/libxc).
The swiss army knife for administrating Xen, namely the Xen light library (libxl). This library replaces the deprecated xm tool with the xl tool and takes care of all your maintenance tasks such as starting/stopping a VM, listing all running VMs, etc. For all these operations, it works in tandem with the aforementioned libxc. (Libxl lives in tools/libxl.)
The Xenstore is a tree-like data structure from which all running domains can retrieve and store data. This is necessary since all I/O goes through Dom0 (not the hypervisor!), and domains need to communicate with Dom0 how they are going to pass I/O along. (Look in tools/xenstore.) You can inspect the Xenstore with a tool such as xenstore-ls.
the blkback/netback kernel drivers which pass the data over shared channels to the VMs. (You will find these drivers in a recent Linux kernel (e.g. >= v3.0) that has so-called PVOPS support).
Take a look at the console daemon (tools/console). Note that sometimes the Qemu console is actually used. Qemu also comes in the pictures as a default backend for if you choose a file-backed virtual storage for a VM.
Experiment with the 'Xen-way' of inter-VM communication: Grant tables, event channels and the Xenstore. With these fundamentals you can create your own shared channel between VMs. You can do this, for example, with writing a kernel module that you use in two domains to let them talk to each other.
I can also give some pointers in the source that you can check out:
xen/xen/include/public/xen.h will give you a list of all the hypercalls with comments what they do.
xen/xen/include/xen/mm.h gives you an introduction to the different memory terminology used by Xen (i.e., real versus virtualized addresses and page numbers). If you don't grasp these differences, then reading the hypervisor code will surely be frustrating.
xen/xen/include/asm-x86/config.h gives an overview of the memory layout of Xen.
xen/tools/libxc/xenctrl.h exports a large list of interesting domain control operations, which gives an abstract view of task division between Dom0 and the hypervisor.
Last but not least, the book 'The Definitive Guide to the Xen Hypervisor' by David Chisnall comes highly recommended. It covers all these topics and more in a thorough, technical fashion with plenty of code examples.
The Xen wiki and developer mailing lists are also a great resource for understanding Xen.
If you have a more specific question, then I can give you a more specific answer.
Here are few links which will guide you with ZEN Start up.Hope they will be useful.
http://www.howtoforge.com/howtos/virtualization/xen
http://wiki.xen.org/wiki/Category:HowTo
http://wiki.debian.org/Xen
For me, that is the best and more concrete tutorial with examples and step by step to start. I used it when I started.
Then you can read a lot more on Xen documentation itself or some books but as a starting point that allows you to easily install and test Xen, I choose that tutorial from Debian Wiki.
If you just want an overview, you may read this: http://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide.
This will introduce you to Xen hypervisor, suggest configuration to set up virtual machines, provide information about the networking and finally have details about tools for the management of virtual machines.
This documentation is to get the Xen specifically on ubuntu (Most importantly, it works!)
https://help.ubuntu.com/community/Xen
===
However, if you want to go to the next level and understand the working of Xen; Xen architecture, memory management, device management, CPU scheduling etc., I would recommend reading the book "The Definitive Guide to the Xen Hypervisor".

Net-SNMP used in UNIX

Does anyone know good tutorials online or books that will help with NET-SNMP.
Or can anybody recommend my a SNMP trap generator for Unix
Basically I want to send SNMP traps from UNIX to SCOM server but i can not use SCOM AGENT as it is heavy.
Net-SNMP includes a commandline tool "snmptrap" that you can use to send traps. Or you can use Perl to write script that does the trap sending.
The O'Reilly book "Essential SNMP" besides explaining SNMP in general, has many examples how to use SNMP from the command line or from Perl.
You can get tutorials from official NET-SNMP wiki - just search google.
Regarding your question, you can find one good article in this
snmptrap tutorial link
If you're using UNIX/Solaris as your dev platform, make sure you include the "/usr/sfw/bin" folder in your PATH as it's not searched by default.

Control System For Sensor Networks

I'm making a distributed sensor network. The basic architecture of my network is to have several slave nodes (up to about 10) reporting back to a master node on a regular basis.
I'm looking for a software framework that I can use for this, so far I have thought of
corba
pubsubhubub
xmtp
making my own
I have some basic requirements (like basic security, fault awareness)
Anyone have any suggestions?
In specific answer to your question, TinyOS provides a lot of what you'll need.
There's quite a large body of academic work on getting these up and running, especially combining agent-based infrastructures with sensor networks -- take a look on Google Scholar for example.
There are also some very good links on Wikipedia.
Are you specifically interested in an OS to run on your sensors, or something at higher level that plugs into some sensor infra you already have? Are you intending to build your own kit, or work on something that already exists (e.g. BTNode)?
You can also use RL-ARM or FreeRTOS if you wanted to use micro controllers for your project. also in the network layer you can use lwip.
there are many other libraries both free and open source in case if you want to use ARM based micro controllers.

Resources