Skip to content

Commit fced166

Browse files
authored
Notebook Instance lifecycle samples (#80)
This PR just contains a sample for the Notebook Instance Lifecycle configuration. samples/notebookinstance_lifecycle_config/my-notebookinstance_lifecycle_config.yaml - Sample Notebook Instance Lifecycle configuration samples/notebookinstance_lifecycle_config/README.md - Guide for using samples
1 parent cd9c3be commit fced166

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Notebook Instance Lifecycle Configuration sample
2+
3+
## Prerequisites
4+
5+
This sample assumes that you have completed the [common prerequisites](/samples/README.md).
6+
7+
### Create a Notebook Instance Lifecycle Configuration
8+
This command creates a Notebook Instance Lifecycle configuration.
9+
Note: The onCreate and onStart fields must be in base64.
10+
11+
```
12+
$ kubectl apply -f my-notebookinstance_lifecycle_config.yaml
13+
notebookinstancelifecycleconfig.sagemaker.services.k8s.aws/my-lifecycle-config created
14+
```
15+
16+
### Update a Notebook Instance Lifecycle Configuration
17+
This command updates a Notebook Instance Lifecycle configuration.
18+
```
19+
$ kubectl apply -f my-notebookinstance_lifecycle_config.yaml
20+
notebookinstancelifecycleconfig.sagemaker.services.k8s.aws/my-lifecycle-config configured
21+
```
22+
### Describe a Notebook Instance Lifecycle Configuration
23+
This command describes a Notebook Instance Lifecycle Configuration.
24+
```
25+
$ kubectl describe NotebookInstanceLifecycleConfig <YOUR LIFECYCLE CONFIG NAME>
26+
```
27+
### List Notebook Instance Lifecycle Configurations
28+
This command lists Notebook Instance Lifecycle Configurations and their last modified times.
29+
```
30+
$ kubectl get NotebookInstanceLifecycleConfig
31+
```
32+
### Delete a Notebook Instance Lifecycle Configuration
33+
This command deletes a Notebook Instance Lifecycle Configuration.
34+
```
35+
$ kubectl delete NotebookInstanceLifecycleConfig <YOUR LIFECYCLE CONFIG NAME>
36+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: sagemaker.services.k8s.aws/v1alpha1
2+
kind: NotebookInstanceLifecycleConfig
3+
metadata:
4+
name: <YOUR LIFECYCLE CONFIG NAME>
5+
spec:
6+
notebookInstanceLifecycleConfigName: <YOUR LIFECYCLE CONFIG NAME>
7+
onStart:
8+
- content: ZWNobyAiRW50ZXJpbmcgb25TdGFydCI= #Decodes to echo "Entering onStart"
9+
onCreate:
10+
- content: ZWNobyAiRW50ZXJpbmcgb25DcmVhdGUi #Decodes to echo "Entering onCreate"

0 commit comments

Comments
 (0)