canonical / canonical/multipass
Bulk operations - Ability to perform actions on multiple nodes
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 829
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 45
Description
**What are you trying to do?**
Currently all commands use instance name to perform operations. This makes operations on multiple instances difficult and requires individual commands/action on each instance. For example: if I have 3 VMs for apps, 2 vms for db, and I want to run a command on just db nodes, I would have to run two commands. Or If I have to reboot app servers, thats 3 commands.
**What's your proposed solution?**
One option is to allow adding tags/lables to hosts. While launching we can add add these tags in commands line.
```
multipass launch --name app-server1 -m2g -c1 -d10g --tags group=app-server
multipass launch --name app-server2 -m2g -c1 -d10g --tags group=app-server
multipass launch --name app-server3 -m2g -c1 -d10g --tags group=app-server
```
Then for any operations we can specify the tag, instead of instance name.
```
multipass stop --tags group=app-server
multipass exec --tags group-app-server exec systemctl daemon-reload
multipass start --tags grou=app-server
```
Additionally, if we can expose these tags to the VM environment (file, metadata, etc.), we can make use of them in config management tool like Chef/Puppet/Script/Cloud-init, etc.
**Additional context**
I made a small utility for multi-node microk8s cluster [yogendra/mnmk8s](https://github.com/yogendra/mnmk8s) (terrible name, i know), that does something similar, in absence of this feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by reviewing the existing multipass launch, stop, start, and exec command paths, then compare the proposed tag examples and the linked mnmk8s utility to define the scope; done should cover selecting multiple nodes for operations and clarify whether tags are exposed inside the VM.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100