Skip to content

Kami/virgo-base

 
 

Virgo

Virgo is a project for building on-host agents. Virgo's goal is to provide shared infrastructure for various types of agents while maintaining a small footprint.

Virgo provides:

  1. A high level scripting language in Lua using Luvit (an event driven framework).
  2. The ability to perform self updating.
  3. Crash capturing and reporting through Google's Breakpad.
  4. Packages, Installers and related goodies.
  5. Automatic .zip bundle generation from a directory (ie, easy deployment).
  6. Automatic versioning from .git introspection of both virgo and the bundle.

The first agent to use this infrastructure is the Rackspace Cloud Monitoring agent. Join in and build your agent with us.

License

virgo is distributed under the Apache License 2.0.

Bundles

Virgo only understand Lua files in the context of a zipped bundle. It will automatically require the root level init.lua file as the entry point. Bundle files can be automatically generated by specifing the bundle directory at precompile time with the flag --bundle=path_to_lua_stuffs. Otherwise, Virgo will bundle the included example directory.

Virgo obeys the following rules when generating bundles:

  1. Only Lua files are included ...
  2. except the files in the root level "static" directory (ie, you can ship fixtures for testing if you want).
  3. Lua files and folders found under the root lua_modules dir are globally accessible and are not lazily loaded.

This bundles will take the name of the final directory that was specified to configure plus the suffic "-bundle.zip".

Versioning

The agent is versioned with a three digit dot seperated "semantic version" with the template being x.y.z. An example being e.g. 1.4.2. The rough meaning of each of these parts are:

  • major version numbers will change when we make a backwards incompatible change to the bundle format. Binaries can only run bundles with identical major version numbers. e.g. a binary of version 2.3.1 can only run bundles starting with 2.

  • minor version numbers will change when we make backwards compatible changes to the bundle format. Binaries can only run bundles with minor versions that are greater than or equal to the bundle version. e.g. a binary of version 2.3.1 can run a 2.3.4 bundle but not a 2.2.1 bundle.

  • patch version numbers will change everytime a new bundle is released. It has no semantic meaning to the versioning.

The zip file bundle and the binary shipped in an rpm/deb/msi will be identical. If the binary is 1.4.2 then the bundle will be 1.4.2.

Building on a Unix-like Operating System

./configure --bundle=some_dir
make

Running tests

make test

Building for Rackspace Cloud Monitoring

Rackspace customers: Virgo is the open source project for the Rackspace Cloud Monitoring agent. Feel free to build your own copy from this source.

But! Please don't contact Rackspace Support about issues you encounter with your custom build. We can't support every change people may make and master might not be fully tested.

Building on RHEL 5.x

Add the EPEL repo and install dependencies

# rpm -ivh http://mirror.hiwaay.net/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# yum update
# yum groupinstall 'Development Tools'
# yum install git python26 gcc44 gcc44-c++

Default to python2.6:

# ln -s /usr/bin/python2.6 /usr/local/bin/python
# export PATH=/usr/local/bin:$PATH

Clone the repository:

# git clone https://github.com/racker/virgo.git

Configure and Build:

# ./configure
# CC=gcc44 CXX=g++44 make
# CC=gcc44 CXX=g++44 make install

Building on Windows

Install the following:

Once the dependencies are installed:

python configure --bundle=some_dir

Now you can open monitoring-agent.sln from Visual Studio.

If you wish to compile from the command line, run:

python tools/build.py build

See also: http://www.chromium.org/developers/how-tos/build-instructions-windows

Building on FreeBSD

# pkg_add -r git
# pkg_add -r gcc46
# git clone https://github.com/racker/virgo
# cd virgo
# git submodule update --init --recursive
# ./configure
# setenv CC gcc46
# gmake -C out
# gmake install
# cp base/pkg/freebsd/rackspace-monitoring-agent.init /etc/rc.d/rackspace-monitoring-agent
# chmod 755 /etc/rc.d/rackspace-monitoring-agent

Edit /etc/rc.conf and append:

rackspace-monitoring-agent_enable="YES"

Distro Packages

RPM

yum install rpm-build
make rpm

Find the rpms in out/rpmbuild/RPMS/

dpkg

apt-get install devscripts
make deb

Find the deb in out/debbuild/

About

No description, website, or topics provided.

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE.txt
Unknown
LICENSE.rtf

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 48.2%
  • Lua 29.2%
  • Python 19.3%
  • C++ 1.3%
  • Perl 0.9%
  • Shell 0.8%
  • Graphviz (DOT) 0.3%