<commit_before>elasticsearch-license
=====================

Internal Elasticsearch Licensing Plugin

## Command Line tools (Interface with Internal License Server)

**Note:** Initially run `mvn clean compile package` to use the scripts

### bin/key-pair-generator

Generates a 2048-bit RSA public/private key pair to be used for license generation & validation

**Note:** Errors if provided file paths for public/private already exists

**Output** - public/private key in the location provided

**Options:**
`--publicKeyPath` - path to store the public key
`--privateKeyPath` - path to store the private key

**Example Usage:**
```bash
$ bin/key-pair-generator --publicKeyPath ~/.es_temp_license/pub.key --privateKeyPath ~/.es_temp_license/pri.key
```<commit_msg>added setup section to README<commit_after>elasticsearch-license
=====================

Internal Elasticsearch Licensing Plugin

## Command Line tools (Interface with Internal License Server)

### Setup
```bash
# clone elasticsearch if not already cloned; go to elasticsearch project directory
git clone <EMAIL>:elasticsearch/elasticsearch.git
cd elasticsearch

# checkout 1.4 branch
git checkout 1.4

# install elasticsearch 1.4
mvn clean install -DskipTests=true

# clone elasticsearch-license; go to elasticsearch-license project directory
git clone <EMAIL>:elasticsearch/elasticsearch-license.git
cd elasticsearch-license

# TEMPORARY (switch to dev branch)
git checkout dev

# build
mvn clean package

```

### bin/key-pair-generator

Generates a 2048-bit RSA public/private key pair to be used for license generation & validation

**Note:** Errors if provided file paths for public/private already exists

**Output** - public/private key in the location provided

**Options:**
`--publicKeyPath` - path to store the public key
`--privateKeyPath` - path to store the private key

**Example Usage:**
```bash
$ bin/key-pair-generator --publicKeyPath ~/.es_temp_license/pub.key --privateKeyPath ~/.es_temp_license/pri.key
```
{'fraction_non_alphanumeric': 0.11714429361488185, 'fraction_numerical': 0.007038712921065862, 'mean_word_length': 5.085626911314985, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6753454', 'n_tokens_mistral': 560, 'n_tokens_neox': 531, 'n_words': 206}