<commit_before># Server installation scripts with Chef-solo/Knife-solo/Berkshelf

## Description

* Chef-solo is for installation cookbooks
* Knife-solo is for cookbooks deployment to server
* Berkshelf is for cookbooks dependency management

## Installation
````
$ bundle install
````

## Usage
Add server specification into nodes/{host}.json

**Note** for security reasons all real node specs are kept into separate private repo. Node specification example:

````json
{
  "run_list": [
    "recipe[sudo]",
    "recipe[rbenv::default]",
    "recipe[rbenv::ruby_build]",
    "recipe[nodejs::nodejs_from_binary]",
    "recipe[nginx::source]",
    "recipe[redisio::install]",
    "recipe[redisio::enable]",
    "recipe[postgresql::server]",
    "recipe[postgresql::config_initdb]",
    "recipe[postgresql::config_pgtune]",
    "recipe[site_install]",
    "recipe[diptables]",
    "recipe[ssh-hardening]",
    "recipe[os-hardening]"
  ],
  "user": {
    "name": "app user name",
    "password": "<PASSWORD>",
    "authorized_keys": [
      "list of public keys to be added during site install"
    ]<commit_msg>fix: docs<commit_after># Server installation scripts with Chef-solo/Knife-solo/Berkshelf

## Description

* Chef-solo is for installation cookbooks
* Knife-solo is for cookbooks deployment to server
* Berkshelf is for cookbooks dependency management

## Installation
````
$ bundle install
````

## Usage
Add server specification into nodes/{host}.json

**Note** for security reasons all real node specs are kept into separate private repo. Node specification example:

````json
{
  "run_list": [
    "recipe[sudo]",
    "recipe[rbenv::default]",
    "recipe[rbenv::ruby_build]",
    "recipe[nodejs::nodejs_from_binary]",
    "recipe[nginx::source]",
    "recipe[redisio::install]",
    "recipe[redisio::enable]",
    "recipe[postgresql::server]",
    "recipe[postgresql::config_initdb]",
    "recipe[postgresql::config_pgtune]",
    "recipe[site_install]",
    "recipe[diptables]",
    "recipe[ssh-hardening]",
    "recipe[os-hardening]"
  ],
  "root_user": {
    "name": "sysadmin name",
    "password": "<PASSWORD> <PASSWORD> for sudo operations",
    "authorized_keys": [
      "list of public keys to be added during site install"
    ]
  },
  "user": {
    "name": "app user name",
    "password": "<PASSWORD>",
    "authorized_keys": [
      "list of public keys to be added during site install"
    ]
{'fraction_non_alphanumeric': 0.1474120082815735, 'fraction_numerical': 0.0, 'mean_word_length': 4.333333333333333, 'pattern_counts': {'":': 14, '<': 7, '<?xml version=': 0, '>': 7, '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': '1931840', 'n_tokens_mistral': 810, 'n_tokens_neox': 774, 'n_words': 192}