Skip to content
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

fix after RABBITMQ_ERLANG_COOKIE deprecation #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cloud-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,18 @@ write_files:
docker exec rabbitmq rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
docker exec rabbitmq rabbitmqctl set_permissions -p / rabbit ".*" ".*" ".*"
docker exec rabbitmq rabbitmqctl delete_user guest
- path: /root/data/.erlang.cookie
permissions: '0600'
content: |
${secret_cookie}

runcmd:
- yum update -y
- yum install -y docker jq
- service docker start
- chkconfig docker on
- usermod -a -G docker ec2-user
- docker run -d --name rabbitmq --hostname $HOSTNAME -p 4369:4369 -p 5672:5672 -p 15672:15672 -p 25672:25672 -e RABBITMQ_ERLANG_COOKIE='${secret_cookie}' -v /root/data:/var/lib/rabbitmq -v /root/conf/:/etc/rabbitmq -v /root/bin:/tmp/bin rabbitmq:3-management
- docker run -d --name rabbitmq --hostname $HOSTNAME -p 4369:4369 -p 5672:5672 -p 15672:15672 -p 25672:25672 -v /root/data:/var/lib/rabbitmq -v /root/conf/:/etc/rabbitmq -v /root/bin:/tmp/bin rabbitmq:3-management
- sleep 1
- docker exec rabbitmq bash /tmp/bin/join_cluster.sh $(bash /root/find_hosts.sh)
- sleep 1
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data "aws_ami_ids" "ami" {

filter {
name = "name"
values = ["amzn-ami-hvm-2017*-gp2"]
values = [ var.ami_name_filter ]
}
}

Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ variable "instance_volume_iops" {
default = "0"
}

variable "ami_name_filter" {
default = "amzn-ami-hvm-2017*-gp2"
}