Skip to content

Commit

Permalink
closes #19 #26 #24 #21 #25 #22 (#29)
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Cox <[email protected]>  woot!
  • Loading branch information
joshuacox authored Apr 23, 2018
1 parent d6835d8 commit c870db4
Show file tree
Hide file tree
Showing 18 changed files with 1,074 additions and 59 deletions.
35 changes: 29 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ matrix:
- MINIKUBE_DRIVER=none
- HELM_INSTALL_DIR=$HOME/.local/bin
- NVM_DIR="$HOME/.nvm"
- CHANGE_MINIKUBE_NONE_USER=true
- MINIKUBE_VERSION=v0.25.2
- KUBE_VERSION=v1.9.4

language: node_js
node_js:
Expand All @@ -40,35 +43,55 @@ addons:

before_install:
# install nsenter which is required for port forwarding

before_script:
# Download kubectl, which is a requirement for using minikube.
# Download minikube.
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBE_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
- sudo minikube start --vm-driver=none --kubernetes-version=$KUBE_VERSION
# Fix the kubectl context, as it's often stale.
- minikube update-context
# Wait for Kubernetes to be up and ready.
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done

script:
- npm i -g yaml2json
- ln -s $(pwd) /home/travis/.kubash
- make bats
- make ct

script:
- ls -alh /home/travis
- ls -alh /home/travis/.kubash
- ls -alh /home/travis/.kubash/bin
- if [[ ! -e "$HOME/.local/bin/nsenter" ]]; then .ci/ubuntu-compile-nsenter.sh && sudo cp .tmp/util-linux-2.30.2/nsenter $HOME/.local/bin; fi
- curl -sL --silent https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get|bash
- bash scripts/dotfiles
- bash scripts/chkdirs
- sudo chown -R $USER /usr/local
- sudo mkdir -p /etc/kubernetes
- sudo chown -R $USER /etc/kubernetes
- sudo chown $USER /var/lib
- /bin/bash -l -c "/usr/bin/time -v make -e ci"
- env
- pwd
- mkdir -p clusters/default
- cp $HOME/.kube/config clusters/default/
- /bin/bash -l -c "kubash tiller"
- /bin/bash -l -c "kubash openebs"
- /bin/bash -l -c "w8s/generic.w8 openebs-provisioner default"
- sleep 5
- bats .ci/.tests.bats
- /bin/bash -l -c "kubash demo"
#- /bin/bash -l -c "kubash demo"
# too much memory usage so we will end it there and destroy the VM
# as the next though successful take too long
#- /bin/bash -l -c "kubash demo"
#- /bin/bash -l -c "w8s/generic.w8 percona default"
#- /bin/bash -l -c "w8s/generic.w8 pgset-0 default"
#- /bin/bash -l -c "w8s/generic.w8 rabbitmq-0 default"
#- sudo chown -R $USER /usr/local
#- sudo ls -lh /usr/bin
#- sudo chown -R $USER /lib/systemd/system
#- sudo chown $USER /usr/bin
#- sudo mkdir -p /etc/kubernetes
#- sudo chown $USER /etc
#- sudo chown -R $USER /etc/kubernetes
#- sudo mkdir /etc/system.d
#- sudo chown -R $USER /etc/system.d
#- /bin/bash -l -c "w8s/generic.w8 mongo-0 default"
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $(eval MONITORING_NAMESPACE := monitoring)
$(eval MINIKUBE_CPU := 2)
$(eval MINIKUBE_MEMORY := 3333)
$(eval MINIKUBE_DRIVER := virtualbox)
$(eval MY_KUBE_VERSION := v1.8.0)
$(eval MY_KUBE_VERSION := v1.9.4)
$(eval CHANGE_MINIKUBE_NONE_USER := true)
$(eval KUBECONFIG := $(HOME)/.kube/config)
$(eval MINIKUBE_WANTREPORTERRORPROMPT := false)
Expand Down Expand Up @@ -227,8 +227,8 @@ $(KUBASH_BIN)/bats:
&& sudo ./install.sh /usr/local
rm -Rf $(TMP)

ci: chown autopilot
ci: chown reqs

ci-next: extended_tests monitoring

chown:
Expand Down Expand Up @@ -257,7 +257,8 @@ extended_tests:
free -m

.minikube.made:
minikube \
sudo cp -v $(KUBASH_BIN)/minikube /usr/local/bin/
sudo minikube \
--kubernetes-version $(MY_KUBE_VERSION) \
--dns-domain $(MINIKUBE_CLUSTER_DOMAIN) \
--memory $(MINIKUBE_MEMORY) \
Expand Down Expand Up @@ -353,6 +354,9 @@ $(KUBASH_BIN)/onessl:
mv $(TMP)/onessl $(KUBASH_BIN)/
rm -Rf $(TMP)

gcloud:
curl https://sdk.cloud.google.com | bash

submodules/openebs:
cd submodules; git clone https://github.com/openebs/openebs.git

Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kubash

Build, provision, initialize, add common components, and tear down a cluster PDQ.
Build, provision, initialize, add common components, interact and tear down a cluster PDQ.

[![Build Status](https://travis-ci.org/kubash/kubash.svg?branch=master)](https://travis-ci.org/kubash/kubash)
[![Waffle.io - Columns and their card count](https://badge.waffle.io/kubash/kubash.svg?columns=all)](https://waffle.io/kubash/kubash)
Expand Down Expand Up @@ -189,8 +189,7 @@ See the [debugging](./docs/debug.md) page for more

### [Interactive Mode](./docs/interactive.md)

`kubash` -- alone will invoke an interactive shell (or if you prefer
`kubash interactive`)
`kubash` -- alone will invoke an interactive shell

see the [Interactive Mode](./docs/interactive.md) documentation

Expand All @@ -215,3 +214,13 @@ This project takes advantage of [GNU Parallel](https://www.gnu.org/software/para
;login: The USENIX Magazine, February 2011:42-47.
```

### Pseudo-etymology

"The whole kubash" - a bastardization of "The whole kit and kaboodle",
["The whole shebang" (#!)](https://www.phrases.org.uk/meanings/the-whole-shebang.html)
, kubernetes, and bash. The meaning here is that kubash is taking on
everything else that kubeadm considers 'out of scope'. From building
images, provisioning, to usage of kubeadm itself, on through to a quick
shell for interacting with the running cluster, and finally
decommissioning the cluster.
Loading

0 comments on commit c870db4

Please sign in to comment.