Created
February 17, 2018 22:05
-
-
Save salewski/54bba62d1c90c4d432e03d8ffb08590f to your computer and use it in GitHub Desktop.
vagrantfile-keepalived-doc-build-alpine-alpine64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile for verifying Alpine Linux-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 = "alpine/alpine64" | |
config.vm.box_version = "3.6.0" | |
# 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 | |
# Provider-specific configuration so you can fine-tune various | |
# backing providers for Vagrant. These expose provider-specific options. | |
# Example for VirtualBox: | |
# | |
config.vm.provider "virtualbox" do |vb| | |
# Display the VirtualBox GUI when booting the machine | |
#vb.gui = true | |
# | |
# Customize the amount of memory on the VM: | |
#vb.memory = "1024" | |
# AL.NOTE (2018-01-28): Found this by a mixture of empirical testing and | |
# gathering tidbits from googling. The alpine/alpine64 vagrant box | |
# (box version 3.6.0) gets stuck at boot-up time unless the | |
# VirtualBox knob that says the cable is plugged-in is checked. | |
# This config line uses the 'VBoxManage' command line tool (to | |
# modify the virtual machine just prior to vagrant booting it) to | |
# do the equivalent of launching the VirtualBox GUI and then | |
# clicking the checkbox manually. | |
# | |
# See also: | |
# https://www.vagrantup.com/docs/virtualbox/configuration.html | |
# https://www.virtualbox.org/manual/ch08.html | |
# | |
# [--cableconnected<1-N> on|off] | |
vb.customize ["modifyvm", :id, "--cableconnected1", "on"] | |
end | |
# 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. | |
# | |
# To be able to build the HTML documenation, you additionally need to: | |
# | |
# # apk upgrade [optional] | |
# # apk add py-sphinx py3-sphinx_rtd_theme | |
# | |
# To be able to build the LaTeX and/or PDF documenation, Alpine Linux | |
# users are on their own. At the time of writing (2018-02-17), Alpine | |
# Linux does not seem to have a supported texlive package. See also: | |
# | |
# https://bugs.alpinelinux.org/issues/3920 | |
# https://bugs.alpinelinux.org/issues/4969 | |
# | |
config.vm.provision "shell", inline: <<-SHELL | |
apk update | |
apk upgrade apk-tools | |
apk add man | |
apk add iptables-dev ipset-dev libnfnetlink-dev libnl3-dev musl-dev openssl-dev | |
apk add gcc{,-doc} make{,-doc} autoconf{,-doc} automake{,-doc} | |
apk add git{,-doc} | |
SHELL | |
# | |
# In my tests on 2018-01-28, the above vagrant provisioning doesn't get | |
# executed, but I just run the above commands manually since this is a | |
# small one-off effort for me (read as: I don't have time to debug the | |
# vagrant/virtualbox aspects of it thoroughly). | |
# | |
# 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 | |
# $ make html | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment