<commit_before># Bootstrapping 101

**WIP**

## Environment Setup

The process to setup an environment involves laying down a basic AWS networking fabric and then creating a Kubernetes cluster in that networking environment. Pib works by reacting to changes in a GitHub repository so the first step before we do anything is to setup Git and GitHub.

1. Create a new directory your local machine: `mkdir ~/pib/environments`.

2. Change into the environment directory: `cd ~/pib/environments`.

3. Initialize a new Git repository: `git init`.

4. Create a new GitHub project to host the Git repository.

5. Create a new branch in the Git repository named `env/dev`: `git checkout -b env/dev`. Pib seperates environments by using Git branches to maintain state information. 

6. Add the GitHub remote to the environments Git repository: `git remote add origin <EMAIL>:${YOUR_ORGANIZATION_OR_USERNAME}/${REPO_NAME}.git`. Update the `${...}` segments with the correct information, for example: `<EMAIL>:datawire/environments.git`

7. Create a new a directory to store Terraform configuration: `mkdir terraform`

8. Change into the terraform directory: `cd terraform/`

9. Create a new Terraform template for the environment: `touch main.tf`

10. Edit the `main.tf` file and add the following information and save afterward:

```hcl
module "environment" {
  source = "github.com/datawire/building-blocks//environment/aws"
  name   = "dev"
}
```
11. Setup a new Travis-CI account.

12. Configure Travis-CI to track the repository on GitHub.

13. Create a `.travis.yml` with the following configuration.

```yaml
TBD
```

14. Acquire AWS IAM credentials that have superuser capabilities. These permissions will be needed for bootstrapping the environment and then deployment Kubernetes.

**NEED FLESHING OUT BEYOND THIS POINT**

15. Configure Travis with AWS access and secret key

16. Push environment to Travis

17. Generate Terraform configuration for a Kubernetes cluster using Kops
<commit_msg>Update bootstrap101.md<commit_after># Bootstrapping 101

**WIP**

## Environment Setup

The process to setup an environment involves laying down a basic AWS networking fabric and then creating a Kubernetes cluster in that networking environment. Pib works by reacting to changes in a GitHub repository so the first step before we do anything is to setup Git and GitHub.

1. Create a new directory your local machine: `mkdir ~/pib/environments`.

2. Change into the environment directory: `cd ~/pib/environments`.

3. Initialize a new Git repository: `git init`.

4. Create a new GitHub project to host the Git repository.

5. Create a new branch in the Git repository named `env/dev`: `git checkout -b env/dev`. Pib seperates environments by using Git branches to maintain state information. 

6. Add the GitHub remote to the environments Git repository: `git remote add origin <EMAIL>:${YOUR_ORGANIZATION_OR_USERNAME}/${REPO_NAME}.git`. Update the `${...}` segments with the correct information, for example: `<EMAIL>:datawire/environments.git`

7. Create a new a directory to store Terraform configuration: `mkdir terraform`

8. Change into the terraform directory: `cd terraform/`

9. Create a new Terraform template for the environment: `touch main.tf`

10. Edit the `main.tf` file and add the following information and save afterward:

```hcl
module "environment" {
  source = "github.com/datawire/building-blocks//environment/aws"
  name   = "dev"
}
```
11. Setup a new Travis-CI account.

12. Configure Travis-CI to track the repository on GitHub.

13. Create a `.travis.yml` with the following configuration.

```yaml
dist: trusty
language: generic
sudo: false

cache:
  pip: true
  directories:
  - "${HOME}/bin"

before_install:
- export PATH=$PATH:$HOME/bin
- bin/setup.sh

before_script:
- bin/init.sh

script:
- bin/run.sh

after_success:
- bin/after_success.sh
```

14. Acquire AWS IAM credentials that have superuser capabilities. These permissions will be needed for bootstrapping the environment and then deployment Kubernetes.

**NEED FLESHING OUT BEYOND THIS POINT**

15. Configure Travis with AWS access and secret key

16. Push environment to Travis

17. Generate Terraform configuration for a Kubernetes cluster using Kops

{'fraction_non_alphanumeric': 0.07884796978281397, 'fraction_numerical': 0.01392823418319169, 'mean_word_length': 4.376903553299492, 'pattern_counts': {'":': 0, '<': 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': '877743', 'n_tokens_mistral': 1233, 'n_tokens_neox': 1160, 'n_words': 561}