https://github.com/educationwarehouse/edwh-multipass-plugin
A plugin for handing local multipass instances using `edwh`
https://github.com/educationwarehouse/edwh-multipass-plugin
edwh invoke multipass plugin python
Last synced: 10 months ago
JSON representation
A plugin for handing local multipass instances using `edwh`
- Host: GitHub
- URL: https://github.com/educationwarehouse/edwh-multipass-plugin
- Owner: educationwarehouse
- License: mit
- Created: 2023-04-05T19:41:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T14:52:38.000Z (over 1 year ago)
- Last Synced: 2024-12-08T22:20:00.418Z (over 1 year ago)
- Topics: edwh, invoke, multipass, plugin, python
- Language: Python
- Homepage: https://pypi.org/project/edwh-multipass-plugin/
- Size: 66.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# edwh-multipass-plugin
[](https://pypi.org/project/edwh-multipass-plugin)
[](https://pypi.org/project/edwh-multipass-plugin)
-----
**Table of Contents**
- [Installation](#installation)
- [License](#license)
- [mp.fix-host](#mpfix-host)
- [mp.install](#mpinstall)
- [mp.prepare](#mpprepare)
## Installation
Install just this plugin:
```console
pip install edwh-multipass-plugin
```
But probably you want to install the whole `edwh` package:
```console
pipx install edwh[plugins,omgeving]
# or
pipx install edwh[multipass]
```
if you want to use the `edwh` command line tool with just the `multipass` plugin:
```console
pipx install edwh
edwh plugin.add multipass
```
---
## mp.fix-host
> aka `mp.fix-dns`
Fixes the ip adres in the hosts file for a multipass instance.
When issuing on the first run fix-host will add an entry to your hosts file, and you can enter
different hostnames you want to register for the instance.
```
mp.fix-host dockers -h dockers.local -h delen.dockers.local -h web2py.dockers.local ...
```
After this initial registration, you can update the ip address of the instance by running `mp.fix-host dockers` again.
Be aware that you cannot register new hostnames after the initial registration. Update your
`/etc/hosts` file instead.
---
## mp.install
Installs multipass on an ubuntu based machine if not already installed.
---
## mp.prepare
Allows you to ssh into a multipass instance, so you are able to run fabric commands against it.
`mp.prepare` will generate a multipass_keyfile `~/.ssh/multipass.key` (if not already present)
and add the public key to the multipass instance's `authorized_keys` file.
`mp.prepares` automatically runs `mp.install`.
---
## License
`edwh-multipass-plugin` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
See [the license](LICENSE.txt) for details.