Minor changes

This commit is contained in:
Fabian Affolter 2016-08-06 22:40:45 +02:00
parent 68b79fe93e
commit b31254c730
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -9,7 +9,7 @@ sharing: true
footer: true
---
A `Vagrantfile` is avalable 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.
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.
<p class='note'>
Vagrant is intended for testing/development only. It is NOT recommended for permanent installations.
@ -21,29 +21,29 @@ You must have [Vagrant](https://www.vagrantup.com/downloads.html) and [Virtualbo
## {% linkable_title Get Home Assistant source code %}
Download the home-assistant source code by either downloading the .zip file from [GitHub releases page](https://github.com/home-assistant/home-assistant/releases), or by using [Git](https://git-scm.com/)
Download the Home Assistant source code by either downloading the .zip file from [GitHub releases page](https://github.com/home-assistant/home-assistant/releases) or by using [Git](https://git-scm.com/)
```bash
git clone https://github.com/home-assistant/home-assistant.git
cd home-assistant/virtualization/vagrant
$ git clone https://github.com/home-assistant/home-assistant.git
$ cd home-assistant/virtualization/vagrant
```
<p class='note'>
The following instructions will assume you changed your working directory to be home-assistant/virtualization/vagrant. This is mandatory because Vagrant will look for informations about the running VM inside that folder and won't work otherwise
The following instructions will assume you changed your working directory to be `home-assistant/virtualization/vagrant`. This is mandatory because Vagrant will look for informations about the running VM inside that folder and won't work otherwise
</p>
<p class='note'>
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.
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.
</p>
```bash
git config --global core.autocrlf input
$ git config --global core.autocrlf input
```
## {% linkable_title Create the Vagrant VM and start Home Assistant %}
```bash
vagrant up
$ vagrant up
```
This will download and start a virtual machine using Virtualbox, which will internally setup the development environment necessary to start Home Assistant process and run test suite as well. After the VM has started succesfully, the Home Assistant frontend will be accessible locally from your browser at [http://localhost:8123](http://localhost:8123)
@ -53,7 +53,7 @@ This will download and start a virtual machine using Virtualbox, which will inte
To shutdown the Vagrant host:
```bash
vagrant halt
$ vagrant halt
```
To start it again, just run `vagrant up`
@ -65,7 +65,7 @@ The root `home-assistant` directory on your workstation will be mirrored with `/
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:
```bash
touch restart ; vagrant provision
$ touch restart ; vagrant provision
```
## {% linkable_title Run test suite (Tox) %}
@ -73,7 +73,7 @@ touch restart ; vagrant provision
To run tests against your changes:
```bash
touch run_tests ; vagrant provision
$ touch run_tests ; vagrant provision
```
## {% linkable_title Cleanup %}
@ -81,7 +81,7 @@ touch run_tests ; vagrant provision
To completely remove the VM:
```bash
rm setup_done ; vagrant destroy -f
$ rm setup_done ; vagrant destroy -f
```
You can now recreate a completely new Vagrant host with `vagrant up`