Skip to content

jfdm/packer-idris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Packer is a tool for virtual machine image and container management supporting creation and provisioning of multiple boxes.

This repository contains a collection of scripts to build a VirtualBox OVF image, and a Vagrant Box that contains an installation of the latest stable release of Idris and Idris2.

Originally we based the boxes off of LTS versions of Ubuntu, however we have switched to a more conservative (in size) distribution: Alpine Linux.

The idea behind this box provisioning is to provide fellow researchers with an image suitable for production of Research Artifacts suitable for evaluation. While we, as Scientists, often publish papers and code online, these artifacts are more tuned towards reproducible results and conservancy of the research as it was done at the time.

The box is intended to allow evaluators access to a working Idris compiler, and evaluate artifacts using the command line.

While we could use Docker, Packer is a Swiss Army knife of tooling that supports generation of many kinds of images.

This project was initially designed for Idris1 reproducible builds, but I have extended it to support Idris2.

Support for Idris1 is not continuing.

Building Boxes

To build the boxes install the dependencies:

  • packer
  • virtualbox
  • virtualbox-guest-additions-iso

and then call the Makefile in the following order:

make alpine    # the base VM
make idris     # the base vm with idris2

Box Information

Idris 2

Only one style of box is provided for Idris2, a conservative Alpine image. The box can be found in the idris directory.

Note

  • The set up is around 10 minutes including building the base image.
  • We have installed idris2 using nix pkgs. Although idris2 is available from Alpine’s own repository, we include nix to allow installation of other packages not in Alpine’s own repositories.

    Thus when provision this box further you need to add the following to your provision script:

    echo ". $HOME/.nix-profile/etc/profile.d/nix.sh" >> ~/.profile
    
    . .profile
    
        

Details

Base OSAlpine Linux 3.16.3
CPU64-AMD
Memory4 GB
Disk8 GB
Cores2
Idris20.6.0
Boxname
idris-playground
Username
idris-playground
Password
idris-playground

DEPRECATED/NO LONGER SUPPORTED Idris 1

There are two setups provided for Idris1: a hefty Ubuntu LTS Server image; and a more conservative Alpine image.

They are provided in the idris1 directory.

Note

  • This vagrant box has been tested with vagrant.
  • The Ubuntu setup will take around 40 minutes to build. The build of the time is spent downloading GHC and building Idris [fn:f9e343f29bb1fab].
  • The Alpine setup is much quicker around 10-15 minutes.

Details

Base OSUbuntu Server 18.04.04 LTSAlpine Linux 3.11.5
CPU64-AMD64-AMD
Memory4 GB4 GB
Disk20 GB4 GB
Cores22
GHC8.2.2n/a
Cabal2.4n/a
Idris1.3.21.3.2
Boxname
idris-playground
Username
idris-playground
Password
idris-playground

PreInstalled Software

Extra software was installed to support Idris installation.

mg
A lightweight emacs clone.
tmux
For advanced terminal usage.
hyperfine
For running benchmarks.
nix
to get packages not available in alpine’s repositories.

Logging output

Use this command for obtaining logs.

PACKER_LOG=1 PACKER_LOG_PATH="packer-log.txt" packer build <image name>.json

External References

The following repositories were instrumental in getting the Alpine linux box setup.

Footnotes

[fn:f9e343f29bb1fab] We need some binary distribution tools for Idris but sadly that is not a priority.

About

Packer scripts for generating Virtual Box OVFs that have Idris preinstalled.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published