2017-07-14 16:33:05 +02:00
|
|
|
# Vagrant <a id="vagrant"></a>
|
2015-01-20 15:13:33 +01:00
|
|
|
|
2017-09-26 18:52:32 +02:00
|
|
|
This chapter explains how to setup the development environment
|
|
|
|
for Icinga Web 2 inside a Vagrant VM.
|
|
|
|
|
|
|
|
If you are looking for a demo setup, please use the official
|
|
|
|
[Icinga Vagrant boxes](https://github.com/icinga/icinga-vagrant)
|
|
|
|
instead.
|
2016-07-08 16:39:24 +02:00
|
|
|
|
|
|
|
## <a id="vagrant-requirements"></a>Requirements
|
2015-01-20 15:13:33 +01:00
|
|
|
|
2015-01-22 11:06:05 +01:00
|
|
|
* Vagrant >= version 1.5
|
2015-09-18 10:48:21 +02:00
|
|
|
* VirtualBox or Parallels Desktop
|
2015-01-20 15:13:33 +01:00
|
|
|
|
2015-09-18 10:48:21 +02:00
|
|
|
Parallels requires the additional provider plugin
|
|
|
|
[vagrant-paralells](http://parallels.github.io/vagrant-parallels/docs/) to be installed:
|
|
|
|
|
2017-09-26 18:52:32 +02:00
|
|
|
```
|
|
|
|
$ vagrant plugin install vagrant-parallels
|
|
|
|
```
|
2015-09-18 10:48:21 +02:00
|
|
|
|
2016-07-08 16:39:24 +02:00
|
|
|
## <a id="vagrant-general"></a>General
|
2015-01-20 15:13:33 +01:00
|
|
|
|
|
|
|
The Icinga Web 2 project ships with a Vagrant virtual machine that integrates
|
|
|
|
the source code with various services and example data in a controlled
|
2017-09-28 15:36:52 +02:00
|
|
|
environment. This enables developers and users to test
|
2015-01-20 15:13:33 +01:00
|
|
|
MySQL and PostgreSQL backends as well as the LDAP authentication. All you
|
|
|
|
have to do is install Vagrant and run:
|
|
|
|
|
2016-09-01 14:31:39 +02:00
|
|
|
```
|
2015-01-20 15:13:33 +01:00
|
|
|
vagrant up
|
2016-09-01 14:31:39 +02:00
|
|
|
```
|
2015-01-20 15:13:33 +01:00
|
|
|
|
|
|
|
> **Note:** The first boot of the vm takes a fairly long time because
|
|
|
|
> you'll download a plain CentOS base box and Vagrant will automatically
|
|
|
|
> provision the environment on the first go.
|
|
|
|
|
|
|
|
After you should be able to browse [localhost:8080/icingaweb2](http://localhost:8080/icingaweb2).
|
|
|
|
|
2016-07-08 16:39:24 +02:00
|
|
|
## <a id="vagrant-login"></a>Log into Icinga Web 2
|
2015-01-20 15:13:33 +01:00
|
|
|
|
|
|
|
Both LDAP and a MySQL are configured as authentication backend. Please use one of the following login credentials:
|
|
|
|
|
|
|
|
> LDAP:
|
|
|
|
>> **Username**: `jdoe`
|
|
|
|
|
|
|
|
>> **Password**: `password`
|
|
|
|
|
|
|
|
>MySQL:
|
|
|
|
>> **Username**: `icingaadmin`
|
|
|
|
|
|
|
|
>> **Password**: `icinga`
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-08 16:39:24 +02:00
|
|
|
## <a id="vagrant-testing"></a>Testing the Source Code
|
2015-01-20 15:13:33 +01:00
|
|
|
|
|
|
|
All software required to run tests is installed in the virtual machine.
|
|
|
|
In order to run all tests you have to execute the following command:
|
|
|
|
|
2016-09-01 14:31:39 +02:00
|
|
|
```
|
2015-01-20 15:13:33 +01:00
|
|
|
vagrant ssh -c "icingacli test php unit"
|
2016-09-01 14:31:39 +02:00
|
|
|
```
|