From b59441f8c4fcac234926de38f952c7c05e8378cc Mon Sep 17 00:00:00 2001 From: derekwaynecarr Date: Thu, 10 Sep 2015 11:25:57 -0400 Subject: [PATCH] Add Fedora Cockpit to vagrant setup to administer/introspect kubernetes --- cluster/vagrant/provision-master.sh | 13 +++++++++++++ cluster/vagrant/util.sh | 12 ++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/cluster/vagrant/provision-master.sh b/cluster/vagrant/provision-master.sh index d94be740054..2d340f904d9 100755 --- a/cluster/vagrant/provision-master.sh +++ b/cluster/vagrant/provision-master.sh @@ -253,6 +253,19 @@ pushd /kube-install ./kubernetes/saltbase/install.sh "${server_binary_tar##*/}" popd +# Enable Fedora Cockpit on host to support Kubernetes administration +# Access it by going to :9090 and login as vagrant/vagrant +if ! which /usr/libexec/cockpit-ws &>/dev/null; then + + pushd /etc/yum.repos.d + wget https://copr.fedoraproject.org/coprs/sgallagh/cockpit-preview/repo/fedora-21/sgallagh-cockpit-preview-fedora-21.repo + yum install -y cockpit cockpit-kubernetes + popd + + systemctl enable cockpit.socket + systemctl start cockpit.socket +fi + # we will run provision to update code each time we test, so we do not want to do salt installs each time if ! which salt-master &>/dev/null; then diff --git a/cluster/vagrant/util.sh b/cluster/vagrant/util.sh index 10cae2dd2f8..fc8a296482b 100644 --- a/cluster/vagrant/util.sh +++ b/cluster/vagrant/util.sh @@ -260,13 +260,21 @@ function verify-cluster { # ensures KUBECONFIG is set get-kubeconfig-basicauth echo - echo "Kubernetes cluster is running. The master is running at:" + echo "Kubernetes cluster is running." + echo + echo "The master is running at:" echo echo " https://${MASTER_IP}" echo + echo "Administer and visualize its resources using Cockpit:" + echo + echo " https://${MASTER_IP}:9090" + echo + echo "For more information on Cockpit, visit http://cockpit-project.org" + echo echo "The user name and password to use is located in ${KUBECONFIG}" echo - ) + ) } # Instantiate a kubernetes cluster