<commit_before>Chef-Starter
============

This is PRE-ALPHA! For testing only!
Please fork and help a project, if you can do better makefile scripting, or found something to fix.

Use-case
--------

Primary use-case I had, is to deploy chef-server from my own workstation with minimal fuss.
Also this prolly would be good for initialising new chef repo and setuping workstation too.

Requirements
------------

* This setup requires a proper FQDN. If you're in intranet, set one in /etc/hosts
* You required to have private key in your ~/.ssh/ directory. It will be copied to a chef-server node

* For now you have to have ```sudo``` other options will be added later. Passwordless sudo would be the best. 
  For centos users: Don't forget to comment ```#Default requiretty``` or else Makefile will fail

Configure
---------

Create .makerc
```
cp .makerc.sample .makerc
```
Set your chef-server hostname and username, repo path, and you ready to go.

Launch chef-server and your workstation setup:
```
make install
```

Usage
-----


Run updates: get cookbooks, upload all cookbooks, update envs/roles/nodes
```
make update
```

Destroy everything that's been generated
```
make destroy
```

Check other available commands inside Makefile or just ```make help```

BUG: Knife-configure problems
-----------------------------

There's a problem with .chef/knife.rb after knife configure -i. Knife doesn't add path of many directories so hack is

```
cookbook_path    ["cookbooks", "site-cookbooks"]
node_path        "nodes"
role_path        "roles"
environment_path "environments"
data_bag_path    "data_bags"
#encrypted_data_bag_secret "data_bag_key"

knife[:berkshelf_path] = "cookbooks"

```

Add this stuff to .chef/knife.rb manually, after ```make install``` failed.
Then relaunch ```make install```

<commit_msg>README.md: bullshit correction<commit_after>Chef-Starter
============

This is PRE-ALPHA! For testing only!
Please fork and help a project, if you can do better makefile scripting, or found something to fix.

Use-case
--------

Primary use-case I had, is to deploy chef-server from my own workstation with minimal fuss.
Also this prolly would be good for initialising new chef repo and setuping workstation too.

Requirements
------------

* This setup requires a proper FQDN. If you're in intranet, set one in /etc/hosts
* You required to have private key in your ~/.ssh/ directory. It will be copied to a chef-server node
* SUDO enabled linux. Notice: For cloud users: Don't forget to comment ```#Default requiretty``` or else Makefile will fail

Configure
---------

Create .makerc
```
cp .makerc.sample .makerc
```
Set your chef-server hostname and username, repo path, and you ready to go.


This will setup chef-server and workstation
```
# make server_prepare # if you want copy ssh key 
make install
```

Usage
-----


Run updates: get cookbooks, upload all cookbooks, update envs/roles/nodes
```
make update
```

Destroy everything that's been generated
```
make destroy
```

Check other available commands inside Makefile or just ```make help```

BUG: Knife-configure problems
-----------------------------

If you want to use knife-solo together with knife, you need to append knife-solo generated config to knife.rb
There's a problem with .chef/knife.rb after knife configure -i. Knife by default thinks that everything in */var/chef*
So if you'll decided to use knife-solo after ```make install``` will finish, it will crash, saying there's no roles in */var/chef/role*s.

Add this stuff to .chef/knife.rb manually

```
cookbook_path    ["cookbooks", "site-cookbooks"]
node_path        "nodes"
role_path        "roles"
environment_path "environments"
data_bag_path    "data_bags"
#encrypted_data_bag_secret "data_bag_key"

knife[:berkshelf_path] = "cookbooks"

```
TODO: Find how to force knife configure append configuration, instead of overwriting it.



{'fraction_non_alphanumeric': 0.11837364899639732, 'fraction_numerical': 0.0, 'mean_word_length': 3.6439665471923535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '582693', 'n_tokens_mistral': 1171, 'n_tokens_neox': 1104, 'n_words': 495}