Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hehe7318 committed Sep 12, 2023
1 parent 1522536 commit c2b0df0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
14 changes: 7 additions & 7 deletions cookbooks/aws-parallelcluster-slurm/kitchen.slurm-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ suites:
controls:
- /tag:config_munge/
attributes:
node_type: HeadNode
scheduler: 'slurm'
dependencies:
- recipe:aws-parallelcluster-slurm::mock_slurm
- resource:node_attributes
cluster:
region: 'us-east-2'
config:
DevSettings:
SlurmSettings:
MungeKeySecretArn: 'arn:aws:secretsmanager:us-east-2:249582277112:secret:TestMungeKey-jDtnqi'
node_type: HeadNode
scheduler: 'slurm'
slurm:
install_dir: "/opt/slurm"
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
# limitations under the License.

setup_munge_head_node unless redhat_on_docker?
include_recipe 'aws-parallelcluster-slurm::config_munge_key'

# Export /opt/slurm
nfs_export "#{node['cluster']['slurm']['install_dir']}" do
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true

#
# Cookbook:: aws-parallelcluster-slurm
# Recipe:: config_munge_key
#
# Copyright:: 2013-2021 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.

setup_munge_head_node unless on_docker?
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
group 'root'
cwd '/tmp'
code <<-FETCH_AND_DECODE
set -e
# Get encoded munge key from secrets manager
encoded_key=$(aws secretsmanager get-secret-value --secret-id #{new_resource.munge_key_secret_arn} --query 'SecretString' --output text --region #{node['cluster']['region']})
# If encoded_key doesn't have a value, error and exit
Expand Down

0 comments on commit c2b0df0

Please sign in to comment.