Skip to content

Instantly share code, notes, and snippets.

@karlkfi
Last active January 15, 2016 21:36
Show Gist options
  • Save karlkfi/ad13628d9ed0fda4848d to your computer and use it in GitHub Desktop.
Save karlkfi/ad13628d9ed0fda4848d to your computer and use it in GitHub Desktop.
Cloud Surfing: Kubernetes on Mesos Demo Script
0. Install DCOS & DCOS CLI
> Install DCOS Community Edition: https://mesosphere.com/product/
> Follow directions from DCOS dashboard to install dcos-cli
1. Install Frameworks w/ DCOS CLI
dcos config prepend package.sources https://github.com/mesosphere/multiverse/archive/version-1.x.zip
dcos package update --validate
cat >/tmp/cassandra.json <<EOF
{
"cassandra": {
"framework": {
"mem": 512
},
"resources": {
"mem": 128
}
}
}
EOF
dcos package install --options=/tmp/cassandra.json cassandra --yes
cat >/tmp/etcd.json <<EOF
{
"etcd": {
"mem-limit": 128,
"disk-limit": 256
}
}
EOF
dcos package install --options=/tmp/etcd.json etcd --yes
cat >/tmp/kubernetes.json <<EOF
{
"kubernetes": {
"mem": 256,
"etcd-mesos-framework-name": "etcd"
}
}
EOF
dcos package install --options=/tmp/kubernetes.json kubernetes --yes
2. Deploy Oinker w/ DCOS Kubectl Plugin
go get github.com/mesosphere/oinker-go
dcos kubectl create -f ~/go/src/github.com/mesosphere/oinker-go/kubernetes.yaml
dcos kubectl get pod -l=app=oinker
3. Load Oinker Data
> Download script: https://gist.github.com/karlkfi/0e3170dff4e5d6e9e951
./oink-a-lot.sh
4. Scale Oinker
dcos kubectl scale --replicas=18 rc oinker-go
dcos kubectl get pods
dcos kubectl get pods | grep Running | wc -l
5. Delete Oinker
dcos kubectl delete rc,svc,pod -l=app=oinker
6. Cluster Cleanup
dcos kubectl delete rc,svc,pod --all
dcos kubectl delete rc,svc,pod --all --namespace=kube-system
dcos package uninstall kubernetes
dcos package uninstall etcd
dcos package uninstall cassandra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment