A flexible event/agent & automation system with lots of bees :bee:
588
Beehive is an event and agent system, which allows you to create your own agents that perform automated tasks triggered by events and filters. It is modular, flexible and really easy to extend for anyone. It has modules (we call them Hives), so it can interface with, talk to, or retrieve information from Twitter, Tumblr, Email, IRC, Jabber, RSS, Jenkins, Hue - to name just a few. Check out the full list of available Hives in our Wiki.
Connecting those modules with each other lets you create immensly useful agents.
Beehive requires Go 1.7 or higher. Make sure you have a working Go environment. See the install instructions.
The recommended way is to fetch the sources and run make:
go get github.com/muesli/beehive
cd $GOPATH/src/github.com/muesli/beehive
make
You can build and install the beehive binary like other Go binaries out there (go get -u)
but you'll need to make sure beehive can find the assets (images, javascript, css, etc).
See the Troubleshooting/Notes section for additional details.
Run beehive --help to see a full list of options.
Think of Hives as little plugins, extending Beehive's abilities with events you can react on and actions you can execute.
Just as examples, there's a Twitter plugin that can
or an RSS plugin that lets you
or an email plugin that gives you the ability to
Each Hive lets you spawn one or multiple Bees in it, all working independently from another. That allows you to create separate plugin instances, e.g. one email-Bee for your private mail account, and another one for your work email.
Sounds complicated? It's not! Just for fun, let's setup Beehive to send us an
email whenever an RSS feed gets updated. Start beehive and open http://localhost:8181/
in your browser. Note that Beehive will create a config file beehive.conf
in its current working directory, unless you specify a different file with the
-config option.
Note: You currently have to start beehive from within $GOPATH/src/github.com/muesli/beehive
in order for it to find all the resources for the admin interface. Also see the
Troubleshooting & Notes section of this README.
The admin interface will present you with a list of available Hives. We will need to create two Bees here, one for the RSS feed and one for your email account.
Now we will have to create a new Chain, which will wire up the two Bees we just created. First we pick the Bee & Event we want to react on, then we pick the Bee we want to execute an Action with. The RSS-Bee's event gives us a whole set of parameters we can work with: the feed item's title, its links and description among others. You can manipulate and combine these parameters with a full templating language at your disposal. For example we can set the email's content to something like:
Title: {{.title}} - Link: {{index .links 0}}
Whenever this action gets executed, Beehive will replace {{.title}} with
the RSS event's title parameter, which is the title of the feed item it
retrieved. In the same manner {{index .links 0}} becomes the first URL of
this event's links array.
You can install beehive with docker if you'd prefer not to set up a working Go environment.
Make sure you have docker installed. See the install instructions.
The simplest way to set up beehive with docker is to simply pull a prebuilt image.
docker pull node3030/beehive
Once you have the image on your machine, it's time to spin up an instance of it!
Of course if you built the container yourself without adding your username, leave out
the <username>/ in this command.
docker run --name beehive -d -p 8181:8181 node3030/beehive
The --name parameter will give your container a name so that you can easily reference it with future commands.
The -d flag specifies that the container should be run as a daemon.
The -p parameter tells docker to map port 8181 on the host machine to port 8181 in the container.
You can expose as many ports as is necessary. If you're running http server bees then you may need to
add additional flags so that those servers can be seen by your machine: -p 8181:8181 -p 12345:12345 ... -p 34343:34343
If ever you want to stop the container, run the following
docker stop beehive
Then you can start it again with
docker start beehive
This container will store the beehive.conf file in a persistent volume.
As long as you use docker stop / docker start to stop/start the container
the configuration will persist.
If you'd like to have the container use an old config file, you can mount it as
a volume with docker run.
Suppose you had a config file stored in /path/to/beehive.conf then when running the container use
docker run -d -p 8181:8181 -v /path/to/beehive.conf:/conf/beehive.conf node3030/beehive
This will tell docker to put your config file at /conf/beehive.conf within the container's filesystem.
Thus beehive will startup using your configuration file.
Content type
Image
Digest
Size
34.6 MB
Last updated
about 9 years ago
docker pull node3030/beehive