DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Ansible and the Pre-Container Arts
  • Kubernetes Cluster Setup on Ubuntu, Explained
  • Scaling Microservices With Docker and Kubernetes on Production
  • A Guide to Container Runtimes

Trending

  • Four Essential Tips for Building a Robust REST API in Java
  • Distributed Consensus: Paxos vs. Raft and Modern Implementations
  • After 9 Years, Microsoft Fulfills This Windows Feature Request
  • Introduction to Retrieval Augmented Generation (RAG)
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Boost Your Development Environment With Ubuntu Multipass

Boost Your Development Environment With Ubuntu Multipass

Ubuntu Multipass is used to quickly launch and manage Linux virtual machines on any workstation. It's available for Linux, macOS, and Windows. From a developer’s perspective, it is an interesting alternative to Docker or VirtualBox. For me, it feels easier and simpler to use.

By 
Tomasz Waraksa user avatar
Tomasz Waraksa
DZone Core CORE ·
Aug. 14, 21 · Review
Likes (6)
Comment
Save
Tweet
Share
9.2K Views

Join the DZone community and get the full member experience.

Join For Free

Ubuntu Multipass is part of the Ubuntu ecosystem, but it works fine on other platforms and operating systems. It can be found at https://multipass.run. I use it daily during my development work. It has become an indispensable tool for keeping my workstation clean. It helps with the testing and deployment of my software.

Flame Wars Disclaimer

This article is not about cloud, deployment strategies, Kubernetes, helm, swarms, AWS vs Azure and alike. It's about using virtual machines to help software developer and devops engineer with daily work.

How Does Multipass Work?

As simple as this:

Shell
 
# Create and launch new virtual machine named "backend"
multipass launch --name backend

# Check how it's doing
multipass info backend

# Run single command on the machine
multipass exec backend -- systemctl restart apache

# Launch interactive shell session with the machine
multipass shell backend

# List all instances
multipass list

# Reboot
multipass restart backend

# Dispose of the instance
multipass delete backend


There are few more commands such as mount for mounting directories or transfer for copying files. Detailed documentation is available at https://multipass.run/docs.

What Can I Do With Multipass?

We agree that virtual machines and containers are the most useful tools in a developer's toolbelt. By installing third-party software on isolated environments we keep our workstations clean and healthy. By using clean environments for testing and deployments we're less vulnerable to "It Works on My Machine" syndrome.

We differ on how to best achieve this. We use Docker, VMWare, VirtualBox, cheap VPS, disposable instances in the cloud, and many other solutions.

Multipass virtual machines are fully functional Ubuntu LTS instances. Everything that can be done with the Ubuntu Linux server, can be done with Multipass instances. We can run software in isolation from your workstation. We can safely play with alternative versions. We can launch multiple micro-instances running automated integration tests. We can test deployment scripts locally, before running them on higher environments. Possibilities are endless.

What Are the Benefits of Multipass?

How does Multipass compare to Docker, from a developer's perspective? Your mileage might vary, but for me the following benefits are important:

Multipass Instance Runs Full Uncompromised Ubuntu LTS

Everything is ready out of the box, beginning with nano and curl. All my familiar Linux tools are either there or one apt install away. I can start using the newly launched instance right away, using the concepts, tools, and commands I already know.

Here's why this is important. The developer's brain already runs at full capacity. Each time I need to learn another command, another precious childhood memory has to make room and goes down the drain, forever lost. I read that recently on The Oatmeal so it must be true ;-)

Multipass Instance Is Connected

Immediately after launching the instance can access LAN and WAN. It is open for connections, without additional configuration. There is no need to manually configure virtual networks or map ports.

Multipass Instance Is Persistent

Docker containers are disposable by design. Data shouldn't be kept on them. We use shared volumes instead. This comes with limitations. For crucial security reasons, Docker allows mounting volumes only once, when a container is created. But these otherwise important considerations aren't relevant to my development machine.

Multipass has mount command for mounting host folders into the instance. This can be done at any time: before starting the instance but also while it is already running.

Additionally, the primary instance mounts my home folder as ~/Home by default, so I can access my files instantly.

Multipass Instance Management Is Easy

Command syntax and options are few and easy to memorize. With the ability to execute commands and transfer files, we can easily write scripts to fully automate software installation, integration tests, deployment tasks, etc.

There Is Even UI For That

After installing Multipass on my PopOS! Linux box I saw the following in the top bar:

How nice!

I Want It, I Want It, Where Can I Get It?!

Multipass can be used on Linux, macOS, and Windows.

On Linux, Multipass is best installed with snap. On Ubuntu-based distributions chances are snap is already there, so simply run:

sudo snap install multipass 


and Multipass is ready to go. Otherwise install snap daemon first, using your package manager of choice.

To install it on other platforms download the proper installation package from https://multipass.run/.

Multipass instances might not start if another VM software is running, such as Oracle VirtualBox. Simply stop VirtualBox and try again.

Enjoy!


Disclaimer

This article is not promoting any of the described products, services, or vendors. We don't have any commercial interest nor associations with them. We're not trying to suggest that these products or services are best for you, nor promising that your experience will be the same.

ubuntu Docker (software) Kubernetes Boost (C++ libraries)

Opinions expressed by DZone contributors are their own.

Related

  • Ansible and the Pre-Container Arts
  • Kubernetes Cluster Setup on Ubuntu, Explained
  • Scaling Microservices With Docker and Kubernetes on Production
  • A Guide to Container Runtimes

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!