Skip to content

Commit 9b821d3

Browse files
authored
New quick start (#358)
* Simplify README * new, simpler, installation process * move more complex stuff to the contributor's guide
1 parent 56e2f09 commit 9b821d3

File tree

3 files changed

+70
-62
lines changed

3 files changed

+70
-62
lines changed

CONTRIBUTING.md

+48
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,50 @@ list][rmq-users]. This would include YAML manifests, Kubernetes version,
2121
RabbitMQ Operator logs and any other relevant information that might help
2222
to diagnose the problem.
2323

24+
## Makefile
25+
26+
This project contains a Makefile to perform common development operation. If you want to build, test or deploy a local copy of the repository, keep reading.
27+
28+
### Required environment variables
29+
30+
The following environment variables are required by many of the `make` targets to access a custom-built image:
31+
32+
- DOCKER_REGISTRY_SERVER: URL of docker registry containing the Operator image (e.g. `registry.my-company.com`)
33+
- OPERATOR_IMAGE: path to the Operator image within the registry specified in DOCKER_REGISTRY_SERVER (e.g. `rabbitmq/cluster-operator`). Note: OPERATOR_IMAGE should **not** include a leading slash (`/`)
34+
35+
When running `make deploy-dev`, additionally:
36+
37+
- DOCKER_REGISTRY_USERNAME: Username for accessing the docker registry
38+
- DOCKER_REGISTRY_PASSWORD: Password for accessing the docker registry
39+
- DOCKER_REGISTRY_SECRET: Name of Kubernetes secret in which to store the Docker registry username and password
40+
41+
#### Make targets
42+
43+
- **controller-gen** Download controller-gen if not in $PATH
44+
- **deploy** Deploy operator in the configured Kubernetes cluster in ~/.kube/config
45+
- **deploy-dev** Deploy operator in the configured Kubernetes cluster in ~/.kube/config, with local changes
46+
- **deploy-kind** Load operator image and deploy operator into current KinD cluster
47+
- **deploy-sample** Deploy RabbitmqCluster defined in config/sample/base
48+
- **destroy** Cleanup all operator artefacts
49+
- **kind-prepare** Prepare KinD to support LoadBalancer services, and local-path StorageClass
50+
- **kind-unprepare** Remove KinD support for LoadBalancer services, and local-path StorageClass
51+
- **list** List Makefile targets
52+
- **run** Run operator binary locally against the configured Kubernetes cluster in ~/.kube/config
53+
- **unit-tests** Run unit tests
54+
- **integration-tests** Run integration tests
55+
- **system-tests** Run end-to-end tests against Kubernetes cluster defined in ~/.kube/config
56+
57+
### Testing
58+
59+
Before submitting a pull request, ensure all local tests pass:
60+
- `make unit-tests`
61+
- `make integration-tests`
62+
63+
<!-- TODO: generalise deployment process: make DOCKER_REGISTRY_SECRET and DOCKER_REGISTRY_SERVER configurable -->
64+
Also, run the system tests with your local changes against a Kubernetes cluster:
65+
- `make deploy-dev`
66+
- `make system-tests`
67+
2468
## Pull Requests
2569

2670
RabbitMQ Operator project uses pull requests to discuss, collaborate on and accept code contributions.
@@ -40,6 +84,10 @@ Here's the recommended workflow:
4084
If what you are going to work on is a substantial change, please first
4185
ask the core team for their opinion on the [RabbitMQ users mailing list][rmq-users].
4286

87+
### Code Conventions
88+
89+
This project follows the [Kubernetes Code Conventions for Go](https://github.com/kubernetes/community/blob/master/contributors/guide/coding-conventions.md#code-conventions), which in turn mostly refer to [Effective Go](https://golang.org/doc/effective_go.html) and [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments). Please ensure your pull requests follow these guidelines.
90+
4391
## Code reviews
4492

4593
All submissions, including submissions by project members, require review. We

README.md

+21-62
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,26 @@
11
# RabbitMQ Cluster Kubernetes Operator
22

3-
Manage [RabbitMQ](https://www.rabbitmq.com/) clusters deployed to [Kubernetes](https://kubernetes.io/). The RabbitMQ Cluster Kubernetes Operator has been built using the [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) implementation of the [operator pattern](https://coreos.com/blog/introducing-operators.html). This repository contains a [custom controller](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-controllers) and [custom resource definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) designed for the lifecyle (creation, upgrade, graceful shutdown) of a RabbitMQ cluster.
3+
Kubernetes operator to deploy and manage [RabbitMQ](https://www.rabbitmq.com/) clusters. This repository contains a [custom controller](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-controllers) and [custom resource definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) designed for the lifecyle (creation, upgrade, graceful shutdown) of a RabbitMQ cluster.
44

55
**Note**: this repository is under active development and is provided as **beta** software. Official support for this software is not provided; if you encounter any issues running this software, please feel free to [contribute to the project](#contributing).
66

7-
## Supported Versions
8-
9-
The operator deploys RabbitMQ `3.8.8` by default, and supports versions from `3.8.4` upwards. The operator requires a Kubernetes cluster of `1.16` or above.
10-
11-
## Versioning
12-
13-
RabbitMQ Cluster Kubernetes Operator follows non-strict [semver](https://semver.org/).
14-
15-
[The versioning guidelines document](version_guidelines.md) contains guidelines
16-
on how we implement non-strict semver. The version number MAY or MAY NOT follow the semver rules. Hence, we highly recommend to read
17-
the release notes to understand the changes and their potential impact for any release.
18-
197
## Quickstart
208

21-
### Deploying on KinD
9+
If you have a running Kubernetes cluster and `kubectl` configured to access it, run the following command to install the operator:
10+
11+
```bash
12+
kubectl apply -f https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator.yml
13+
```
2214

23-
The easiest way to set up a local development environment for running the RabbitMQ operator is using [KinD](https://kind.sigs.k8s.io/):
15+
Then you can deploy a RabbitMQ cluster:
2416

25-
1. Follow the KinD [installation guide](https://kind.sigs.k8s.io/#installation-and-usage) to deploy a Kubernetes cluster
26-
1. Ensure that all [Required environment variables](#required-environment-variables) are set in your environment
27-
1. Run `make deploy-kind`
28-
1. Check that the operator is running by running `kubectl get all --namespace=rabbitmq-system`
29-
1. Deploy a `RabbitmqCluster` custom resource. Refer to the [example YAML](./cr-example.yaml) and [documentation](https://docs.pivotal.io/rabbitmq-kubernetes/0-7/using.html#configure) for available CR attributes
30-
1. Due to resource limitations on your Docker daemon, the Kubernetes might not be able to schedule all `RabbitmqCluster` nodes. Either [increase your Docker daemon's resource limits](https://docs.docker.com/docker-for-mac/#resources) or deploy the `RabbitmqCluster` custom resource with `resources: {}` to remove default `memory` and `cpu` resource settings.
31-
1. If you set the `serviceType` to `LoadBalancer`, run `make kind-prepare` to deploy a [MetalLB](https://metallb.universe.tf/) load balancer. This will allow the operator to complete the `RabbitmqCluster` provisioning by assign an arbitrary local IP address to the cluster's client service. Proper [network configuration](https://metallb.universe.tf/installation/network-addons/) is required to route traffic via the assigned IP address.
17+
```bash
18+
kubectl apply -f https://raw.githubusercontent.com/rabbitmq/cluster-operator/main/docs/examples/hello-world/rabbitmq.yaml
19+
```
3220

21+
<p align="center">
22+
<img width="100%" src="./docs/demos/installation.svg">
23+
</p>
3324

3425
## Documentation
3526

@@ -46,54 +37,23 @@ In addition, a number of [examples](./docs/examples) can be found in this reposi
4637
The doc guides are open source. The source can be found in the [RabbitMQ website repository](https://github.com/rabbitmq/rabbitmq-website/)
4738
under `site/kubernetes`.
4839

40+
## Supported Versions
4941

50-
## Makefile
51-
52-
#### Required environment variables
53-
54-
- DOCKER_REGISTRY_SERVER: URL of docker registry containing the Operator image (e.g. `registry.my-company.com`)
55-
- OPERATOR_IMAGE: path to the Operator image within the registry specified in DOCKER_REGISTRY_SERVER (e.g. `rabbitmq/cluster-operator`). Note: OPERATOR_IMAGE should **not** include a leading slash (`/`)
56-
57-
When running `make deploy-dev`, additionally:
42+
The operator deploys RabbitMQ `3.8.8` by default, and supports versions from `3.8.4` upwards. The operator requires Kubernetes `1.16` or newer.
5843

59-
- DOCKER_REGISTRY_USERNAME: Username for accessing the docker registry
60-
- DOCKER_REGISTRY_PASSWORD: Password for accessing the docker registry
61-
- DOCKER_REGISTRY_SECRET: Name of Kubernetes secret in which to store the Docker registry username and password
44+
## Versioning
6245

63-
#### Make targets
46+
RabbitMQ Cluster Kubernetes Operator follows non-strict [semver](https://semver.org/).
6447

65-
- **controller-gen** Download controller-gen if not in $PATH
66-
- **deploy** Deploy operator in the configured Kubernetes cluster in ~/.kube/config
67-
- **deploy-dev** Deploy operator in the configured Kubernetes cluster in ~/.kube/config, with local changes
68-
- **deploy-kind** Load operator image and deploy operator into current KinD cluster
69-
- **deploy-sample** Deploy RabbitmqCluster defined in config/sample/base
70-
- **destroy** Cleanup all operator artefacts
71-
- **kind-prepare** Prepare KinD to support LoadBalancer services, and local-path StorageClass
72-
- **kind-unprepare** Remove KinD support for LoadBalancer services, and local-path StorageClass
73-
- **list** List Makefile targets
74-
- **run** Run operator binary locally against the configured Kubernetes cluster in ~/.kube/config
75-
- **unit-tests** Run unit tests
76-
- **integration-tests** Run integration tests
77-
- **system-tests** Run end-to-end tests against Kubernetes cluster defined in ~/.kube/config
48+
[The versioning guidelines document](version_guidelines.md) contains guidelines
49+
on how we implement non-strict semver. The version number MAY or MAY NOT follow the semver rules. Hence, we highly recommend to read
50+
the release notes to understand the changes and their potential impact for any release.
7851

7952
## Contributing
8053

8154
This project follows the typical GitHub pull request model. Before starting any work, please either comment on an [existing issue](https://github.com/rabbitmq/cluster-operator/issues), or file a new one.
8255

83-
### Testing
84-
85-
Before submitting a pull request, ensure all local tests pass:
86-
- `make unit-tests`
87-
- `make integration-tests`
88-
89-
<!-- TODO: generalise deployment process: make DOCKER_REGISTRY_SECRET and DOCKER_REGISTRY_SERVER configurable -->
90-
Also, run the system tests with your local changes against a Kubernetes cluster:
91-
- `make deploy-dev`
92-
- `make system-tests`
93-
94-
### Code Conventions
95-
96-
This project follows the [Kubernetes Code Conventions for Go](https://github.com/kubernetes/community/blob/master/contributors/guide/coding-conventions.md#code-conventions), which in turn mostly refer to [Effective Go](https://golang.org/doc/effective_go.html) and [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments). Please ensure your pull requests follow these guidelines.
56+
Please read [contribution guidelines](CONTRIBUTING.md) if you are interested in contributing to this project.
9757

9858
## License
9959

@@ -102,4 +62,3 @@ This project follows the [Kubernetes Code Conventions for Go](https://github.com
10262
## Copyright
10363

10464
Copyright 2020 VMware, Inc. All Rights Reserved.
105-

docs/demos/installation.svg

+1
Loading

0 commit comments

Comments
 (0)