Skip to content

Commit

Permalink
update helm_external playbook to add tag to rabbitmq specific croles
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsagtani97 committed Dec 19, 2023
1 parent 6ffdc96 commit 0be790d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 29 deletions.
19 changes: 10 additions & 9 deletions ansible/helm_external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@
server_type: cassandra
network_interface: "{{ cassandra_network_interface }}"

# - 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 }}"
- 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 }}"
tags: rabbitmq-external
2 changes: 1 addition & 1 deletion bin/offline-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -x

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ANSIBLE_DIR="$( cd "$SCRIPT_DIR/../ansible" && pwd )"
ansible-playbook -i "$ANSIBLE_DIR"/inventory/offline "$ANSIBLE_DIR"/helm_external.yml -vv
ansible-playbook -i "$ANSIBLE_DIR"/inventory/offline "$ANSIBLE_DIR"/helm_external.yml --skip-tags=rabbitmq-external -vv

helm upgrade --install --wait cassandra-external ./charts/cassandra-external --values ./values/cassandra-external/values.yaml
helm upgrade --install --wait elasticsearch-external ./charts/elasticsearch-external --values ./values/elasticsearch-external/values.yaml
Expand Down
4 changes: 2 additions & 2 deletions offline/docs_ubuntu_22.04.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,10 @@ After that continue to the next steps below.

### Preparing helm values for external services
Afterwards, run the following playbook to create helm values that tell our helm charts
what the IP addresses of cassandra, elasticsearch, minio and rabbitmq are.
what the IP addresses of cassandra, elasticsearch, minio are.

```
d ansible-playbook -i ./ansible/inventory/offline/hosts.ini ansible/helm_external.yml
d ansible-playbook -i ./ansible/inventory/offline/hosts.ini ansible/helm_external.yml --skip-tags=rabbitmq-external
```


Expand Down
16 changes: 1 addition & 15 deletions offline/federation_preparation.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,10 @@ 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
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:
Expand Down
4 changes: 2 additions & 2 deletions values/wire-server/prod-values.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ brig:
elasticsearch:
host: elasticsearch-external
rabbitmq:
host: rabbitmq
host: rabbitmq # name of the rabbitmq service, for e.g. rabbitmq-external
useSES: false
# Set to false if you want to hand out DynamoDB to store prekeys
randomPrekeys: true
Expand Down Expand Up @@ -141,7 +141,7 @@ galley:
cassandra:
host: cassandra-external
rabbitmq:
host: rabbitmq
host: rabbitmq # name of the rabbitmq service, for e.g. rabbitmq-external
settings:
# prefix URI used when inviting users to a conversation by link
conversationCodeURI: https://account.example.com/conversation-join/ # change this
Expand Down

0 comments on commit 0be790d

Please sign in to comment.