IoT addon for Kubernetes clusters.
$ curl https://raw.githubusercontent.com/fest-research/iot-addon/master/assets/hyperkube/hyperkube.sh | shYou can shut down with docker kill $(docker ps -q). Execute twice because some containers might have been restarted by Kubernetes.
Install and configure kubectl to connect with master
$ kubectl create -f https://raw.githubusercontent.com/fest-research/iot-addon/master/assets/iot-addon.yamlFlash RaspberryPi devices with this software to connect easily to the iot-server.
Deploy a sample application to the Kubernetes cluster and all RaspberryPis.
$ kubectl create -f https://raw.githubusercontent.com/fest-research/demo/master/assets/demo-deployment-all.yamlCloud part can be found here and device part here. Please note: the backend IP is currently hard coded, so you might want to fork the project.
Clone repository into $GOPATH/src/github.com/fest-research/:
mkdir -p $GOPATH/src/github.com/fest-research/
cd $GOPATH/src/github.com/fest-research/
git clone git@github.com:fest-research/iot-addon.git
To format source files use govendor, it will skip dependencies:
govendor fmt +local
Use following commands to start all modules:
go run cmd/apiserver/apiserver.go --kubeconfig=<kubeconfig-path> --apiserver=<apiserver-adress>
go run cmd/controller/controller.go --kubeconfig=<kubeconfig-path> --apiserver=<apiserver-adress>
To build docker images use following command:
make build
To deploy it to Docker Hub use following commands:
docker login
make deploy
$ kubectl config set-cluster demo-cluster --server=http://104.155.11.172:8080/
$ kubectl config set-context demo --cluster=demo-cluster
$ kubectl config use-context demo