-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs and CI to support rabbitmq-external chart (#655)
* fix the system containers seeding group * add more storage to vms in test env * ci.sh: Add rabbitmq-external chart to artifact * Use `rabbitmq` Helm chart (instead of `rabbitmq-external`) * Document RabbitMQ installation Co-authored-by: Sven Tennie <[email protected]> * offline-cluster.sh: Don't use rabbitmq and helm_external playbooks * add helm_external playbook installation step in offline-helm.sh * use k8s based rabbitmq by default * Point restund_allowed_private_network_cidrs to 172.16.0.1/24 * offline-cluster.sh: Run restund Ansible playbook last * [temp] use mandarian release to build the artifact Current Mandarin * pickup valid changes from #656 * [temp] debug the failing CI * use the main wire-server chart repo * pass the ssh-agent path and remove verbosity * use fixed inventory path for CI * pass correct ssh_auth_sock * Revert "use fixed inventory path for CI" This reverts commit ec0bbed. * fix indentation and if-else statements * update helm_external playbook to add tag to rabbitmq specific croles * fix documentation and CI with rabbitmq chart * add note for adding etcd groups * add more details to rabbitmq configuration steps --------- Co-authored-by: Sven Tennie <[email protected]>
- Loading branch information
1 parent
bc1cbd2
commit 4088352
Showing
12 changed files
with
153 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sft
updated
3 files
+3 −1 | README.md | |
+1 −0 | roles/sft-server/tasks/install.yml | |
+0 −1 | roles/sft-server/templates/sftd.vhost.conf.j2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
## RabbitMQ | ||
|
||
There are two methods to deploy the RabbitMQ cluster: | ||
|
||
### Method 1: Install RabbitMQ inside kubernetes cluster with the help of helm chart | ||
|
||
To install the RabbitMQ service, first copy the value and secret files: | ||
``` | ||
cp ./values/rabbitmq/prod-values.example.yaml ./values/rabbitmq/values.yaml | ||
cp ./values/rabbitmq/prod-secrets.example.yaml ./values/rabbitmq/secrets.yaml | ||
``` | ||
By default this will create a RabbitMQ deployment with ephemeral storage. To use the local persistence storage of Kubernetes nodes, please refer to the related documentation in [offline/local_persistent_storage_k8s.md](./local_persistent_storage_k8s.md). | ||
|
||
Now, update the `./values/rabbitmq/values.yaml` and `./values/rabbitmq/secrets.yaml` with correct values as needed. | ||
|
||
Deploy the `rabbitmq` helm chart: | ||
``` | ||
d helm upgrade --install rabbitmq ./charts/rabbitmq --values ./values/rabbitmq/values.yaml --values ./values/rabbitmq/secrets.yaml | ||
``` | ||
|
||
### Method 2: Install RabbitMQ outside of the Kubernetes cluster with an Ansible playbook | ||
|
||
Add the nodes on which you want to run rabbitmq to the `[rmq-cluster]` group in the `ansible/inventory/offline/hosts.ini` file. Also, update the `ansible/roles/rabbitmq-cluster/defaults/main.yml` file with the correct configurations for your environment. | ||
|
||
If you need RabbitMQ to listen on a different interface than the default gateway, set `rabbitmq_network_interface` | ||
|
||
You should have following entries in the `/ansible/inventory/offline/hosts.ini` file. For example: | ||
``` | ||
[rmq-cluster:vars] | ||
rabbitmq_network_interface = enp1s0 | ||
[rmq-cluster] | ||
ansnode1 | ||
ansnode2 | ||
ansnode3 | ||
``` | ||
|
||
|
||
#### Hostname Resolution | ||
RabbitMQ nodes address each other using a node name, a combination of a prefix and domain name, either short or fully-qualified (FQDNs). For e.g. rabbitmq@ansnode1 | ||
|
||
Therefore every cluster member must be able to resolve hostnames of every other cluster member, its own hostname, as well as machines on which command line tools such as rabbitmqctl might be used. | ||
|
||
Nodes will perform hostname resolution early on node boot. In container-based environments it is important that hostname resolution is ready before the container is started. | ||
|
||
Hostname resolution can use any of the standard OS-provided methods: | ||
|
||
For e.g. DNS records | ||
Local host files (e.g. /etc/hosts) | ||
Reference - https://www.rabbitmq.com/clustering.html#cluster-formation-requirements | ||
|
||
|
||
For adding entries to local host file(`/etc/hosts`), run | ||
``` | ||
d ansible-playbook -i ansible/inventory/offline/hosts.ini ansible/roles/rabbitmq-cluster/tasks/configure_dns.yml | ||
``` | ||
|
||
Create the rabbitmq cluster: | ||
|
||
``` | ||
d ansible-playbook -i ansible/inventory/offline/hosts.ini ansible/rabbitmq.yml | ||
``` | ||
|
||
and run the following playbook to create values file for helm charts to look for RabbitMQ IP addresses - | ||
|
||
``` | ||
d ansible-playbook -i ./ansible/inventory/offline/hosts.ini ansible/helm_external.yml --tags=rabbitmq-external | ||
``` | ||
|
||
Make Kubernetes aware of where RabbitMQ external stateful service is running: | ||
``` | ||
d helm install rabbitmq-external ./charts/rabbitmq-external --values ./values/rabbitmq-external/values.yaml | ||
``` | ||
|
||
Configure wire-server to use the external RabbitMQ service: | ||
|
||
Edit the `/values/wire-server/prod-values.example.yaml` file to update the RabbitMQ host | ||
Under `brig` and `galley` section, you will find the `rabbitmq` config, update the host to `rabbitmq-external`, it should look like this: | ||
``` | ||
rabbitmq: | ||
host: rabbitmq-external | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters