snapctl 0.22.0__tar.gz → 0.22.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of snapctl might be problematic. Click here for more details.
- {snapctl-0.22.0 → snapctl-0.22.1}/PKG-INFO +111 -22
- {snapctl-0.22.0 → snapctl-0.22.1}/README.md +110 -21
- {snapctl-0.22.0 → snapctl-0.22.1}/pyproject.toml +1 -1
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/commands/byogs.py +239 -195
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/commands/byosnap.py +251 -160
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/commands/snapend.py +5 -1
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/config/constants.py +1 -1
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/main.py +134 -72
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/utils/helper.py +6 -3
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/__init__.py +0 -0
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/__main__.py +0 -0
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/commands/__init__.py +0 -0
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/config/__init__.py +0 -0
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/config/endpoints.py +0 -0
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/config/hashes.py +0 -0
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/types/__init__.py +0 -0
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/types/definitions.py +0 -0
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/utils/__init__.py +0 -0
- {snapctl-0.22.0 → snapctl-0.22.1}/snapctl/utils/echo.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: snapctl
|
|
3
|
-
Version: 0.22.
|
|
3
|
+
Version: 0.22.1
|
|
4
4
|
Summary: Snapser CLI Tool
|
|
5
5
|
Author: Ajinkya Apte
|
|
6
6
|
Author-email: aj@snapser.com
|
|
@@ -81,8 +81,26 @@ You can generate up to 3 API Keys per user account.
|
|
|
81
81
|
|
|
82
82
|
### Setup a local config
|
|
83
83
|
|
|
84
|
+
You have three ways to pass the API key to Snapctl
|
|
85
|
+
1. Pass it via a command line argument with every command
|
|
86
|
+
2. Pass it via an environment variable
|
|
87
|
+
3. Pass it via a config file
|
|
88
|
+
|
|
89
|
+
#### Command line argument
|
|
90
|
+
|
|
91
|
+
Every Snapser command can take a command line argument `--api-key <your_key>`. This will take precedence over
|
|
92
|
+
other methods.
|
|
93
|
+
|
|
94
|
+
#### Environment Variable
|
|
95
|
+
|
|
96
|
+
You can set an Environment variable `SNAPSER_API_KEY=<your_key>` and then run your snapctl commands. This will
|
|
97
|
+
be evaluated after verifying if there is any command line argument.
|
|
98
|
+
|
|
99
|
+
#### Config file
|
|
100
|
+
|
|
84
101
|
Create a file named `~/.snapser/config`. Open it using the editor of your choice and replace with your
|
|
85
|
-
personal Snapser Access key. Save the file.
|
|
102
|
+
personal Snapser Access key. Save the file. Advantage of using this method is you can use the `--profile`
|
|
103
|
+
argument with your snapctl command to use different API keys.
|
|
86
104
|
|
|
87
105
|
```
|
|
88
106
|
[default]
|
|
@@ -165,7 +183,8 @@ snapctl byosnap --help
|
|
|
165
183
|
|
|
166
184
|
#### 2. byosnap create
|
|
167
185
|
|
|
168
|
-
|
|
186
|
+
Create a custom snap. Note that you will have to build, push and publish your snap image, for it to be useable
|
|
187
|
+
in a Snapend.
|
|
169
188
|
|
|
170
189
|
```
|
|
171
190
|
# Help for the byosnap command
|
|
@@ -183,45 +202,42 @@ snapctl byosnap create --help
|
|
|
183
202
|
snapctl byosnap create $byosnap_sid --name "$name" --desc "$desc" --platform "$platform" --language "$language"
|
|
184
203
|
```
|
|
185
204
|
|
|
186
|
-
|
|
205
|
+
### 3. byosnap build
|
|
187
206
|
|
|
188
|
-
|
|
207
|
+
Build your snap image
|
|
189
208
|
|
|
190
209
|
```
|
|
191
210
|
# Help for the byosnap command
|
|
192
|
-
snapctl byosnap
|
|
211
|
+
snapctl byosnap build --help
|
|
193
212
|
|
|
194
213
|
# Publish a new image
|
|
195
214
|
# $byosnap_sid = Snap ID for your snap
|
|
196
215
|
# $image_tag = An image tag for your snap
|
|
197
216
|
# $code_root_path = Local code path where your Dockerfile is present
|
|
198
217
|
# Example:
|
|
199
|
-
# snapctl byosnap
|
|
200
|
-
snapctl byosnap
|
|
218
|
+
# snapctl byosnap build byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/jinks_flask
|
|
219
|
+
snapctl byosnap build $byosnap_sid --tag $image_tag --path $code_root_path
|
|
201
220
|
```
|
|
202
221
|
|
|
203
|
-
|
|
222
|
+
### 4. byosnap push
|
|
204
223
|
|
|
205
|
-
|
|
224
|
+
Push your snap image to Snapser
|
|
206
225
|
|
|
207
226
|
```
|
|
208
227
|
# Help for the byosnap command
|
|
209
|
-
snapctl byosnap
|
|
228
|
+
snapctl byosnap push --help
|
|
210
229
|
|
|
211
230
|
# Publish a new image
|
|
212
231
|
# $byosnap_sid = Snap ID for your snap
|
|
213
232
|
# $image_tag = An image tag for your snap
|
|
214
|
-
# $prefix = Prefix for your snap Eg: /v1
|
|
215
|
-
# $version = Semantic version for your snap Eg: v0.0.1
|
|
216
|
-
# $ingress_port = Ingress port for your snap Eg: 5003
|
|
217
233
|
# Example:
|
|
218
|
-
# snapctl byosnap
|
|
219
|
-
snapctl byosnap
|
|
234
|
+
# snapctl byosnap push byosnap-jinks-flask --tag my-first-image
|
|
235
|
+
snapctl byosnap push $byosnap_sid --tag $image_tag
|
|
220
236
|
```
|
|
221
237
|
|
|
222
238
|
#### 5. byosnap upload-docs
|
|
223
239
|
|
|
224
|
-
|
|
240
|
+
Upload swagger.json and README.md for you Snap
|
|
225
241
|
|
|
226
242
|
```
|
|
227
243
|
# Help for the byogs command
|
|
@@ -236,6 +252,44 @@ snapctl byosnap upload-docs --help
|
|
|
236
252
|
snapctl byosnap upload-docs $byogs_sid --tag $image_tag --path $code_root_path
|
|
237
253
|
```
|
|
238
254
|
|
|
255
|
+
#### 6. byosnap publish-image
|
|
256
|
+
|
|
257
|
+
Publish a custom snap code image. This command executes, `build`, `push` and `upload-docs` one
|
|
258
|
+
after the other.
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
# Help for the byosnap command
|
|
262
|
+
snapctl byosnap publish-image --help
|
|
263
|
+
|
|
264
|
+
# Publish a new image
|
|
265
|
+
# $byosnap_sid = Snap ID for your snap
|
|
266
|
+
# $image_tag = An image tag for your snap
|
|
267
|
+
# $code_root_path = Local code path where your Dockerfile is present
|
|
268
|
+
# Example:
|
|
269
|
+
# snapctl byosnap publish-image byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/jinks_flask
|
|
270
|
+
snapctl byosnap publish-image $byosnap_sid --tag $image_tag --path $code_root_path
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
#### 7. byosnap publish-version
|
|
274
|
+
|
|
275
|
+
Publish a new version for your Snap. Only after your Snap version is published, you will be able
|
|
276
|
+
to use your snap in your Snapend. This command should be run after `push` or `publish-image` commands.
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
# Help for the byosnap command
|
|
280
|
+
snapctl byosnap publish-version --help
|
|
281
|
+
|
|
282
|
+
# Publish a new image
|
|
283
|
+
# $byosnap_sid = Snap ID for your snap
|
|
284
|
+
# $image_tag = An image tag for your snap
|
|
285
|
+
# $prefix = Prefix for your snap Eg: /v1
|
|
286
|
+
# $version = Semantic version for your snap Eg: v0.0.1
|
|
287
|
+
# $ingress_port = Ingress port for your snap Eg: 5003
|
|
288
|
+
# Example:
|
|
289
|
+
# snapctl byosnap publish-image byosnap-jinks-flask --tag my-first-image --prefix /v1 --version v0.0.1 --http-port 5003
|
|
290
|
+
snapctl byosnap publish-version $byosnap_sid --tag $image_tag --prefix $prefix --version $version --http-port $ingress_port
|
|
291
|
+
```
|
|
292
|
+
|
|
239
293
|
### BYO Game Server - Bring your own Game Server
|
|
240
294
|
|
|
241
295
|
#### 1. byogs help
|
|
@@ -249,7 +303,8 @@ snapctl byogs --help
|
|
|
249
303
|
|
|
250
304
|
#### 2. byogs create
|
|
251
305
|
|
|
252
|
-
|
|
306
|
+
Create a custom game server. Note that you will have to build, push and publish your game server image, for it to be useable
|
|
307
|
+
in a Snapend fleet.
|
|
253
308
|
|
|
254
309
|
```
|
|
255
310
|
# Help for the byosnap command
|
|
@@ -267,9 +322,42 @@ snapctl byogs create --help
|
|
|
267
322
|
snapctl byogs create $byogs_sid --name "$name" --desc "$desc" --platform "$platform" --language "$language"
|
|
268
323
|
```
|
|
269
324
|
|
|
270
|
-
#### 3. byogs
|
|
325
|
+
#### 3. byogs build
|
|
326
|
+
|
|
327
|
+
Build your custom game server image.
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
# Help for the byogs command
|
|
331
|
+
snapctl byogs build --help
|
|
332
|
+
|
|
333
|
+
# Publish a new image
|
|
334
|
+
# $byogs_sid = Game server ID for your snap
|
|
335
|
+
# $image_tag = An image tag for your snap
|
|
336
|
+
# $code_root_path = Local code path where your Dockerfile is present
|
|
337
|
+
# Example:
|
|
338
|
+
# snapctl byogs build byosnap-jinks-gs --tag my-first-image --path /Users/DevName/Development/SnapserEngine/jinks_flask
|
|
339
|
+
snapctl byogs build $byogs_sid --tag $image_tag --path $code_root_path
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### 4. byogs push
|
|
343
|
+
|
|
344
|
+
Push your custom game server image.
|
|
345
|
+
|
|
346
|
+
```
|
|
347
|
+
# Help for the byogs command
|
|
348
|
+
snapctl byogs push --help
|
|
349
|
+
|
|
350
|
+
# Publish a new image
|
|
351
|
+
# $byogs_sid = Game server ID for your snap
|
|
352
|
+
# $image_tag = An image tag for your snap
|
|
353
|
+
# Example:
|
|
354
|
+
# snapctl byogs push byosnap-jinks-gs --tag my-first-image
|
|
355
|
+
snapctl byogs push $byogs_sid --tag $image_tag
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
#### 5. byogs publish-image
|
|
271
359
|
|
|
272
|
-
|
|
360
|
+
Publish your custom game server image. This command executes, `build` and `push` one after the other.
|
|
273
361
|
|
|
274
362
|
```
|
|
275
363
|
# Help for the byogs command
|
|
@@ -284,9 +372,10 @@ snapctl byogs publish-image --help
|
|
|
284
372
|
snapctl byogs publish-image $byogs_sid --tag $image_tag --path $code_root_path
|
|
285
373
|
```
|
|
286
374
|
|
|
287
|
-
####
|
|
375
|
+
#### 6. byogs publish-version
|
|
288
376
|
|
|
289
|
-
|
|
377
|
+
Publish a new version for your game server. Only after your game server version is published, you will be able
|
|
378
|
+
to use it in your Snapend fleet. This command should be run after you `push` or `publish-image` commands.
|
|
290
379
|
|
|
291
380
|
```
|
|
292
381
|
# Help for the byogs command
|
|
@@ -65,8 +65,26 @@ You can generate up to 3 API Keys per user account.
|
|
|
65
65
|
|
|
66
66
|
### Setup a local config
|
|
67
67
|
|
|
68
|
+
You have three ways to pass the API key to Snapctl
|
|
69
|
+
1. Pass it via a command line argument with every command
|
|
70
|
+
2. Pass it via an environment variable
|
|
71
|
+
3. Pass it via a config file
|
|
72
|
+
|
|
73
|
+
#### Command line argument
|
|
74
|
+
|
|
75
|
+
Every Snapser command can take a command line argument `--api-key <your_key>`. This will take precedence over
|
|
76
|
+
other methods.
|
|
77
|
+
|
|
78
|
+
#### Environment Variable
|
|
79
|
+
|
|
80
|
+
You can set an Environment variable `SNAPSER_API_KEY=<your_key>` and then run your snapctl commands. This will
|
|
81
|
+
be evaluated after verifying if there is any command line argument.
|
|
82
|
+
|
|
83
|
+
#### Config file
|
|
84
|
+
|
|
68
85
|
Create a file named `~/.snapser/config`. Open it using the editor of your choice and replace with your
|
|
69
|
-
personal Snapser Access key. Save the file.
|
|
86
|
+
personal Snapser Access key. Save the file. Advantage of using this method is you can use the `--profile`
|
|
87
|
+
argument with your snapctl command to use different API keys.
|
|
70
88
|
|
|
71
89
|
```
|
|
72
90
|
[default]
|
|
@@ -149,7 +167,8 @@ snapctl byosnap --help
|
|
|
149
167
|
|
|
150
168
|
#### 2. byosnap create
|
|
151
169
|
|
|
152
|
-
|
|
170
|
+
Create a custom snap. Note that you will have to build, push and publish your snap image, for it to be useable
|
|
171
|
+
in a Snapend.
|
|
153
172
|
|
|
154
173
|
```
|
|
155
174
|
# Help for the byosnap command
|
|
@@ -167,45 +186,42 @@ snapctl byosnap create --help
|
|
|
167
186
|
snapctl byosnap create $byosnap_sid --name "$name" --desc "$desc" --platform "$platform" --language "$language"
|
|
168
187
|
```
|
|
169
188
|
|
|
170
|
-
|
|
189
|
+
### 3. byosnap build
|
|
171
190
|
|
|
172
|
-
|
|
191
|
+
Build your snap image
|
|
173
192
|
|
|
174
193
|
```
|
|
175
194
|
# Help for the byosnap command
|
|
176
|
-
snapctl byosnap
|
|
195
|
+
snapctl byosnap build --help
|
|
177
196
|
|
|
178
197
|
# Publish a new image
|
|
179
198
|
# $byosnap_sid = Snap ID for your snap
|
|
180
199
|
# $image_tag = An image tag for your snap
|
|
181
200
|
# $code_root_path = Local code path where your Dockerfile is present
|
|
182
201
|
# Example:
|
|
183
|
-
# snapctl byosnap
|
|
184
|
-
snapctl byosnap
|
|
202
|
+
# snapctl byosnap build byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/jinks_flask
|
|
203
|
+
snapctl byosnap build $byosnap_sid --tag $image_tag --path $code_root_path
|
|
185
204
|
```
|
|
186
205
|
|
|
187
|
-
|
|
206
|
+
### 4. byosnap push
|
|
188
207
|
|
|
189
|
-
|
|
208
|
+
Push your snap image to Snapser
|
|
190
209
|
|
|
191
210
|
```
|
|
192
211
|
# Help for the byosnap command
|
|
193
|
-
snapctl byosnap
|
|
212
|
+
snapctl byosnap push --help
|
|
194
213
|
|
|
195
214
|
# Publish a new image
|
|
196
215
|
# $byosnap_sid = Snap ID for your snap
|
|
197
216
|
# $image_tag = An image tag for your snap
|
|
198
|
-
# $prefix = Prefix for your snap Eg: /v1
|
|
199
|
-
# $version = Semantic version for your snap Eg: v0.0.1
|
|
200
|
-
# $ingress_port = Ingress port for your snap Eg: 5003
|
|
201
217
|
# Example:
|
|
202
|
-
# snapctl byosnap
|
|
203
|
-
snapctl byosnap
|
|
218
|
+
# snapctl byosnap push byosnap-jinks-flask --tag my-first-image
|
|
219
|
+
snapctl byosnap push $byosnap_sid --tag $image_tag
|
|
204
220
|
```
|
|
205
221
|
|
|
206
222
|
#### 5. byosnap upload-docs
|
|
207
223
|
|
|
208
|
-
|
|
224
|
+
Upload swagger.json and README.md for you Snap
|
|
209
225
|
|
|
210
226
|
```
|
|
211
227
|
# Help for the byogs command
|
|
@@ -220,6 +236,44 @@ snapctl byosnap upload-docs --help
|
|
|
220
236
|
snapctl byosnap upload-docs $byogs_sid --tag $image_tag --path $code_root_path
|
|
221
237
|
```
|
|
222
238
|
|
|
239
|
+
#### 6. byosnap publish-image
|
|
240
|
+
|
|
241
|
+
Publish a custom snap code image. This command executes, `build`, `push` and `upload-docs` one
|
|
242
|
+
after the other.
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
# Help for the byosnap command
|
|
246
|
+
snapctl byosnap publish-image --help
|
|
247
|
+
|
|
248
|
+
# Publish a new image
|
|
249
|
+
# $byosnap_sid = Snap ID for your snap
|
|
250
|
+
# $image_tag = An image tag for your snap
|
|
251
|
+
# $code_root_path = Local code path where your Dockerfile is present
|
|
252
|
+
# Example:
|
|
253
|
+
# snapctl byosnap publish-image byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/jinks_flask
|
|
254
|
+
snapctl byosnap publish-image $byosnap_sid --tag $image_tag --path $code_root_path
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### 7. byosnap publish-version
|
|
258
|
+
|
|
259
|
+
Publish a new version for your Snap. Only after your Snap version is published, you will be able
|
|
260
|
+
to use your snap in your Snapend. This command should be run after `push` or `publish-image` commands.
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
# Help for the byosnap command
|
|
264
|
+
snapctl byosnap publish-version --help
|
|
265
|
+
|
|
266
|
+
# Publish a new image
|
|
267
|
+
# $byosnap_sid = Snap ID for your snap
|
|
268
|
+
# $image_tag = An image tag for your snap
|
|
269
|
+
# $prefix = Prefix for your snap Eg: /v1
|
|
270
|
+
# $version = Semantic version for your snap Eg: v0.0.1
|
|
271
|
+
# $ingress_port = Ingress port for your snap Eg: 5003
|
|
272
|
+
# Example:
|
|
273
|
+
# snapctl byosnap publish-image byosnap-jinks-flask --tag my-first-image --prefix /v1 --version v0.0.1 --http-port 5003
|
|
274
|
+
snapctl byosnap publish-version $byosnap_sid --tag $image_tag --prefix $prefix --version $version --http-port $ingress_port
|
|
275
|
+
```
|
|
276
|
+
|
|
223
277
|
### BYO Game Server - Bring your own Game Server
|
|
224
278
|
|
|
225
279
|
#### 1. byogs help
|
|
@@ -233,7 +287,8 @@ snapctl byogs --help
|
|
|
233
287
|
|
|
234
288
|
#### 2. byogs create
|
|
235
289
|
|
|
236
|
-
|
|
290
|
+
Create a custom game server. Note that you will have to build, push and publish your game server image, for it to be useable
|
|
291
|
+
in a Snapend fleet.
|
|
237
292
|
|
|
238
293
|
```
|
|
239
294
|
# Help for the byosnap command
|
|
@@ -251,9 +306,42 @@ snapctl byogs create --help
|
|
|
251
306
|
snapctl byogs create $byogs_sid --name "$name" --desc "$desc" --platform "$platform" --language "$language"
|
|
252
307
|
```
|
|
253
308
|
|
|
254
|
-
#### 3. byogs
|
|
309
|
+
#### 3. byogs build
|
|
310
|
+
|
|
311
|
+
Build your custom game server image.
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
# Help for the byogs command
|
|
315
|
+
snapctl byogs build --help
|
|
316
|
+
|
|
317
|
+
# Publish a new image
|
|
318
|
+
# $byogs_sid = Game server ID for your snap
|
|
319
|
+
# $image_tag = An image tag for your snap
|
|
320
|
+
# $code_root_path = Local code path where your Dockerfile is present
|
|
321
|
+
# Example:
|
|
322
|
+
# snapctl byogs build byosnap-jinks-gs --tag my-first-image --path /Users/DevName/Development/SnapserEngine/jinks_flask
|
|
323
|
+
snapctl byogs build $byogs_sid --tag $image_tag --path $code_root_path
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
#### 4. byogs push
|
|
327
|
+
|
|
328
|
+
Push your custom game server image.
|
|
329
|
+
|
|
330
|
+
```
|
|
331
|
+
# Help for the byogs command
|
|
332
|
+
snapctl byogs push --help
|
|
333
|
+
|
|
334
|
+
# Publish a new image
|
|
335
|
+
# $byogs_sid = Game server ID for your snap
|
|
336
|
+
# $image_tag = An image tag for your snap
|
|
337
|
+
# Example:
|
|
338
|
+
# snapctl byogs push byosnap-jinks-gs --tag my-first-image
|
|
339
|
+
snapctl byogs push $byogs_sid --tag $image_tag
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### 5. byogs publish-image
|
|
255
343
|
|
|
256
|
-
|
|
344
|
+
Publish your custom game server image. This command executes, `build` and `push` one after the other.
|
|
257
345
|
|
|
258
346
|
```
|
|
259
347
|
# Help for the byogs command
|
|
@@ -268,9 +356,10 @@ snapctl byogs publish-image --help
|
|
|
268
356
|
snapctl byogs publish-image $byogs_sid --tag $image_tag --path $code_root_path
|
|
269
357
|
```
|
|
270
358
|
|
|
271
|
-
####
|
|
359
|
+
#### 6. byogs publish-version
|
|
272
360
|
|
|
273
|
-
|
|
361
|
+
Publish a new version for your game server. Only after your game server version is published, you will be able
|
|
362
|
+
to use it in your Snapend fleet. This command should be run after you `push` or `publish-image` commands.
|
|
274
363
|
|
|
275
364
|
```
|
|
276
365
|
# Help for the byogs command
|