
* 🔥 Removes octopress.js * 🔥 Removes use of root_url var * 🔥 Removes Octopress generator reference from feed * 🔥 Removes delicious support * 🔥 Removes support for Pinboard * 🔥 Removes support for Disqus * 🔥 Removes support for Google Plus * ↩️ Migrate custom after_footer to default template * ↩️ Migrate custom footer to default template * ↩️ Migrate custom header to default template * 🔥 Removes unused template files * 🚀 Places time to read directly in post template * 🚀 Removes unneeded capture from archive_post.html template * 🔥 🚀 Removes unused, but heaving sorting call in component page * 🚀 Merged javascripts into a single file * 🔥 Removes more uses of root_url * 🚀 Removal of unneeded captures from head * 🔥 🚀 Removal of expensive liquid HTML compressor * 🔥 Removes unneeded templates * 🚀 Replaces kramdown with GitHub's CommonMark 🚀 * 💄 Adds Prism code syntax highlighting * ✨ Adds support for redirect in Netlify * ↩️ 🔥 Let Netlify handle all developer doc redirects * ✏️ Fixes typo in redirects file: Netify -> Netlify * 🔥 Removes unused .themes folder * 🔥 Removes unused aside.html template * 🔥 Removes Disqus config leftover * 🔥 Removes rouge highlighter config * 🔥 Removes Octopress 🎉 * 💄 Adjust code block font size and adds soft wraps * 💄 Adds styling for inline code blocks * 💄 Improve styling of note/warning/info boxes + div support * 🔨 Rewrites all note/warning/info boxes
4.6 KiB
title, description, redirect_from
title | description | redirect_from |
---|---|---|
Installation on Vagrant | Instructions to run Home Assistant on a Vagrant VM. | /getting-started/installation-vagrant/ |
A Vagrantfile
is available into virtualization/vagrant
folder for quickly spinning up a Linux virtual machine running Home Assistant. This can be beneficial for those who want to experiment with Home Assistant and/or developers willing to easily test local changes and run test suite against them. In the same virtualization/vagrant
folder there's also a provision.sh
shell script which provides an easy way to interact with the Home Assistant instance running within the Vagrant VM. For Windows, use the batch script provision.bat
.
Install Vagrant
You must have Vagrant and Virtualbox installed on your workstation. Vagrant and Virtualbox support all the main platforms, including Windows, MacOS and Linux.
Limited support is available for Hyper-V on Windows, see below.
Get Home Assistant source code
Download the Home Assistant source code by either downloading the .zip file from GitHub releases page or by using Git
$ git clone https://github.com/home-assistant/home-assistant.git
$ cd home-assistant/virtualization/vagrant
The following instructions will assume you changed your working directory to be home-assistant/virtualization/vagrant
. This is mandatory because Vagrant will look for information about the running VM inside that folder and won't work otherwise
When using Vagrant on Windows, change git's auto.crlf
to input before cloning the Home Assistant repository. With input setting git won't automatically change line endings from Unix LF to Windows CRLF. Shell scripts executed during provision won't work with Windows line endings.
$ git config --global core.autocrlf input
Create the Vagrant VM and start Home Assistant
$ ./provision.sh setup
This will download and start a virtual machine using Virtualbox, which will internally setup the development environment necessary to start Home Assistant. The whole process might take up to 30 minutes to complete, depending on Internet connection speed and workstation resources. After the VM has started successfully, the Home Assistant frontend will be accessible locally from your browser at http://localhost:8123
Stopping Vagrant
To shutdown the Vagrant host:
$ ./provision.sh stop
To start it again:
$ ./provision.sh start
Restarting Home Assistant process to test changes
The root home-assistant
directory on your workstation will be mirrored with /home-assistant
inside the VM. In virtualization/vagrant
there's also a config
folder that you can use to drop configuration files (Check the Configuration section in the docmentation for more information about how to configure Home Assistant).
Any changes made to the local directory on your workstation will be available from the Vagrant host, so to apply your changes to the Home Assistant process, just restart it using the provided provision.sh
wrapper script:
$ ./provision.sh restart
vagrant reload
Run test suite (Tox)
To run tests against the local version of Home Assistant code:
$ ./provision.sh tests
Cleanup
To completely remove the VM
$ ./provision.sh destroy
To completely remove the VM and setup a fresh new environment:
$ ./provision.sh recreate
Windows
On Windows, Vagrant is launched through an elevated PowerShell
. Use the batch script provision.bat
instead of the shell script provision.sh
.
Hyper-V
It is possible to use Hyper-V instead of Virtualbox on Windows, with some limitations.
Samba is used for the virtual machine to access files, for which the Windows credentials are needed when the machine is created. As Hyper-V does not allow for port forwarding, NAT is used by default for the network. Through creating an external network switch in Hyper-V it is possible to access the machine on the network. The IP address is visible on creation, and through the Hyper-V manager.