Created
January 31, 2023 17:28
-
-
Save remcoboerma/12f19a8561a781bc41ef5a9b7ab6dadf to your computer and use it in GitHub Desktop.
Multipass tasks.py for my PycharmProjects folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from invoke import task | |
@task | |
def mp_up(ctx, omgeving, mp_name='dockers'): | |
ctx.run(f'multipass exec {mp_name} -d {omgeving} ../.local/bin/invoke up', echo=True) | |
@task | |
def mp_remount(ctx, mp_name='dockers'): | |
if mp_name == 'dockers': | |
ctx.run(f'multipass unmount {mp_name}:', echo=True) | |
ctx.run(f'multipass mount reverse_proxy {mp_name}:reverse_proxy', echo=True) | |
ctx.run(f'multipass mount omgeving {mp_name}:omgeving', echo=True) | |
ctx.run(f'multipass info {mp_name}', echo=True) | |
ctx.run(f'multipass exec {mp_name} -d reverse_proxy ../.local/bin/invoke up', echo=True) | |
@task | |
def shell(ctx, mp_name='dockers'): | |
ctx.run(f'multipass shell {mp_name}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment