-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RabbitMQ complete doc #667
Conversation
Visit the preview URL for this PR (updated for commit 16e1cbe): https://kubedb-v2-hugo--pr667-rabbit-1n4tge3b.web.app (expires Wed, 25 Sep 2024 04:57:05 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0f29ae8ae0bd54a99bf2b223b6833be47acd5943 |
9b58177
to
9848696
Compare
Now, wait until `rabbitmq-autoscale` has status `Ready`. i.e, | ||
|
||
```bash | ||
$ kubectl get pp -n demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get rm
- `spec.databaseRef.name` specifies that we are performing compute resource autoscaling on `rabbitmq-autoscale`. | ||
- `spec.compute.rabbitmq.trigger` specifies that compute resource autoscaling is enabled for this rabbitmq. | ||
- `spec.compute.rabbitmq.podLifeTimeThreshold` specifies the minimum lifetime for at least one of the pod to initiate a vertical scaling. | ||
- `spec.compute.replicaset.resourceDiffPercentage` specifies the minimum resource difference in percentage. The default is 10%. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spec.compute.rabbitmq.resourceDiffPercentage
ppops-rabbitmq-autoscale-zzell6 VerticalScaling Progressing 1m48s | ||
``` | ||
|
||
Let's wait for the ops request to become successful. | ||
|
||
```bash | ||
$ watch kubectl get rabbitmqopsrequest -n demo | ||
Every 2.0s: kubectl get rabbitmqopsrequest -n demo | ||
NAME TYPE STATUS AGE | ||
ppops-rabbitmq-autoscale-zzell6 VerticalScaling Successful 3m40s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name problem ppops
|
||
```bash | ||
$ kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/guides/rabbitmq/autoscaler/storage/cluster/examples/sample-rabbitmq.yaml | ||
rabbitmq.kubedb.com/sample-rabbitmq created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name different of rabbitmq yaml and created rabbitmq
Let's exec into the database pod and fill the database volume(`var/lib/mysql`) using the following commands: | ||
|
||
```bash | ||
$ kubectl exec -it -n demo sample-rabbitmq-0 -- bash | ||
root@sample-rabbitmq-0:/ df -h /var/lib/mysql | ||
Filesystem Size Used Avail Use% Mounted on | ||
/dev/topolvm/57cd4330-784f-42c1-bf8e-e743241df164 1014M 357M 658M 36% /var/lib/mysql | ||
root@sample-rabbitmq-0:/ dd if=/dev/zero of=/var/lib/mysql/file.img bs=500M count=1 | ||
1+0 records in | ||
1+0 records out | ||
524288000 bytes (524 MB, 500 MiB) copied, 0.340877 s, 1.5 GB/s | ||
root@sample-rabbitmq-0:/ df -h /var/lib/mysql | ||
Filesystem Size Used Avail Use% Mounted on | ||
/dev/topolvm/57cd4330-784f-42c1-bf8e-e743241df164 1014M 857M 158M 85% /var/lib/mysql | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pvc directory is wrong for rabbitmq /var/lib/mysql
podTemplate: | ||
spec: | ||
containers: | ||
- name: pgpool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
container name problem
rabbitmq.kubedb.com/builtin-prom-rm created | ||
``` | ||
|
||
Now, wait for the database to go into `Running` state. | ||
|
||
```bash | ||
$ kubectl get rm -n demo builtin-prom-rm | ||
NAME VERSION STATUS AGE | ||
builtin-prom-rm 3.13.2 Ready 2m34s | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name mismatched
|
||
2. `KubeDB` Provisioner operator watches the `RabbitMQ` CRO. | ||
|
||
3. When the operator finds a `RabbitMQ` CR, it creates required number of `StatefulSets` and related necessary stuff like secrets, services, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Petsets
$ kubectl exec -it mg-rs-2 -n demo bash | ||
root@mgo-rs-tls-2:/$ ls /var/run/RabbitMQ/tls | ||
ca.crt client.pem mongo.pem | ||
root@mgo-rs-tls-2:/$ openssl x509 -in /var/run/RabbitMQ/tls/client.pem -inform PEM -subject -nameopt RFC2253 -noout | ||
subject=CN=root,OU=client,O=mongo | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be rabbitmq and path should be accurate
We are connected to the mongo shell. Let's run some command to verify the sslMode and the user, | ||
|
||
```bash | ||
rs0:PRIMARY> db.adminCommand({ getParameter:1, sslMode:1 }) | ||
{ | ||
"sslMode" : "requireSSL", | ||
"ok" : 1, | ||
"$clusterTime" : { | ||
"clusterTime" : Timestamp(1615472249, 1), | ||
"signature" : { | ||
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), | ||
"keyId" : NumberLong(0) | ||
} | ||
}, | ||
"operationTime" : Timestamp(1615472249, 1) | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work with rabbitmq?
Signed-off-by: raihankhan <[email protected]>
docs/guides/rabbitmq/scaling/vertical-scaling/vertical-scaling.md
Outdated
Show resolved
Hide resolved
Signed-off-by: raihankhan <[email protected]>
No description provided.