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

[WIP] Instructions for using compose setup with minikube. #313

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion compose/galaxy-slurm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ ENV GALAXY_DIR=/export/galaxy-central \
SLURM_GID=1450 \
SLURM_PARTITION_NAME=work \
SLURM_CLUSTER_NAME=Cluster \
SLURM_CONTROL_MACHINE=galaxy-slurm \
SLURM_CONTROL_ADDR=galaxy-slurm \
SLURM_NODE_NAME=galaxy-slurm \
SLURMD_AUTOSTART=True \
SLURMCTLD_AUTOSTART=True \
SLURM_CONF_PATH=/export/slurm.conf \
Expand Down
9 changes: 7 additions & 2 deletions compose/galaxy-slurm/configure_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
#SlurmctldLogFile=
SlurmdDebug=3
#SlurmdLogFile=
NodeName=$hostname CPUs=$cpus RealMemory=$memory State=UNKNOWN
NodeName=$node_name NodeAddr=$hostname CPUs=$cpus RealMemory=$memory State=UNKNOWN
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, interesting!

PartitionName=$partition_name Nodes=$nodes Default=YES MaxTime=INFINITE State=UP Shared=YES
'''

Expand All @@ -91,9 +91,11 @@

def main():
hostname = gethostname()
node_name = environ.get('SLURM_NODE_NAME', hostname)
template_params = {
"hostname": hostname,
"nodes": ",".join(environ.get('SLURM_NODES', hostname).split(',')),
"node_name": node_name,
"nodes": ",".join(environ.get('SLURM_NODES', node_name).split(',')),
"cluster_name": environ.get('SLURM_CLUSTER_NAME', 'Cluster'),
"control_machine": environ.get('SLURM_CONTROL_MACHINE', hostname),
"user": environ.get('SLURM_USER_NAME', '{{ galaxy_user_name }}'),
Expand All @@ -102,6 +104,9 @@ def main():
"memory": environ.get("SLURM_MEMORY", int(mem / (1024 * 1024)))
}
config_contents = Template(SLURM_CONFIG_TEMPLATE).substitute(template_params)
control_addr = environ.get('SLURM_CONTROL_ADDR', None)
if control_addr:
config_contents = config_contents.replace("#ControlAddr=", "ControlAddr=%s" % control_addr)
open("/etc/slurm-llnl/slurm.conf", "w").write(config_contents)

if __name__ == "__main__":
Expand Down