Skip to content

Commit

Permalink
Use kubeadm to deploy kubemark master, add workload-controller and co…
Browse files Browse the repository at this point in the history
…redns. (CentaurusInfra#211)

* Use kubeadm to setup kubemark master and register master name for perf tests

* Add workload-controller to AWS kube-up, kubemark deployments

* Fix version script and update docs

* Fix the check for null pre-existing KubernetesCluster DHCP option set

Co-authored-by: Xiaoning Ding <[email protected]>
  • Loading branch information
vinaykul and Xiaoning Ding authored Apr 22, 2020
1 parent aa383d3 commit e30717c
Show file tree
Hide file tree
Showing 12 changed files with 876 additions and 1,150 deletions.
10 changes: 4 additions & 6 deletions aws_build_version
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ unset KUBE_GIT_COMMIT

kube::version::get_version_vars

KUBE_GIT_MAJOR=${KUBE_GIT_MAJOR:-1}
KUBE_GIT_MINOR=${KUBE_GIT_MINOR:-15}
if [[ -z "${KUBE_GIT_VERSION}" ]]; then
short_commit=${KUBE_GIT_COMMIT:0:8}
KUBE_GIT_VERSION="v${KUBE_GIT_MAJOR}.${KUBE_GIT_MINOR}.0-${short_commit}"
fi
KUBE_GIT_MAJOR="1"
KUBE_GIT_MINOR="15"
short_commit=${KUBE_GIT_COMMIT:0:8}
KUBE_GIT_VERSION="v${KUBE_GIT_MAJOR}.${KUBE_GIT_MINOR}.0-${short_commit}"

export KUBE_GIT_MAJOR
export KUBE_GIT_MINOR
Expand Down
8 changes: 6 additions & 2 deletions cluster/aws/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ MASTER_ROOT_DISK_SIZE=${MASTER_ROOT_DISK_SIZE:-40}
# The minions root EBS volume size (used to house Docker images)
NODE_ROOT_DISK_TYPE="${NODE_ROOT_DISK_TYPE:-gp2}"
NODE_ROOT_DISK_SIZE=${NODE_ROOT_DISK_SIZE:-32}
KUBE_CREATE_NODES="${KUBE_CREATE_NODES:-true}"

MASTER_NAME="${INSTANCE_PREFIX}-master"
MASTER_TAG="${INSTANCE_PREFIX}-master"
Expand All @@ -91,10 +92,12 @@ CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.244.0.0/16}"
MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}"
SSH_CIDR="${SSH_CIDR:-0.0.0.0/0}" # IP to restrict ssh access to nodes/master
HTTP_API_CIDR="${HTTP_API_CIDR:-0.0.0.0/0}" # IP to restrict HTTP API access
API_BIND_PORT=${KUBE_API_BIND_PORT:-6443}
# If set to an Elastic IP address, the master instance will be associated with this IP.
# Otherwise a new Elastic IP will be acquired
# (We used to accept 'auto' to mean 'allocate elastic ip', but that is now the default)
MASTER_RESERVED_IP="${MASTER_RESERVED_IP:-}"
REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-true}

# Runtime config
RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"
Expand Down Expand Up @@ -129,7 +132,8 @@ ENABLE_DNS_HORIZONTAL_AUTOSCALER="${KUBE_ENABLE_DNS_HORIZONTAL_AUTOSCALER:-false
ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}"

# Optional: Create autoscaler for cluster's nodes.
ENABLE_CLUSTER_AUTOSCALER="${KUBE_ENABLE_CLUSTER_AUTOSCALER:-false}"
ENABLE_CLUSTER_AUTOSCALER="${KUBE_ENABLE_CLUSTER_AUTOSCALER:-true}"
AUTOSCALER_MIG_CONFIG=""
if [[ "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
# TODO: actually configure ASG or similar
AUTOSCALER_MIN_NODES="${KUBE_AUTOSCALER_MIN_NODES:-1}"
Expand All @@ -154,7 +158,7 @@ COREOS_CHANNEL="${COREOS_CHANNEL:-alpha}"
CONTAINER_RUNTIME="${KUBE_CONTAINER_RUNTIME:-docker}"
RKT_VERSION="${KUBE_RKT_VERSION:-1.14.0}"

NETWORK_PROVIDER="${NETWORK_PROVIDER:-kubenet}" # kubenet, opencontrail, flannel
NETWORK_PROVIDER="${NETWORK_PROVIDER:-flannel}" # kubenet, opencontrail, flannel

# OpenContrail networking plugin specific settings
OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}"
Expand Down
6 changes: 5 additions & 1 deletion cluster/aws/config-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ MASTER_ROOT_DISK_SIZE=${MASTER_ROOT_DISK_SIZE:-40}
# The minions root EBS volume size (used to house Docker images)
NODE_ROOT_DISK_TYPE="${NODE_ROOT_DISK_TYPE:-gp2}"
NODE_ROOT_DISK_SIZE=${NODE_ROOT_DISK_SIZE:-32}
KUBE_CREATE_NODES="${KUBE_CREATE_NODES:-true}"

MASTER_NAME="${INSTANCE_PREFIX}-master"
AGGREGATOR_MASTER_NAME="${INSTANCE_PREFIX}-aggregator"
MASTER_TAG="${INSTANCE_PREFIX}-master"
NODE_TAG="${INSTANCE_PREFIX}-minion"
NODE_SCOPES=""
Expand All @@ -78,10 +80,12 @@ CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.245.0.0/16}"
MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}"
SSH_CIDR="${SSH_CIDR:-0.0.0.0/0}" # IP to restrict ssh access to nodes/master
HTTP_API_CIDR="${HTTP_API_CIDR:-0.0.0.0/0}" # IP to restrict HTTP API access
API_BIND_PORT=${KUBE_API_BIND_PORT:-6443}
# If set to an Elastic IP address, the master instance will be associated with this IP.
# Otherwise a new Elastic IP will be acquired
# (We used to accept 'auto' to mean 'allocate elastic ip', but that is now the default)
MASTER_RESERVED_IP="${MASTER_RESERVED_IP:-}"
REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-true}
RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"

# Optional: Cluster monitoring to setup as part of the cluster bring up:
Expand Down Expand Up @@ -139,7 +143,7 @@ COREOS_CHANNEL="${COREOS_CHANNEL:-alpha}"
CONTAINER_RUNTIME="${KUBE_CONTAINER_RUNTIME:-docker}"
RKT_VERSION="${KUBE_RKT_VERSION:-1.14.0}"

NETWORK_PROVIDER="${NETWORK_PROVIDER:-flannel}" # flannel
NETWORK_PROVIDER="${NETWORK_PROVIDER:-kubenet}" # kubenet

# Optional: if set to true, kube-up will configure the cluster to run e2e tests.
E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false}
Loading

0 comments on commit e30717c

Please sign in to comment.