How to Start Remote microVM Playgrounds from the Command Line with iximiuz Labs

Jun 24, 2024 | Programming

Are you excited about exploring various DevOps playgrounds in a secure and disposable environment? With the iximiuz Labs command-line tool, you can easily start and access Linux, Docker, Kubernetes, and more straight from your terminal. In this article, we’ll guide you through the setup and usage of this powerful tool, ensuring that your journey into the world of playgrounds is smooth and enjoyable!

Getting Started

Before diving into the playgrounds, make sure to check out this helpful getting started video.

Installation

To install the iximiuz Labs command-line tool, open your terminal and run the following command. This will download the latest release to your machine and add it to your PATH:

sh curl -sf https://labs.iximiuz.com/cli/install.sh | sh

Usage

Authentication

First, you’ll need to authenticate your CLI session with iximiuz Labs. This command will open a browser page with a one-time use URL:

sh labctl auth login

Starting Playgrounds

Once authenticated, starting a playground is as simple as running a single command. For example, to start the Docker playground, use:

sh labctl playground start docker

You can also choose to open the playground in a browser with the following command:

sh labctl playground start k3s --open

Or SSH into the Ubuntu playground by running:

sh labctl playground start ubuntu --ssh

SSH into a Playground

After starting a playground, access it via SSH with:

sh labctl ssh playground-id

You can also run one-off commands using:

sh labctl ssh playground-id -- ls -la

Using IDE (VSCode, JetBrains, etc.) to Access Playgrounds

To launch a playground in your IDE, use:

sh labctl playground start docker --ide

If you want to access it through SSH proxy mode, here’s how:

sh labctl ssh-proxy playground-id

Your command line will return output similar to:

textSSH proxy is running on 58279

You can connect from the terminal using:

ssh -i ~/.ssh/iximiuz_labs_user ssh:root@127.0.0.1:58279

Once you configure your SSH settings, you can develop directly on the playground machine by using the Visual Studio Code Remote – SSH extension!

Port Forwarding

You can expose services from your playground to your local machine using:

sh labctl port-forward playground-id -L local-port:remote-port

For remote port forwarding, use:

sh labctl ssh-proxy --address local-proxy-address playground-id
ssh -i ~/.ssh/iximiuz_labs_user -R remote-host:remote-port:local-host:local-port ssh:root@local-proxy-address

Listing and Stopping Playgrounds

To view your recent playgrounds, simply run:

sh labctl playground list

Stopping a playground is just as easy:

sh labctl playground stop playground-id

Signing Out and Deleting the CLI

If you wish to sign out and remove your CLI session, execute:

sh labctl auth logout

To uninstall the CLI, simply delete the ~/.iximiuzlabctl directory.

Troubleshooting

If you encounter issues during your journey, here are a few troubleshooting ideas:

  • Ensure you have a stable internet connection, as the playground requires resources online.
  • Double-check if your ~/.iximiuzlabctl directory is correctly set up or if it has been inadvertently deleted.
  • If the playground fails to start, try logging out and logging back in with the authentication command.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

By using this command-line tool from iximiuz Labs, you can easily create and access a variety of DevOps playgrounds, enhancing your learning and experimentation in a secure environment. At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox