Examples

We have a number of examples cases available, which demonstrate various features of Disnix. The example cases can be freely used under the MIT license and obtained through the download page.

There are various ways to try these examples. The first option is to deploy the system in a heterogeneous network, which also takes the most effort. This requires you to manually install a network of machines, configure system services (such as a DBMS and web server), install Disnix and to write an infrastructure model matching the properties of the systems in the network.

Another option is to install a network of NixOS machines running the Disnix service. The DisnixOS extension can be used to automatically upgrade the underlying infrastructure to support the services. Examples of NixOS configurations are included with each example.

The most convenient way of trying these examples, is by using the virtualization tool of DisnixOS. This tool can be used on any Linux distribution (not just NixOS) using the Nix package manager and KVM. It will automatically generate a network running NixOS instances.

StaffTracker (PHP/MySQL version)

This example is a PHP/MySQL web application system to manage staff of a university department. The system is composed of various databases; one to store zip codes, another to store room numbers and one to store the staff members. A PHP web application front-end allows users to view and modify staff members.

StaffTracker (Web services version)

A more complex variant of the previous example implemented in Java. In this variant access to the databases is provided by web services. Moreover, a Geolocation service is included using GeoIP to determine a staff members' location from an IP address.

StaffTracker.NET (Web services version)

A port of the previous web services example to .NET technologies, such as C#, WCF, ADO.NET and SQL server.

ViewVC

A system running ViewVC, a web-based CVS and Subversion repository viewer. In this example we automatically deploy the ViewVC web application front-end, a MySQL database storing commit records, and an arbitrary number of Subversion repositories.

Hello World example

A trivial example composed of web services, which show various ways to combine services together. In this example four different compositions are shown, such as a dynamic variant using a lookup service and a load balancer. This example can be used as a reference for designing services and to make them better deployable.

Disnix proxy example

A trivial example composed of two processes communicating with other through a TCP socket. A proxy can be used to drain connections during the upgrade phase, which makes the upgrade process completely atomic.

NixOS configurations

A trivial example case deploying complete NixOS configurations.