Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix vagrant virtual machine deployment #781

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Vagrant.configure("2") do |config|

# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "bento/ubuntu-18.04"
config.vm.box = "ubuntu/focal64"

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
Expand All @@ -30,10 +30,10 @@ Vagrant.configure("2") do |config|
# Using VirtualBox:
config.vm.provider :virtualbox do |vm|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
# vm.gui = true

# # Customize the amount of memory on the VM:
# vb.memory = "1024"
vm.memory = "2048" # default, 1024 was not enough

# Enable creating symlinks in shared folder
# On a Windows host, vagrant will need to run with permissions to 'Create Symlinks', either
Expand All @@ -46,4 +46,4 @@ Vagrant.configure("2") do |config|
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", path: "provision/vm_provision.sh"
end
end
9 changes: 7 additions & 2 deletions provision/vm_provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ set -x
# Create vagrant user if not exists
id -u vagrant >/dev/null 2>&1 || useradd --create-home vagrant

# Create the file repository configuration:
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

#
# Install OS packages
Expand All @@ -40,7 +45,7 @@ apt-get install -y \
#

# node version and platform
NODE_VERSION=v12.18.1
NODE_VERSION=v16.13.2
DISTRO=linux-x64

# download
Expand Down Expand Up @@ -118,7 +123,7 @@ chown -R vagrant:vagrant /home/vagrant/colouringlondon
#

# Install latest release of npm
npm install -g npm@next
npm install -g npm@latest

# Local fixed install of node modules
cd /vagrant/app && npm install
Expand Down