2017-03-10 12:32:45 +01:00
The **LibreTime Vagrant install** is the fastet way to get LibreTime up and running in a way
2019-01-18 11:08:28 +01:00
to hack on its source code or to test it locally. There are two supported providers: libvirt
and VirtualBox.
2017-03-10 12:32:45 +01:00
## Prerequisites
* [Git ](https://git-scm.com/ )
* [Vagrant ](https://vagrantup.com )
2019-01-18 11:08:28 +01:00
### Virtual Box
You will need to install [VirtualBox ](https://www.virtualbox.org ) and may want to consider
installing [vagrant-vbguest ](https://github.com/dotless-de/vagrant-vbguest ) to update the
guest extensions to match your host system on vagrant up.
2017-03-10 12:32:45 +01:00
```bash
vagrant plugin install vagrant-vbguest
```
2019-01-18 11:08:28 +01:00
### Libvirt
Setting the libvirt provider up on (Ubuntu and Debian)[#Ubuntu and Debian] is straight
forward, using the distribution provided packages. While on
(Other Distributions)[#Other Distributions] it can be built from within vagrant.
If you try run a libvirt provided box after using a VirtualBox one, you will receive an
error:
```
Error while activating network:
Call to virNetworkCreate failed: internal error: Network is already in use by interface vboxnet0.
```
This is fixed by stopping virtualbox and re-creating the vagrant box:
```
sudo systemctl stop virtualbox
vagrant destroy ubuntu-xenial
vagrant up ubuntu-xenial --provider=libvirt
```
#### Debian and Ubuntu
```bash
2019-01-18 14:08:12 +01:00
sudo apt install vagrant vagrant-libvirt libvirt-daemon-system vagrant-mutate libvirt-dev
2019-01-18 11:08:28 +01:00
sudo usermod -a -G libvirt $USER
2019-01-18 14:08:12 +01:00
# Reboot
2019-01-18 11:08:28 +01:00
2019-01-22 13:13:30 +01:00
vagrant box add bento/ubuntu-16.04 --provider=virtualbox
2019-01-18 11:08:28 +01:00
vagrant mutate bento/ubuntu-16.04 libvirt
2019-01-22 13:13:30 +01:00
vagrant up ubuntu-xenial --provider=libvirt
2019-01-18 11:08:28 +01:00
```
#### Other Distributions
You will need to install [libvirt ](https://libvirt.org/ ) and `vagrant-mutate` and then run
```bash
vagrant plugin install vagrant-libvirt
sudo usermod -a -G libvirt $USER
2019-01-18 14:08:12 +01:00
# Reboot
2019-01-18 11:08:28 +01:00
vagrant plugin install vagrant-mutate
vagrant box fetch bento/ubuntu-16.04
vagrant mutate bento/ubuntu-16.04 libvirt
2019-01-22 13:13:30 +01:00
vagrant up ubuntu-xenial --provider=libvirt
2019-01-18 11:08:28 +01:00
```
2017-03-10 12:32:45 +01:00
## Starting LibreTime Vagrant
2019-01-18 11:08:28 +01:00
To get started you clone the repo and run `vagrant up` . The command accepts a parameter to
change the default provider if you have multiple installed. This can be done by appending
`--provider=virtualbox` or `--provider=libvirt` as applicable.
2017-03-10 12:32:45 +01:00
```bash
git clone https://github.com/libretime/libretime.git
cd libretime
2018-10-12 19:35:37 +02:00
vagrant up ubuntu-xenial
2017-03-10 12:32:45 +01:00
```
2019-01-18 11:08:28 +01:00
If everything works out, you will find LibreTime on [port 8080 ](http://localhost:8080 ),
icecast on [port 8000 ](http://localhost:8000 ) and the docs on
[port 8888 ](http://localhost:8888 ).
2017-03-10 12:32:45 +01:00
2019-01-18 11:08:28 +01:00
Once you reach the web setup GUI you can click through it using the default values. To
connect to the vagrant machine you can run `vagrant ssh ubuntu-xenial` in the libretime
directory.
2017-03-08 12:39:59 +01:00
## Alternative OS installations
2019-01-18 11:08:28 +01:00
With the above instructions LibreTime is installed on Ubuntu Xenial Xerus. The Vagrant setup
offers the option to choose a different operation system according to you needs.
2017-03-08 12:39:59 +01:00
| OS | Command | Comment |
| ------ | ------------------- | ------- |
2019-01-11 11:30:03 +01:00
| Debian 10 | `vagrant up debian-buster` | Install on Debian Buster. |
2019-01-22 13:13:30 +01:00
| Debian 9.6 | `vagrant up debian-stretch` | Install on current Debian Stretch. |
2018-10-12 19:35:37 +02:00
| Ubuntu 18.04 | `vagrant up ubuntu-bionic` | Experimental install on current Ubuntu Bionic Beaver. |
| Ubuntu 16.04 | `vagrant up ubuntu-xenial` | Install on Ubuntu Xenial Xerus. |
2018-10-06 12:09:08 +02:00
| CentOS | `vagrant up centos` | Extremely experimental install on 7.3 with native systemd support and activated SELinux. Needs manual intervention due to Liquidsoap 1.3.3. |
2017-03-10 12:32:45 +01:00
## Troubleshooting
2019-01-18 11:08:28 +01:00
If anything fails during the initial provisioning step you can try running `vagrant provision`
to rerun the installer.
2017-03-08 12:39:59 +01:00
2019-01-18 11:08:28 +01:00
If you only want to re-run parts of the installer, use `--provision-with install` . The
supported steps are `prepare` , `install` , `install-mkdocs` and `start-mkdocs` .