<commit_before># Faster Bootstrap with Cloudera Director

There are steps you can take to make the bootstrap of new deployments and clusters faster.

## Preloaded AMI Creation

### Overview

The build-ami.sh script creates AMIs with Cloudera Manager and a CDH parcel installed (preloaded) for use by Cloudera Director. Using such an AMI can cut down significantly on the time for new cluster creation, as software installation and the downloading and distribution* of the parcel can be skipped.

This script, and the support files beneath it, only support CentOS 6, CentOS 7, Red Hat Enterprise Linux 6, and Red Hat Enterprise Linux 7.

To learn how to use a preloaded AMI, consult the [usage document](ami-usage.md).

*Please refer to the [Preloaded AMI Notes](#notes) section for more information about what "parcel distribution" entails.

### Prerequisites

Before running the script, [Packer](https://packer.io/) must be installed. Use version 0.8 or newer. Follow the [installation instructions](https://www.packer.io/intro/getting-started/setup.html). Be careful about the other "packer" tool often installed on Red Hat systems.

This script and other scripts it sources require bash 4 or higher. Mac OS X and macOS remain on bash 3, so be sure to install and use bash 4, using [Homebrew](http://brew.sh/) for example.

### Script arguments

The build-ami.sh script has two required arguments and three optional arguments.

* The region. This is the region that Packer will run on. The resulting AMI will only be available
  on this region.
* The operating system. This guides the selection of AMIs and parcels. If you use the optional `-a`
  option described below to point to a specific AMI, that AMI is expected to have this operating
  system installed.
* (Optional) The AMI name. This is the name of the resulting AMI. The default AMI name includes the
  operating system. The final AMI name has a timestamp concatenated onto the end of it
  automatically.
* (Optional) The CDH parcel URL. This script will download a parcel from this URL to preload and
  possibly pre-extract onto the new AMI. This argument defaults to
  http://archive.cloudera.com/cdh5/parcels/5.11/.
* (Optional) The Cloudera Manager yum repository URL. This script will download and install
  Cloudera Manager from packages at this URL onto the new AMI. This argument defaults to
  http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.11/.

The URLs together determine the version of Cloudera Manager and CDH available on the AMI. Be sure that the version indicated in the parcel URL is not later than the version indicated in the Cloudera Manager URL; that is, Cloudera Manager cannot work with CDH versions newer than itself.
<commit_msg>Updates link to Packer installation<commit_after># Faster Bootstrap with Cloudera Director

There are steps you can take to make the bootstrap of new deployments and clusters faster.

## Preloaded AMI Creation

### Overview

The build-ami.sh script creates AMIs with Cloudera Manager and a CDH parcel installed (preloaded) for use by Cloudera Director. Using such an AMI can cut down significantly on the time for new cluster creation, as software installation and the downloading and distribution* of the parcel can be skipped.

This script, and the support files beneath it, only support CentOS 6, CentOS 7, Red Hat Enterprise Linux 6, and Red Hat Enterprise Linux 7.

To learn how to use a preloaded AMI, consult the [usage document](ami-usage.md).

*Please refer to the [Preloaded AMI Notes](#notes) section for more information about what "parcel distribution" entails.

### Prerequisites

Before running the script, [Packer](https://packer.io/) must be installed. Use version 0.8 or newer. Follow the [installation instructions](https://www.packer.io/intro/getting-started/install.html). Be careful about the other "packer" tool often installed on Red Hat systems.

This script and other scripts it sources require bash 4 or higher. Mac OS X and macOS remain on bash 3, so be sure to install and use bash 4, using [Homebrew](http://brew.sh/) for example.

### Script arguments

The build-ami.sh script has two required arguments and three optional arguments.

* The region. This is the region that Packer will run on. The resulting AMI will only be available
  on this region.
* The operating system. This guides the selection of AMIs and parcels. If you use the optional `-a`
  option described below to point to a specific AMI, that AMI is expected to have this operating
  system installed.
* (Optional) The AMI name. This is the name of the resulting AMI. The default AMI name includes the
  operating system. The final AMI name has a timestamp concatenated onto the end of it
  automatically.
* (Optional) The CDH parcel URL. This script will download a parcel from this URL to preload and
  possibly pre-extract onto the new AMI. This argument defaults to
  http://archive.cloudera.com/cdh5/parcels/5.11/.
* (Optional) The Cloudera Manager yum repository URL. This script will download and install
  Cloudera Manager from packages at this URL onto the new AMI. This argument defaults to
  http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.11/.

The URLs together determine the version of Cloudera Manager and CDH available on the AMI. Be sure that the version indicated in the parcel URL is not later than the version indicated in the Cloudera Manager URL; that is, Cloudera Manager cannot work with CDH versions newer than itself.

{'fraction_non_alphanumeric': 0.05594149908592322, 'fraction_numerical': 0.008043875685557587, 'mean_word_length': 4.225405921680993, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7526816', 'n_tokens_mistral': 1485, 'n_tokens_neox': 1424, 'n_words': 810}