diff --git a/examples/vagrant/beowulf cluster/README.md b/examples/vagrant/beowulf cluster/README.md new file mode 100644 index 0000000..b8fc8aa --- /dev/null +++ b/examples/vagrant/beowulf cluster/README.md @@ -0,0 +1,24 @@ +# Beowulf cluster example + +## Requirements: + +- VirtualBox +- A host-only virtual network (`VirtualBox Host-Only Ethernet Adapter`, address space `192.168.56.0/24`) +- An SSH key pair (files `id_ed25519` and `id_ed25519.pub`, create it with the command below) + + ```sh + ssh-keygen -f 'id_ed25519' -N '' -C 'controller' + ``` + +- An SSH config file ([`ssh_config.txt`][ssh_config.txt]) +- A list of hosts for MPICH ([`mpi_hosts.txt`][mpi_hosts.txt]) containing the IP addresses of the workers + +When up, execute the command below and enjoy: + +```sh +vagrant ssh -c 'mpiexec -f mpi_hosts -n 3 hostname' +``` + + +[mpi_hosts.txt]: mpi_hosts.txt +[ssh_config.txt]: ssh_config.txt diff --git a/examples/vagrant/beowulf cluster/Vagrantfile b/examples/vagrant/beowulf cluster/Vagrantfile index 7444f87..a05de74 100644 --- a/examples/vagrant/beowulf cluster/Vagrantfile +++ b/examples/vagrant/beowulf cluster/Vagrantfile @@ -1,23 +1,5 @@ Vagrant.configure("2") do |config| - # Requirements: - # - # - VirtualBox - # - A host-only virtual network ('VirtualBox Host-Only Ethernet Adapter', - # address space '192.168.56.0/24') - # - An SSH key pair (files 'id_ed25519' and 'id_ed25519.pub') - # - An SSH config file ('ssh_config.txt') configured like so: - # - # Host 192.168.56.* - # IdentityFile ~/.ssh/id_ed25519 - # StrictHostKeyChecking no - # - # - A list of hosts for MPICH ('mpi_hosts.txt') containing the IP addresses - # of the workers - - # When up, execute the command below and enjoy: - # vagrant ssh -c 'mpiexec -f mpi_hosts -n 3 hostname' - controller_hostname = "controller" controller_ip = "192.168.56.101" diff --git a/examples/vagrant/beowulf cluster/mpi_hosts.txt b/examples/vagrant/beowulf cluster/mpi_hosts.txt new file mode 100755 index 0000000..26dd288 --- /dev/null +++ b/examples/vagrant/beowulf cluster/mpi_hosts.txt @@ -0,0 +1,3 @@ +192.168.56.201 +192.168.56.202 +192.168.56.203 \ No newline at end of file diff --git a/examples/vagrant/beowulf cluster/ssh_config.txt b/examples/vagrant/beowulf cluster/ssh_config.txt new file mode 100755 index 0000000..2fb4547 --- /dev/null +++ b/examples/vagrant/beowulf cluster/ssh_config.txt @@ -0,0 +1,3 @@ +Host 192.168.56.* + IdentityFile ~/.ssh/id_ed25519 + StrictHostKeyChecking no \ No newline at end of file