-
Notifications
You must be signed in to change notification settings - Fork 45
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
Update docs and CI to support rabbitmq-external chart #655
Merged
Merged
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
5a36bf6
fix the system containers seeding group
amitsagtani97 a0e9e39
add more storage to vms in test env
amitsagtani97 dc7dd76
ci.sh: Add rabbitmq-external chart to artifact
supersven 610378f
Use `rabbitmq` Helm chart (instead of `rabbitmq-external`)
supersven d35442d
Document RabbitMQ installation
supersven 889ddb2
offline-cluster.sh: Don't use rabbitmq and helm_external playbooks
supersven 7e4618a
add helm_external playbook installation step in offline-helm.sh
amitsagtani97 f3e7170
use k8s based rabbitmq by default
amitsagtani97 d047978
Point restund_allowed_private_network_cidrs to 172.16.0.1/24
supersven d77f1bd
offline-cluster.sh: Run restund Ansible playbook last
supersven 8f49bd7
[temp] use mandarian release to build the artifact
amitsagtani97 9fbf5b7
pickup valid changes from #656
amitsagtani97 05ee989
[temp] debug the failing CI
amitsagtani97 e82a025
use the main wire-server chart repo
amitsagtani97 6096d61
pass the ssh-agent path and remove verbosity
amitsagtani97 ec0bbed
use fixed inventory path for CI
amitsagtani97 1a8d701
pass correct ssh_auth_sock
amitsagtani97 19251c4
Revert "use fixed inventory path for CI"
amitsagtani97 6ffdc96
fix indentation and if-else statements
amitsagtani97 0be790d
update helm_external playbook to add tag to rabbitmq specific croles
amitsagtani97 3ba71f7
fix documentation and CI with rabbitmq chart
amitsagtani97 8c2385b
add note for adding etcd groups
amitsagtani97 6a6de1e
add more details to rabbitmq configuration steps
amitsagtani97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 files
+23 −68 | poetry.lock | |
+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,85 @@ | ||
## 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 | ||
``` | ||
|
||
**Important:** RabbitMQ nodes address each other using a node name, for e.g rabbitmq@ansnode1 | ||
amitsagtani97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Please refer to the official documentation and configure your DNS based on the setup - https://www.rabbitmq.com/clustering.html#cluster-formation-requirements | ||
|
||
|
||
For adding entries to local host file(`/etc/hosts`), run | ||
amitsagtani97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
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 | ||
``` | ||
|
||
Uncomment the following section, in the `ansible/helm_external.yml` file: | ||
``` | ||
# - hosts: "rmq-cluster" | ||
# become: false | ||
# tasks: | ||
# - name: Generate rabbitmq IPs for helm | ||
# include_tasks: tasks/helm_external.yml | ||
# vars: | ||
# external_dir_name: rabbitmq-external | ||
# server_type: rmq-cluster | ||
# network_interface: "{{ rabbitmq_network_interface }}" | ||
|
||
``` | ||
|
||
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 | ||
``` | ||
|
||
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.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 | ||
``` | ||
amitsagtani97 marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is commenting out the best way to not execute this task? Wouldn't it be better to rely on some conditional (e.g.
when: rabbitmq_cluster.is_internal == false
(these value names likely don't exist yet, I made them up))?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.
Created a tag for the rabbimq role and added --skip-tags and --tags to install as required.