Skip to content

Commit

Permalink
Fetch slurmdbd configuration from S3 if available
Browse files Browse the repository at this point in the history
Remove configuration of S3 mountpoint (now useless).

Signed-off-by: Jacopo De Amicis <[email protected]>
  • Loading branch information
jdeamicis committed Feb 1, 2024
1 parent abe389b commit 5a1f903
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

include_recipe 'aws-parallelcluster-slurm::config_head_node_directories'

include_recipe 'aws-parallelcluster-slurm::config_external_slurmdbd_s3_mountpoint'
#include_recipe 'aws-parallelcluster-slurm::config_external_slurmdbd_s3_mountpoint'

# TODO: move this template to a separate recipe
# TODO: add a logic in update_munge_key.sh.erb to skip sharing munge key to shared dir
Expand Down Expand Up @@ -80,4 +80,6 @@
# TODO: add a logic in munge_key_manager to skip sharing munge key to shared dir
include_recipe 'aws-parallelcluster-slurm::config_munge_key'

include_recipe 'aws-parallelcluster-slurm::retrieve_slurmdbd_config_from_s3'

include_recipe "aws-parallelcluster-slurm::config_slurm_accounting"
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# frozen_string_literal: true

#
# Cookbook:: aws-parallelcluster-slurm
# Recipe:: retrieve_slurmdbd_config_from_s3
#
# Copyright:: 2013-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the
# License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
# limitations under the License.

# WARNING: Mountpoint for Amazon S3 is a tool that allows you to mount an S3 bucket as a file system.
# This is now GA, but it is still hosted on the AWS Labs repositories (https://github.com/awslabs/mountpoint-s3).
# This is considered fine for the external slurmdbd stack.
# A deeper evaluation would be required for further uses of this tool in AWS ParallelCluster.

bucket_name = node['slurmdbd_conf_bucket']

remote_object "slurmdbd.conf" do
url "s3://#{bucket_name}/slurmdbd.conf"
destination "opt/slurm/etc/slurm/slurmdbd.conf"
sensitive true
ignore_failure true
end

remote_object "slurm_external_slurmdbd.conf" do
url "s3://#{bucket_name}/slurm_external_slurmdbd.conf"
destination "opt/slurm/etc/slurm/slurm_external_slurmdbd.conf"
sensitive true
ignore_failure true
end

0 comments on commit 5a1f903

Please sign in to comment.