• This repository has been archived on 08/Dec/2022
  • Stars
    star
    181
  • Rank 212,110 (Top 5 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 12 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vagrant plugin that redirects `notify-send` from guest to host machine and notifies provisioning status.

⚠️ UNMAINTAINED ⚠️

This project has been archived. Thanks a lot to everyone that contributed with it and used it over the years ❤️‍🔥

If anyone else wants to resurrect it please reach out on Twitter or by other means listed in @fgrehm's website!

vagrant-notify

Build Status Gem Version

A Vagrant plugin that forwards notify-send from guest to host machine and notifies provisioning status. See it in action

Installation

Make sure you have Vagrant 1.4+ around and run:

$ vagrant plugin install vagrant-notify

Usage

notify-send from guest VMs

Whenever you run vagrant up, a Ruby TCPServer will fire up on a port within the usable port range and a Ruby script will be copied over to the guest machine to replace the original notify-send command.

Provisioning notification

Apart from redirecting notify-send from the guest VM to the host, whenever a Vagrant 1.4+ provisioner starts or completes running you'll also receive notifications like:

provisioning

provisioned

Linux

Since Linux distributions have notify-send pre-installed, everything should work out of the box.

OS X

Check out our OS X notify-send compatible scripts.

Windows

Check out our Windows notify-send compatible scripts.

Configuration

Notification server is enabled by default on all guests. You can individually disable the plugin by adding a false boolean to the notify.enable option in your Vagrantfile configuration block

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"
  config.notify.enable = false
end

Please note that as of v0.5.1, the notification server will automatically be disabled for any of the following cloud providers.

By default, the notification server is binded to local interfaces. For networking different than your provider's default network configuration, you can use the notify.bind_ip configuration option to bind the notification server onto a different local ip address.

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"
  config.notify.bind_ip = "192.68.56.20"
end

WARNING! Do NOT bind the notification server to an IP accessible over a network! The notification server does not have any authentication and doing so will leave your system vulnerable to remote command execution.

By default the local notification server uses the notify_send command in your host PATH for displaying notifications, there is a possibility to use different app without wrapper scripts:

  • notify.sender_app configuration option is used for specifing application name (default: notify-send)
  • notify.sender_params_str defines how params for applications will be passed (default: [--app-name {app_name}] [--urgency {urgency}] [--expire-time {expire_time}] [--icon {icon}] [--category {category}] [--hint {hint}] {message}). You can use these variables (escaped by { and } characters) here:
    • urgency - urgency level for notification
    • expire_time - when notification will expire?
    • app_name - application name
    • icon - icon for the notification (can be multiple, devided by comma)
    • category - category for the notification (can be multiple, devided by comma)
    • hint - icon for the notification (need to use this format: TYPE:NAME:VALUE)
    • message - message to send
  • notify.sender_params_escape - should params will be escaped when passed to script (default: true)

This is example how to to run notifications with build-in MacOS X notifications support:

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"
  config.notify.sender_params_str = '-e \'display notification {message} sound name \"default\"\''
  config.notify.sender_app = 'osascript'
  config.notify.sender_params_escape = true
end

Providers and Guests

vagrant-notify supports the following providers:

vagrant-notify has been tested and known to work with Linux, Solaris 11, FreeBSD, OpenBSD, and NetBSD guests. (notify-send icon forwarding feature is not supported on BSD guests)

Demo

Demo Demo OS X Demo Windows

Known issues

  • On rare occasions the notification server may stop receiving notifications if the host is suspended/hibernates. The notification server may need to be manually restarted if that's the case. vagrant notify --restart

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

More Repositories

1

vagrant-lxc

LXC provider for Vagrant
Ruby
1,208
star
2

vagrant-cachier

Caffeine reducer
Ruby
1,077
star
3

letter_opener_web

A web interface for browsing Ruby on Rails sent emails
HTML
716
star
4

ventriloquist

Development environments made easy
Ruby
359
star
5

devstep

Development environments powered by Docker and buildpacks
Shell
195
star
6

docker-netbeans

NetBeans in a container
Shell
150
star
7

docker-eclipse

Eclipse IDE in a Docker container
Shell
147
star
8

vagrant-mssql-express

Vagrant environment with Windows 2008 R2 + SQL Server Express 2008
HTML
97
star
9

vocker

[DEPRECATED] Docker provisioner for Vagrant
Ruby
89
star
10

docker-provider

[DEPRECATED] Docker provider for Vagrant
Ruby
89
star
11

bindler

[DEPRECATED] Dead easy Vagrant plugins management
Ruby
87
star
12

notify-send-http

Trigger notify-send across the network using HTTP, useful for triggering notifications from local VMs / Containers into your own computer. It even supports notification icons!
Go
69
star
13

vagrant-lxc-base-boxes

Scripts for building vagrant-lxc 1.0+ base boxes
Shell
68
star
14

vagrant-global-status

[DEPRECATED] A proof of concept Vagrant plugin that keeps track of vagrant machines and provides a command for listing the status of all known machines.
Ruby
61
star
15

chef-dokku

Chef cookbook for Dokku
Ruby
50
star
16

docker-phantomjs2

Minimum Viable Docker Image for PhantomJS 2.0
JavaScript
46
star
17

vagrant-pristine

vagrant destroy && up
Ruby
44
star
18

rake-notes

rake notes task for non-Rails projects
Ruby
40
star
19

go-dockerpty

Pseudo-tty handler for docker Go client https://github.com/fsouza/go-dockerclient
Go
30
star
20

qmlunit

An easy-to-use Unit Testing framework for Qt Declarative UI - QML [unmaintained]
JavaScript
28
star
21

pucrs-unity3d-pool

A very basic Straight Pool Unity 3D game
C#
28
star
22

docker-easy-lb

Experimental automagic load balancing for Docker web apps in less than 100 lines of bash.
Shell
25
star
23

serf-docker-vagrant-hipache

Buzzwords everywhere
Shell
22
star
24

go-tour

My own Tour of Go - http://tour.golang.org/
Go
21
star
25

lmk

A CLI tool to draw your attention to a terminal when a command finishes running
Go
20
star
26

middleman-blog-drafts

An addon for middleman-blog that simplifies draft posts creation and publishing.
Ruby
20
star
27

squid3-ssl-docker

Shell
20
star
28

docker-android-studio

Android Studio in a container
Shell
18
star
29

rails-base-box

Base vagrant box for working with Rails
Puppet
16
star
30

dotfiles

Just my dotfiles
Shell
16
star
31

vagrant-lxc-vbox-hosts

vagrant-lxc ready VirtualBox machines
Shell
15
star
32

vagrant-boxen

Deprecated in favor of https://github.com/fgrehm/ventriloquist
Ruby
14
star
33

serenata-ocr

A Serverless API for OCRing Serenata de Amor's documents (currently limited to Chamber of Deputies receipts)
JavaScript
12
star
34

pearfarm

Improves the productivity of the PHP community by making it easy to repeatable produce PEAR packages and post them to a public PEAR server
PHP
12
star
35

previewdocs

Preview Viewdocs documentation before pushing changes back to your repositories
Go
11
star
36

docker-intellij

IntelliJ IDEA in a Docker container
Shell
11
star
37

find-pr-for-commit

Tired of copy & pasting commit SHAs into the browser to find out the PR that introduced it? You came to the right place
Shell
10
star
38

vimfiles

just my vim configuration
Vim Script
10
star
39

covid19br-pub

Projeto de monitoramento de publicações oficiais relacionadas a COVID-19 no Brasil.
Ruby
10
star
40

outlet-orm

Initial work towards 2.0 version of Outlet ORM for PHP and SVN mirror [unmaintained]
PHP
9
star
41

boom-curl

Work in progress cURL like interface for https://github.com/rakyll/boom
Go
8
star
42

rbenv-install-remote

rbenv / ruby-build plugin that adds support for installing rubies using a custom definition defined remotely (like a gist)
Shell
8
star
43

tiny-rails

Scaffold for tiny Rails apps based on José Valim's Rails Lightweight Stack code
Ruby
7
star
44

docker-alpine-dind

[DEPRECATED] Docker in Docker Alpine Linux image with support for latest Docker release
Makefile
6
star
45

monitor-covid19-br

Monitor COVID-19 no Brasil
Ruby
6
star
46

dev-droplet

Chef recipes for building a DigitalOcean Droplet for my development needs.
Ruby
6
star
47

laptop-bootstrap

Handful of script to boostrap my laptop
Shell
6
star
48

unity3d-roll-a-ball

Code created while following http://unity3d.com/learn/tutorials/projects/roll-a-ball
C#
6
star
49

vagrant-dev-box

My general purpose vagrant dev box
Puppet
5
star
50

itau_to_ofx

Itaú savings and credit card statements to OFX
Ruby
5
star
51

autotestforphp

AutotestForPHP is based off of ZenTest autotest which is a popular Ruby tool for running tests as soon as files get changed.
Ruby
5
star
52

docker-sbc-article-latex

Docker image for building LaTeX documents (more specifically, SBC articles)
TeX
4
star
53

ubuntu-puppet-git

Manage Ubuntu 12.04 servers using Puppet and git [unmaintained]
Ruby
4
star
54

sls-web

Web platform for analysis, modelling and solution of Stochastic Automata Networks (SAN)
CSS
4
star
55

rails-template

Ruby
4
star
56

letter_opener_web_demo

Ruby
4
star
57

docker-alpine-go

A simple Alpine Linux image for developing Golang apps
Makefile
4
star
58

docker-graphviz

Graphviz in an Alpine Linux container
3
star
59

docker-codebox

Codebox IDE in a Docker
Makefile
3
star
60

pucrs-ospf-attack

C
3
star
61

devstep-examples

Example projects for demoing https://github.com/fgrehm/devstep
Ruby
3
star
62

devstep-envy

Devstep and Envy holding hands.
Shell
3
star
63

pucrs-audio-steganography

Go
2
star
64

covid19br-pub-scenarios

Ruby
2
star
65

artoolkit-docker

Docker image for building and running ARToolKit projects
C
2
star
66

pucrs-simple-json-db

A rudimentary JSON database, built for the PUCRS Database Implementation 2015.2 course
Go
2
star
67

gh-journal

Trying to make sense of my GitHub activity feed since 2016
CSS
2
star
68

covid19br-pub-agents

Ruby
2
star
69

devstep-cli

A CLI for usage with http://fgrehm.viewdocs.io/devstep
Go
2
star
70

viewdocs-yeti

Assets and example for the yeti theme
CSS
2
star
71

brinfo-prototype

Agregador de publicações feitas por instituições governamentais do Brasil
Go
2
star
72

spike-gql-stitch-relay-nodes

JavaScript
2
star
73

rubygems-charts

JavaScript
2
star
74

angulardoro

Pomorodo app built with Rails and AngularJS
Ruby
1
star
75

pucrs-doom2d

Doom 2D
C++
1
star
76

devstep-squid3-ssl

Plugin for automatically configuring Devstep containers to use a Squid3 caching proxy with SSL enabled
Shell
1
star
77

my-setup

The way I set up my computers, with scripts, dotfiles and the like
Lua
1
star
78

git-applet

Python
1
star
79

docker-json-diff

https://github.com/andreyvit/json-diff in a Linux Alpine container
Makefile
1
star
80

go-san

A package for parsing Stochastic Automata Network models in Go
Go
1
star
81

docker-gh-release

https://github.com/progrium/gh-release in a minimal container
Shell
1
star
82

libduckdb-docker

DuckDB headers and libs distributed as Docker images
Makefile
1
star
83

docker-alpine-go-web

A simple Alpine Linux image for developing Golang web apps that leverages nodejs setups for client side code, built on top of https://github.com/fgrehm/docker-alpine-go
Makefile
1
star
84

pucrs-network-simulations

Experimenting with networking conditions
Shell
1
star
85

dockerized

Ruby
1
star