Skip to content

Commit 2be929c

Browse files
Updating documentation to use hosted helm chart. (#115)
1 parent 0fa567a commit 2be929c

File tree

8 files changed

+118
-104
lines changed

8 files changed

+118
-104
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ clean:
3232
mod-tidy:
3333
export GO111MODULE=on; go mod tidy
3434

35-
release: manifests
35+
release: manifests helm-check
3636
VERSION=${VERSION} bash hack/setup_release.sh
3737

3838
###
@@ -84,6 +84,9 @@ manifests-check:
8484
@echo "Check to make sure the manifests are up to date"
8585
git diff --exit-code -- config
8686

87+
helm-check:
88+
helm lint helm/solr-operator
89+
8790
# Generate code
8891
generate: controller-gen
8992
$(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths="./..."

docs/charts/index.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ entries:
33
solr-operator:
44
- apiVersion: v1
55
appVersion: v0.2.5
6-
created: "2020-05-08T18:03:36.734334-04:00"
6+
created: "2020-05-14T14:31:51.166349-04:00"
77
description: The Solr Operator enables easy management of Solr resources within
88
Kubernetes.
9-
digest: b6cfb98aa7d77999310ee82c7b706e572c823e5c25fe5ddceb6454b2413d3541
9+
digest: cdc896541390137c0f8aaab7b51f4b944e6cde23f9d8da5ffb0486e20efa5c48
1010
home: https://github.com/bloomberg/solr-operator
1111
icon: https://lucene.apache.org/theme/images/solr/identity/Solr_Logo_on_white.png
1212
keywords:
@@ -26,4 +26,4 @@ entries:
2626
urls:
2727
- https://github.com/bloomberg/solr-operator/releases/download/v0.2.5/solr-operator-0.2.5.tgz
2828
version: 0.2.5
29-
generated: "2020-05-08T18:03:36.728994-04:00"
29+
generated: "2020-05-14T14:31:51.161206-04:00"

docs/local_tutorial.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
This tutorial shows how to setup Solr under Kubernetes on your local mac. The plan is as follows:
44

5-
1. [Setup Docker for Mac with K8S](#setup-docker-for-mac-with-k8s)
6-
2. [Install an Ingress Controller to reach the cluster on localhost](#install-an-ingress-controller)
5+
1. [Setup Kubernetes and Dependencies](#setup-kubernetes-and-dependencies)
6+
1. [Setup Docker for Mac with K8S](#setup-docker-for-mac-with-k8s)
7+
2. [Install an Ingress Controller to reach the cluster on localhost](#install-an-ingress-controller)
78
3. [Install Solr Operator](#install-solr-operator)
89
4. [Start your Solr cluster](#start-your-solr-cluster)
910
5. [Create a collection and index some documents](#create-a-collection-and-index-some-documents)
@@ -12,7 +13,9 @@ This tutorial shows how to setup Solr under Kubernetes on your local mac. The pl
1213
8. [Install Kubernetes Dashboard (optional)](#install-kubernetes-dashboard-optional)
1314
9. [Delete the solrCloud cluster named 'example'](#delete-the-solrcloud-cluster-named-example)
1415

15-
## Setup Docker for Mac with K8S
16+
## Setup Kubernetes and Dependencies
17+
18+
### Setup Docker for Mac with K8s
1619

1720
```bash
1821
# Install Homebrew, if you don't have it already
@@ -33,7 +36,7 @@ open /Applications/Docker.app
3336
brew install helm watch
3437
```
3538

36-
## Install an Ingress Controller
39+
### Install an Ingress Controller
3740

3841
Kubernetes services are by default only accessible from within the k8s cluster. To make them adressable from our laptop, we'll add an ingress controller
3942

@@ -51,22 +54,28 @@ kubectl get all --namespace ingress-nginx
5154

5255
Once we have installed Solr to our k8s, this will allow us to address the nodes locally.
5356

54-
## Install Solr Operator
57+
## Install the Solr Operator
5558

5659
Now that we have the prerequisites setup, let us install Solr Operator which will let us easily manage a large Solr cluster:
5760

61+
Before installing the Solr Operator, we need to install the [Zookeeper Operator](https://github.com/pravega/zookeeper-operator).
62+
Eventually this will be a dependency on the helm chart, but for now we can run an easy `kubectl apply`.
63+
64+
```bash
65+
kubectl apply -f https://raw.githubusercontent.com/bloomberg/solr-operator/master/example/dependencies/zk_operator.yaml
66+
```
67+
68+
Now add the Solr Operator Helm repository. (You should only need to do this once)
69+
5870
```bash
59-
# Download the operator
60-
OPERATOR_VER=0.2.5
61-
curl https://codeload.github.com/bloomberg/solr-operator/tar.gz/v$OPERATOR_VER | tar xz
62-
ln -s -f solr-operator-$OPERATOR_VER solr-operator
71+
$ helm repo add solr-operator https://bloomberg.github.io/solr-operator/charts
72+
```
6373

64-
# Install the Zookeeper operator (and etcd operator even if we don't use it)
65-
kubectl apply -f solr-operator/example/dependencies/
74+
Next, install the Solr Operator chart. Note this is using Helm v3, in order to use Helm v2 please consult the [Helm Chart documentation](https://hub.helm.sh/charts/solr-operator/solr-operator).
6675

76+
```bash
6777
# Install the operator (specifying ingressBaseDomain to match our ingressController)
68-
helm install --set-string ingressBaseDomain=ing.local.domain \
69-
solr-operator solr-operator/helm/solr-operator
78+
$ helm install solr-operator solr-operator/solr-operator --set-string ingressBaseDomain=ing.local.domain
7079
```
7180

7281
After installing, you can check to see what lives in the cluster to make sure that the Solr and ZooKeeper operators have started correctly.

docs/running-the-operator.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
11
# Running the Solr Operator
22

3+
### Installing the Zookeeper Operator
4+
5+
Before installing the Solr Operator, we need to install the [Zookeeper Operator](https://github.com/pravega/zookeeper-operator).
6+
This is because the Solr Operator, in most instances, relies on the Zookeeper Operator to create the Zookeeper clusters that Solr coordinates through.
7+
Eventually this will be a dependency on the helm chart, but for now we can run an easy `kubectl apply`.
8+
9+
```bash
10+
kubectl apply -f https://raw.githubusercontent.com/bloomberg/solr-operator/master/example/dependencies/zk_operator.yaml
11+
```
12+
313
## Using the Solr Operator Helm Chart
414

5-
The easiest way to run the Solr Operator is via the [provided Helm Chart](/helm/solr-operator).
15+
The easiest way to run the Solr Operator is via the [provided Helm Chart](https://hub.helm.sh/charts/solr-operator/solr-operator).
616

717
The helm chart provides abstractions over the Input Arguments described below, and should work with any official images in docker hub.
818

919
### How to install via Helm
1020

11-
Currently you need a local version of the Helm chart downloaded before you can install the operator.
21+
The first step is to add the Solr Operator helm repository.
1222

1323
```bash
14-
# Download the operator
15-
OPERATOR_VER=0.2.5
16-
curl https://codeload.github.com/bloomberg/solr-operator/tar.gz/v$OPERATOR_VER | tar xz
17-
ln -s -f solr-operator-$OPERATOR_VER solr-operator
24+
$ helm repo add solr-operator https://bloomberg.github.io/solr-operator/charts
25+
```
1826

19-
# Install the Zookeeper operator (and etcd operator even if we don't use it)
20-
kubectl apply -f solr-operator/example/dependencies/
2127

22-
# Install the operator (specifying ingressBaseDomain to match our ingressController)
23-
helm install --set-string ingressBaseDomain=ing.local.domain \
24-
solr-operator solr-operator/helm/solr-operator
28+
Next, install the Solr Operator chart. Note this is using Helm v3, in order to use Helm v2 please consult the [Helm Chart documentation](https://hub.helm.sh/charts/solr-operator/solr-operator).
29+
30+
```bash
31+
$ helm install solr-operator solr-operator/solr-operator
2532
```
2633

2734
After installing, you can check to see what lives in the cluster to make sure that the Solr and ZooKeeper operators have started correctly.

example/dependencies/crds.yaml

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

example/dependencies/operators.yaml renamed to example/dependencies/zk_operator.yaml

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
1-
apiVersion: apps/v1
2-
kind: Deployment
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
33
metadata:
4-
name: etcd-operator
4+
name: zookeeperclusters.zookeeper.pravega.io
55
spec:
6-
replicas: 1
7-
selector:
8-
matchLabels:
9-
name: etcd-operator
10-
template:
11-
metadata:
12-
labels:
13-
name: etcd-operator
14-
spec:
15-
containers:
16-
- name: etcd-operator
17-
image: quay.io/coreos/etcd-operator:v0.9.3
18-
command:
19-
- etcd-operator
20-
- -cluster-wide
21-
env:
22-
- name: MY_POD_NAMESPACE
23-
valueFrom:
24-
fieldRef:
25-
fieldPath: metadata.namespace
26-
- name: MY_POD_NAME
27-
valueFrom:
28-
fieldRef:
29-
fieldPath: metadata.name
6+
group: zookeeper.pravega.io
7+
names:
8+
kind: ZookeeperCluster
9+
listKind: ZookeeperClusterList
10+
plural: zookeeperclusters
11+
singular: zookeepercluster
12+
shortNames:
13+
- zk
14+
additionalPrinterColumns:
15+
- name: Replicas
16+
type: integer
17+
description: The number of ZooKeeper servers in the ensemble
18+
JSONPath: .status.replicas
19+
- name: Ready Replicas
20+
type: integer
21+
description: The number of ZooKeeper servers in the ensemble that are in a Ready state
22+
JSONPath: .status.readyReplicas
23+
- name: Internal Endpoint
24+
type: string
25+
description: Client endpoint internal to cluster network
26+
JSONPath: .status.internalClientEndpoint
27+
- name: External Endpoint
28+
type: string
29+
description: Client endpoint external to cluster network via LoadBalancer
30+
JSONPath: .status.externalClientEndpoint
31+
- name: Age
32+
type: date
33+
JSONPath: .metadata.creationTimestamp
34+
scope: Namespaced
35+
version: v1beta1
36+
subresources:
37+
status: {}
3038

3139
---
3240
apiVersion: apps/v1

helm/solr-operator/Chart.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

22
apiVersion: v1
3-
type: application
43
name: solr-operator
54
description: The Solr Operator enables easy management of Solr resources within Kubernetes.
65
version: 0.2.5

helm/solr-operator/README.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,53 @@
11
Solr Operator
22
=============
3-
A Helm chart for the Solr Operator.
4-
5-
## The Solr Operator
63

74
The Solr Operator is designed to allow easy deployment Solr Clouds and other Solr Resources to Kubernetes.
85

96
Documentation around using the Solr Operator can be found in it's [source repo](https://github.com/bloomberg/solr-operator).
107

118
## Using the Helm Chart
129

10+
### Installing the Zookeeper Operator
11+
12+
Before installing the Solr Operator, we need to install the [Zookeeper Operator](https://github.com/pravega/zookeeper-operator).
13+
This is because the Solr Operator, in most instances, relies on the Zookeeper Operator to create the Zookeeper clusters that Solr coordinates through.
14+
15+
If you are setting `useZkOperator=false`, then please disregard this section.
16+
17+
Eventually the Zookeeper Opertor will be a dependency on the Solr Operator helm chart, but for now there are two easy ways to deploy it.
18+
19+
- A helm chart is available [in the Zookeeper Operator repository](https://github.com/pravega/zookeeper-operator/blob/master/charts/zookeeper-operator/).
20+
- Use the following kubectl command:
21+
```bash
22+
kubectl apply -f https://raw.githubusercontent.com/bloomberg/solr-operator/master/example/dependencies/zk_operator.yaml
23+
```
24+
25+
#### Helm
26+
27+
Eventually this will be a dependency on the helm chart, but for now we can run an easy `kubectl apply`.
28+
29+
```bash
30+
kubectl apply -f https://raw.githubusercontent.com/bloomberg/solr-operator/master/example/dependencies/zk_operator.yaml
31+
```
32+
33+
### Adding the Solr Operator Helm Chart Repository
34+
You should only need to add the solr operator helm chart repository once, by running the following command:
35+
36+
```console
37+
$ helm repo add solr-operator https://bloomberg.github.io/solr-operator/charts
38+
```
39+
1340
### Installing the Chart
1441

15-
To install the chart with the release name `test`:
42+
To install the Solr Operator with the latest version or with a specific version, run either of the following commands:
1643

1744
```console
18-
$ helm install test .
45+
$ helm install solr-operator solr-operator/solr-operator
46+
$ helm install solr-operator solr-operator/solr-operator --version 0.2.5
1947
```
2048

2149
The command deploys the solr-operator on the Kubernetes cluster with the default configuration. The [configuration](#chart-values) section lists the parameters that can be configured during installation.
2250

23-
**NOTE**: Since by default the `useZkOperator` option is set to `True`, you must have already installed the [Zookeeper Operator](https://github.com/pravega/zookeeper-operator) in your kubernetes cluster. A helm chart is [also available](https://github.com/pravega/zookeeper-operator/blob/master/charts/zookeeper-operator/Chart.yaml) for it.
24-
2551
### Helm Version Differences
2652

2753
#### Helm 2
@@ -31,7 +57,7 @@ If you are using Helm 2, CRDs are installed using the crd-install hook. Prior to
3157
You will also need to update the install command to use the name flag, as shown below.
3258

3359
```console
34-
$ helm install --name test .
60+
$ helm install --name solr-operator solr-operator/solr-operator
3561
```
3662

3763
#### Helm 3
@@ -45,13 +71,13 @@ To uninstall/delete the `solr-operator` deployment:
4571
#### Helm 3
4672

4773
```console
48-
$ helm uninstall test
74+
$ helm uninstall solr-operator
4975
```
5076

5177
#### Helm 2
5278

5379
```console
54-
$ helm delete test
80+
$ helm delete solr-operator
5581
```
5682

5783
The command removes all the Kubernetes components associated with the chart and deletes the release.

0 commit comments

Comments
 (0)