Skip to content

Commit

Permalink
[celery-rabbitmq-update] tested, now rabbitmq (and workers) definitel…
Browse files Browse the repository at this point in the history
…y work.
  • Loading branch information
biblicabeebli committed Mar 29, 2024
1 parent 1aaf24d commit 7011142
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cluster_management/launch_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def load_git_repo():
""" Get a local copy of the git repository """
# Git clone the repository into the remote beiwe-backend folder
# git operations print to both stderr *and* stdout, so redirect them both to the log file
log.info("Cloning the git repository into the remote server, supressing more spam...")
log.info("Cloning the git repository into the remote server, suppressing more spam...")
run(f'cd {REMOTE_HOME_DIR}; git clone https://github.com/onnela-lab/beiwe-backend.git 2>> {LOG_FILE}', quiet=True)

if DEV_MODE:
Expand All @@ -149,7 +149,7 @@ def setup_python():
versions: str = run(f"{pyenv} install --list", quiet=True) # its a weird string-like object
versions = [v.strip() for v in versions.splitlines() if v.strip().startswith("3.8")]
most_recent_three_point_eight = versions[-1]
log.info(f"It is {most_recent_three_point_eight}!, installing... (Supressing a lot of spam, this will take a while.)")
log.info(f"It is {most_recent_three_point_eight}!, installing... (Suppressing a lot of spam, this will take a while.)")
run(f"{pyenv} install -v {most_recent_three_point_eight} >> {LOG_FILE}", quiet=True)
run(f"{pyenv} virtualenv {most_recent_three_point_eight} beiwe >> {LOG_FILE}", quiet=True)
log.info("It installed successfully! Now installing python requirements... (again with the spam and the suppressing.)")
Expand Down
26 changes: 19 additions & 7 deletions cluster_management/pushed_files/rabbitmq_configuration.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
# Defaults to rabbit. This can be useful if you want to run more than one node
# per machine - RABBITMQ_NODENAME should be unique per erlang-node-and-machine
# combination. See the clustering on a single machine guide for details:
# We use the environment-variable-like configuration for RabbitMQ.
# documentation for all the environment variable options can be found at
# https://www.rabbitmq.com/docs/configure#supported-environment-variables

# these extra comments are from an ancient version of the default rabbitmq.conf file.

# Defaults to rabbit. This can be useful if you want to run more than one node per machine -
# RABBITMQ_NODENAME should be unique per erlang-node-and-machine combination. See the clustering on
# a single machine guide for details:
# http://www.rabbitmq.com/clustering.html#single-machine
#NODENAME=rabbit

# By default RabbitMQ will bind to all interfaces, on IPv4 and IPv6 if
# available. Set this if you only want to bind to one network interface or#
# address family.
# By default RabbitMQ will bind to all interfaces, on IPv4 and IPv6 if available. Set this if you
# only want to bind to one network interface or# address family.
#NODE_IP_ADDRESS=127.0.0.1

# Defaults to 5672; we use port 50000.
NODE_PORT=50000
NODE_PORT=50000

# 50001 is used by supervisord, so we will use 50002.
# Task distribution works without needing to modify the security groups, not 100% clear
# what this port is used for - its the erlang distribution port.
# if not present you get a "invalid_dist_port_range,70000" error because by default it takes the
# node port and adds 20k. Sure. Whatever.
RABBITMQ_DIST_PORT=50002

0 comments on commit 7011142

Please sign in to comment.