summaryrefslogtreecommitdiffstats
path: root/README.md
blob: c7d2d1be57fb9338819d05f36b3fc2be0f086301 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# ibox - an immerda box

This is a vagrant box that represents the basis that all immerda boxes are built on. It is an easy way to get started with what looks like a VM within the immerda network.

## Requirements

* Have [Vagrant](http://vagrantup.com) running
* Install the following plugin

  vagrant plugin install vagrant-hostmanager

* If you want to use the kvm box install the libvirt vagrant (currently not supported!)

  vagrant plugin install vagrant-libvirt

## Setup

* Vagrant with virtualbox support. At the moment we relay on virtualbox support, as it's the easiest way to go with more advanced boxes (multiple nics, disks). But basic kvm support is available as well and you should always be able to run a base box with it.
* Import the stemcell that is used to start as a basis

    # For virtualbox
    vagrant box add 'ibox-stemcell-centos7-virtualbox' 'https://ibox.immerda.ch/stemcells/virtualbox/ibox-centos7-x86_64-virtualbox.box'
    # For kvm/qemu
    vagrant box add 'ibox-stemcell-centos7-qemu' 'https://ibox.immerda.ch/stemcells/qemu/ibox-centos7-x86_64-qemu.box'

* Clone this repository and recursively checkout all the submodules

    git clone https://git.immerda.ch/ibox/ibox_base.git ibox
    cd ibox
    git submodule update --init --recursive

* Enable the default hierdata file for you to tune. The idea is, that you will do all hiera configuration mainly in this file.

   cp manifests/hieradata/vagrant.yaml.sample manifests/hieradata/vagrant.yaml

* Start the box

    # with your default provider
    vagrant up
    # with a different provider
    vagrant up --provider=libvirt
    # or
    vagrant up --provider=virtualbox
    # this will automatically apply the basic configuration (ibox standard)

* Rerun puppet provisioning

    # if you made changes and want to apply them, simply run another provision
    vagrant provision

* You can also ssh into the box and run it from there

    vagrant ssh
    /etc/puppet/ibox/bin/local_apply.sh

* Root password: vagrant
  It will be changed once you run puppet.

## Tuning your deployment

The Vagrant file uses a simple yaml file: `boxes.yaml` to describe the boxes that should be created. You can use it to tweak the various options for a deployment, like an additional node, additional disk, cpu & memory. See `boxes.yaml.sample` for the various options you can tweak.

By default - if boxes.yaml is missing - only one box is started using all the defaults. Meaning (on virtualbox):

* a box called ibox-one
* 1 cpu
* 1G of memory
* one interface
* one additional disk of 10GB