forked from m3db/m3db-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Paul Schooss
committed
Aug 24, 2018
1 parent
83722c6
commit f7387a8
Showing
7 changed files
with
121 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,89 @@ | ||
# m3db-operator | ||
|
||
### Help | ||
``` | ||
>make help | ||
## Project Status: pre-Alpha | ||
|
||
Usage: | ||
make <target> | ||
### Kubernetes cluster prerequisites | ||
|
||
Targets: | ||
build-bin Build m3db-operator binary | ||
build-docker Build m3db-operator docker image with go binary | ||
code-gen Generate boilerplate code for kubernetes packages | ||
dep-ensure Run dep ensure to generate vendor directory | ||
dep-install Ensure dep is installed | ||
When running on GKE, the user applying the manifests will need the ability to | ||
allow `cluster-admin-binding` during the installation. Use the following | ||
`ClusterRoleBinding` with the user name provided by gloud | ||
|
||
``` | ||
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=<[email protected]> | ||
``` | ||
|
||
### Build and Deploy | ||
### Build and Deploy M3 Cluster | ||
|
||
Generate Go linux binary and push to a Docker registry | ||
|
||
``` | ||
make -e IMAGE=<registry>/<repo>/m3db-operator -e LINUX_BUILD=1 build-docker | ||
``` | ||
|
||
Update the [operator manifest](https://github.com/m3db/m3db-operator/blob/master/manifests/operator.yaml#L93) to include image location | ||
``` | ||
... <snip> | ||
spec: | ||
containers: | ||
- name: m3db-operator | ||
image: <registry>/<repository>/m3db-operator:<gitsha> | ||
ports: | ||
- containerPort: 60000 | ||
... <snip> | ||
``` | ||
|
||
|
||
Apply the persistent disk storage resource | ||
|
||
``` | ||
kubectl apply -f example/storage-fast-gcp.yaml | ||
``` | ||
|
||
Apply the `m3db-operator` operator | ||
|
||
``` | ||
kubectl apply -f manifests/operator.yaml | ||
``` | ||
|
||
Apply the `etcd` cluster | ||
|
||
``` | ||
kubectl apply -f example/etcd.yaml | ||
``` | ||
|
||
Apply the `m3db` cluster | ||
|
||
``` | ||
kubectl apply -f example/example-m3db-cluster-gke.yaml | ||
``` | ||
|
||
### Delete M3 Cluster | ||
|
||
Delete M3 Cluster | ||
|
||
``` | ||
kubectl delete -f example/example-m3db-cluster-gke.yaml | ||
``` | ||
|
||
Delete M3DB Operator | ||
|
||
``` | ||
kubectrl delete -f manifests/operator.yaml | ||
``` | ||
|
||
### Help | ||
``` | ||
>make help | ||
Usage: | ||
make <target> | ||
Targets: | ||
build-bin Build m3db-operator binary | ||
build-docker Build m3db-operator docker image with go binary | ||
code-gen Generate boilerplate code for kubernetes packages | ||
dep-ensure Run dep ensure to generate vendor directory | ||
dep-install Ensure dep is installed | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: StorageClass | ||
apiVersion: storage.k8s.io/v1 | ||
metadata: | ||
name: fast | ||
provisioner: kubernetes.io/gce-pd | ||
parameters: | ||
type: pd-ssd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters