Git Product home page Git Product logo

ganeti-instance-guix's Introduction

ganeti-instance-guix

Create Guix instances on Ganeti!

Usage

$ gnt-instance add -o guix+default my-instance

The default configuration assumes gnt-network is configured and will create an instance with static networking, a serial console, and an SSH server that reuses the hosts /root/.ssh/authorized_keys for root.

It is possible to use a specific Guix commit via an OS parameter:

$ gnt-instance add -o guix+default \
  -O "commit=ecd5db37ff,filesystem=ext4,layout=basic"

Other supported parameters for Guix are branch, repo_uri, and disable_authentication. If any of these parameters are set, guix time-machine will be used to build the image. Otherwise the hosts (root user) Guix version will be used.

You can also build for a specific architecture by passing the 'system' parameter, and even cross-compile a disk image by passing 'target'.

$ gnt-instance add -o guix+default -O system=i686-linux

Behind the scenes, this uses guix system init to deploy a configuration that matches a filesystem and partitioning layout combination.

Related to partitioning and filesystems are the following options:

  • fs_type: choose between btrfs, f2fs, xfs, ext2, ext3 and ext4 filesystems.
  • layout: you can choose "basic" for installation on one partition, or "advanced" for an LVM layout with separate partitions for /gnu/store, etc. Though in the case of btrfs, the same layout is setup using btrfs subvolumes.
  • part_size: specify the partition size.
  • luks_passphrase: if you set a value for this option luks will be used (works fine with any layout and filesystem combination).

Note that all layout and filesystem combinations do not work on all disk storage backends. For example, using a combination that creates an LVM setup does not work well when the disk backend is a logical volume itself. You could use a "file" for disk storage backend instead.

Installation

$ ./configure --sysconfdir=/etc --localstatedir=/var
$ make && sudo make install

For development you may want to pass --with-guix=guix to use the Guix available on $PATH instead of the root users Guix.

Dependencies

  • Guix
  • util-linux
  • multipath-tools
  • e2fsprogs
  • parted

These are optional:

  • jq (for running tests)
  • xfsprogs
  • btrfs-progs
  • lvm2, for LVM support (experimental)
  • cryptsetup

Limitations

  • No import and export functionality yet.
  • Runs with elevated privileges on the host.
    • Do not use this with untrusted configuration files!

ganeti-instance-guix's People

Contributors

mbakke avatar methuselah-0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

methuselah-0

ganeti-instance-guix's Issues

Copy-files

Would be nice to add a way to have files or directories copied to new VM's, so impöementation-wise would need to read an env var with key-values for source-path -> target-path (ganeti server to VM disk). This could be used to add private (non-world readable) files to new VM's at creation time. An example would be to add private key files for VPN's with some specified permissions. This should run after guix init to allow all folders to have been created first. One option would be to have the env var be expecting json content to allow multiple files with different target permissions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.