<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vagrant on Janik von Rotz</title>
    <link>https://janikvonrotz.ch/tags/vagrant/</link>
    <description>Recent content in Vagrant on Janik von Rotz</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Thu, 08 Oct 2015 16:03:44 +0000</lastBuildDate>
    <atom:link href="https://janikvonrotz.ch/tags/vagrant/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Zabbix stack with Vagrant, CoreOS and Docker</title>
      <link>https://janikvonrotz.ch/2015/10/08/zabbix-stack-with-vagrant-coreos-and-docker/</link>
      <pubDate>Thu, 08 Oct 2015 16:03:44 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2015/10/08/zabbix-stack-with-vagrant-coreos-and-docker/</guid>
      <description>&lt;p&gt;This short guide shows you how to set up a virtual Zabbix Network Monitoring Stack with MySQL and CoreOS deployed by Docker.&lt;/p&gt;&#xA;&lt;p&gt;On your host machine make sure that these tools are available.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://www.vagrantup.com/downloads&#34;&gt;Vagrant&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.virtualbox.org/wiki/Downloads&#34;&gt;VirtualBox&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://git-scm.com/downloads&#34;&gt;Git&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;First we are going to setup a virtual machine with Vagrant.&lt;/p&gt;&#xA;&lt;p&gt;Create a project directory and open navigate there with your command line.&#xA;Next clone the CoreOS Vagrant repository.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git clone https://github.com/coreos/coreos-vagrant/&#xA;cd coreos-vagrant&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This repository is preconfigured CoreOS installation.&lt;/p&gt;&#xA;&lt;p&gt;Open up the &lt;code&gt;Vagrant&lt;/code&gt; file and edit the lines as showed below.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;$vm_memory = 2024&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now install and run the virtual machine with Vagrant.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;vagrant up&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If this command finishes without an error, your virtual machine should be up and running in the VirtualBox environment.&lt;/p&gt;&#xA;&lt;p&gt;Now connect to the virtual machine with ssh.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;vagrant ssh&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Hint: For windows hosts, make sure that the ssh.exe binary that is shipped with Git is available in your system PATH variable.&lt;/p&gt;&#xA;&lt;p&gt;CoreOS has Docker pre-installed, so no worry about that. We will now deploy our MySQL and Zabbix stack with preconfigured Docker images.&lt;/p&gt;&#xA;&lt;p&gt;Install and run the MySQL with Docker.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:latest&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install and the phpMyAdmin image.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;docker run -d --name phpmyadmin --link mysql:mysql -p 1234:80 nazarpc/phpmyadmin&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Get the configuration of your MySQL container.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;docker inspect mysql&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And look for the IPv4 address. We will use in the next statement.&lt;/p&gt;&#xA;&lt;p&gt;Run the Zabbix image&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;docker run \&#xA;-d \&#xA;--name zabbix \&#xA;-p 80:80 \&#xA;-p 10051:10051 \&#xA;-link mysql:db \&#xA;--env=&amp;quot;DB_USER=root&amp;quot; \&#xA;--env=&amp;quot;DB_PASS=password&amp;quot; \&#xA;--env=&amp;quot;SLACK_WEBHOOK=webhook_url&amp;quot; \&#xA;million12/zabbix-server&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now open the browser on your host machine to &lt;code&gt;http://host_ip&lt;/code&gt; and login with &lt;code&gt;Admin:zabbix&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;You can get the host machines ip by tipping &lt;code&gt;ifconfig&lt;/code&gt; on command line.&lt;/p&gt;&#xA;&lt;p&gt;You phpMyAdmin installation is accessbile under &lt;code&gt;http://host_ip:1234&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h1 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h1&gt;&#xA;&lt;p&gt;In case some fails are doesn&amp;rsquo;t work as supposed, follow these steps:&lt;/p&gt;&#xA;&lt;p&gt;Reboot your virtual machine.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo reboot&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Login and start the docker containers.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;docker start container_name&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check if the containers have been started successfully.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;docker ps&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;source&#34;&gt;Source&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://hub.docker.com/r/million12/zabbix-server/&#34;&gt;https://hub.docker.com/r/million12/zabbix-server/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vagrant - portable development environment</title>
      <link>https://janikvonrotz.ch/2013/07/02/vagrant-portable-development-environment/</link>
      <pubDate>Tue, 02 Jul 2013 11:54:35 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2013/07/02/vagrant-portable-development-environment/</guid>
      <description>&lt;p&gt;Today almost every coder uses git or another vcs and a related service like github for code hosting.&lt;/p&gt;&#xA;&lt;p&gt;As a front end designer twitters bower is the right tool to manage your libary dependencies.&lt;/p&gt;&#xA;&lt;p&gt;And for the backend developer the npm package manager is always on board.&lt;/p&gt;&#xA;&lt;p&gt;Those tools have changed the way of developing websites and webapplication.&lt;/p&gt;&#xA;&lt;p&gt;They&amp;rsquo;ve increased productivity and the flexibilty for your application.&lt;/p&gt;&#xA;&lt;p&gt;So far, there&amp;rsquo;s only one part lagging behind: It&amp;rsquo;s the development environment.&lt;/p&gt;&#xA;&lt;p&gt;And yes, also for this part exists a solution. I&amp;rsquo;m talking about &lt;!-- raw HTML omitted --&gt;vagrant&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;&#xA;&lt;p&gt;It is the lost child in my development workflow, it&amp;rsquo;s the perfect supplement.&lt;/p&gt;&#xA;&lt;p&gt;With vagrant and vm provider of your choice (virtualbox, vmware or amazon so far) you&amp;rsquo;re abble to setup a portable and reproducible development environment. Vargant installs a virtual machine based on virtual appliance, by default vargant syncs your folder with the virtual machines default directory. With this setup you are able to run your code in virtual machine but still code your stuff as it appeals to you on your local host.&lt;/p&gt;&#xA;&lt;p&gt;Well, that looks interesting, where should I start? For newbies the offical documentation should be fine: &lt;!-- raw HTML omitted --&gt;&lt;a href=&#34;https://docs.vagrantup.com/v2/getting-started/index.html&#34;&gt;https://docs.vagrantup.com/v2/getting-started/index.html&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;&#xA;&lt;p&gt;Follow step by step and you&amp;rsquo;ll run a virtual linux appliance with an apache preinstalled.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
