<commit_before># vagrant-provision-zimbra
[Vagrant](https://www.vagrantup.com/) provisioning script for various [Zimbra](https://www.zimbra.com/) related environments along with examples, notes and hints on getting things up and running.

In order to use these, you'll need to have Vagrant [installed](https://www.vagrantup.com/downloads.html) and [get familiar](https://docs.vagrantup.com/v2/) with how to use it.

## What's here...

* [vsetup-ubuntu.sh](vsetup-ubuntu.sh)

A vagrant provisioning script for ubuntu (known to work with 14.04 LTS):
```
Usage: vsetup-ubuntu.sh <[-b][-d][-r]>
  environment type (choose all desired zimbra related environments):
    -b  == build       ThirdParty FOSS (fpm,gcc,headers,libs,etc.)
    -d  == development Full ZCS builds (ant,java,maven,...)
    -r  == runtime     consul, mariadb, redis, memcached

  Note: runtime uses non-standard ZCS components (instead of
        building the components from ThirdParty)
```

* [Vagrantfile-example](Vagrantfile-example)

Copy this example Vagrantfile to the name 'Vagrantfile' in the location of the VM to be provisioned.  Set the variables as appropriate for your environment:

```
HOSTNAME = "zpc"          # name of VM, convenient to use same name as p4 client
SRCDIR = "/site"          # map source directory into the VM
HOMEDIR = "/home/ppearl"  # map my home into the VM

# provisioning script and args
#   PPATH = "./vsetup-ubuntu.sh"
#   PARGS = ...  # -b == build, -d == dev, -r == runtime
PPATH =
  "https://raw.githubusercontent.com/plobbes/vagrant-provision-zimbra/master/vsetup-ubuntu.sh"
PARGS = ["-d"]
```

Then start up the VM:

```console
$ vagrant up ubuntu/trusty64 --provider virtualbox
```

* [vsetup-ubuntu.custom.sh](vsetup-ubuntu.custom.sh)

An second (example) script that could also be called via the vagrant provisioning process to setup more custom environmental related settings.

In this file there are hints as to how to setup and use a tunnel between the VM and the host/laptop where you are running vagrant from.  With the right environment setup is possible to get p4 and reviewboard to work easily with code that is being shared between your host/laptop and the VM.

```
    # custom tunnel for perforce and reviewboard
    # - connect VM ports to preexisting tunnels on my laptop via:
    #   vagrant ssh -- -R 1066:127.1.1.1:1066 -R 1443:127.1.1.1:1443
    # - where:
    #   - .reviewboardrc has: REVIEWBOARD_URL="https://ztun:1443"
    #   - .p4config has:      P4PORT=ztun:1066
```

## TODO

- [ ] Break out of build environment to
  - environment for third party source builds vs ZCS builds
- [ ] CentOS setup script(s)
- [ ] Provide more info/links on getting started with Vagrant?<commit_msg>- (ThirdParty) build environment is separated from ZCS build environment<commit_after># vagrant-provision-zimbra
[Vagrant](https://www.vagrantup.com/) provisioning script for various [Zimbra](https://www.zimbra.com/) related environments along with examples, notes and hints on getting things up and running.

In order to use these, you'll need to have Vagrant [installed](https://www.vagrantup.com/downloads.html) and [get familiar](https://docs.vagrantup.com/v2/) with how to use it.

## What's here...

* [vsetup-ubuntu.sh](vsetup-ubuntu.sh)

A vagrant provisioning script for ubuntu (known to work with 14.04 LTS):
```
Usage: vsetup-ubuntu.sh <[-b][-d][-r]>
  environment type (choose all desired zimbra related environments):
    -b  == build       ThirdParty FOSS (fpm,gcc,headers,libs,etc.)
    -d  == development Full ZCS builds (ant,java,maven,...)
    -r  == runtime     consul, mariadb, redis, memcached

  Note: runtime uses non-standard ZCS components (instead of
        building the components from ThirdParty)
```

* [Vagrantfile-example](Vagrantfile-example)

Copy this example Vagrantfile to the name 'Vagrantfile' in the location of the VM to be provisioned.  Set the variables as appropriate for your environment:

```
HOSTNAME = "zpc"          # name of VM, convenient to use same name as p4 client
SRCDIR = "/site"          # map source directory into the VM
HOMEDIR = "/home/ppearl"  # map my home into the VM

# provisioning script and args
#   PPATH = "./vsetup-ubuntu.sh"
#   PARGS = ...  # -b == build, -d == dev, -r == runtime
PPATH =
  "https://raw.githubusercontent.com/plobbes/vagrant-provision-zimbra/master/vsetup-ubuntu.sh"
PARGS = ["-d"]
```

Then start up the VM:

```console
$ vagrant up ubuntu/trusty64 --provider virtualbox
```

* [vsetup-ubuntu.custom.sh](vsetup-ubuntu.custom.sh)

An second (example) script that could also be called via the vagrant provisioning process to setup more custom environmental related settings.

In this file there are hints as to how to setup and use a tunnel between the VM and the host/laptop where you are running vagrant from.  With the right environment setup is possible to get p4 and reviewboard to work easily with code that is being shared between your host/laptop and the VM.

```
    # custom tunnel for perforce and reviewboard
    # - connect VM ports to preexisting tunnels on my laptop via:
    #   vagrant ssh -- -R 1066:127.1.1.1:1066 -R 1443:127.1.1.1:1443
    # - where:
    #   - .reviewboardrc has: REVIEWBOARD_URL="https://ztun:1443"
    #   - .p4config has:      P4PORT=ztun:1066
```

## TODO

- [ ] CentOS setup script(s)
- [ ] Provide more info/links on getting started with Vagrant?
{'fraction_non_alphanumeric': 0.10983515465827005, 'fraction_numerical': 0.017410631598444155, 'mean_word_length': 3.560810810810811, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4381309', 'n_tokens_mistral': 1809, 'n_tokens_neox': 1679, 'n_words': 617}