<commit_before>#!/usr/bin/env bash
#
# (c) Copyright 2015 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

CM_GPG_KEY=${CM_GPG_KEY:-https://archive.cloudera.com/cm5/redhat/6/x86_64/cm/RPM-GPG-KEY-cloudera}
PREBAKED_DIRECTORY=/opt/cloudera/director
PREBAKED_GPG_KEY=${PREBAKED_DIRECTORY}/rhel-key

# Install ntp, curl, nscd, screen, and python
sudo yum -y install ntp curl nscd screen python bc

# Director can avoid downloading the GPG key for the Cloudera repository by using a prebaked key file
sudo mkdir -p "${PREBAKED_DIRECTORY}"
sudo curl "${CM_GPG_KEY}" -o "${PREBAKED_GPG_KEY}"

# Configure the Cloudera Manager repository
echo "Configuring Cloudera Manager repository at $CM_REPOSITORY_URL"
sudo tee /etc/yum.repos.d/cloudera-manager.repo > /dev/null <<REPO<commit_msg>Start rngd as part of instance normalization.<commit_after>#!/usr/bin/env bash
#
# (c) Copyright 2015 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

CM_GPG_KEY=${CM_GPG_KEY:-https://archive.cloudera.com/cm5/redhat/6/x86_64/cm/RPM-GPG-KEY-cloudera}
PREBAKED_DIRECTORY=/opt/cloudera/director
PREBAKED_GPG_KEY=${PREBAKED_DIRECTORY}/rhel-key

# Install ntp, curl, nscd, screen, python, bc, and rng-tools
sudo yum -y install ntp curl nscd screen python bc rng-tools

# Director can avoid downloading the GPG key for the Cloudera repository by using a prebaked key file
sudo mkdir -p "${PREBAKED_DIRECTORY}"
sudo curl "${CM_GPG_KEY}" -o "${PREBAKED_GPG_KEY}"

# Configure the Cloudera Manager repository
echo "Configuring Cloudera Manager repository at $CM_REPOSITORY_URL"
sudo tee /etc/yum.repos.d/cloudera-manager.repo > /dev/null <<REPO
{'fraction_non_alphanumeric': 0.09297912713472485, 'fraction_numerical': 0.01062618595825427, 'mean_word_length': 4.870824053452115, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4889699', 'n_tokens_mistral': 895, 'n_tokens_neox': 857, 'n_words': 304}