Merge pull request #10236 from derekwaynecarr/remove_nginx

Remove nginx from vagrant configuration
This commit is contained in:
Maxwell Forbes 2015-06-24 13:21:59 -07:00
commit 244c2f7b90
6 changed files with 15 additions and 21 deletions

View File

@ -9,7 +9,7 @@
{% endif %}
{% endif %}
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce' ] %}
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant' ] %}
/srv/kubernetes/basic_auth.csv:
file.managed:
- source: salt://kube-apiserver/basic_auth.csv

View File

@ -52,7 +52,7 @@
{% set client_ca_file = "" -%}
{% set secure_port = "6443" -%}
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce' ] %}
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant' ] %}
{% set secure_port = "443" -%}
{% set client_ca_file = "--client_ca_file=/srv/kubernetes/ca.crt" -%}
{% endif -%}
@ -71,7 +71,7 @@
{% endif -%}
{% endif -%}
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce' ] %}
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant'] %}
{% set basic_auth_file = "--basic_auth_file=/srv/kubernetes/basic_auth.csv" -%}
{% endif -%}

View File

@ -16,7 +16,7 @@
{% endif -%}
# TODO: remove nginx for other cloud providers.
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce' ] %}
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant' ] %}
{% set api_servers_with_port = api_servers -%}
{% else -%}
{% set api_servers_with_port = api_servers + ":6443" -%}

View File

@ -31,7 +31,7 @@ base:
- kube-controller-manager
- kube-scheduler
- monit
{% if grains['cloud'] is defined and not grains.cloud in [ 'aws', 'gce' ] %}
{% if grains['cloud'] is defined and not grains.cloud in [ 'aws', 'gce', 'vagrant' ] %}
- nginx
{% endif %}
- cadvisor
@ -45,15 +45,7 @@ base:
{% if grains['cloud'] is defined and grains['cloud'] == 'azure' %}
- openvpn
{% endif %}
{% if grains['cloud'] is defined and grains['cloud'] == 'vagrant' %}
- docker
- kubelet
{% endif %}
{% if grains['cloud'] is defined and grains['cloud'] == 'aws' %}
- docker
- kubelet
{% endif %}
{% if grains['cloud'] is defined and grains['cloud'] == 'gce' %}
{% if grains['cloud'] is defined and grains['cloud'] in [ 'vagrant', 'gce', 'aws' ] %}
- docker
- kubelet
{% endif %}

View File

@ -226,12 +226,12 @@ EOF
done
fi
# Configure nginx authorization
mkdir -p /srv/salt-overlay/salt/nginx
if [[ ! -f /srv/salt-overlay/salt/nginx/htpasswd ]]; then
python "${KUBE_ROOT}/third_party/htpasswd/htpasswd.py" \
-b -c "/srv/salt-overlay/salt/nginx/htpasswd" \
"$MASTER_USER" "$MASTER_PASSWD"
readonly BASIC_AUTH_FILE="/srv/salt-overlay/salt/kube-apiserver/basic_auth.csv"
if [ ! -e "${BASIC_AUTH_FILE}" ]; then
mkdir -p /srv/salt-overlay/salt/kube-apiserver
(umask 077;
echo "${MASTER_USER},${MASTER_PASSWD},admin" > "${BASIC_AUTH_FILE}")
fi
echo "Running release install script"

View File

@ -131,6 +131,8 @@ function create-provision-scripts {
echo "SERVICE_CLUSTER_IP_RANGE='${SERVICE_CLUSTER_IP_RANGE}'"
echo "MASTER_USER='${MASTER_USER}'"
echo "MASTER_PASSWD='${MASTER_PASSWD}'"
echo "KUBE_USER='${KUBE_USER}'"
echo "KUBE_PASSWORD='${KUBE_PASSWORD}'"
echo "ENABLE_NODE_MONITORING='${ENABLE_NODE_MONITORING:-false}'"
echo "ENABLE_NODE_LOGGING='${ENABLE_NODE_LOGGING:-false}'"
echo "LOGGING_DESTINATION='${LOGGING_DESTINATION:-}'"
@ -186,7 +188,7 @@ function verify-cluster {
# verify master has all required daemons
echo "Validating master"
local machine="master"
local -a required_daemon=("salt-master" "salt-minion" "nginx" "kubelet")
local -a required_daemon=("salt-master" "salt-minion" "kubelet")
local validated="1"
until [[ "$validated" == "0" ]]; do
validated="0"