Limavel πβπ©
A tool for creating and provisioning virtualized development environments for Laravel on macOS.
This tool may serve also as Laravel Homestead replacement.
Motivation
Laravel offers a great development environment based on containers for macOS with Laravel Herd; however, some developers require a development environment that must be close to the production one, or simply need extra customization and security. Limavel offers the possibility of using virtualized development environments like Laravel Homestead but without using Vagrant and commercial virtualization software.
Installation
|
or using cargo:
How it works
Limavel uses Lima with the native Apple Virtualization Framework and Ansible under the hood. It helps to create, edit, and provision virtual machines in macOS that are oriented to web development and especially to Laravel app development.
In order to use Limavel, you need to previously install Lima 2.x.
Getting started
To use Limavel, follow the steps below:
- Initialize configuration:
limavel init - Edit the configuration file (limavel.yaml)
- Start the virtual machine:
limavel start
After the first start, Limavel will create a new virtual machine and run the provisioning process.
Provisioning
You can run limavel provision for applying changes to the virtual machine and software installation or/and configurations.
The provisioning process is based on Ansible playbooks.
Provision customization
Limavel was developed for using Debian Trixie as base distribution; however, it's possible to customize the bootstrap scripts and playbooks to use other distributions.
To publish the OS bootstrap and Ansible playbook files in your filesystem, you can run limavel publish. Feel free to modify these files for custom needs.
See the following provisions:
- Debian Trixie (Default used by Limavel)
- Ubuntu Server Noble
- Rocky 10 (Under testing)
The provisions located into the limavel project are oriented to Laravel development; however, you are free to create your own provisions for different purposes or/and development stacks.
Virtual Machine Configuration
Edit the limavel.yaml file to customize the virtual machine configuration such as memory, CPU, and file mapping, and run limavel edit to apply the changes.
SSH Access
With the limavel ssh command you can access the virtual machine using SSH. The default system user is limavel and the password is secret.
Commands list
| Command | Description |
|---|---|
init |
Initialize the configuration file |
edit |
Change virtual machine configuration |
provision |
Run the provisioning process |
publish |
Publish the OS bootstrap and Ansible playbooks |
start |
Start the virtual machine |
stop |
Stop the virtual machine |
restart |
Restart the virtual machine |
status |
Check the status of the virtual machine |
ssh |
Access the virtual machine using SSH |
ssh-details |
Show the SSH connection instructions |
Management architecture
Limavel will take care of the virtual machine management, provisioning, and hosts configuration.
βββββββββββββββββ Hosts βββββββββββββββββββ Provision
β β management β β management
β /etc/hosts βββββββββββββββββ Limavel ββββββββββββββββ ββββββββββββββββββββββββ
β β β β β β Guest VM β
βββββββββββββββββ βββββββββββββββββββ β β β
β β β βββββββββββββββββββ β
VM management ββββββΌββΆβ Ansible β β
β βββββΆβ βββββββββββββββββββ β
β β β β
βΌ β β β
βββββββββββββββββββββββββ β β β
β Lima-vm β β β β
β βββββββββββββ ββββββββββββββββββββββββ
β βββββββββββββββββββ β
β β Apple β β
β β Virtualization β β
β β Framework β β
β βββββββββββββββββββ β
βββββββββββββββββββββββββ
FAQ
-
How can I obtain the host ip from any instance? The host
host.lima.internalpoints to the host ip. -
Why sometimes the guest IP changes? The guest ip is assigned by the virtualization framework and it can change, but it's possible to obtain the guest ip running the
limavel statuscommand.