<commit_before># cookbook-omnibus-gitlab-cookbook

Install GitLab Community Edition or Enterprise Edition omnibus packages from
packages.gitlab.com.

## Supported Platforms

See packages.gitlab.com/gitlab/gitlab-ce.


## Attributes

- `node['omnibus-gitlab']['package']['repo']` defaults to `gitlab/gitlab-ce`. Use `gitlab/gitlab-ee` for GitLab Enterprise Edition
- `node['omnibus-gitlab']['package']['name']` defaults to `gitlab-ce`. Use `gitlab-ee` for GitLab Enterprise Edition

For more available attributes see `attributes/default.rb`.

### Examples

Install GitLab Community Edition `7.11.1~omnibus-1`.

```
{
  "omnibus-gitlab": {
    "package": {
      "version": "7.11.1~omnibus-1"
    },
    "gitlab_rb": {
      "external_url": "http://gitlab.example.com"
    }
  }
}
```

Install GitLab Enterprise Edition `7.11.1~ee.omnibus-1`.

```
{
  "omnibus-gitlab": {
    "package": {
      "repo": "gitlab/gitlab-ee",
      "name": "gitlab-ee",
      "version": "7.11.1~ee.omnibus-1"
    },
    "gitlab_rb": {
      "external_url": "http://gitlab.example.com"
    }
  }
}
```

## Usage

### omnibus-gitlab::default

Installs a GitLab omnibus package, renders `/etc/gitlab/gitlab.rb`, manages SSL
certificates.

### omnibus-gitlab::backup_cron_job

Create/remove a cron job for GitLab backups. Defaults to daily backups at 0:45.

Use 'gitlab.rb' to configure parameters like rotation and cloud uploads.

#### Examples

Disable backups of repositories and uploaded files:

```
{
  "omnibus-gitlab": {
    "backup_cron_job": {
      "skip": [
        "repositories",
        "uploads"
      ]
    }
  }
}
```

Run the backup script with progress messages:

```
{
  "omnibus-gitlab": {
    "backup_cron_job": {
      "silent": false
    }
  }
}
```

## Contributing

1. Fork the repository on GitLab.com
2. Create a named feature branch (i.e. `add-new-recipe`)
3. Write you change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request

## License and Authors

Author:: <NAME> (<EMAIL>)
Author:: <NAME> (<EMAIL>)
<commit_msg>Add basic information to the doc.<commit_after># cookbook-omnibus-gitlab-cookbook

Install GitLab Community Edition or Enterprise Edition omnibus packages from
packages.gitlab.com.

## Supported Platforms

See packages.gitlab.com/gitlab/gitlab-ce.


## Attributes

- `node['omnibus-gitlab']['package']['repo']` defaults to `gitlab/gitlab-ce`. Use `gitlab/gitlab-ee` for GitLab Enterprise Edition
- `node['omnibus-gitlab']['package']['name']` defaults to `gitlab-ce`. Use `gitlab-ee` for GitLab Enterprise Edition

For more available attributes see `attributes/default.rb`.

### Examples

Install GitLab Community Edition `7.11.1~omnibus-1`.

```
{
  "omnibus-gitlab": {
    "package": {
      "version": "7.11.1~omnibus-1"
    },
    "gitlab_rb": {
      "external_url": "http://gitlab.example.com"
    }
  }
}
```

Install GitLab Enterprise Edition `7.11.1~ee.omnibus-1`.

```
{
  "omnibus-gitlab": {
    "package": {
      "repo": "gitlab/gitlab-ee",
      "name": "gitlab-ee",
      "version": "7.11.1~ee.omnibus-1"
    },
    "gitlab_rb": {
      "external_url": "http://gitlab.example.com"
    }
  }
}
```

## Usage

### omnibus-gitlab::default

Installs a GitLab omnibus package, renders `/etc/gitlab/gitlab.rb`, manages SSL
certificates.

### omnibus-gitlab::backup_cron_job

Create/remove a cron job for GitLab backups. Defaults to daily backups at 0:45.

Use 'gitlab.rb' to configure parameters like rotation and cloud uploads.

#### Examples

Disable backups of repositories and uploaded files:

```
{
  "omnibus-gitlab": {
    "backup_cron_job": {
      "skip": [
        "repositories",
        "uploads"
      ]
    }
  }
}
```

Run the backup script with progress messages:

```
{
  "omnibus-gitlab": {
    "backup_cron_job": {
      "silent": false
    }
  }
}
```

## Secrets

Starting with version 0.3.0, this cookbook supports reading secrets from [Chef Vault](https://docs.chef.io/chef_vault.html) or [Encrypted Data Bags](https://docs.chef.io/data_bags.html#encrypt-a-data-bag-item).

### Chef Vault

To get the cookbook to read a Chef Vault item, you need to specify `chef_vault` attribute with the name of the Vault.

Eg. In a role "gitlab-example-com" we can read secrets from Vault named `gitlab-example-com`:

```json
{ "name": "gitlab-example-com",
  "default_attributes": {
    "omnibus-gitlab": {
      "chef_vault": "gitlab-example-com",
      "package": {
        "repo": "gitlab/gitlab-ce",
        "version": "7.14.1-ce.0"
      },
      "gitlab_rb": {
        "external_url": "http://gitlab.example.com"
        "gitlab_rb": {
          "gitlab-rails": {
            "secret_token": "Read from Vault."
          }
        }
      }
    }
  }
}
```

Chef Vault item will look similar to:

```json
{
  "id": "_default",
  "omnibus-gitlab": {
    "gitlab_rb": {
      "gitlab-rails": {
        "secret_token": "12334qwerty"
      }
    }
  }
}

```

### Encrypted Data Bag

To get the cookbook to read an Encrypted Data Bag item, you need to specify `data_bag` attribute with the name of the data bag. As a prerequisite, node needs to have the `encrypted_data_bag_secret` in `/etc/chef/` directory in order to be able to decrypt the secrets.

Eg. In a role "gitlab-example-com" we can read secrets from Encrypted Data Bag named `gitlab-example-com`:

```json
{ "name": "gitlab-example-com",
  "default_attributes": {
    "omnibus-gitlab": {
      "data_bag": "gitlab-example-com",
      "package": {
        "repo": "gitlab/gitlab-ce",
        "version": "7.14.1-ce.0"
      },
      "gitlab_rb": {
        "external_url": "http://gitlab.example.com"
        "gitlab_rb": {
          "gitlab-rails": {
            "secret_token": "Read from Data Bag."
          }
        }
      }
    }
  }
}
```

Encrypted data bag item will look similar to:

```json
{
  "omnibus-gitlab": {
    "gitlab_rb": {
      "gitlab-rails": {
        "secret_token": "12334qwerty"
      }
    }
  }
}

```

## Contributing

1. Fork the repository on GitLab.com
2. Create a named feature branch (i.e. `add-new-recipe`)
3. Write you change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request

## License and Authors

Author:: <NAME> (<EMAIL>)
Author:: <NAME> (<EMAIL>)

{'fraction_non_alphanumeric': 0.15305476416587527, 'fraction_numerical': 0.01282051282051282, 'mean_word_length': 3.0095177664974617, 'pattern_counts': {'":': 69, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '2030709', 'n_tokens_mistral': 2370, 'n_tokens_neox': 2231, 'n_words': 558}