<commit_before>#!/bin/bash

declare -A ROMANA_GATES
declare -A ROMANA_ROUTES

is_master () {
	[[ $INSTANCE_ID == $MASTER_ID ]] && return 0 || return 1
	
}

get_romana_binaries () {
	for bin in root ipam agent tenant topology tenant; do 
		s3_prefix=://s3-us-west-1.amazonaws.com
		s3_bucket=romana-binaries
		wget "$s3_prefix/$s3_bucket/core/latest/origin/$CORE_BRANCH/$bin -O /bin/$bin
		chmod +x /bin/$bin
	done
}

configure_romana () {
	echo "In configure_romana"

	if is_master; then
		test -f /home/ubuntu/romana.conf || cp /home/ubuntu/romana/k8s/romana.conf.example /home/ubuntu/romana.conf
		sed -i "s/__MASTER_IP__/$MASTER_IP/g" /home/ubuntu/romana.conf
		if ! test -f /tmp/romana_mysql.done; then
			mysql -u root -psecrete  < /home/ubuntu/romana/k8s/romana.sqldump
			touch /tmp/romana_mysql.done
		fi
		cp /home/ubuntu/romana/k8s/romana.rc /root/romana.rc
	else
		cp /home/ubuntu/romana/k8s/romana.agent.rc /root/romana.rc
	fi

	sysctl net.ipv4.conf.all.proxy_arp=1<commit_msg>Misspel fix<commit_after>#!/bin/bash

declare -A ROMANA_GATES
declare -A ROMANA_ROUTES

is_master () {
	[[ $INSTANCE_ID == $MASTER_ID ]] && return 0 || return 1
	
}

get_romana_binaries () {
	for bin in root ipam agent tenant topology tenant; do 
		s3_prefix="https://s3-us-west-1.amazonaws.com"
		s3_bucket=romana-binaries
		wget "$s3_prefix/$s3_bucket/core/latest/origin/$CORE_BRANCH/$bin -O /bin/$bin"
		chmod +x /bin/$bin
	done
}

configure_romana () {
	echo "In configure_romana"

	if is_master; then
		test -f /home/ubuntu/romana.conf || cp /home/ubuntu/romana/k8s/romana.conf.example /home/ubuntu/romana.conf
		sed -i "s/__MASTER_IP__/$MASTER_IP/g" /home/ubuntu/romana.conf
		if ! test -f /tmp/romana_mysql.done; then
			mysql -u root -psecrete  < /home/ubuntu/romana/k8s/romana.sqldump
			touch /tmp/romana_mysql.done
		fi
		cp /home/ubuntu/romana/k8s/romana.rc /root/romana.rc
	else
		cp /home/ubuntu/romana/k8s/romana.agent.rc /root/romana.rc
	fi

	sysctl net.ipv4.conf.all.proxy_arp=1
{'fraction_non_alphanumeric': 0.13961693548387097, 'fraction_numerical': 0.014112903225806451, 'mean_word_length': 3.5113636363636362, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2828117', 'n_tokens_mistral': 914, 'n_tokens_neox': 833, 'n_words': 150}