Skip to content

Instantly share code, notes, and snippets.

@salewski
Created February 17, 2018 21:33
Show Gist options
  • Save salewski/895ec8b36fa5a431597198992c96ac1b to your computer and use it in GitHub Desktop.
Save salewski/895ec8b36fa5a431597198992c96ac1b to your computer and use it in GitHub Desktop.
vagrantfile-keepalived-doc-build-ubuntu-artful64
# coding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile for verifying Ubuntu 17.10 "Artful Aardvark"-based documentation
# updates for keepalived issue #761:
#
# https://github.com/acassen/keepalived/issues/761
#
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/artful64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
config.vm.box_check_update = false
# The below will give you a box on which you can 'git clone' the
# 'keepalived' repo and configure the project, but will not be able to
# build the HTML and/or PDF documentation.
#
# The 'resize2fs' command is just a hack to work around a known bug with
# the root filesystem being too small upon boot. Before running the
# 'resize2fs' command, there will be less than 1G of space; afterwards
# there will be closer to 10G. For more info, see:
#
# • bug #1726818: "vagrant artful64 box filesystem too small"
# https://bugs.launchpad.net/cloud-images/+bug/1726818
#
# To be able to build the HTML documenation, you additionally need to:
#
# # apt-get -y install python-sphinx python-sphinx-rtd-theme
#
# To be able to build the LaTeX and/or PDF documenation, you additionally
# need to:
#
# # apt-get -y install texlive-latex-base texlive-generic-extra texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra
#
config.vm.provision "shell", inline: <<-SHELL
resize2fs /dev/sda1
apt-get update
apt-get -y install git
apt-get -y build-dep keepalived
SHELL
# Upon login (as the 'vagrant' user):
#
# $ mkdir src
#
# $ cd src
# $ git clone https://github.com/acassen/keepalived.git
#
# $ cd keepalived
#
# $ find . -exec touch -r configure {} +
#
# $ ./configure --prefix=/tmp/blah-keepalived-build
#
# If you have installed the packages to build the HTML documentation, then
# you can run the following from the top of the build tree:
#
# $ make html
#
# If you have installed the packages to build the LaTeX and PDF
# documentation, then you can run the following to kick off the build of
# that. Note that building the PDF documentation cannot be done from the top
# of the build tree, hence the reason we 'cd' into the 'doc' subdir:
#
# $ cd doc
# $ make latexpdf
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment