Skip to content

Commit add4fe5

Browse files
Improved remote logging for IDE lifecycle configuration
1 parent 557ebad commit add4fe5

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

sagemaker_ssh_helper/sm-ssh-ide

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ if [[ "$1" == "configure" ]]; then
2323
exit 0
2424
fi
2525

26+
echo "sm-ssh-ide: Configuring services..."
27+
2628
OPTIONS=$2
2729
mkdir -p /opt/sagemaker-ssh-helper/
2830
echo "$OPTIONS" > /opt/sagemaker-ssh-helper/.sm-ssh-ide-options
@@ -75,7 +77,7 @@ EOF
7577

7678
touch /opt/sagemaker-ssh-helper/.ssh-ide-configured
7779

78-
echo "sm-ssh-ide: Configuration complete."
80+
echo "sm-ssh-ide: Finished configuration. Done"
7981

8082
elif [[ "$1" == "get-user-profile-name" ]]; then
8183
_assert_is_ssh_ide_inside_studio
@@ -156,6 +158,8 @@ elif [[ "$1" == "set-local-user-id" ]]; then
156158
fi
157159

158160
elif [[ "$1" == "init-ssm" ]]; then
161+
echo "sm-ssh-ide: Initializing SSM..."
162+
159163
LOCAL_USER_ID="$(cat ~/.sm-ssh-owner)"
160164
echo "sm-ssh-ide: Will use local user ID: $LOCAL_USER_ID"
161165

@@ -190,7 +194,11 @@ elif [[ "$1" == "init-ssm" ]]; then
190194

191195
sm-init-ssm
192196

197+
echo "sm-ssh-ide: SSM initialized. Done"
198+
193199
elif [[ "$1" == "start" ]]; then
200+
echo "sm-ssh-ide: Starting services..."
201+
194202
OPTIONS=$(cat /opt/sagemaker-ssh-helper/.sm-ssh-ide-options || echo "")
195203

196204
if [[ -f /tmp/.ssh-ide-local-lock ]]; then
@@ -247,7 +255,7 @@ elif [[ "$1" == "start" ]]; then
247255
echo "sm-ssh-ide: Skipping VNC and Jupyter start"
248256
fi
249257

250-
echo "sm-ssh-ide: Started all services"
258+
echo "sm-ssh-ide: Started all services. Done"
251259

252260
elif [[ "$1" == "ssm-agent" ]]; then
253261

@@ -291,6 +299,8 @@ elif [[ "$1" == "env-diagnostics" ]]; then
291299
find "$JUPYTER_PATH" -name 'kernel.json' -print0 | xargs -0 cat
292300

293301
elif [[ "$1" == "stop" ]]; then
302+
echo "sm-ssh-ide: Stopping services..."
303+
294304
OPTIONS=$(cat /opt/sagemaker-ssh-helper/.sm-ssh-ide-options || echo "")
295305

296306
echo "sm-ssh-ide: Stopping SSM agent"
@@ -341,7 +351,7 @@ elif [[ "$1" == "stop" ]]; then
341351
echo "sm-ssh-ide: Local lock is missing, was not not running on this instance?"
342352
fi
343353

344-
echo "sm-ssh-ide: Stopped all services"
354+
echo "sm-ssh-ide: Stopped all services. Done"
345355

346356
else
347357

0 commit comments

Comments
 (0)