diff options
author | 2016-02-08 05:53:01 -0500 | |
---|---|---|
committer | 2016-02-09 14:03:35 +0000 | |
commit | 13173800bc96ae9db7ee034f7628b2d5de8dc061 (patch) | |
tree | 3766435596e4e1181c165b3631947b5ee6e03a05 /vagrant-demo/bootstrap-host.ubuntu1404.sh | |
parent | d1e8024f091a1cc59f2a64c3a44f5cba21179ee7 (diff) |
Vagrant configuration to create VMs and connections for demo.
Change-Id: I4648f5cd738183193b3b342a96ececccdea0bad6
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'vagrant-demo/bootstrap-host.ubuntu1404.sh')
-rw-r--r-- | vagrant-demo/bootstrap-host.ubuntu1404.sh | 29 |
1 files changed, 29 insertions, 0 deletions
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 |