Skip to content

Commit 800a8cd

Browse files
author
Chris Chinchilla
authored
Update Read me, contributing guide and delete docs folder (#272)
* Update Read me and delete docs folder * Update contributing guide * Remove docs tests no longer needed
1 parent a0ecbf9 commit 800a8cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+91
-1327
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
1-
Contributing
2-
============
1+
# Contributing
32

4-
We'd love your help building the M3DB Operator!
3+
We welcome your help building the M3 Operator.
54

65
## Getting Started
76

8-
M3DB Operator uses `dep` to manage dependencies. To get started:
7+
The M3 Operator uses `dep` to manage dependencies. To get started:
98

10-
```bash
9+
```shell
1110
git submodule update --init --recursive
12-
make dep-ensure
11+
make install-tools
1312
```
1413

1514
## Making A Change
1615

17-
* Before making any significant changes, please [open an issue](https://github.com/m3db/m3db-operator/issues)
18-
19-
* Discussing your proposed changes ahead of time will make the contribution process smooth for everyone.
16+
- Before making any significant changes, please [open an issue](https://github.com/m3db/m3db-operator/issues).
17+
- Discussing your proposed changes ahead of time maked the contribution process smoother for everyone.
2018

21-
Once we've discussed your changes and you've got your code ready, make sure that tests are passing:
19+
Once the changes are discussed and you have your code ready, make sure that tests are passing:
2220

2321
```bash
2422
make test-all
2523
```
2624

2725
Your pull request is most likely to be accepted if it:
2826

29-
* Includes tests for new functionality.
30-
* Follows the guidelines in [Effective Go](https://golang.org/doc/effective_go.html) and the [Go team's common code
31-
review comments](https://github.com/golang/go/wiki/CodeReviewComments).
32-
* Has a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
27+
- Includes tests for new functionality.
28+
- Follows the guidelines in [Effective Go](https://golang.org/doc/effective_go.html) and the [Go team's common code
29+
review comments](https://github.com/golang/go/wiki/CodeReviewComments).
30+
- Has a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).

Makefile

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
PROJECT_NAME := m3db-operator
22
OUTPUT_DIR := out
3-
DOCS_OUT_DIR := site
43
.DEFAULT_GOAL := all
54

65
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
@@ -189,7 +188,7 @@ asset-gen:
189188

190189
# NB(schallert): order matters -- we want license generation after all else.
191190
.PHONY: all-gen
192-
all-gen: mock-gen kubernetes-gen asset-gen helm-bundle docs-api-gen license-gen
191+
all-gen: mock-gen kubernetes-gen asset-gen helm-bundle license-gen
193192

194193
# Ensure base commit had up-to-date generated artifacts
195194
.PHONY: test-all-gen
@@ -244,30 +243,4 @@ helm-bundle: install-tools helm-bundle-no-deps
244243
.PHONY: publish-helm-charts
245244
publish-helm-charts: ## pushes a new version of the helm chart
246245
@echo "+ $@"
247-
./build/package-helm-charts.sh
248-
249-
## Documentation
250-
251-
.PHONY: docs-clean
252-
docs-clean:
253-
mkdir -p $(DOCS_OUT_DIR)
254-
rm -rf $(DOCS_OUT_DIR)/*
255-
256-
.PHONY: docs-container
257-
docs-container:
258-
docker build -t m3db-docs -f docs/Dockerfile docs
259-
260-
.PHONY: docs-build
261-
docs-build: docs-clean docs-container
262-
docker run -v $(PWD):/m3db --rm m3db-docs "mkdocs build -e docs/theme -t material"
263-
264-
.PHONY: docs-serve
265-
docs-serve: docs-clean docs-container
266-
docker run -v $(PWD):/m3db -p 8000:8000 -it --rm m3db-docs "mkdocs serve -e docs/theme -t material -a 0.0.0.0:8000"
267-
268-
.PHONY: docs-api-gen-no-deps
269-
docs-api-gen-no-deps:
270-
$(SELF_DIR)/out/docgen api pkg/apis/m3dboperator/v1alpha1/cluster.go pkg/apis/m3dboperator/v1alpha1/namespace.go pkg/apis/m3dboperator/v1alpha1/pod_identity.go > $(SELF_DIR)/docs/api.md
271-
272-
.PHONY: docs-api-gen
273-
docs-api-gen: docgen docs-api-gen-no-deps
246+
./build/package-helm-charts.sh

README.md

Lines changed: 77 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,114 @@
1-
# M3DB Operator [![Build status](https://badge.buildkite.com/6cf88054469d7d59a584f618426dc2bd436f816daaf5000db8.svg)](https://buildkite.com/m3/m3db-operator) [![codecov](https://codecov.io/gh/m3db/m3db-operator/branch/master/graph/badge.svg)](https://codecov.io/gh/m3db/m3db-operator)
1+
# M3 Operator [![Build status](https://badge.buildkite.com/6cf88054469d7d59a584f618426dc2bd436f816daaf5000db8.svg)](https://buildkite.com/m3/m3db-operator) [![codecov](https://codecov.io/gh/m3db/m3db-operator/branch/master/graph/badge.svg)](https://codecov.io/gh/m3db/m3db-operator)
22

3-
The M3DB Operator is a project dedicated to setting up M3DB on Kubernetes. It aims to automate everyday tasks around managing M3DB. Specifically, it aims to automate:
3+
The M3 Operator helps you set up M3 on Kubernetes. It aims to automate everyday tasks around managing M3, specifically, it aims to automate:
44

5-
* Creating M3DB clusters
6-
* Destroying M3DB clusters
7-
* Expanding clusters (adding instances)
8-
* Shrinking clusters (removing instances)
9-
* Replacing failed instances
5+
- Creating clusters
6+
- Destroying clusters
7+
- Expanding clusters (adding instances)
8+
- Shrinking clusters (removing instances)
9+
- Replacing failed instances
1010

11-
More information:
11+
## Table of Contents
1212

13-
- [Documentation][docs]
14-
- [Gitter room](https://gitter.im/m3db/kubernetes)
15-
- [M3DB Google Group](https://groups.google.com/forum/#!forum/m3db)
13+
- [M3 Operator ![Build status](https://buildkite.com/m3/m3db-operator) [![codecov](https://codecov.io/gh/m3db/m3db-operator/branch/master/graph/badge.svg)](https://codecov.io/gh/m3db/m3db-operator)](#m3-operator--)
14+
- [Table of Contents](#table-of-contents)
15+
- [More Information](#more-information)
16+
- [Community Meetings](#community-meetings)
17+
- [Office Hours](#office-hours)
18+
- [Install](#install)
19+
- [Dependencies](#dependencies)
20+
- [Usage](#usage)
21+
- [Create an etcd Cluster](#create-an-etcd-cluster)
22+
- [Install the Operator](#install-the-operator)
23+
- [Create an M3 Cluster](#create-an-m3-cluster)
24+
- [Resize a Cluster](#resize-a-cluster)
25+
- [Delete a Cluster](#delete-a-cluster)
26+
- [Contributing](#contributing)
1627

17-
## Getting Started
28+
## More Information
1829

19-
The following instructions serve as a quickstart to get an M3DB cluster up and running in your Kubernetes cluster. This
20-
setup is not for production use, as there's no persistent storage. More information on production-grade clusters can be
21-
found in our [docs][docs].
30+
- [Documentation](https://m3db.io/docs/operator/)
31+
- [Slack](http://bit.ly/m3slack)
32+
- [Forum (Google Group)](https://groups.google.com/forum/#!forum/m3db)
2233

23-
### Kubernetes Cluster Prerequisites
34+
### Community Meetings
2435

25-
The M3DB operator targets Kubernetes **1.11** and **1.12**. We generally aim to target the latest two minor versions
26-
supported by GKE but welcome community contributions to support more versions!
36+
M3 contributors and maintainers have regular meetings. Join our M3 meetup group to receive notifications on upcoming meetings: <https://www.meetup.com/M3-Community/>.
2737

28-
The M3DB operator is intended for creating highly available clusters across distinct failure domains. For this reason we
29-
currently only support Kubernetes clusters with nodes in at least 3 zones, but [support][zonal] for zonal clusters is
30-
coming soon.
38+
You can find recordings of past meetups here: <https://vimeo.com/user/120001164/folder/2290331>.
3139

32-
When running on GKE, the user applying the manifests will need the ability to allow `cluster-admin-binding` during the
33-
installation. Use the following `ClusterRoleBinding` with the user name provided by gcloud:
40+
### Office Hours
3441

35-
```
36-
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud config get-value core/account)
37-
```
42+
Members of the M3 team hold office hours on the third Thursday of every month from 11-1pm EST. To join, make sure to sign up for a slot here: <https://calendly.com/chronosphere-intro/m3-community-office-hours>.
3843

39-
### Installing the M3DB Operator
44+
## Install
4045

41-
With Helm:
46+
### Dependencies
4247

43-
```
44-
helm repo add m3db https://m3-helm-charts.storage.googleapis.com/stable
45-
helm install m3db/m3db-operator --namespace m3db-operator
46-
```
48+
The M3 operator targets Kubernetes **1.11** and **1.12**. We aim to target the latest two minor versions supported by GKE but welcome community contributions to support more versions
4749

48-
With `kubectl` (will install in the `default` namespace):
50+
The M3 operator is intended for creating highly available clusters across distinct failure domains. For this reason it only support Kubernetes clusters with nodes **in at least 3 zones**, but [support][https://github.com/m3db/m3db-operator/issues/68] for zonal clusters is coming soon.
4951

50-
```
51-
kubectl apply -f https://raw.githubusercontent.com/m3db/m3db-operator/v0.13.0/bundle.yaml
52-
```
52+
## Usage
5353

54-
## Managing Clusters
54+
The following instructions are a quickstart to get a cluster up and running. This setup is not for production use, as it has no persistent storage. [Read the operator documentation](https://m3db.io/docs/operator/) for more information on production-grade clusters.
5555

56-
### Creating a Cluster
56+
### Create an etcd Cluster
5757

58-
Create a simple etcd cluster to store M3DB's topology:
58+
M3 stores its cluster placements and runtime metadata in [etcd](https://etcd.io/) and needs a running cluster to communicate with.
5959

60-
```
60+
```shell
6161
kubectl apply -f https://raw.githubusercontent.com/m3db/m3db-operator/v0.13.0/example/etcd/etcd-basic.yaml
6262
```
6363

64-
Apply manifest with your zones specified for isolation groups:
65-
66-
```yaml
67-
apiVersion: operator.m3db.io/v1alpha1
68-
kind: M3DBCluster
69-
metadata:
70-
name: simple-cluster
71-
spec:
72-
image: quay.io/m3db/m3dbnode:latest
73-
replicationFactor: 3
74-
numberOfShards: 256
75-
# Default endpoints if using provided etcd manifests.
76-
etcdEndpoints:
77-
- http://etcd-0.etcd:2379
78-
- http://etcd-1.etcd:2379
79-
- http://etcd-2.etcd:2379
80-
isolationGroups:
81-
- name: group1
82-
numInstances: 1
83-
nodeAffinityTerms:
84-
- key: failure-domain.beta.kubernetes.io/zone
85-
values:
86-
- <zone-a>
87-
- name: group2
88-
numInstances: 1
89-
nodeAffinityTerms:
90-
- key: failure-domain.beta.kubernetes.io/zone
91-
values:
92-
- <zone-b>
93-
- name: group3
94-
numInstances: 1
95-
nodeAffinityTerms:
96-
- key: failure-domain.beta.kubernetes.io/zone
97-
values:
98-
- <zone-c>
99-
podIdentityConfig:
100-
sources: []
101-
namespaces:
102-
- name: metrics-10s:2d
103-
preset: 10s:2d
104-
dataDirVolumeClaimTemplate:
105-
metadata:
106-
name: m3db-data
107-
spec:
108-
accessModes:
109-
- ReadWriteOnce
110-
resources:
111-
requests:
112-
storage: 100Gi
64+
### Install the Operator
65+
66+
Using `kubectl` (installs in the `default` namespace):
67+
68+
```shell
69+
kubectl apply -f https://raw.githubusercontent.com/m3db/m3db-operator/v0.13.0/bundle.yaml
11370
```
11471

115-
### Resizing a Cluster
72+
### Create an M3 Cluster
11673

117-
To resize a cluster, specify the new number of instances you want in each zone either by reapplying your manifest or
118-
using `kubectl edit`. The operator will safely scale up or scale down your cluster.
74+
The following creates an M3 cluster with 3 replicas of data across 256 shards that connects to the 3 available etcd endpoints.
11975

120-
### Deleting a Cluster
76+
```shell
77+
kubectl apply -f https://raw.githubusercontent.com/m3db/m3db-operator/master/example/m3db-local.yaml
78+
```
12179

122-
Delete a cluster using `kubectl delete`. You will to remove the etcd data as well, or wipe the data generated by the
123-
operator if you intend to reuse the etcd cluster for another M3DB cluster:
80+
When running on GKE, the user applying the manifests needs the ability to allow `cluster-admin-binding` during installation. Use the following `ClusterRoleBinding` with the user name provided by gcloud:
12481

82+
```shell
83+
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud config get-value core/account)
12584
```
85+
86+
### Resize a Cluster
87+
88+
To resize a cluster, specify the new number of instances you want in each zone either by reapplying your manifest or using `kubectl edit`. The operator safely scales up or scales down the cluster.
89+
90+
### Delete a Cluster
91+
92+
```shell
93+
kubectl delete m3dbcluster simple-cluster
94+
```
95+
96+
You also need to remove the etcd data, or wipe the data generated by the operator if you intend to reuse the etcd cluster for another M3 cluster:
97+
98+
```shell
12699
kubectl exec etcd-0 -- env ETCDCTL_API=3 etcdctl del --keys-only --prefix ""
127100
```
128101

129102
## Contributing
130103

131-
We welcome community contributions to to the M3DB operator! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more
132-
information. Please note that on creating a pull request you will be asked to agree to the Uber CLA before we can accept
133-
your contribution.
104+
You can ask questions and give feedback in the following ways:
105+
106+
- [Create a GitHub issue](https://github.com/m3db/m3db-operator/issues)
107+
- [In the public M3 Slack](http://bit.ly/m3slack)
108+
- [In the M3 forum (Google Group)](https://groups.google.com/forum/#!forum/m3db)
109+
110+
The M3 operator welcomes pull requests, read [the development guide](CONTRIBUTING.md) to help you get setup for building and contributing.
134111

135-
## License
136-
This project is licensed under the Apache license -- see the [LICENSE](https://github.com/m3db/m3db-operator/blob/master/LICENSE) file for details.
112+
* * *
137113

138-
[docs]: https://operator.m3db.io/
139-
[zonal]: https://github.com/m3db/m3db-operator/issues/68
114+
This project is released under the [Apache License, Version 2.0](https://github.com/m3db/m3/blob/master/LICENSE).

docs/Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)