Skip to content

Commit

Permalink
new worker vm instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
skara9 committed Jul 22, 2024
1 parent 7e00252 commit 2d20a11
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions _docs/developer/getting_started/worker_vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

---

Expand Down

0 comments on commit 2d20a11

Please sign in to comment.