Class: AWSCDK::PCS::CfnCluster::SlurmConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pcs/cfn_cluster.rb

Overview

Additional options related to the Slurm scheduler.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(accounting: nil, auth_key: nil, cgroup_custom_settings: nil, jwt_auth: nil, scale_down_idle_time_in_seconds: nil, slurm_custom_settings: nil, slurmdbd_custom_settings: nil, slurm_rest: nil) ⇒ SlurmConfigurationProperty

Returns a new instance of SlurmConfigurationProperty.

Parameters:



1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
# File 'pcs/cfn_cluster.rb', line 1089

def initialize(accounting: nil, auth_key: nil, cgroup_custom_settings: nil, jwt_auth: nil, scale_down_idle_time_in_seconds: nil, slurm_custom_settings: nil, slurmdbd_custom_settings: nil, slurm_rest: nil)
  @accounting = accounting.is_a?(Hash) ? ::AWSCDK::PCS::CfnCluster::AccountingProperty.new(**accounting.transform_keys(&:to_sym)) : accounting
  Jsii::Type.check_type(@accounting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wY3MuQ2ZuQ2x1c3Rlci5BY2NvdW50aW5nUHJvcGVydHkifV19fQ==")), "accounting") unless @accounting.nil?
  @auth_key = auth_key.is_a?(Hash) ? ::AWSCDK::PCS::CfnCluster::AuthKeyProperty.new(**auth_key.transform_keys(&:to_sym)) : auth_key
  Jsii::Type.check_type(@auth_key, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wY3MuQ2ZuQ2x1c3Rlci5BdXRoS2V5UHJvcGVydHkifV19fQ==")), "authKey") unless @auth_key.nil?
  @cgroup_custom_settings = cgroup_custom_settings
  Jsii::Type.check_type(@cgroup_custom_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGNzLkNmbkNsdXN0ZXIuQ2dyb3VwQ3VzdG9tU2V0dGluZ1Byb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "cgroupCustomSettings") unless @cgroup_custom_settings.nil?
  @jwt_auth = jwt_auth.is_a?(Hash) ? ::AWSCDK::PCS::CfnCluster::JwtAuthProperty.new(**jwt_auth.transform_keys(&:to_sym)) : jwt_auth
  Jsii::Type.check_type(@jwt_auth, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wY3MuQ2ZuQ2x1c3Rlci5Kd3RBdXRoUHJvcGVydHkifV19fQ==")), "jwtAuth") unless @jwt_auth.nil?
  @scale_down_idle_time_in_seconds = scale_down_idle_time_in_seconds
  Jsii::Type.check_type(@scale_down_idle_time_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scaleDownIdleTimeInSeconds") unless @scale_down_idle_time_in_seconds.nil?
  @slurm_custom_settings = slurm_custom_settings
  Jsii::Type.check_type(@slurm_custom_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGNzLkNmbkNsdXN0ZXIuU2x1cm1DdXN0b21TZXR0aW5nUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "slurmCustomSettings") unless @slurm_custom_settings.nil?
  @slurmdbd_custom_settings = slurmdbd_custom_settings
  Jsii::Type.check_type(@slurmdbd_custom_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGNzLkNmbkNsdXN0ZXIuU2x1cm1kYmRDdXN0b21TZXR0aW5nUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "slurmdbdCustomSettings") unless @slurmdbd_custom_settings.nil?
  @slurm_rest = slurm_rest.is_a?(Hash) ? ::AWSCDK::PCS::CfnCluster::SlurmRestProperty.new(**slurm_rest.transform_keys(&:to_sym)) : slurm_rest
  Jsii::Type.check_type(@slurm_rest, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wY3MuQ2ZuQ2x1c3Rlci5TbHVybVJlc3RQcm9wZXJ0eSJ9XX19")), "slurmRest") unless @slurm_rest.nil?
end

Instance Attribute Details

#accountingAWSCDK::IResolvable, ... (readonly)

The accounting configuration includes configurable settings for Slurm accounting.



1112
1113
1114
# File 'pcs/cfn_cluster.rb', line 1112

def accounting
  @accounting
end

#auth_keyAWSCDK::IResolvable, ... (readonly)

The shared Slurm key for authentication, also known as the cluster secret .



1117
1118
1119
# File 'pcs/cfn_cluster.rb', line 1117

def auth_key
  @auth_key
end

#cgroup_custom_settingsAWSCDK::IResolvable, ... (readonly)

Additional cgroup-specific configuration that directly maps to cgroup.conf settings.



1122
1123
1124
# File 'pcs/cfn_cluster.rb', line 1122

def cgroup_custom_settings
  @cgroup_custom_settings
end

#jwt_authAWSCDK::IResolvable, ... (readonly)

The JWT authentication configuration for Slurm REST API access.



1127
1128
1129
# File 'pcs/cfn_cluster.rb', line 1127

def jwt_auth
  @jwt_auth
end

#scale_down_idle_time_in_secondsNumeric? (readonly)

The time (in seconds) before an idle node is scaled down.

Default: 600



1134
1135
1136
# File 'pcs/cfn_cluster.rb', line 1134

def scale_down_idle_time_in_seconds
  @scale_down_idle_time_in_seconds
end

#slurm_custom_settingsAWSCDK::IResolvable, ... (readonly)

Additional Slurm-specific configuration that directly maps to Slurm settings.



1139
1140
1141
# File 'pcs/cfn_cluster.rb', line 1139

def slurm_custom_settings
  @slurm_custom_settings
end

#slurm_restAWSCDK::IResolvable, ... (readonly)

The Slurm REST API configuration for the cluster.



1149
1150
1151
# File 'pcs/cfn_cluster.rb', line 1149

def slurm_rest
  @slurm_rest
end

#slurmdbd_custom_settingsAWSCDK::IResolvable, ... (readonly)

Additional slurmdbd-specific configuration that directly maps to slurmdbd.conf settings.



1144
1145
1146
# File 'pcs/cfn_cluster.rb', line 1144

def slurmdbd_custom_settings
  @slurmdbd_custom_settings
end

Class Method Details

.jsii_propertiesObject



1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
# File 'pcs/cfn_cluster.rb', line 1151

def self.jsii_properties
  {
    :accounting => "accounting",
    :auth_key => "authKey",
    :cgroup_custom_settings => "cgroupCustomSettings",
    :jwt_auth => "jwtAuth",
    :scale_down_idle_time_in_seconds => "scaleDownIdleTimeInSeconds",
    :slurm_custom_settings => "slurmCustomSettings",
    :slurmdbd_custom_settings => "slurmdbdCustomSettings",
    :slurm_rest => "slurmRest",
  }
end

Instance Method Details

#to_jsiiObject



1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
# File 'pcs/cfn_cluster.rb', line 1164

def to_jsii
  result = {}
  result.merge!({
    "accounting" => @accounting,
    "authKey" => @auth_key,
    "cgroupCustomSettings" => @cgroup_custom_settings,
    "jwtAuth" => @jwt_auth,
    "scaleDownIdleTimeInSeconds" => @scale_down_idle_time_in_seconds,
    "slurmCustomSettings" => @slurm_custom_settings,
    "slurmdbdCustomSettings" => @slurmdbd_custom_settings,
    "slurmRest" => @slurm_rest,
  })
  result.compact
end