Skip to content

Commit 3c79af5

Browse files
committed
Add Cluster Status Management Demon
Signed-off-by: Luca Carrogu <[email protected]>
1 parent c6eb90b commit 3c79af5

File tree

17 files changed

+721
-13
lines changed

17 files changed

+721
-13
lines changed

attributes/default.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
default['cluster']['previous_cluster_config_path'] = "#{node['cluster']['shared_dir']}/previous-cluster-config.yaml"
3333
default['cluster']['launch_templates_config_path'] = "#{node['cluster']['shared_dir']}/launch-templates-config.json"
3434
default['cluster']['instance_types_data_path'] = "#{node['cluster']['shared_dir']}/instance-types-data.json"
35+
default['cluster']['computefleet_status_path'] = "#{node['cluster']['shared_dir']}/computefleet-status.json"
3536
default['cluster']['reserved_base_uid'] = 400
3637

3738
# Python Version
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# frozen_string_literal: true
2+
3+
#
4+
# Cookbook:: aws-parallelcluster-config
5+
# Recipe:: update_computefleet_status
6+
#
7+
# Copyright:: 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the
10+
# License. A copy of the License is located at
11+
#
12+
# http://aws.amazon.com/apache2.0/
13+
#
14+
# or in the "LICENSE.txt" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
15+
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
unless node['cluster']['scheduler'] == 'awsbatch'
19+
load_cluster_config
20+
end
21+
22+
include_recipe 'aws-parallelcluster-scheduler-plugin::update_computefleet_status' if node['cluster']['scheduler'] == 'plugin'

cookbooks/aws-parallelcluster-config/templates/default/base/parallelcluster_supervisord.conf.erb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ environment = HOME="/home/<%= node['cluster']['cluster_admin_user'] %>",USER="<%
1717
redirect_stderr = true
1818
stdout_logfile = /var/log/parallelcluster/clustermgtd
1919
<% end -%>
20-
20+
<% if node['cluster']['scheduler'] == 'plugin' -%>
21+
[program:clusterstatusmgtd]
22+
command = <%= node['cluster']['cookbook_virtualenv_path'] %>/bin/python /opt/parallelcluster/scripts/scheduler_plugin/clusterstatusmgtd.py
23+
user = <%= node['cluster']['cluster_admin_user'] %>
24+
environment = HOME="/home/<%= node['cluster']['cluster_admin_user'] %>",USER="<%= node['cluster']['cluster_admin_user'] %>"
25+
redirect_stderr = true
26+
stdout_logfile = /var/log/parallelcluster/clusterstatusmgtd
27+
<% end -%>
2128
<% if node['cluster']['dcv_enabled'] == "head_node" && node['conditions']['dcv_supported'] -%>
2229
[program:pcluster_dcv_authenticator]
2330
command = <%= node['cluster']['dcv']['authenticator']['virtualenv_path'] %>/bin/python <%= node['cluster']['dcv']['authenticator']['user_home'] %>/pcluster_dcv_authenticator.py

0 commit comments

Comments
 (0)