<commit_before>## Introduction

The is a development environment virtual machine for the Islandora and Fedora 4 project. It should work on any operating system that supports VirtualBox and Vagrant.

N.B. This virtual machine **should not** be used in production.

## Requirements

1. [VirtualBox](https://www.virtualbox.org/)
2. [Vagrant](http://www.vagrantup.com/) 1.8.5+
3. [git](https://git-scm.com/)

## Variables

### System Resources

By default the virtual machine that is built uses 2GB of RAM. Your host machine will need to be able to support the additional memory use. You can override the CPU and RAM allocation by creating `ISLANDORA_VAGRANT_CPUS` and `ISLANDORA_VAGRANT_MEMORY` environment variables and setting the values. For example, on an Ubuntu host you could add to `~/.bashrc`:

```bash
export ISLANDORA_VAGRANT_CPUS=4
export ISLANDORA_VAGRANT_MEMORY=4096
```

### Hostname and Description

If you use a DNS or host file management plugin with Vagrant, you may want to set a specific hostname for the virtual machine. You can do that with the `ISLANDORA_VAGRANT_HOSTNAME` variable.  The `ISLANDORA_VAGRANT_VIRTUALBOXDESCRIPTION` variables can be used to track the VM build. For example:

```bash
export ISLANDORA_VAGRANT_HOSTNAME="islandora-deux"
export ISLANDORA_VAGRANT_VIRTUALBOXDESCRIPTION="Islandora CLAW"
```

## Use

VirtualBox:

1. `git clone https://github.com/Islandora-CLAW/CLAW`
2. `cd CLAW`
2. `git submodule update --init --recursive`
3. `cd install`
4. Visit https://github.com/settings/tokens and get an oauth token (check the 'repos' checkbox when making it) and place it [here](https://github.com/dannylamb/CLAW/blob/c3d7c1c74560b8a130ab94f4660b44125a22e457/install/configs/variables#L21)
5. `vagrant up`

DigitalOcean:

1. `git clone https://github.com/Islandora-CLAW/CLAW`
2. `cd CLAW`
3. `git submodule update --init --recursive`
4. `cd install`
5. `vagrant plugin install vagrant-digitalocean`
6. Set the following environment variables:
  * `DIGITALOCEAN_TOKEN` -- Your DigitalOcean API token
  * `DIGITALOCEAN_KEYNAME` -- Your DigitalOcean ssh key name
  * `DIGITALOCEAN_KEYPATH` -- Path to your ssh keys that you've setup with DigitalOcean
7. Visit https://github.com/settings/tokens and get an oauth token (check the 'repos' checkbox when making it) and place it [here](https://github.com/dannylamb/CLAW/blob/c3d7c1c74560b8a130ab94f4660b44125a22e457/install/configs/variables#L21)
8. `vagrant up --provider=digital_ocean`

## Connect

You can connect to the machine via the browser at [http://localhost:8000](http://localhost:8000).

The default Drupal login details are:
  
  * username: admin
  * password: <PASSWORD>

MySQL:
  
  * username: root
  * password: <PASSWORD>

The Fedora 4 REST API can be accessed at [http://localhost:8080/fcrepo/rest](http://localhost:8080/fcrepo/rest).  It currently has authentication disabled.

Tomcat Manager:
  
  * username: islandora
  * password: <PASSWORD>

You can connect to the machine via ssh: `ssh -p 2222 vagrant@localhost`
<commit_msg>Update documentation to reflect repo change (#4)<commit_after>## Introduction

The is a development environment virtual machine for the Islandora and Fedora 4 project. It should work on any operating system that supports VirtualBox and Vagrant.

N.B. This virtual machine **should not** be used in production.

## Requirements

1. [VirtualBox](https://www.virtualbox.org/)
2. [Vagrant](http://www.vagrantup.com/) 1.8.5+
3. [git](https://git-scm.com/)

## Variables

### System Resources

By default the virtual machine that is built uses 2GB of RAM. Your host machine will need to be able to support the additional memory use. You can override the CPU and RAM allocation by creating `ISLANDORA_VAGRANT_CPUS` and `ISLANDORA_VAGRANT_MEMORY` environment variables and setting the values. For example, on an Ubuntu host you could add to `~/.bashrc`:

```bash
export ISLANDORA_VAGRANT_CPUS=4
export ISLANDORA_VAGRANT_MEMORY=4096
```

### Hostname and Description

If you use a DNS or host file management plugin with Vagrant, you may want to set a specific hostname for the virtual machine. You can do that with the `ISLANDORA_VAGRANT_HOSTNAME` variable.  The `ISLANDORA_VAGRANT_VIRTUALBOXDESCRIPTION` variables can be used to track the VM build. For example:

```bash
export ISLANDORA_VAGRANT_HOSTNAME="islandora-deux"
export ISLANDORA_VAGRANT_VIRTUALBOXDESCRIPTION="Islandora CLAW"
```

## Use

VirtualBox:

1. `git clone https://github.com/Islandora-CLAW/claw_vagrant`
2. `cd claw_vagrant`
3. Visit https://github.com/settings/tokens and get an oauth token (check the 'repos' checkbox when making it) and place it [here](https://github.com/Islandora-CLAW/claw_vagrant/blob/master/configs/variables#L21)
4. `vagrant up`

DigitalOcean:

1. `git clone https://github.com/Islandora-CLAW/claw_vagrant`
2. `cd claw_vagrant`
3. `vagrant plugin install vagrant-digitalocean`
4. Set the following environment variables:
  * `DIGITALOCEAN_TOKEN` -- Your DigitalOcean API token
  * `DIGITALOCEAN_KEYNAME` -- Your DigitalOcean ssh key name
  * `DIGITALOCEAN_KEYPATH` -- Path to your ssh keys that you've setup with DigitalOcean
5. Visit https://github.com/settings/tokens and get an oauth token (check the 'repos' checkbox when making it) and place it [here](https://github.com/Islandora-CLAW/claw_vagrant/blob/master/configs/variables#L21)
6. `vagrant up --provider=digital_ocean`

## Connect

You can connect to the machine via the browser at [http://localhost:8000](http://localhost:8000).

The default Drupal login details are:
  
  * username: admin
  * password: <PASSWORD>

MySQL:
  
  * username: root
  * password: <PASSWORD>

The Fedora 4 REST API can be accessed at [http://localhost:8080/fcrepo/rest](http://localhost:8080/fcrepo/rest).  It currently has authentication disabled.

Tomcat Manager:
  
  * username: islandora
  * password: <PASSWORD>

You can connect to the machine via ssh: `ssh -p 2222 vagrant@localhost`

{'fraction_non_alphanumeric': 0.09726188476398455, 'fraction_numerical': 0.02637325718125315, 'mean_word_length': 4.7195004803073966, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 16, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3967720', 'n_tokens_mistral': 2096, 'n_tokens_neox': 1929, 'n_words': 662}