<commit_before>#!/bin/bash

rs_kube_install_master() {
  # Download kubernetes and docker
  curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

  sudo tee /etc/apt/sources.list.d/kubernetes.list <<EOF
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF

  sudo apt-get update

  sudo apt-get install -y docker.io
  sudo apt-get install -y kubelet kubeadm kubectl kubernetes-cni

  # Initialize the master
  token=$(sudo kubeadm init --pod-network-cidr 10.244.0.0/16 | tail -n 1)

  # Save the token as a RightScale credential
  rsc --refreshToken="$RS_REFRESH_TOKEN" --host=us-4.rightscale.com cm15 create credentials \
    credential[name]="KUBE_${RS_CLUSTER_NAME}_CLUSTER_TOKEN" \
    credential[value]="$token"

  # Initialize the overlay network
  sudo kubectl apply -f "$RS_ATTACH_DIR/kube_flannel.yml"
}<commit_msg>Add kubernetes dashboard yaml/port code<commit_after>#!/bin/bash

rs_kube_install_master() {
  # Download kubernetes and docker
  curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

  sudo tee /etc/apt/sources.list.d/kubernetes.list <<EOF
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF

  sudo apt-get update

  sudo apt-get install -y docker.io
  sudo apt-get install -y kubelet kubeadm kubectl kubernetes-cni

  # Initialize the master
  token=$(sudo kubeadm init --pod-network-cidr 10.244.0.0/16 | tail -n 1)

  # Save the token as a RightScale credential
  rsc --refreshToken="$RS_REFRESH_TOKEN" --host=us-4.rightscale.com cm15 create credentials \
    credential[name]="KUBE_${RS_CLUSTER_NAME}_CLUSTER_TOKEN" \
    credential[value]="$token"

  # Initialize the overlay network
  sudo kubectl apply -f "$RS_ATTACH_DIR/kube_flannel.yml"
  sudo kubectl apply -f "$RS_ATTACH_DIR/kube_dashboard.yml"

  dashboard_port=$(sudo kubectl get svc -n kube-system | grep '^kubernetes-dashboard ' | awk '{print $4}' | cut -f1 -d/ | cut -f2 -d:)

  rs_cluster_tag "rs_cluster:dashboard_port=$dashboard_port"
}
{'fraction_non_alphanumeric': 0.1195, 'fraction_numerical': 0.0145, 'mean_word_length': 3.9044117647058822, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3281131', 'n_tokens_mistral': 781, 'n_tokens_neox': 719, 'n_words': 172}