diff --git a/cookbooks/aws-parallelcluster-entrypoints/recipes/external_slurmdbd_config.rb b/cookbooks/aws-parallelcluster-entrypoints/recipes/external_slurmdbd_config.rb index cc8544c436..8bc332ef14 100644 --- a/cookbooks/aws-parallelcluster-entrypoints/recipes/external_slurmdbd_config.rb +++ b/cookbooks/aws-parallelcluster-entrypoints/recipes/external_slurmdbd_config.rb @@ -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 @@ -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" diff --git a/cookbooks/aws-parallelcluster-slurm/recipes/config/retrieve_slurmdbd_config_from_s3.rb b/cookbooks/aws-parallelcluster-slurm/recipes/config/retrieve_slurmdbd_config_from_s3.rb new file mode 100644 index 0000000000..b356ecfbfc --- /dev/null +++ b/cookbooks/aws-parallelcluster-slurm/recipes/config/retrieve_slurmdbd_config_from_s3.rb @@ -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