Skip to content

Commit 076fe89

Browse files
authored
simplify and fix getting-started page in main docs (#432)
* working copy * simplify to single node
1 parent 426aeaa commit 076fe89

File tree

1 file changed

+68
-53
lines changed

1 file changed

+68
-53
lines changed

modules/ROOT/pages/getting_started.adoc

Lines changed: 68 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,19 @@ Kind offers a very quick and easy way to bootstrap your Kubernetes infrastructur
2424

2525
If you don't already have Docker then visit https://docs.docker.com/get-docker/[Docker Website] to find out how to install Docker. Kind is a single executable that performs the tasks of installing and configuring Kubernetes for you within Docker containers. The https://kind.sigs.k8s.io/docs/user/quick-start/[Kind Website] has instructions for installing Kind on your system.
2626

27-
Once you have both of these installed then you can build a Kubernetes cluster in Docker. We're going to create a 2 node cluster to test out Stackable, one node hosting the Kubernetes control plane and the other hosting the Stackable services.
27+
Once you have both of these installed then you can build a Kubernetes cluster in Docker. We're going to create a simple, single node cluster to test out Stackable, with the one node hosting both the Kubernetes control plane and the Stackable services.
2828

2929
[source, bash]
3030
----
31-
kind create cluster --name quickstart --config - << EOF
32-
---
33-
kind: Cluster
34-
apiVersion: kind.x-k8s.io/v1alpha4
35-
nodes:
36-
- role: control-plane
37-
- role: worker
38-
kubeadmConfigPatches:
39-
- |
40-
kind: JoinConfiguration
41-
nodeRegistration:
42-
kubeletExtraArgs:
43-
node-labels: node=quickstart-1
44-
EOF
31+
kind create cluster --name quickstart
4532
----
4633

4734
=== Installing Kubernetes using K3s
4835
K3s provides a quick way of installing Kubernetes. On your control node run the following command to install K3s:
4936

5037
[source,bash]
5138
----
52-
curl -sfL https://get.k3s.io | sh -s - --node-label 'node=quickstart-1' --write-kubeconfig-mode 644
39+
curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644
5340
----
5441

5542
So long as you have an Internet connection K3s will download and automatically configure a simple Kubernetes environment.
@@ -70,7 +57,14 @@ To check if everything worked as expected you can use `kubectl cluster-info` to
7057
----
7158
Kubernetes control plane is running at https://127.0.0.1:6443
7259
CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
73-
Metrics-server is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy
60+
----
61+
62+
If you set up your cluster using K3s you will additionally see the metrics server:
63+
64+
----
65+
Kubernetes control plane is running at https://127.0.0.1:6443
66+
CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
67+
Metrics-server is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/https:metrics-server:https/proxy
7468
----
7569

7670
== Installing Stackable
@@ -85,7 +79,7 @@ Stackable operators can be installed using stackablectl. Run the following comma
8579

8680
[source,bash]
8781
----
88-
stackablectl release install -i zookeeper -i kafka -i nifi -i secret 23.7
82+
stackablectl release install -i commons -i secret -i zookeeper -i kafka -i nifi 23.7
8983
----
9084

9185
.Using Helm instead
@@ -104,21 +98,23 @@ Install the operators:
10498
10599
[source,bash]
106100
----
107-
helm install zookeeper-operator stackable-stable/zookeeper-operator --version=0.10.0
108-
helm install kafka-operator stackable-stable/kafka-operator --version=0.6.0
109-
helm install secret-operator stackable-stable/secret-operator --version=0.5.0
110-
helm install nifi-operator stackable-stable/nifi-operator --version=0.6.0
101+
helm install zookeeper-operator stackable-stable/zookeeper-operator --version=23.7
102+
helm install kafka-operator stackable-stable/kafka-operator --version=23.7
103+
helm install secret-operator stackable-stable/secret-operator --version=23.7
104+
helm install commons-operator stackable-stable/commons-operator --version=23.7
105+
helm install nifi-operator stackable-stable/nifi-operator --version=23.7
111106
----
112107
====
113108

114109
You can check which operators are installed using `stackablectl operator installed`:
115110

116111
----
117112
OPERATOR VERSION NAMESPACE STATUS LAST UPDATED
118-
kafka 0.6.0 default deployed 2022-06-30 17:01:17.552606 +0100 BST
119-
nifi 0.6.0 default deployed 2022-06-30 17:01:31.895733 +0100 BST
120-
secret 0.5.0 default deployed 2022-06-30 17:07:48.542761 +0100 BST
121-
zookeeper 0.10.0 default deployed 2022-06-30 17:01:47.032154 +0100 BST
113+
commons 23.7.0 default deployed 2023-07-27 09:41:05.769685041 +0200 CEST
114+
kafka 23.7.0 default deployed 2023-07-27 09:41:27.685845379 +0200 CEST
115+
nifi 23.7.0 default deployed 2023-07-27 09:41:40.928558978 +0200 CEST
116+
secret 23.7.0 default deployed 2023-07-27 09:41:51.820834174 +0200 CEST
117+
zookeeper 23.7.0 default deployed 2023-07-27 09:41:54.972145417 +0200 CEST
122118
----
123119

124120
== Deploying Stackable Services
@@ -136,13 +132,26 @@ kind: ZookeeperCluster
136132
metadata:
137133
name: simple-zk
138134
spec:
135+
image:
136+
productVersion: "3.8.1"
137+
stackableVersion: "23.7"
138+
clusterConfig:
139+
tls:
140+
serverSecretClass: null
139141
servers:
140142
roleGroups:
141143
primary:
142144
replicas: 1
143145
config:
144146
myidOffset: 10
145-
version: 3.8.0-stackable0
147+
---
148+
apiVersion: zookeeper.stackable.tech/v1alpha1
149+
kind: ZookeeperZnode
150+
metadata:
151+
name: simple-zk-znode
152+
spec:
153+
clusterRef:
154+
name: simple-zk
146155
EOF
147156
----
148157

@@ -158,8 +167,13 @@ kind: KafkaCluster
158167
metadata:
159168
name: simple-kafka
160169
spec:
161-
version: 2.8.1-stackable0
162-
zookeeperConfigMapName: simple-kafka-znode
170+
image:
171+
productVersion: "3.4.0"
172+
stackableVersion: "23.7"
173+
clusterConfig:
174+
zookeeperConfigMapName: simple-kafka-znode
175+
tls:
176+
serverSecretClass: null
163177
brokers:
164178
roleGroups:
165179
brokers:
@@ -204,41 +218,42 @@ kind: NifiCluster
204218
metadata:
205219
name: simple-nifi
206220
spec:
207-
version: 1.16.3-stackable0.1.0
208-
zookeeperConfigMapName: simple-nifi-znode
209-
config:
221+
image:
222+
productVersion: "1.21.0"
223+
stackableVersion: "23.7"
224+
clusterConfig:
225+
listenerClass: external-unstable
226+
zookeeperConfigMapName: simple-nifi-znode
210227
authentication:
211228
method:
212229
singleUser:
213230
adminCredentialsSecret: nifi-admin-credentials-simple
214-
autoGenerate: true
215231
sensitiveProperties:
216232
keySecret: nifi-sensitive-property-key
217233
autoGenerate: true
218234
nodes:
219235
roleGroups:
220236
default:
221-
config:
222-
log:
223-
rootLogLevel: INFO
224237
replicas: 1
225238
EOF
226239
----
227240

228241
You can check the status of the services using `kubectl get pods`. This will retrieve the status of all pods running in the default namespace.
229242

230243
----
231-
NAME READY STATUS RESTARTS AGE
232-
nifi-operator-deployment-64c98c779c-nw6h8 1/1 Running 0 24m
233-
kafka-operator-deployment-54df9f86c7-psqgd 1/1 Running 0 24m
234-
zookeeper-operator-deployment-767458d4f5-2czb9 1/1 Running 0 24m
235-
secret-operator-daemonset-pddkv 2/2 Running 0 24m
236-
simple-zk-server-primary-0 1/1 Running 0 23m
237-
simple-kafka-broker-brokers-0 2/2 Running 0 21m
238-
simple-nifi-node-default-0 1/1 Running 0 22m
244+
NAME READY STATUS RESTARTS AGE
245+
commons-operator-deployment-598c744f6f-gfj2h 1/1 Running 0 15m
246+
kafka-operator-deployment-7c4bd694d5-xjwsj 1/1 Running 0 15m
247+
nifi-operator-deployment-748d748487-qg885 1/1 Running 0 15m
248+
secret-operator-daemonset-wr57f 3/3 Running 0 14m
249+
simple-kafka-broker-brokers-0 2/2 Running 0 7m50s
250+
simple-nifi-create-reporting-task-1-21-0-jltpv 0/1 Completed 4 5m13s
251+
simple-nifi-node-default-0 1/1 Running 0 5m13s
252+
simple-zk-server-primary-0 1/1 Running 0 14m
253+
zookeeper-operator-deployment-64fcccc797-pckhf 1/1 Running 0 14m
239254
----
240255

241-
Since this is the first time that each of these services has been deployed to these nodes, it will take some time to download the software from the Stackable repository and deploy the services. Once all of the pods are in the running state your cluster is ready to use.
256+
Since this is the first time that each of these services has been deployed to these nodes, it will take some time to download the software from the Stackable repository and deploy the services. Once all the pods are in the running state your cluster is ready to use.
242257

243258
== Testing your cluster
244259
If all has gone well then you will have successfully deployed a Stackable cluster and used it to start three services that should now be ready for you.
@@ -255,7 +270,7 @@ The shell should connect automatically to the ZooKeeper server running on the po
255270

256271
----
257272
[zk: localhost:2181(CONNECTED) 0] ls /
258-
[nifi, znode-17b28a7e-0d45-450b-8209-871225c6efa1, zookeeper]
273+
[znode-81484420-e097-4b13-a121-84f0211b99db, znode-9076785e-39d0-49cc-b067-30be25bf4faa, znode-a4b12f66-48c2-40dc-91d8-a42135eaf371, zookeeper]
259274
----
260275

261276
=== Apache Kafka
@@ -283,15 +298,15 @@ To get the IP address we need to connect to (in this case `172.18.0.2`), run:
283298

284299
[source,bash]
285300
----
286-
kubectl get nodes --selector=node=quickstart-1 -o wide
301+
kubectl get nodes -o wide
287302
----
288303
----
289-
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
290-
quickstart-worker Ready <none> 45m v1.21.1 172.18.0.2 <none> Ubuntu 21.04 5.15.0-25-generic containerd://1.5.2
304+
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
305+
quickstart-control-plane Ready control-plane 9m59s v1.25.3 172.18.0.2 <none> Ubuntu 22.04.1 LTS 5.14.0-1052-oem containerd://1.6.9
291306
----
292307

293308

294-
With the following command we get the port (in this case `30247`):
309+
With the following command we get the port (in this case `31931`):
295310

296311
[source,bash]
297312
----
@@ -300,14 +315,14 @@ kubectl get svc simple-nifi
300315

301316
----
302317
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
303-
simple-nifi NodePort 10.43.75.25 <none> 8443:30247/TCP 49m
318+
simple-nifi NodePort 10.96.82.80 <none> 8443:31931/TCP 7m51s
304319
----
305320

306-
Browse to the address of your Kubernetes node on port `30247` e.g. https://172.18.0.2:30247/nifi and you should see the NiFi login screen.
321+
Browse to the address of your Kubernetes node on port `31931` e.g. https://172.18.0.2:31931/nifi and you should see the NiFi login screen.
307322

308323
image:nifi_login_screen.png[The Apache NiFi web interface login screen]
309324

310-
The Apache NiFi operator will automatically generate the admin user credentials with a random password and store it as a Kubernetes secret in order to provide some security out of the box. You can retrieve this password for the `admin` user with the following kubectl command.
325+
If a password has not been specified for the admin user the Apache NiFi operator will automatically generate the admin user credentials with a random password and store it as a Kubernetes secret in order to provide some security out of the box. In the example above we have provided our own secret, but you can retrieve and confirm this password for the `admin` user with the following kubectl command.
311326

312327
[source,bash]
313328
----

0 commit comments

Comments
 (0)