From 2d20a11391a829436063e0955a0ed12eca8e813c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1tvik=20Karanam?= <89281036+skara9@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:15:30 -0400 Subject: [PATCH] new worker vm instructions --- _docs/developer/getting_started/worker_vm.md | 42 ++++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/_docs/developer/getting_started/worker_vm.md b/_docs/developer/getting_started/worker_vm.md index 978491b5..b939ab99 100644 --- a/_docs/developer/getting_started/worker_vm.md +++ b/_docs/developer/getting_started/worker_vm.md @@ -11,36 +11,36 @@ machines* in addition to your primary vagrant virtual machine. ## Automated Worker Installation -These steps will create a worker machine alongside the normal Submitty machine. -1. Make sure to destroy any existing vagrant machines with -``` -vagrant destroy -``` - -2. Ensure you have [Python 3](https://www.python.org/downloads/) installed on your machine - -3. Generate configuration for the desired number of worker machines +1. Make sure to destroy any existing worker machines before generating a new worker configuration. + Failure to do this could result in 'hidden' worker machines from the previous configuration + still running on your computer, taking up disk space and resources. ``` - python3 generate_workers.py [-n NUM] [--ip-range IP_RANGE] [--base-port PORT] + vagrant workers destroy ``` - This will create or update a configuration file stored at `.vagrant/workers.json`. - Now you can create the virtual machines with: + +2. Ensure you have [Python 3](https://www.python.org/downloads/) installed on your machine. + `python3 --version` + +3. Generate configuration for the worker machine(s). ``` - vagrant up + vagrant workers generate ``` + For multiple workers, use the `-n` flag. (ex. `-n 3` for 3 machines). - If you happen to encounter error messages regarding IP addresses or port conflicts, you can manually edit the `workers.json` file as needed. - - __NOTE__: Do not edit the `workers.json` configuration file or run the aforementioned python script if there are any existing vagrant machines in your project. This can result in the existing VMs continuing to run in the background or storing their data with no clean way to remove them. + If using a provider other than the default for your system, use the `--provider` flag. + (ex. `--provider parallels`) -4. To delete the worker machines and revert to a normal development setup, you can first run +4. If you are on MacOS running QEMU, make sure to restart the network socket. ``` - vagrant destroy + vagrant workers socket restart ``` - And confirm to delete all the existing virtual machines. + If the VM runs into errors when attempting to reach the internet, try starting the socket + in public mode. (`--public`) - Next, you can delete the `workers.json` file, which will remove the worker configuration from your project. - The next `vagrant up` should only create the primary development virtual machine without any workers. +5. Now you can provision the virtual machines with: + ``` + vagrant workers up + ``` ---