Skip to content

Instantly share code, notes, and snippets.

apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: rookeval
labels:
app: eval
spec:
strategy:
type: Recreate
template:
@paha
paha / ebs-create.sh
Last active September 11, 2017 23:23
$ aws ec2 create-volume --availability-zone=us-west-2b --size=120 --volume-type=gp2
...
$ aws ec2 create-volume --availability-zone=us-west-2b --size=120 --volume-type=io1 --iops=200
...
$ aws ec2 create-volume --availability-zone=us-west-2b --size=500 --volume-type=st1
...
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rookeval-claim
labels:
app: eval
spec:
storageClassName: rook-block
accessModes:
- ReadWriteOnce
@paha
paha / rookctl.sh
Last active September 11, 2017 23:21
$ kubectl create --filename=https://raw.githubusercontent.com/rook/rook/master/cluster/examples/kubernetes/rook-tools.yaml
pod "rook-tools" created
$ kubectl -n rook exec -it rook-tools -- rookctl status
OVERALL STATUS: OK
USAGE:
TOTAL USED DATA AVAILABLE
5.18 TiB 6.00 GiB 0 B 5.18 TiB
MONITORS:
$ kubectl create --filename=https://raw.githubusercontent.com/rook/rook/master/cluster/examples/kubernetes/rook-storageclass.yaml
pool "replicapool" created
storageclass "rook-block" created
$ kubectl create --filename=rook-cluster.yaml
cluster "rook-eval" created
$ kubectl get pods --namespace rook
NAME READY STATUS RESTARTS AGE
rook-api-3588729152-s0dxw 1/1 Running 0 46s
rook-ceph-mgr0-1957545771-bsg7h 1/1 Running 0 46s
rook-ceph-mon0-t1m3z 1/1 Running 0 1m
rook-ceph-mon1-mkdl4 1/1 Running 0 1m
rook-ceph-mon2-bv1qk 1/1 Running 0 1m
rook-ceph-osd-0027l 1/1 Running 0 46s
@paha
paha / get-nodes.sh
Last active September 8, 2017 20:41
$ kubectl get nodes
NAME STATUS AGE VERSION
ip-172-20-37-102.us-west-2.compute.internal Ready 1m v1.7.0
ip-172-20-46-42.us-west-2.compute.internal Ready 1m v1.7.0
ip-172-20-60-92.us-west-2.compute.internal Ready 1m v1.7.0
ip-172-20-61-88.us-west-2.compute.internal Ready 3m v1.7.0
@paha
paha / cluster.yaml
Last active September 11, 2017 23:30
apiVersion: rook.io/v1alpha1
kind: Cluster
metadata:
name: rook-eval
namespace: rook
spec:
versionTag: v0.5.1
dataDirHostPath: "/var/lib/docker/rook-eval"
storage:
useAllNodes: true
/*
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
in top.sls file
...
{% set roles = salt['grains.get']('roles', []) %}
{% for role in roles -%}
- {{ role }}
{% endfor %}
...
#!pyobjects
# salt://roles/init.sls