<commit_before># OneOps Packer

[packer.io](https://www.packer.io/) + [OneOps Build](https://github.com/oneops/oneops-build-converter) = OneOps Single Stand Alone Instance


## Requirements

A number of tools the typical development tools are required including

- git
- JDK 8
- Ruby

In addition Packer is needed and details follow below.

### packer.io

This project required [packer.io](https://www.packer.io) therefore it must be
installed on machine that is going to be running this tool.

Packer is easy to use and automates the creation of any type of machine
image. It embraces modern configuration management by encouraging you to use
automated scripts to install and configure the software within your Packer-made
images. Packer brings machine images into the modern age, unlocking untapped
potential and opening new opportunities.

Install following the [official instructions](https://www.packer.io/intro/getting-started/install.html) or
if you're using OS X and [Homebrew](https://brew.sh), you can install Packer by running:

```
$ brew install packer
```

If you're using Windows and [Chocolatey](http://chocolatey.org/), you can install Packer by running:
```
choco install packer
```
## Initial Setup

First clone the repository.

Then init and update the submodule for the oneops-build-converter

```
cd oneops-packer
git submodule update --init oneops-build-converter/
```

Now you should have all the source code in place.

## Building

Simply run:

```
sh build-oneops.sh
```

Yes that's all to it!  If everything works [packer](https://packer.io) will
output a box file that can be imported into Vagrant.

This tool depends on
[OneOps Build](https://github.com/oneops/oneops-build-converter) of which you
can get most up-to-date by running:

```
sh build-oneops.sh -f
```

This will clean up everything and pull the latest
[OneOps Build](https://github.com/oneops/oneops-build-converter) into the
workspace.

```
vagrant box add --name oneops target/*.box
```

This will place the just created box in ~/.vagrant.d/boxes

Vagrantfile you will need looks something like:

```
Vagrant.configure(2) do |config|

 config.vm.box = "oneops"

 # Use the vagrant-cachier plugin, if installed, to cache downloaded packages
  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.scope = :box
  end

  config.vm.network "forwarded_port", guest: 3001, host: 3003
  config.vm.network "forwarded_port", guest: 3000, host: 9090
  config.vm.network "forwarded_port", guest: 8080, host: 9091
  config.vm.network "forwarded_port", guest: 8161, host: 8166

 config.vm.provider "virtualbox" do |vb|
   vb.gui = false
   vb.memory = 6144
   vb.customize ["modifyvm", :id, "--cpuexecutioncap", "70"]
  end
end<commit_msg>Add full name of box and you need the force option to replace an existing box.<commit_after># OneOps Packer

[packer.io](https://www.packer.io/) + [OneOps Build](https://github.com/oneops/oneops-build-converter) = OneOps Single Stand Alone Instance


## Requirements

A number of tools the typical development tools are required including

- git
- JDK 8
- Ruby

In addition Packer is needed and details follow below.

### packer.io

This project required [packer.io](https://www.packer.io) therefore it must be
installed on machine that is going to be running this tool.

Packer is easy to use and automates the creation of any type of machine
image. It embraces modern configuration management by encouraging you to use
automated scripts to install and configure the software within your Packer-made
images. Packer brings machine images into the modern age, unlocking untapped
potential and opening new opportunities.

Install following the [official instructions](https://www.packer.io/intro/getting-started/install.html) or
if you're using OS X and [Homebrew](https://brew.sh), you can install Packer by running:

```
$ brew install packer
```

If you're using Windows and [Chocolatey](http://chocolatey.org/), you can install Packer by running:
```
choco install packer
```
## Initial Setup

First clone the repository.

Then init and update the submodule for the oneops-build-converter

```
cd oneops-packer
git submodule update --init oneops-build-converter/
```

Now you should have all the source code in place.

## Building

Simply run:

```
sh build-oneops.sh
```

Yes that's all to it!  If everything works [packer](https://packer.io) will
output a box file that can be imported into Vagrant.

This tool depends on
[OneOps Build](https://github.com/oneops/oneops-build-converter) of which you
can get most up-to-date by running:

```
sh build-oneops.sh -f
```

This will clean up everything and pull the latest
[OneOps Build](https://github.com/oneops/oneops-build-converter) into the
workspace.

```
vagrant box add -f --name oneops target/oneops-centos73-${version}.box
```

This will place the just created box in ~/.vagrant.d/boxes

Vagrantfile you will need looks something like:

```
Vagrant.configure(2) do |config|

 config.vm.box = "oneops"

 # Use the vagrant-cachier plugin, if installed, to cache downloaded packages
  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.scope = :box
  end

  config.vm.network "forwarded_port", guest: 3001, host: 3003
  config.vm.network "forwarded_port", guest: 3000, host: 9090
  config.vm.network "forwarded_port", guest: 8080, host: 9091
  config.vm.network "forwarded_port", guest: 8161, host: 8166

 config.vm.provider "virtualbox" do |vb|
   vb.gui = false
   vb.memory = 6144
   vb.customize ["modifyvm", :id, "--cpuexecutioncap", "70"]
  end
end
{'fraction_non_alphanumeric': 0.10351668169522092, 'fraction_numerical': 0.01478809738503156, 'mean_word_length': 4.276879162702189, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, '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': '7598764', 'n_tokens_mistral': 1818, 'n_tokens_neox': 1694, 'n_words': 645}