2014-06-26 00:11:48 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-05-01 16:19:44 +00:00
|
|
|
# Copyright 2014 The Kubernetes Authors All rights reserved.
|
2014-06-06 23:40:48 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2014-07-14 17:50:04 +00:00
|
|
|
## Contains configuration values for interacting with the Vagrant cluster
|
|
|
|
|
2014-12-12 19:08:22 +00:00
|
|
|
# Number of minions in the cluster
|
2015-02-09 17:59:31 +00:00
|
|
|
NUM_MINIONS=${NUM_MINIONS-"1"}
|
2014-12-12 19:08:22 +00:00
|
|
|
export NUM_MINIONS
|
2014-07-14 17:50:04 +00:00
|
|
|
|
2014-12-12 19:08:22 +00:00
|
|
|
# The IP of the master
|
|
|
|
export MASTER_IP="10.245.1.2"
|
2015-04-21 04:44:44 +00:00
|
|
|
export KUBE_MASTER_IP="10.245.1.2"
|
2014-07-14 17:50:04 +00:00
|
|
|
|
2015-02-27 18:17:46 +00:00
|
|
|
export INSTANCE_PREFIX="kubernetes"
|
2014-12-12 19:08:22 +00:00
|
|
|
export MASTER_NAME="${INSTANCE_PREFIX}-master"
|
2014-09-05 16:33:52 +00:00
|
|
|
|
2014-12-12 19:08:22 +00:00
|
|
|
# Map out the IPs, names and container subnets of each minion
|
|
|
|
export MINION_IP_BASE="10.245.1."
|
|
|
|
MINION_CONTAINER_SUBNET_BASE="10.246"
|
2015-02-09 21:58:45 +00:00
|
|
|
MASTER_CONTAINER_NETMASK="255.255.255.0"
|
|
|
|
MASTER_CONTAINER_ADDR="${MINION_CONTAINER_SUBNET_BASE}.0.1"
|
|
|
|
MASTER_CONTAINER_SUBNET="${MINION_CONTAINER_SUBNET_BASE}.0.1/24"
|
2014-12-12 19:08:22 +00:00
|
|
|
CONTAINER_SUBNET="${MINION_CONTAINER_SUBNET_BASE}.0.0/16"
|
2014-10-18 17:23:14 +00:00
|
|
|
for ((i=0; i < NUM_MINIONS; i++)) do
|
2014-12-12 19:08:22 +00:00
|
|
|
MINION_IPS[$i]="${MINION_IP_BASE}$((i+3))"
|
|
|
|
MINION_NAMES[$i]="${INSTANCE_PREFIX}-minion-$((i+1))"
|
2015-02-09 21:58:45 +00:00
|
|
|
MINION_CONTAINER_SUBNETS[$i]="${MINION_CONTAINER_SUBNET_BASE}.$((i+1)).1/24"
|
|
|
|
MINION_CONTAINER_ADDRS[$i]="${MINION_CONTAINER_SUBNET_BASE}.$((i+1)).1"
|
2014-12-12 19:08:22 +00:00
|
|
|
MINION_CONTAINER_NETMASKS[$i]="255.255.255.0"
|
|
|
|
VAGRANT_MINION_NAMES[$i]="minion-$((i+1))"
|
2014-09-03 19:07:12 +00:00
|
|
|
done
|
2014-11-14 04:32:35 +00:00
|
|
|
|
2015-05-24 05:17:55 +00:00
|
|
|
SERVICE_CLUSTER_IP_RANGE=10.247.0.0/16 # formerly PORTAL_NET
|
2014-12-12 19:08:22 +00:00
|
|
|
|
|
|
|
# Since this isn't exposed on the network, default to a simple user/passwd
|
|
|
|
MASTER_USER=vagrant
|
|
|
|
MASTER_PASSWD=vagrant
|
|
|
|
|
2015-02-16 15:54:29 +00:00
|
|
|
# Admission Controllers to invoke prior to persisting objects in cluster
|
2015-05-22 20:46:52 +00:00
|
|
|
ADMISSION_CONTROL=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota
|
2014-12-12 19:08:22 +00:00
|
|
|
|
2014-11-14 07:07:43 +00:00
|
|
|
# Optional: Enable node logging.
|
2015-01-07 23:02:35 +00:00
|
|
|
ENABLE_NODE_LOGGING=false
|
2014-11-14 07:07:43 +00:00
|
|
|
LOGGING_DESTINATION=elasticsearch
|
2014-12-12 19:08:22 +00:00
|
|
|
|
2015-01-07 23:02:35 +00:00
|
|
|
# Optional: When set to true, Elasticsearch and Kibana will be setup as part of the cluster bring up.
|
|
|
|
ENABLE_CLUSTER_LOGGING=false
|
|
|
|
ELASTICSEARCH_LOGGING_REPLICAS=1
|
|
|
|
|
2015-05-30 05:28:26 +00:00
|
|
|
# Optional: Cluster monitoring to setup as part of the cluster bring up:
|
|
|
|
# none - No cluster monitoring setup
|
|
|
|
# influxdb - Heapster, InfluxDB, and Grafana
|
|
|
|
# google - Heapster, Google Cloud Monitoring, and Google Cloud Logging
|
|
|
|
ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
|
2015-03-11 23:34:04 +00:00
|
|
|
|
2014-12-12 19:08:22 +00:00
|
|
|
# Extra options to set on the Docker command line. This is useful for setting
|
2015-06-02 01:19:38 +00:00
|
|
|
# --insecure-registry for local registries, or globally configuring selinux options
|
|
|
|
# TODO Enable selinux when Fedora 21 repositories get an updated docker package
|
|
|
|
# see https://bugzilla.redhat.com/show_bug.cgi?id=1216151
|
|
|
|
#EXTRA_DOCKER_OPTS="-b=cbr0 --selinux-enabled --insecure-registry 10.0.0.0/8"
|
|
|
|
EXTRA_DOCKER_OPTS="-b=cbr0 --insecure-registry 10.0.0.0/8"
|
2014-11-07 04:49:21 +00:00
|
|
|
|
|
|
|
# Optional: Install cluster DNS.
|
|
|
|
ENABLE_CLUSTER_DNS=true
|
2015-01-05 18:09:31 +00:00
|
|
|
DNS_SERVER_IP="10.247.0.10"
|
2015-05-12 06:00:43 +00:00
|
|
|
DNS_DOMAIN="cluster.local"
|
2014-11-07 04:49:21 +00:00
|
|
|
DNS_REPLICAS=1
|
2015-01-30 17:16:24 +00:00
|
|
|
|
|
|
|
# Optional: Enable setting flags for kube-apiserver to turn on behavior in active-dev
|
2015-02-19 15:11:42 +00:00
|
|
|
#RUNTIME_CONFIG=""
|
|
|
|
RUNTIME_CONFIG="api/v1beta3"
|