<commit_before>#!/bin/bash -x
# Bootstrap for Fedora, generally made to be compatible with any version to
# keep up with the rapid rate of Fedora releases. We don't bother trying to
# support any version of Fedora older than the current release due to the
# 6 month EOL.
(
# No need for logger with Fedora, cloud-init logs all the user-data output.

# Sometimes Fedora runs user-data before networking is ready, so we should
# make sure the network is ready before starting to try and downlod stuff!
t=300; c=0; r=0; until ping -c 1 www.google.com >/dev/null 2>&1 || ((++c >= t)); do r=$?; echo "Waiting for network... ($r)"; done

yum update --assumeyes
yum install --assumeyes puppet ruby-devel rubygems gcc zlib-devel libxml2-devel patch gnupg

gem install pupistry --no-ri --no-rdoc
mkdir -p /etc/pupistry
mkdir -p <%= puppetcode %>
cat > /etc/pupistry/settings.yaml << "EOF"
general:
  app_cache: ~/.pupistry/cache
  s3_bucket: <%= s3_bucket %>
  s3_prefix: <%= s3_prefix %>
  gpg_disable: <%= gpg_disable %>
  gpg_signing_key: <%= gpg_signing_key %>
agent:
  puppetcode: <%= puppetcode %>
  access_key_id: <%= access_key_id %>
  secret_access_key: <%= secret_access_key %>
  region: <%= region %>
  proxy_uri: <%= proxy_uri %>
  daemon_frequency: <%= daemon_frequency %>
  daemon_minimal: <%= daemon_minimal %><commit_msg>Ruby gems fail to build on Fedora without some symlinks offered by redhat-rpm-config<commit_after>#!/bin/bash -x
# Bootstrap for Fedora, generally made to be compatible with any version to
# keep up with the rapid rate of Fedora releases. We don't bother trying to
# support any version of Fedora older than the current release due to the
# 6 month EOL.
(
# No need for logger with Fedora, cloud-init logs all the user-data output.

# Sometimes Fedora runs user-data before networking is ready, so we should
# make sure the network is ready before starting to try and downlod stuff!
t=300; c=0; r=0; until ping -c 1 www.google.com >/dev/null 2>&1 || ((++c >= t)); do r=$?; echo "Waiting for network... ($r)"; done

yum update --assumeyes
yum install --assumeyes puppet ruby-devel rubygems gcc zlib-devel libxml2-devel patch gnupg redhat-rpm-config

gem install pupistry --no-ri --no-rdoc
mkdir -p /etc/pupistry
mkdir -p <%= puppetcode %>
cat > /etc/pupistry/settings.yaml << "EOF"
general:
  app_cache: ~/.pupistry/cache
  s3_bucket: <%= s3_bucket %>
  s3_prefix: <%= s3_prefix %>
  gpg_disable: <%= gpg_disable %>
  gpg_signing_key: <%= gpg_signing_key %>
agent:
  puppetcode: <%= puppetcode %>
  access_key_id: <%= access_key_id %>
  secret_access_key: <%= secret_access_key %>
  region: <%= region %>
  proxy_uri: <%= proxy_uri %>
  daemon_frequency: <%= daemon_frequency %>
  daemon_minimal: <%= daemon_minimal %>
{'fraction_non_alphanumeric': 0.12459016393442623, 'fraction_numerical': 0.010200364298724954, 'mean_word_length': 4.161654135338346, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '4992299', 'n_tokens_mistral': 1022, 'n_tokens_neox': 898, 'n_words': 321}