Skip to content

Commit 4a2e0fe

Browse files
author
Himani Deshpande
committed
Re-naming NICE DCV to Amazon DCV
1 parent 95e480e commit 4a2e0fe

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

cookbooks/aws-parallelcluster-platform/files/dcv/pcluster_dcv_authenticator.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def get_token_info(self, token):
103103

104104
class DCVAuthenticator(BaseHTTPRequestHandler):
105105
"""
106-
Simple HTTP server to handle NICE DCV authentication process.
106+
Simple HTTP server to handle Amazon DCV authentication process.
107107
108108
The authentication process to access to a DCV session is performed by the following steps:
109109
1. Obtain a Request Token:
@@ -191,7 +191,7 @@ def do_GET(self): # noqa N802, pylint: disable=C0103
191191

192192
def do_POST(self): # noqa N802 pylint: disable=C0103
193193
"""
194-
Handle POST requests, coming from NICE DCV server.
194+
Handle POST requests, coming from Amazon DCV server.
195195
196196
The format of the request is the following:
197197
curl -k http://localhost:<port> -d sessionId=<session-id> -d authenticationToken=<token>
@@ -360,7 +360,7 @@ def _is_session_valid(user, session_id):
360360
# because currently DCV doesn't allow list-session to list all session even for non-root user.
361361
# TODO change this method if DCV updates his behaviour.
362362
"""
363-
logger.info("Verifying NICE DCV session validity..")
363+
logger.info("Verifying Amazon DCV session validity..")
364364
# Remove the first and the last because they are the heading and empty, respectively
365365
# All commands and arguments in this subprocess call are built as literals
366366
processes = subprocess.check_output(["/bin/ps", "aux"]).decode("utf-8").split("\n")[1:-1] # nosec B603
@@ -370,7 +370,7 @@ def _is_session_valid(user, session_id):
370370
filter(lambda process: DCVAuthenticator.check_dcv_process(process, user, session_id), processes), None
371371
):
372372
raise DCVAuthenticator.IncorrectRequestError("The given session does not exists")
373-
logger.info("The NICE DCV session is valid.")
373+
logger.info("The Amazon DCV session is valid.")
374374

375375
@staticmethod
376376
def _verify_session_existence(user, session_id):
@@ -402,9 +402,9 @@ class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
402402

403403
def _run_server(port, certificate=None, key=None):
404404
"""
405-
Run NICE DCV authenticator server on localhost.
405+
Run Amazon DCV authenticator server on localhost.
406406
407-
The NICE DCV authenticator server *must* run with an appropriate user.
407+
The Amazon DCV authenticator server *must* run with an appropriate user.
408408
409409
:param port: the port in which you want to start the server
410410
:param certificate: the certificate to use if HTTPSs
@@ -497,12 +497,12 @@ def main():
497497
global logger # pylint: disable=C0103,W0603
498498
logger = _config_logger()
499499
try:
500-
logger.info("Starting NICE DCV authenticator server")
500+
logger.info("Starting Amazon DCV authenticator server")
501501
args = _parse_args()
502502
_prepare_auth_folder()
503503
_run_server(port=args.port if args.port else 8444, certificate=args.certificate, key=args.key)
504504
except KeyboardInterrupt:
505-
logger.info("Closing NICE DCV authenticator server")
505+
logger.info("Closing Amazon DCV authenticator server")
506506
except Exception as e:
507507
fail(f"Unexpected error of type {type(e).__name__}: {e}")
508508

cookbooks/aws-parallelcluster-platform/files/dcv/pcluster_dcv_connect.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,18 @@ _create_dcv_session() {
9090
dcv_session_file="$1"
9191
shared_folder_path="$2"
9292

93-
_log "Creating a new NICE DCV session..."
93+
_log "Creating a new Amazon DCV session..."
9494
# Generate a random session id
9595
sessionid=$(shuf -zer -n20 {A..Z} {a..z} {0..9})
9696
echo "${sessionid}" > "${dcv_session_file}"
9797
dcv create-session --type virtual --storage-root "${shared_folder_path}" "${sessionid}"
98-
_log "NICE DCV session created successfully."
98+
_log "Amazon DCV session created successfully."
9999

100100
echo "${sessionid}"
101101
}
102102

103103
main() {
104-
_log "--- Initializing NICE DCV authentication... ---"
104+
_log "--- Initializing Amazon DCV authentication... ---"
105105

106106
if [[ -z "$1" ]]; then
107107
_fail "The script requires the shared folder as input parameter."
@@ -117,7 +117,7 @@ main() {
117117
fi
118118

119119
if ! systemctl is-active --quiet dcvserver; then
120-
_fail "NICE DCV service is not active on the given instance."
120+
_fail "Amazon DCV service is not active on the given instance."
121121
fi
122122

123123
# Create a session with session storage enabled.
@@ -127,7 +127,7 @@ main() {
127127
sessionid=$(_create_dcv_session "${dcv_session_file}" "${shared_folder_path}")
128128
else
129129
sessionid=$(cat "${dcv_session_file}")
130-
_log "Reusing existing NICE DCV session for the current user."
130+
_log "Reusing existing Amazon DCV session for the current user."
131131

132132
# number of session can either be 0 or 1
133133
number_of_sessions=$(dcv list-sessions |& grep "${user}" | grep -c "${sessionid}")
@@ -145,7 +145,7 @@ main() {
145145
# Retrieve Request Token and Access File name
146146
_log "Retrieving Request Token and Access File name.."
147147
user_token_request=$(/usr/bin/curl --retry 3 --max-time 5 -s -k -X GET -G "https://localhost:${ext_auth_port}" -d action=requestToken -d authUser="${user}" -d sessionID="${sessionid}")
148-
_validate_json "${user_token_request}" "Unable to obtain the Request Token from the NICE DCV external authenticator."
148+
_validate_json "${user_token_request}" "Unable to obtain the Request Token from the Amazon DCV external authenticator."
149149
request_token=$(echo "${user_token_request}" | jq -r .requestToken)
150150
access_file=$(echo "${user_token_request}" | jq -r .accessFile)
151151
_log "Request Token and Access File name obtained successfully."
@@ -160,15 +160,15 @@ main() {
160160
# Retrieve Session Token
161161
_log "Retrieving Session Token.."
162162
session_token_request=$(/usr/bin/curl --retry 3 --max-time 5 -s -k -X GET -G "https://localhost:${ext_auth_port}" -d action=sessionToken -d requestToken="${request_token}")
163-
_validate_json "${session_token_request}" "Unable to obtain the Session Token from the NICE DCV external authenticator."
163+
_validate_json "${session_token_request}" "Unable to obtain the Session Token from the Amazon DCV external authenticator."
164164
session_token=$(echo "${session_token_request}" | jq -r .sessionToken)
165165
_log "Session Token obtained successfully."
166166

167167
if [[ -z "${dcv_server_port}" ]]; then
168168
dcv_server_port=8443
169169
fi
170170

171-
_log "--- NICE DCV authentication performed successfully. ---"
171+
_log "--- Amazon DCV authentication performed successfully. ---"
172172
echo "PclusterDcvServerPort=${dcv_server_port} PclusterDcvSessionId=${sessionid} PclusterDcvSessionToken=${session_token}"
173173
}
174174

cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_dcv_common.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def post_install
6060
# empty by default
6161
end
6262

63-
# Configure the system to enable NICE DCV to have direct access to the Linux server's GPU and enable GPU sharing.
63+
# Configure the system to enable Amazon DCV to have direct access to the Linux server's GPU and enable GPU sharing.
6464
def allow_gpu_acceleration
6565
# Update the xorg.conf to set up NVIDIA drivers.
6666
# NOTE: --enable-all-gpus parameter is needed to support servers with more than one NVIDIA GPU.
@@ -124,14 +124,14 @@ def optionally_disable_rnd
124124
if dcv_supported?
125125
# Setup dcv authenticator group
126126
group node['cluster']['dcv']['authenticator']['group'] do
127-
comment 'NICE DCV External Authenticator group'
127+
comment 'Amazon DCV External Authenticator group'
128128
gid node['cluster']['dcv']['authenticator']['group_id']
129129
system true
130130
end
131131

132132
# Setup dcv authenticator user
133133
user node['cluster']['dcv']['authenticator']['user'] do
134-
comment 'NICE DCV External Authenticator user'
134+
comment 'Amazon DCV External Authenticator user'
135135
uid node['cluster']['dcv']['authenticator']['user_id']
136136
gid node['cluster']['dcv']['authenticator']['group_id']
137137
# home is mounted from the head node
@@ -247,7 +247,7 @@ def optionally_disable_rnd
247247
mode '0700'
248248
end
249249

250-
# Start NICE DCV server
250+
# Start Amazon DCV server
251251
service "dcvserver" do
252252
action %i(enable start)
253253
end

cookbooks/aws-parallelcluster-platform/spec/unit/resources/dcv_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,15 +450,15 @@ def self.nothing(chef_run)
450450

451451
it 'sets up dcv authenticator group' do
452452
is_expected.to create_group(authenticator_group).with(
453-
comment: 'NICE DCV External Authenticator group',
453+
comment: 'Amazon DCV External Authenticator group',
454454
gid: authenticator_group_id,
455455
system: true
456456
)
457457
end
458458

459459
it 'sets up dcv authenticator user' do
460460
is_expected.to create_user(authenticator_user).with(
461-
comment: 'NICE DCV External Authenticator user',
461+
comment: 'Amazon DCV External Authenticator user',
462462
gid: authenticator_group_id,
463463
uid: authenticator_user_id,
464464
manage_home: true,
@@ -884,7 +884,7 @@ def self.nothing(chef_run)
884884
)
885885
end
886886

887-
it 'starts NICE DCV server' do
887+
it 'starts Amazon DCV server' do
888888
is_expected.to enable_service('dcvserver').with_action(%i(enable start))
889889
end
890890
end

cookbooks/aws-parallelcluster-platform/test/controls/dcv_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
it { should exist }
176176
its('uid') { should eq node['cluster']['dcv']['authenticator']['user_id'] }
177177
its('gid') { should eq node['cluster']['dcv']['authenticator']['group_id'] }
178-
# 'NICE DCV External Authenticator user'
178+
# 'Amazon DCV External Authenticator user'
179179
end
180180

181181
describe group(node['cluster']['dcv']['authenticator']['group']) do

0 commit comments

Comments
 (0)