Skip to content

Commit

Permalink
Add node monitoring and logging facilities to libvirt-coreos
Browse files Browse the repository at this point in the history
Deploy cadvisor and fluentd on each minion.
  • Loading branch information
L3n41c committed Mar 2, 2015
1 parent 9077c23 commit a25f2ad
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cluster/libvirt-coreos/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ done
MINION_CONTAINER_SUBNETS[$NUM_MINIONS]=$MASTER_CONTAINER_SUBNET

PORTAL_NET=10.11.0.0/16

# Optional: Install node monitoring.
ENABLE_NODE_MONITORING=true

# Optional: Enable node logging.
ENABLE_NODE_LOGGING=false
LOGGING_DESTINATION=elasticsearch
3 changes: 2 additions & 1 deletion cluster/libvirt-coreos/user_data_minion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ coreos:
ExecStart=/opt/kubernetes/bin/kubelet \
--address=0.0.0.0 \
--hostname_override=${MINION_IPS[$i]} \
--etcd_servers=http://127.0.0.1:4001
--etcd_servers=http://127.0.0.1:4001 \
--config=/opt/kubernetes/manifests
Restart=always
RestartSec=2
Expand Down
13 changes: 13 additions & 0 deletions cluster/libvirt-coreos/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ function initialize-pool {

mkdir -p "$POOL_PATH/kubernetes"
kube-push

mkdir -p "$POOL_PATH/kubernetes/manifests"
if [[ "$ENABLE_NODE_MONITORING" == "true" ]]; then
cp "$KUBE_ROOT/cluster/saltbase/salt/cadvisor/cadvisor.manifest" "$POOL_PATH/kubernetes/manifests"
fi
if [[ "$ENABLE_NODE_LOGGING" == "true" ]]; then
if [[ "$LOGGING_DESTINATION" == "elasticsearch" ]]; then
cp "$KUBE_ROOT/cluster/saltbase/salt/fluentd-es/fluentd-es.manifest" "$POOL_PATH/kubernetes/manifests"
elif [[ "$LOGGING_DESTINATION" == "gcp" ]]; then
cp "$KUBE_ROOT/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.manifest" "$POOL_PATH/kubernetes/manifests"
fi
fi

virsh pool-refresh $POOL
}

Expand Down

0 comments on commit a25f2ad

Please sign in to comment.