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

Commit 6971ffd

Browse files
authored
Merge pull request #136 from TheNewNormal/v0.9.6
v0.9.6
2 parents e8a551b + 982fd5b commit 6971ffd

File tree

18 files changed

+110
-163
lines changed

18 files changed

+110
-163
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/k8s/kube.tgz filter=lfs diff=lfs merge=lfs -text
2+
src/k8s/kubectl filter=lfs diff=lfs merge=lfs -text

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ How to install Kube-Solo
2929
- **macOS 10.10.3** Yosemite or later
3030
- Mac 2010 or later for this to work.
3131
- **Note: [Corectl App](https://github.com/TheNewNormal/corectl.app) must be installed, which will serve as `corectld` server daemon control.**
32-
- [iTerm2](https://www.iterm2.com/) is required, if not found the app it will install it by itself.
32+
- [iTerm2](https://www.iterm2.com/) is required, if not found the app will install it by itself.
3333

3434

3535
###Install:
@@ -43,15 +43,15 @@ How to install Kube-Solo
4343
- App will bootstrap `master+worker` Kubernetes cluster on the single VM
4444
- Mac user home folder is automaticly mounted via NFS (it has to work on Mac end of course) to `/Users/my_user`:`/Users/my_user` on each VM boot, check the [PV example](https://github.com/TheNewNormal/kube-solo-osx/blob/master/examples/pv/nfs-pv-mount-on-pod.md) how to use Persistent Volumes.
4545
- macOS `docker` client is installed to `~/kube-solo/bin` and preset in `OS shell` to be used from there, so you can build `docker` images on the VM and use with Kubernetes
46-
- After successful install you can control `kube-solo` VM via `ksolo` cli as well. Cli resides in `~/kube-solo/bin` and `~/bin`folders and has simple commands: `ksolo start|stop|status|ip|ssh`, just add `~/bin` to your pre-set path.
46+
- After successful install you can control `kube-solo` VM via `ksolo` cli as well. Cli resides in `~/kube-solo/bin` and `~/bin`folders and has simple commands: `ksolo start|stop|status|ip|ssh|shell`, just add `~/bin` to your pre-set path.
4747

4848
**The install will do the following:**
4949

5050
* All dependent files/folders will be put under `~/kube-solo` folder in the user's home folder e.g `/Users/someuser/kube-solo`.
5151
* Will download latest CoreOS ISO image (if there is no such one) and run `corectl` to initialise VM
5252
* When you first time do install or `Up` after destroying Kube-Solo setup, k8s binary files (with the version which was available when the App was built) get copied to VM, this allows to speed up Kubernetes setup.
5353
* It will install `docker, helmc, helm, deis and kubectl` clients to `~/kube-solo/bin/`
54-
* [Kubernetes Dashboard](http://kubernetes.io/docs/user-guide/ui/), [DNS](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns) and [Kubedash](https://github.com/kubernetes/kubedash) will be instlled as add-ons
54+
* [Kubernetes Dashboard](http://kubernetes.io/docs/user-guide/ui/) and [DNS](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns) will be instlled as add-ons
5555
* Via assigned static IP (it will be shown in first boot and will survive VM's reboots) you can access any port on CoreOS VM
5656
* Persistent sparse disk (QCow2) `data.img` will be created and mounted to `/data` for these mount binds and other folders:
5757

@@ -89,12 +89,11 @@ Path to `~/kube-solo/bin` where macOS clients and shell scripts are stored
8989
* `ksolo stop` will stop VM
9090
* `ksolo status`will show VM's status
9191
* `ksolo ip` will show VM's IP
92-
* `ksolo ssh` will open VM shell
93-
92+
* `ksolo ssh` will ssh to VM
93+
* `ksolo shell` will open pre-set shell
9494

9595
###Other menu options:
9696
* [Kubernetes Dashboard](http://kubernetes.io/docs/user-guide/ui/) will show nice Kubernetes Dashboard, where you can check Nodes, Pods, Replication, Deployments, Service Controllers, deploy Apps and etc.
97-
* [Kubedash](https://github.com/kubernetes/kubedash) is a performance analytics UI for Kubernetes Clusters
9897
* `Check for App updates` will check for a new app version
9998
* `Updates/Update Kubernetes to the latest version` will update to latest version of Kubernetes.
10099
* `Updates/Change Kubernetes version` will download and install specified Kubernetes version from GitHub.
@@ -117,8 +116,8 @@ KubeDNS is running at http://192.168.64.3:8080/api/v1/proxy/namespaces/kube-syst
117116
kubernetes-dashboard is running at http://192.168.64.3:8080/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
118117
119118
Cluster version:
120-
Client version: v1.3.2
121-
Server version: v1.3.2
119+
Client version: v1.4.0
120+
Server version: v1.4.0
122121
123122
kubectl get nodes:
124123
NAME STATUS AGE

kube-solo-osx.png

-4.01 KB
Loading
884 Bytes
Binary file not shown.

src/Kube-Solo/AppDelegate.m

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -326,22 +326,6 @@ - (IBAction)KubernetesUI:(id)sender {
326326
}
327327
}
328328

329-
- (IBAction)Kubedash:(id)sender {
330-
VMStatus vmStatus = [self.vmManager checkVMStatus];
331-
332-
switch (vmStatus) {
333-
case VMStatusDown:
334-
[self notifyUserWithText:NSLocalizedString(@"VMStateOff", nil)];
335-
break;
336-
337-
case VMStatusUp: {
338-
NSString *vmIP = [NSString stringWithContentsOfURL:[NSURL ks_ipAddressURL] encoding:NSUTF8StringEncoding error:nil];
339-
NSString *url = [NSString stringWithFormat:@"http://%@:8080/api/v1/proxy/namespaces/kube-system/services/kubedash", vmIP];
340-
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:url]];
341-
break;
342-
}
343-
}
344-
}
345329

346330
- (IBAction)quit:(id)sender {
347331
VMStatus vmStatus = [self.vmManager checkVMStatus];

src/Kube-Solo/Base.lproj/MainMenu.xib

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11201" systemVersion="16B2327e" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
4+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
55
</dependencies>
66
<objects>
77
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
@@ -684,12 +684,6 @@
684684
<action selector="KubernetesUI:" target="494" id="5Xc-5r-fwB"/>
685685
</connections>
686686
</menuItem>
687-
<menuItem title="Kubedash" id="bXS-8Q-f6a">
688-
<modifierMask key="keyEquivalentModifierMask"/>
689-
<connections>
690-
<action selector="Kubedash:" target="494" id="21F-qt-gCu"/>
691-
</connections>
692-
</menuItem>
693687
<menuItem isSeparatorItem="YES" id="JNE-kH-7PZ"/>
694688
<menuItem title="Check for App updates" id="Suo-Zv-Vbz">
695689
<modifierMask key="keyEquivalentModifierMask"/>

src/Kube-Solo/Kube-Solo-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
<key>CFBundlePackageType</key>
2020
<string>APPL</string>
2121
<key>CFBundleShortVersionString</key>
22-
<string>0.9.5</string>
22+
<string>0.9.6</string>
2323
<key>CFBundleSignature</key>
2424
<string>????</string>
2525
<key>CFBundleVersion</key>
26-
<string>299</string>
26+
<string>303</string>
2727
<key>LSApplicationCategoryType</key>
2828
<string>public.app-category.utilities</string>
2929
<key>LSMinimumSystemVersion</key>

src/bin/install_deis

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ vm_ip=$(~/bin/corectl q -i k8solo-01)
1313

1414
#
1515
echo " "
16-
echo "If you have installed previous versions of Deis Workflow PaaS, please uninstall it first"
17-
echo "with '$ helmc uninstall workflow-VERSION -n deis' ..."
18-
echo " "
1916
echo "If you want to upgrade already installed version, check out how to do upgrade at https://deis.com/docs/workflow/managing-workflow/upgrading-workflow/ "
2017
echo " "
2118
pause 'Press [Enter] key to continue...'

src/bin/ksolo

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,10 @@ start() {
99
"${app_path}"/up.command
1010
}
1111

12-
13-
stop() {
14-
"${app_path}"/halt.command
15-
}
16-
17-
1812
status() {
1913
echo "$(~/bin/corectl q -a k8solo-01)"
2014
}
2115

22-
2316
ip() {
2417
echo "$(~/bin/corectl q -i k8solo-01)"
2518
}
@@ -28,8 +21,12 @@ ssh() {
2821
~/bin/corectl ssh k8solo-01
2922
}
3023

24+
shell() {
25+
"${app_path}"/os_shell.command
26+
}
27+
3128
usage() {
32-
echo "Usage: ksolo start|stop|status|ip|ssh"
29+
echo "Usage: ksolo start|stop|status|ip|ssh|shell"
3330
}
3431

3532

@@ -49,6 +46,9 @@ case "$1" in
4946
ssh)
5047
ssh
5148
;;
49+
shell)
50+
shell
51+
;;
5252
*)
5353
usage
5454
;;

src/functions.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ rm -rf ~/kube-solo/tmp/*
352352

353353
# downloading latest version of k8s for CoreOS
354354
echo "Downloading Kubernetes $K8S_VERSION"
355-
bins=( kubectl kubelet kube-proxy kube-apiserver kube-scheduler kube-controller-manager )
355+
bins=( kubelet kube-proxy kube-apiserver kube-scheduler kube-controller-manager )
356356
for b in "${bins[@]}"; do
357357
curl -k -L https://storage.googleapis.com/kubernetes-release/release/$K8S_VERSION/bin/linux/amd64/$b > ~/kube-solo/tmp/$b
358358
done
@@ -441,7 +441,7 @@ mv -f kubectl ~/kube-solo/kube
441441
chmod 755 ~/kube-solo/bin/kubectl
442442
#
443443
tar xvf kubernetes.tar.gz --strip=2 kubernetes/server/kubernetes-server-linux-amd64.tar.gz
444-
bins=( kubectl kubelet kube-proxy kube-apiserver kube-scheduler kube-controller-manager )
444+
bins=( kubelet kube-proxy kube-apiserver kube-scheduler kube-controller-manager )
445445
for b in "${bins[@]}"; do
446446
tar xvf kubernetes-server-linux-amd64.tar.gz -C ~/kube-solo/tmp --strip=3 kubernetes/server/bin/$b
447447
done
@@ -472,13 +472,19 @@ vm_ip=$(~/bin/corectl q -i k8solo-01)
472472
# check if file ~/kube-solo/kube/kube.tgz exists
473473
if [ ! -f ~/kube-solo/kube/kube.tgz ]
474474
then
475-
# copy k8s files
476-
cp -f "${res_folder}"/k8s/kubectl ~/kube-solo/kube
477-
chmod +x ~/kube-solo/bin/kubectl
478475
# linux binaries tar file
479476
cp -f "${res_folder}"/k8s/kube.tgz ~/kube-solo/kube
480477
fi
481478

479+
# check if file ~/kube-solo/bin/kubectl exists
480+
if [ ! -f ~/kube-solo/bin/kubectl ]
481+
then
482+
# copy k8s files
483+
cp -f "${res_folder}"/k8s/kubectl ~/kube-solo/bin
484+
chmod +x ~/kube-solo/bin/kubectl
485+
486+
fi
487+
482488
# install k8s files on to VM
483489
echo "Installing Kubernetes files on to VM..."
484490
cd ~/kube-solo/kube
@@ -492,6 +498,16 @@ echo "Done..."
492498

493499

494500
function install_k8s_add_ons() {
501+
502+
# check if file ~/kube-solo/bin/kubectl exists
503+
if [ ! -f ~/kube-solo/bin/kubectl ]
504+
then
505+
# copy k8s files
506+
cp -f "${res_folder}"/k8s/kubectl ~/kube-solo/bin
507+
chmod +x ~/kube-solo/bin/kubectl
508+
509+
fi
510+
495511
echo " "
496512
echo "Creating kube-system namespace ..."
497513
~/kube-solo/bin/kubectl create -f ~/kube-solo/kubernetes/kube-system-ns.yaml > /dev/null 2>&1
@@ -503,12 +519,8 @@ echo "Installing SkyDNS ..."
503519
#
504520
echo " "
505521
echo "Installing Kubernetes Dashboard ..."
506-
~/kube-solo/bin/kubectl create -f ~/kube-solo/kubernetes/dashboard-controller.yaml
507522
~/kube-solo/bin/kubectl create -f ~/kube-solo/kubernetes/dashboard-service.yaml
508-
#
509-
echo " "
510-
echo "Installing Kubedash ..."
511-
~/kube-solo/bin/kubectl create -f ~/kube-solo/kubernetes/kubedash.yaml
523+
~/kube-solo/bin/kubectl create -f ~/kube-solo/kubernetes/dashboard-controller.yaml
512524
#
513525
echo " "
514526
echo "Installing Helm Tiller service ..."
@@ -522,18 +534,6 @@ rm -f ~/kube-solo/kubernetes/skydns-rc.yaml
522534
rm -f ~/kube-solo/kubernetes/skydns-svc.yaml
523535
rm -f ~/kube-solo/kubernetes/dashboard-controller.yaml
524536
rm -f ~/kube-solo/kubernetes/dashboard-service.yaml
525-
rm -f ~/kube-solo/kubernetes/kubedash.yaml
526-
}
527-
528-
529-
function install_k8s_add_ons_kubelet() {
530-
# get App's Resources folder
531-
res_folder=$(cat ~/kube-solo/.env/resouces_path)
532-
#
533-
echo " "
534-
echo "Installing add-ons: SkyDNS, Kubernetes Dashboard and Kubedash ..."
535-
~/bin/corectl scp "${res_folder}"/k8s/add-ons.tgz k8solo-01:/home/core/
536-
~/bin/corectl ssh k8solo-01 'sudo tar xzf /home/core/add-ons.tgz -C /data/kubernetes/manifests'
537537
}
538538

539539

0 commit comments

Comments
 (0)