Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
v0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rimusz committed Jul 9, 2015
1 parent 2b04257 commit 12119ac
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/CoreOS k8s Cluster/CoreOS k8s Cluster-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.4.3</string>
<string>0.4.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>129</string>
<string>137</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
1 change: 1 addition & 0 deletions src/coreos-vagrant-install.command
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ln -s /opt/vagrant/bin/vagrant /usr/local/bin/vagrant >/dev/null 2>&1
# copy k8s files
cp "$1"/k8s/kubectl ~/coreos-k8s-cluster/bin
chmod 755 ~/coreos-k8s-cluster/bin/kubectl
cp "$1"/k8s/*.yaml ~/coreos-k8s-cluster/kubernetes
# linux binaries
cp "$1"/k8s/master.tgz ~/coreos-k8s-cluster/control
cp "$1"/k8s/nodes.tgz ~/coreos-k8s-cluster/workers
Expand Down
13 changes: 11 additions & 2 deletions src/first-init.command
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ rm -f fleet.zip
echo " "

# set etcd endpoint
export ETCDCTL_PEERS=http://172.17.15.101:4001
export ETCDCTL_PEERS=http://172.17.15.101:2379
echo "etcd cluster:"
~/coreos-k8s-cluster/bin/etcdctl ls /
echo " "

# set fleetctl tunnel
export FLEETCTL_ENDPOINT=http://172.17.15.101:4001
export FLEETCTL_ENDPOINT=http://172.17.15.101:2379
export FLEETCTL_DRIVER=etcd
export FLEETCTL_STRICT_HOST_KEY_CHECKING=false
echo "fleetctl list-machines:"
Expand Down Expand Up @@ -195,6 +195,15 @@ until ~/coreos-k8s-cluster/bin/kubectl get nodes | grep 172.17.15.103 >/dev/null
# attach label to the nodes
~/coreos-k8s-cluster/bin/kubectl label nodes 172.17.15.102 node=worker1
~/coreos-k8s-cluster/bin/kubectl label nodes 172.17.15.103 node=worker2
#
echo " "
echo "Installing k8s UI ..."
~/coreos-k8s-solo/bin/kubectl create -f ~/coreos-k8s-cluster/kubernetes/kube-ui-rc.yaml
~/coreos-k8s-solo/bin/kubectl create -f ~/coreos-k8s-cluster/kubernetes/kube-ui-svc.yaml
# clean up kubernetes folder
rm -f ~/coreos-k8s-cluster/kubernetes/kube-ui-rc.yaml
rm -f ~/coreos-k8s-cluster/kubernetes/kube-ui-svc.yaml

#
echo " "
echo "kubectl get nodes:"
Expand Down
30 changes: 30 additions & 0 deletions src/k8s/kube-ui-rc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-ui-v1
namespace: kube-system
labels:
k8s-app: kube-ui
version: v1
kubernetes.io/cluster-service: "true"
spec:
replicas: 1
selector:
k8s-app: kube-ui
version: v1
template:
metadata:
labels:
k8s-app: kube-ui
version: v1
kubernetes.io/cluster-service: "true"
spec:
containers:
- name: kube-ui
image: gcr.io/google_containers/kube-ui:v1
resources:
limits:
cpu: 100m
memory: 50Mi
ports:
- containerPort: 8080
15 changes: 15 additions & 0 deletions src/k8s/kube-ui-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: kube-ui
namespace: kube-system
labels:
k8s-app: kube-ui
kubernetes.io/cluster-service: "true"
kubernetes.io/name: "KubeUI"
spec:
selector:
k8s-app: kube-ui
ports:
- port: 80
targetPort: 8080
Binary file modified src/k8s/kubectl
Binary file not shown.
Binary file modified src/k8s/master.tgz
Binary file not shown.
Binary file modified src/k8s/nodes.tgz
Binary file not shown.
4 changes: 2 additions & 2 deletions src/os_shell.command
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ ssh-add ~/.vagrant.d/insecure_private_key >/dev/null 2>&1
export PATH=${HOME}/coreos-k8s-cluster/bin:$PATH

# set etcd endpoint
export ETCDCTL_PEERS=http://172.17.15.101:4001
export ETCDCTL_PEERS=http://172.17.15.101:2379
echo "etcd cluster:"
etcdctl --no-sync ls /
echo ""

# set fleetctl endpoint
export FLEETCTL_ENDPOINT=http://172.17.15.101:4001
export FLEETCTL_ENDPOINT=http://172.17.15.101:2379
export FLEETCTL_DRIVER=etcd
export FLEETCTL_STRICT_HOST_KEY_CHECKING=false
echo "fleetctl list-machines:"
Expand Down
2 changes: 1 addition & 1 deletion src/update.command
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ echo " "
#
echo "Reinstalling updated fleet units to '~/coreos-k8s-cluster/fleet' folder:"
# set fleetctl tunnel
export FLEETCTL_ENDPOINT=http://172.17.15.101:4001
export FLEETCTL_ENDPOINT=http://172.17.15.101:2379
export FLEETCTL_DRIVER=etcd
export FLEETCTL_STRICT_HOST_KEY_CHECKING=false
cd ~/coreos-k8s-cluster/fleet
Expand Down
2 changes: 1 addition & 1 deletion src/update_k8s.command
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ echo "Done with k8snode-02 "
# restart fleet units
echo "Restarting fleet units:"
# set fleetctl tunnel
export FLEETCTL_ENDPOINT=http://172.17.15.101:4001
export FLEETCTL_ENDPOINT=http://172.17.15.101:2379
export FLEETCTL_DRIVER=etcd
export FLEETCTL_STRICT_HOST_KEY_CHECKING=false
cd ~/coreos-k8s-cluster/fleet
Expand Down
4 changes: 2 additions & 2 deletions src/vagrant_reload.command
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ vagrant reload
export PATH=${HOME}/coreos-k8s-cluster/bin:$PATH

# set etcd endpoint
export ETCDCTL_PEERS=http://172.17.15.101:4001
export ETCDCTL_PEERS=http://172.17.15.101:2379
echo "etcd cluster:"
etcdctl --no-sync ls /
echo " "

# set fleetctl endpoint
export FLEETCTL_ENDPOINT=http://172.17.15.101:4001
export FLEETCTL_ENDPOINT=http://172.17.15.101:2379
export FLEETCTL_DRIVER=etcd
export FLEETCTL_STRICT_HOST_KEY_CHECKING=false
echo "fleetctl list-machines:"
Expand Down
31 changes: 29 additions & 2 deletions src/vagrant_up.command
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ res_folder=$(cat ~/coreos-k8s-cluster/.env/resouces_path)
export PATH=${HOME}/coreos-k8s-cluster/bin:$PATH

# set etcd endpoint
export ETCDCTL_PEERS=http://172.17.15.101:4001
export ETCDCTL_PEERS=http://172.17.15.101:2379

# set fleetctl endpoint
export FLEETCTL_ENDPOINT=http://172.17.15.101:4001
export FLEETCTL_ENDPOINT=http://172.17.15.101:2379
export FLEETCTL_DRIVER=etcd
export FLEETCTL_STRICT_HOST_KEY_CHECKING=false
#
Expand All @@ -42,6 +42,8 @@ then
chmod 755 ~/coreos-k8s-cluster/bin/wget
# copy fleet units
cp -Rf "${res_folder}"/fleet/ ~/coreos-k8s-cluster/fleet
# copy k8s UI files
cp -f "${res_folder}"/k8s/*.yaml ~/coreos-k8s-cluster/kubernetes

#
vagrant box update
Expand Down Expand Up @@ -88,7 +90,15 @@ then
# attach label to the nodes
~/coreos-k8s-cluster/bin/kubectl label nodes 172.17.15.102 node=worker1
~/coreos-k8s-cluster/bin/kubectl label nodes 172.17.15.103 node=worker2
#
echo " "
echo "Installing k8s UI ..."
~/coreos-k8s-solo/bin/kubectl create -f ~/coreos-k8s-cluster/kubernetes/kube-ui-rc.yaml
~/coreos-k8s-solo/bin/kubectl create -f ~/coreos-k8s-cluster/kubernetes/kube-ui-svc.yaml
# clean up kubernetes folder
rm -f ~/coreos-k8s-cluster/kubernetes/kube-ui-rc.yaml
rm -f ~/coreos-k8s-cluster/kubernetes/kube-ui-svc.yaml

else
# start control
vagrant up
Expand All @@ -104,17 +114,34 @@ fi

#
echo "etcd cluster:"
spin='-\|/'
i=0
until ~/coreos-k8s-cluster/bin/etcdctl --no-sync ls / | grep 'coreos.com' >/dev/null 2>&1; do i=$(( (i+1) %4 )); printf "\r${spin:$i:1}"; sleep .1; done
etcdctl --no-sync ls /
echo ""
#
echo "fleetctl list-machines:"
spin='-\|/'
i=0
until ~/coreos-k8s-cluster/bin/fleetctl list-machines | grep 'role=kube' >/dev/null 2>&1; do i=$(( (i+1) %4 )); printf "\r${spin:$i:1}"; sleep .1; done
fleetctl list-machines
echo " "
#
echo "fleetctl list-units:"
fleetctl list-units
echo " "
#

echo Waiting for Kubernetes cluster to be ready. This can take a few minutes...
spin='-\|/'
i=0
until ~/coreos-k8s-cluster/bin/kubectl version | grep 'Server Version' >/dev/null 2>&1; do i=$(( (i+1) %4 )); printf "\r${spin:$i:1}"; sleep .1; done
i=0
until ~/coreos-k8s-cluster/bin/kubectl get nodes | grep 172.17.15.102 >/dev/null 2>&1; do i=$(( (i+1) %4 )); printf "\r${spin:$i:1}"; sleep .1; done
i=0
until ~/coreos-k8s-cluster/bin/kubectl get nodes | grep 172.17.15.103 >/dev/null 2>&1; do i=$(( (i+1) %4 )); printf "\r${spin:$i:1}"; sleep .1; done
echo " "
#
echo "kubectl get nodes:"
kubectl get nodes
echo " "
Expand Down

0 comments on commit 12119ac

Please sign in to comment.