sintonia/docs/_site/vagrant.html

254 lines
11 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<!-- Custom fonts for this template -->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- Plugin CSS -->
<link href="vendor/magnific-popup/magnific-popup.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/creative.min.css" rel="stylesheet">
<style>
header.masthead {
padding-top: 10rem;
padding-bottom: calc(10rem - 56px);
background-image: url("img/header.jpg");
background-position: center center;
background-size: cover;
}
.bg-dark{
padding:2rem 0
}
</style>
<title>LibreTime Radio Automation - Using Vagrant and Virturalbox for developing LibreTime</title>
</head>
<body id="page-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top navbar-shrink" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="index"> LibreTime Radio Automation </a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="quickstart">Install</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="features">Features</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="tour">Tour</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="faq">FAQ</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="advanced-configuration">Docs</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="contribute">Help Us!</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container-lg">
<nav class="content">
<html>
<head>
<style>
section{padding:4rem 0}
</style>
</head>
<body>
<section class="bg-primary">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto text-center">
<h2 class="section-heading text-white"> Using Vagrant and Virturalbox for developing LibreTime </h2>
<hr class="light my-4">
<p class="text-faded mb-4">
The fastest way to get LibreTime up and running in a way to hack on its source code or to test it locally.
</p>
</div>
</div>
</div>
</section>
<blockquote>
<p>Prerequisites: git, <a href="https://vagrantup.com">Vagrant</a>, libvirt or VirturalBox</p>
</blockquote>
<h3 id="virtual-box">Virtual Box</h3>
<p>You will need to install <a href="https://www.virtualbox.org">VirtualBox</a> and may want to consider
installing <a href="https://github.com/dotless-de/vagrant-vbguest">vagrant-vbguest</a> to update the
guest extensions to match your host system on vagrant up.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vagrant plugin <span class="nb">install </span>vagrant-vbguest
</code></pre></div></div>
<h3 id="libvirt">Libvirt</h3>
<p>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.</p>
<p>If you try run a libvirt provided box after using a VirtualBox one, you will receive an
error:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Error while activating network:
Call to virNetworkCreate failed: internal error: Network is already in use by interface vboxnet0.
</code></pre></div></div>
<p>This is fixed by stopping virtualbox and re-creating the vagrant box:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo systemctl stop virtualbox
vagrant destroy ubuntu-xenial
vagrant up ubuntu-xenial --provider=libvirt
</code></pre></div></div>
<h4 id="debian-and-ubuntu">Debian and Ubuntu</h4>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>apt <span class="nb">install </span>vagrant vagrant-libvirt libvirt-daemon-system vagrant-mutate libvirt-dev
<span class="nb">sudo </span>usermod <span class="nt">-a</span> <span class="nt">-G</span> libvirt <span class="nv">$USER</span>
<span class="c"># Reboot</span>
vagrant box add bento/ubuntu-16.04 <span class="nt">--provider</span><span class="o">=</span>virtualbox
vagrant mutate bento/ubuntu-16.04 libvirt
vagrant up ubuntu-xenial <span class="nt">--provider</span><span class="o">=</span>libvirt
</code></pre></div></div>
<h4 id="other-distributions">Other Distributions</h4>
<p>You will need to install <a href="https://libvirt.org/">libvirt</a> and <code class="highlighter-rouge">vagrant-mutate</code> and then run</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vagrant plugin <span class="nb">install </span>vagrant-libvirt
<span class="nb">sudo </span>usermod <span class="nt">-a</span> <span class="nt">-G</span> libvirt <span class="nv">$USER</span>
<span class="c"># Reboot</span>
vagrant plugin <span class="nb">install </span>vagrant-mutate
vagrant box fetch bento/ubuntu-16.04
vagrant mutate bento/ubuntu-16.04 libvirt
vagrant up ubuntu-xenial <span class="nt">--provider</span><span class="o">=</span>libvirt
</code></pre></div></div>
<h2 id="starting-libretime-vagrant">Starting LibreTime Vagrant</h2>
<p>To get started you clone the repo and run <code class="highlighter-rouge">vagrant up</code>. The command accepts a parameter to
change the default provider if you have multiple installed. This can be done by appending
<code class="highlighter-rouge">--provider=virtualbox</code> or <code class="highlighter-rouge">--provider=libvirt</code> as applicable.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/libretime/libretime.git
<span class="nb">cd </span>libretime
vagrant up ubuntu-xenial
</code></pre></div></div>
<p>If everything works out, you will find LibreTime on <a href="http://localhost:8080">port 8080</a>,
icecast on <a href="http://localhost:8000">port 8000</a> and the docs on
<a href="http://localhost:8888">port 8888</a>.</p>
<p>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 <code class="highlighter-rouge">vagrant ssh ubuntu-xenial</code> in the libretime
directory.</p>
<h2 id="alternative-os-installations">Alternative OS installations</h2>
<p>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.</p>
<table>
<thead>
<tr>
<th>OS</th>
<th>Command</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>Debian 10</td>
<td><code class="highlighter-rouge">vagrant up debian-buster</code></td>
<td>Install on Debian Buster.</td>
</tr>
<tr>
<td>Debian 9</td>
<td><code class="highlighter-rouge">vagrant up debian-stretch</code></td>
<td>Install on current Debian Stretch. Needs manual intervention due to Liquidsoap 1.3.3.</td>
</tr>
<tr>
<td>Ubuntu 18.04</td>
<td><code class="highlighter-rouge">vagrant up ubuntu-bionic</code></td>
<td>Install on current Ubuntu Bionic Beaver.</td>
</tr>
<tr>
<td>Ubuntu 16.04</td>
<td><code class="highlighter-rouge">vagrant up ubuntu-xenial</code></td>
<td>Install on Ubuntu Xenial Xerus.</td>
</tr>
<tr>
<td>CentOS</td>
<td><code class="highlighter-rouge">vagrant up centos</code></td>
<td>Extremely experimental install on 7.3 with native systemd support and activated SELinux. Needs manual intervention due to Liquidsoap 1.3.3.</td>
</tr>
</tbody>
</table>
<h2 id="troubleshooting">Troubleshooting</h2>
<p>If anything fails during the initial provisioning step you can try running <code class="highlighter-rouge">vagrant provision</code>
to re-run the installer.</p>
<p>If you only want to re-run parts of the installer, use <code class="highlighter-rouge">--provision-with $step</code>. The
supported steps are <code class="highlighter-rouge">prepare</code>, <code class="highlighter-rouge">install</code>, <code class="highlighter-rouge">install-mkdocs</code> and <code class="highlighter-rouge">start-mkdocs</code>.</p>
</body>
</html>
</nav>
</div>
<footer>
<section class="bg-dark text-white">
<div class="text-footer">
<small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/ned-kelly">ned-kelly</a> and <a href="https://github.com/zklosko">Zachary Klosko</a> &nbsp; | &nbsp;</small>
<small>Code and docs licensed under GPLv2. More details <a href="http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/about-this-manual/">here</a>. </small>
</div>
</section>
</footer>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</body>
</html>