{"id":19874172,"url":"https://github.com/pythoninthegrass/multipass_poc","last_synced_at":"2025-03-01T01:23:06.756Z","repository":{"id":85073754,"uuid":"497099404","full_name":"pythoninthegrass/multipass_poc","owner":"pythoninthegrass","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-27T16:02:46.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T16:50:27.923Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Just","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythoninthegrass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-27T18:28:48.000Z","updated_at":"2024-01-31T15:40:44.000Z","dependencies_parsed_at":"2024-11-12T16:34:49.531Z","dependency_job_id":null,"html_url":"https://github.com/pythoninthegrass/multipass_poc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fmultipass_poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fmultipass_poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fmultipass_poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fmultipass_poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythoninthegrass","download_url":"https://codeload.github.com/pythoninthegrass/multipass_poc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241301808,"owners_count":19940711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T16:22:06.803Z","updated_at":"2025-03-01T01:23:06.738Z","avatar_url":"https://github.com/pythoninthegrass.png","language":"Just","readme":"# multipass_poc\n\nUse Ansible and Multipass to setup a local Kubernetes (k3s) cluster.\n\n## Setup\n* Install [homebrew](https://brew.sh/)\n* Install [asdf](https://asdf-vm.com/guide/getting-started.html#_1-install-dependencies)\n* Install [python](https://github.com/danhper/asdf-python)\n* Install [pipx](https://pypa.github.io/pipx/#install-pipx)\n* Install [ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#from-pip)\n* Install [multipass](https://multipass.run/)\n\n## Usage\n* Edit the `templates/cloud-init-template.j2` file to your heart's content. Can add nodes, change hardware provisioning, Ubuntu version, etc.\n* Run a sanity check via `ansible-playbook main-playbook.yml --check`\n* Assuming no errors occur, re-run the playbook without the dry-run flag: `ansible-playbook main-playbook.yml`\n* Basic multipass commands\n    ```\n    # launch instance\n    multipass launch --name testvm\n\n    # cloud-init\n    multipass launch -n testvm --cloud-init cloud-init.yaml\n\n    # see instances\n    multipass list\n\n    # ssh\n    multipass shell foo\n\n    # run commands\n    multipass exec foo -- lsb_release -a\n\n    # start/stop instances\n    multipass \u003cstart|stop\u003e foo bar\n\n    # stop _all_ instances\n    multipass stop --all\n\n    # cleanup\n    multipass delete bar\n    multipass purge\n\n    # find alternate images\n    λ multipass find\n    Image                       Aliases           Version          Description\n    18.04                       bionic            20220523         Ubuntu 18.04 LTS\n    20.04                       focal,lts         20220505         Ubuntu 20.04 LTS\n    21.10                       impish            20220309         Ubuntu 21.10\n    22.04                       jammy             20220506         Ubuntu 22.04 LTS\n    anbox-cloud-appliance                         latest           Anbox Cloud Appliance\n    charm-dev                                     latest           A development and testing environment for charmers\n    docker                                        latest           A Docker environment with Portainer and related tools\n    minikube                                      latest           minikube is local Kubernetes\n\n    # rtfm\n    multipass help \u003ccommand\u003e\n    ```\n\n## TODO\n* Setup `$KUBECONFIG`\n* [terraform multipass provider](https://github.com/roiterorh/multipass-terraform)\n* Customize cloud-init image\n  * Maybe add Fedora or other distros\n* Refactor kludgey variables\n* Switch to either k0s or rancher instead of multipass\n\n## Further reading\n[Creating Multipass Virtual Machines with Ansible – The Blog of Ivan Krizsan](https://www.ivankrizsan.se/2021/10/10/creating-multipass-virtual-machines-with-ansible/)\n\n[Use Linux Virtual Machines with Multipass | by Andrew Zhu | CodeX | Medium](https://medium.com/codex/use-linux-virtual-machines-with-multipass-4e2b620cc6)\n\n[Cloud config examples — cloud-init 22.2 documentation](https://cloudinit.readthedocs.io/en/latest/topics/examples.html)\n\n[Adding Users | Ansible Tutorials](https://www.ansibletutorials.com/adding-users)\n\n[6 troubleshooting skills for Ansible playbooks | Enable Sysadmin](https://www.redhat.com/sysadmin/troubleshoot-ansible-playbooks)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Fmultipass_poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythoninthegrass%2Fmultipass_poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Fmultipass_poc/lists"}