Join us
@priteshtailor ・ Feb 03,2022 ・ 1 min read ・ 579 views ・ Originally posted on faun.pub
Virtual environments are invaluable tools for developers be they data scientists, software/cloud/DevOps engineers and system administrators. They provide you with quick disposable environments for experimentation, testing and endless fresh starts.
Multipass released by Canonical has presented itself as a fresh and easy to use tool inside of this domain. Which I now use on a daily basis over similar tools for VMs! So what exactly makes it so great? (Beyond VMs for M1 MacBooks!)
It is a one-liner to install in most cases:
sudo snap install multipass
brew install multipass
You can manage the entire VM lifecycle with 3 commands:
multipass launch 20.04
multipass shell <vm name>
multipass delete <vm name>
multipass launch 20.04 --cpus 2
multipass launch 20.04 --mem 1G
multipass launch 20.04 --disk 5G
multipass mount /host/path <vm name>:/some/path
multipass transfer script.sh <vm name>:/tmp/script.sh
multipass transfer <vm name>:/root/script.sh /path/on/host
multipass delete <vm name>
multipass purge
multipass recover <vm name>
Here is a demo of multipass in action to show how simple it is.
#Find available VM images
$ multipass find
Image Aliases Version Description
18.04 bionic 20220104 Ubuntu 18.04 LTS
20.04 focal,lts 20220111 Ubuntu 20.04 LTS
21.04 hirsute 20220113 Ubuntu 21.04
21.10 impish 20220111 Ubuntu 21.10
#Spin up an ubuntu 20.04 instance
$ multipass launch 20.04
Launched: glowing-ibex
#Run uname command to check kernel version in VM
$ multipass exec glowing-ibex -- uname -rp
5.4.0-94-generic aarch64
#Delete VM
$ multipass delete glowing-ibex
#Permanently delete VM
$ multipass delete glowing-ibex
$ multipass ls
Name State IPv4 Image
glowing-ibex Deleted -- Not Available
$ multipass purge
$ multipass ls
No instances found.
Multipass is a super simple but powerful tool to spin up VMs and destroy them in very few CLI lines. Its beauty is in its simplicity, as you can imagine it saves you time by letting you spin up VMs for quick experiments locally rather than on cloud instances, it could provide a disposable environment to run a local data pipeline or even form a part of CI/CD pipeline. You could use it to test your DevOps configuration scripts or experiment with cluster technology setups. Of course, your creativity is your limit, just know it's easy from start to finish with Multipass.
Join other developers and claim your FAUN account now!
Devops Engineer, previsico
@priteshtailorInfluence
Total Hits
Posts
Only registered users can post comments. Please, login or signup.