From 13173800bc96ae9db7ee034f7628b2d5de8dc061 Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Mon, 8 Feb 2016 05:53:01 -0500 Subject: Vagrant configuration to create VMs and connections for demo. Change-Id: I4648f5cd738183193b3b342a96ececccdea0bad6 Signed-off-by: Dave Wallace --- vagrant-demo/bootstrap-host.ubuntu1404.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 vagrant-demo/bootstrap-host.ubuntu1404.sh (limited to 'vagrant-demo/bootstrap-host.ubuntu1404.sh') diff --git a/vagrant-demo/bootstrap-host.ubuntu1404.sh b/vagrant-demo/bootstrap-host.ubuntu1404.sh new file mode 100644 index 000000000..b84acbf1e --- /dev/null +++ b/vagrant-demo/bootstrap-host.ubuntu1404.sh @@ -0,0 +1,29 @@ +# Args +VAGRANT_VM_NAME="$1" +echo "Running bootstrap-host.ubuntu1404.sh..." +echo "VAGRANT_VM_NAME = '$VAGRANT_VM_NAME'" + +# Directory and file definitions +VAGRANT_HOME="/home/vagrant" +VAGRANT_BASHRC="$VAGRANT_HOME/.bashrc" +VAGRANT_BASH_ALIASES="$VAGRANT_HOME/.bash_aliases" + +# Set prompt to include VM name if provided. +sudo -H -u vagrant perl -i -pe 's/@\\h/@\\\h\$VM_NAME/g' $VAGRANT_BASHRC +sudo -H -u vagrant touch $VAGRANT_BASH_ALIASES +if [ "$VAGRANT_VM_NAME" != "" ] && [ "$(grep -q VM_NAME $VAGRANT_BASH_ALIASES)" = "" ] ; then + echo -e "\n# Include VM Name in prompt" >> $VAGRANT_BASH_ALIASES + echo "export VM_NAME=\"($VAGRANT_VM_NAME)\"" >> $VAGRANT_BASH_ALIASES +fi +chown vagrant:vagrant $VAGRANT_BASH_ALIASES + +# Fix grub-pc on Virtualbox with Ubuntu +export DEBIAN_FRONTEND=noninteractive + +# Add fd.io apt repo in case its needed +echo "deb http://nexus.fd.io/content/repositories/fd.io.dev/ ./" > /etc/apt/sources.list.d/99fd.io.list + +# Standard update + upgrade dance +apt-get update +apt-get upgrade -y +apt-get install -y wireshark -- cgit 1.2.3-korg