<commit_before># Lab 4: Create and run a blueprint

The purpose of this lab is to fix a broken blueprint, install it locally and also upload it a Cloudify Manager.

It is assumed that the exercise's files are extracted into `$LAB_ROOT`.

### Step 1: Replace the placeholder

You need to replace **_all_** the occurrences of the placeholders (“`REPLACE_WITH`”) wherever they are located, with the suitable values and to add missing parts as well.

### Step 2: Run in local mode

Once you're done, you can run the application in local mode:

```bash
cd ~/work
cfy local init -p $LAB_ROOT/hello-tomcat/tomcat-blueprint.yaml -i $LAB_ROOT/hello-tomcat/tomcat-local.yaml
cfy local execute -w install
```

Now browse to `http://127.0.0.1:8080/helloworld` (from the vagrant box itself, or `http://192.168.33.10:8080/helloworld` from the host) and then run the following CLI command:

```bash
cfy local outputs
```

To clean up:

```bash
cfy local execute -w uninstall
```

### Step 3: Existing manager
<commit_msg>Fixes<commit_after># Lab 4: Create and run a blueprint

The purpose of this lab is to fix a broken blueprint, install it locally and also upload it a Cloudify Manager.

It is assumed that the exercise's files are extracted into `$LAB_ROOT`. Otherwise, export it:

```bash
export LAB_ROOT=~/cloudify-training-labs/lab4/exercise
```

### Step 1: Replace the placeholder

You need to replace **_all_** the occurrences of the placeholders (“`REPLACE_WITH`”) wherever they are located, with the suitable values and to add missing parts as well.

### Step 2: Run in local mode

Once you're done, you can run the application in local mode:

```bash
cd ~/work
cfy local init -p $LAB_ROOT/hello-tomcat/tomcat-blueprint.yaml -i $LAB_ROOT/hello-tomcat/tomcat-local.yaml
cfy local execute -w install
```

Now browse to `http://127.0.0.1:8080/helloworld` (from the vagrant box itself, or `http://192.168.33.10:8080/helloworld` from the host) and then run the following CLI command:

```bash
cfy local outputs
```

To clean up:

```bash
cfy local execute -w uninstall
```

### Step 3: Existing manager

{'fraction_non_alphanumeric': 0.10267430754536772, 'fraction_numerical': 0.027220630372492838, 'mean_word_length': 4.344387755102041, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '4960105', 'n_tokens_mistral': 712, 'n_tokens_neox': 637, 'n_words': 288}