diff --git a/morph/grid/local/README.rst b/morph/grid/local/README.rst index 0920afa4d31e91bcd0450493093131979234b1ba..e11d92a1fd9660cc850d5ff939d252c500c7d912 100644 --- a/morph/grid/local/README.rst +++ b/morph/grid/local/README.rst @@ -78,7 +78,24 @@ Build and start the VMs:: VAGRANT_DEFAULT_PROVIDER=virtualbox vagrant up -Then:: +Then, once:: + + vagrant ssh-config > ./vagrant-ssh-config + +Add the IPs from ``grid.nix`` to the vagrant-ssh-config Host match blocks so the config reads like:: + + Host payments1 192.168.67.21 + HostName 192.168.67.21 + User vagrant + [...] + +Then, make morph use this ssh config either - with newer morph - point it to it:: + + export SSH_CONFIG_FILE=./vagrant-ssh-config + +Or, with older morph, adding the config to your user's ``~/.ssh/config`` file. + +Then, build and deploy our software to the Vagrant VMs:: morph build grid.nix morph push grid.nix diff --git a/morph/grid/local/Vagrantfile b/morph/grid/local/Vagrantfile index 7c20fddda1516d31abd65c9850abaf7619ce8030..81dec21ee701d761b4347f11df43398d78d4b528 100644 --- a/morph/grid/local/Vagrantfile +++ b/morph/grid/local/Vagrantfile @@ -33,6 +33,7 @@ Vagrant.configure("2") do |config| end # To make the VMs assign the static IPs to the network interfaces we need a rebuild: + config.vm.provision "shell", inline: "echo '{nix.trustedUsers = [ \"@wheel\" \"root\" \"vagrant\" ];}' > /etc/nixos/custom-configuration.nix" config.vm.provision "shell", inline: "nixos-rebuild switch" config.trigger.after :up do |trigger|