snapctl 0.48.0__tar.gz → 0.49.0__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.48.0 → snapctl-0.49.0}/PKG-INFO +159 -97
- {snapctl-0.48.0 → snapctl-0.49.0}/README.md +158 -96
- {snapctl-0.48.0 → snapctl-0.49.0}/pyproject.toml +8 -3
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/commands/byosnap.py +23 -12
- snapctl-0.49.0/snapctl/commands/byows.py +421 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/commands/game.py +1 -1
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/commands/release_notes.py +12 -18
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/commands/snapend.py +26 -11
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/config/constants.py +7 -2
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/config/endpoints.py +5 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/config/hashes.py +5 -1
- snapctl-0.49.0/snapctl/data/releases/__init__.py +0 -0
- snapctl-0.49.0/snapctl/data/releases/beta-0.49.0.mdx +12 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/main.py +72 -1
- snapctl-0.49.0/snapctl/types/__init__.py +0 -0
- snapctl-0.49.0/snapctl/utils/__init__.py +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/utils/helper.py +9 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/LICENSE +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/__init__.py +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/__main__.py +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/commands/__init__.py +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/commands/byogs.py +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/commands/generate.py +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/config/__init__.py +0 -0
- {snapctl-0.48.0/snapctl/types → snapctl-0.49.0/snapctl/data}/__init__.py +0 -0
- {snapctl-0.48.0/snapctl/utils → snapctl-0.49.0/snapctl/data/profiles}/__init__.py +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/data/profiles/snapser-byosnap-profile.json +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/data/profiles/snapser-byosnap-profile.yaml +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/data/profiles/snapser-byosnap-profile.yml +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/data/releases/beta-0.46.0.mdx +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/data/releases/beta-0.46.4.mdx +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/data/releases/beta-0.47.0.mdx +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/data/releases/beta-0.47.1.mdx +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/data/releases/beta-0.47.2.mdx +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/data/releases/beta-0.48.0.mdx +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/types/definitions.py +0 -0
- {snapctl-0.48.0 → snapctl-0.49.0}/snapctl/utils/echo.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: snapctl
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.49.0
|
|
4
4
|
Summary: Snapser CLI Tool
|
|
5
5
|
Author: Ajinkya Apte
|
|
6
6
|
Author-email: aj@snapser.com
|
|
@@ -18,30 +18,27 @@ Requires-Dist: requests (>=2.28.2,<3.0.0)
|
|
|
18
18
|
Requires-Dist: typer[all] (>=0.12.3,<0.13.0)
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
|
|
21
|
+
export const description = 'CLI'
|
|
22
|
+
|
|
23
|
+
export const meta = {
|
|
24
|
+
author: 'AJ Apte',
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
# Snapser CLI
|
|
22
28
|
|
|
23
29
|
Snapser has developed a CLI tool called **snapctl** that can be used on MaxOSX, Linux and Windows machines.
|
|
24
30
|
Snapctl will be the best way for game studios to integrate Snapser into their build pipelines.
|
|
25
31
|
|
|
26
32
|
## What's new in the latest version?
|
|
33
|
+
### Breaking Changes
|
|
34
|
+
1. Renamed SDK type `server` to `api-key` to be consistent with the Snapser Web app.
|
|
35
|
+
|
|
27
36
|
### Features
|
|
28
|
-
1.
|
|
29
|
-
2. Snapctl now throws a better warning when the swagger for the BYOSnap is not compatible with what the Snapser backed expects. You will get a warning message:
|
|
30
|
-
```bash
|
|
31
|
-
Warning Snapser enforces a strict schema for the swagger.json file. It needs to be a valid OpenAPI 3.0 spec. In addition, ever API needs an operationId. a summary and
|
|
32
|
-
a non-empty description. This allows Snapser to generate your SDK and power the API explorer. If you do not wish to leverage this feature, just remove the
|
|
33
|
-
swagger.json file.
|
|
34
|
-
```
|
|
35
|
-
3. You can now use the `--skip-build` flag with the snapctl sync command. This allows you to skip the build step when syncing your Snapend resources.
|
|
37
|
+
1. Added support for Bring your own Workstation commands.
|
|
36
38
|
```bash
|
|
37
|
-
|
|
39
|
+
snapctl byows attach --snapend-id $snapend_id --byosnap-id $byosnap_id --http-port $http_port
|
|
38
40
|
```
|
|
39
41
|
|
|
40
|
-
### Fixes
|
|
41
|
-
1. Snapctl was failing if the user passed in a tag with a `:` in it. This has been fixed. It now checks for the presence of a `:` in the tag and throws an error in the input validation step.
|
|
42
|
-
2. The byosnap generate command was failing. This has been fixed.
|
|
43
|
-
|
|
44
|
-
|
|
45
42
|
## Requirements
|
|
46
43
|
### Python 3.X and Pip
|
|
47
44
|
The Snapser CLI tool depends on Python 3.X and Pip. MacOS comes pre installed with Python. But
|
|
@@ -59,6 +56,7 @@ cause issues with the Snapser CLI tool.
|
|
|
59
56
|
|
|
60
57
|
## Installation
|
|
61
58
|
|
|
59
|
+
### Pip
|
|
62
60
|
Installing PIP on MacOS
|
|
63
61
|
|
|
64
62
|
```
|
|
@@ -73,29 +71,48 @@ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
|
|
73
71
|
python get-pip.py
|
|
74
72
|
```
|
|
75
73
|
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
### Pipx
|
|
75
|
+
Now a days, pipx is recommended for CLI tools. Once you have Python and Pip installed, lets install `Pipx`.
|
|
76
|
+
```bash
|
|
77
|
+
python3 -m pip install --user pipx
|
|
78
|
+
python3 -m pipx ensurepath
|
|
78
79
|
```
|
|
80
|
+
|
|
81
|
+
### Install Snapctl
|
|
82
|
+
- If you chose to use Pip
|
|
83
|
+
```bash
|
|
79
84
|
pip install --user snapctl
|
|
80
85
|
```
|
|
81
86
|
|
|
82
87
|
If you also have Python 2.X on your machine, you may have to run the following command instead
|
|
83
88
|
|
|
84
|
-
```
|
|
89
|
+
```bash
|
|
85
90
|
pip3 install --user snapctl
|
|
86
91
|
```
|
|
92
|
+
- If using, Pipx
|
|
93
|
+
```bash
|
|
94
|
+
pipx install snapctl
|
|
95
|
+
```
|
|
87
96
|
|
|
88
97
|
**IMPORTANT**: After you install snapctl you may have to add the python bin folder to your
|
|
89
98
|
path. For example, on MacOSX this is usually **~/Library/Python/3.9/bin**. On
|
|
90
|
-
Windows this is usually
|
|
91
|
-
|
|
99
|
+
Windows this is usually **C:\Users\username\AppData\Roaming\Python\Python39\Scripts**.
|
|
100
|
+
For, Windows users, after running pipx ensurepath, you may need to restart your terminal (Command Prompt, PowerShell, or Windows Terminal) for the PATH changes to take effect.
|
|
101
|
+
|
|
92
102
|
|
|
93
103
|
## Upgrade
|
|
94
104
|
|
|
95
105
|
Upgrade your snapctl version
|
|
96
106
|
|
|
107
|
+
- If using Pip
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pip3 install --user snapctl --upgrade
|
|
97
111
|
```
|
|
98
|
-
|
|
112
|
+
|
|
113
|
+
- If using Pipx
|
|
114
|
+
```bash
|
|
115
|
+
pipx upgrade snapctl
|
|
99
116
|
```
|
|
100
117
|
|
|
101
118
|
## Setup
|
|
@@ -115,7 +132,7 @@ to see it again.
|
|
|
115
132
|
You have three ways to pass the API key to Snapctl
|
|
116
133
|
1. Pass it via a command line argument with every command
|
|
117
134
|
2. Pass it via an environment variable
|
|
118
|
-
3. Pass it via a config file
|
|
135
|
+
3. Pass it via a config file (recommended)
|
|
119
136
|
|
|
120
137
|
#### Command line argument
|
|
121
138
|
|
|
@@ -138,7 +155,7 @@ will look for the config file at that path.
|
|
|
138
155
|
|
|
139
156
|
```
|
|
140
157
|
[default]
|
|
141
|
-
|
|
158
|
+
SNAPSER_API_KEY=$your_api_key
|
|
142
159
|
```
|
|
143
160
|
|
|
144
161
|
Or you can run the following command
|
|
@@ -174,10 +191,10 @@ Snapser by default supports access to multiple accounts. You can create multiple
|
|
|
174
191
|
|
|
175
192
|
```
|
|
176
193
|
[profile personal]
|
|
177
|
-
|
|
194
|
+
nSNAPSER_API_KEY=<key>
|
|
178
195
|
|
|
179
196
|
[profile professional]
|
|
180
|
-
|
|
197
|
+
nSNAPSER_API_KEY=<key>
|
|
181
198
|
|
|
182
199
|
```
|
|
183
200
|
|
|
@@ -195,7 +212,7 @@ setx SNAPSER_PROFILE="my_profile_name";
|
|
|
195
212
|
|
|
196
213
|
```
|
|
197
214
|
|
|
198
|
-
Or you can pass **--profile
|
|
215
|
+
Or you can pass **--profile professional** with every command to tell Snapser to use a particular profile.
|
|
199
216
|
|
|
200
217
|
## Command variable name nomenclature
|
|
201
218
|
All commands follow these rules with their input variables
|
|
@@ -216,15 +233,14 @@ Snapctl commands for your custom code
|
|
|
216
233
|
|
|
217
234
|
#### 1. byosnap help
|
|
218
235
|
|
|
219
|
-
See all the supported commands.
|
|
220
|
-
All the others are for CRUD operations.
|
|
236
|
+
See all the supported commands.
|
|
221
237
|
|
|
222
238
|
```bash
|
|
223
239
|
# Help for the byosnap command
|
|
224
240
|
snapctl byosnap --help
|
|
225
241
|
```
|
|
226
242
|
|
|
227
|
-
|
|
243
|
+
#### 2. byosnap generate-profile
|
|
228
244
|
|
|
229
245
|
This command generates a base BYOSnap profile. You will have to update the values within this file
|
|
230
246
|
and then you can use it in commands like `publish` and `sync`. It is recommended that you save this
|
|
@@ -240,11 +256,11 @@ snapctl byosnap generate-profile --help
|
|
|
240
256
|
# are allowed. If you do not pass `--profile-filename` then Snapser choses
|
|
241
257
|
# `snapser-byosnap-profile.json` as the filename.
|
|
242
258
|
snapctl byosnap generate-profile --out-path $output_path --profile-filename $profile_filename
|
|
243
|
-
snapctl byosnap generate-profile --out-path /Users/DevName/Development/SnapserEngine/
|
|
244
|
-
snapctl byosnap generate-profile --out-path /Users/DevName/Development/SnapserEngine/
|
|
259
|
+
snapctl byosnap generate-profile --out-path /Users/DevName/Development/SnapserEngine/byosnap-python --profile-filename=my-byosnap-profile.json
|
|
260
|
+
snapctl byosnap generate-profile --out-path /Users/DevName/Development/SnapserEngine/byosnap-python --profile-filename=my-byosnap-profile.yaml
|
|
245
261
|
```
|
|
246
262
|
|
|
247
|
-
|
|
263
|
+
#### 3. byosnap validate-profile
|
|
248
264
|
|
|
249
265
|
This command validates your BYOSnap profile.
|
|
250
266
|
|
|
@@ -260,8 +276,8 @@ snapctl byosnap validate-profile --help
|
|
|
260
276
|
# Snapser choses the default `snapser-byosnap-profile.json` as the filename to validate
|
|
261
277
|
snapctl byosnap validate-profile --path $path
|
|
262
278
|
snapctl byosnap validate-profile --resources-path $resources_path --profile-filename $profile_filename
|
|
263
|
-
snapctl byosnap validate-profile --path /Users/DevName/Development/SnapserEngine/
|
|
264
|
-
snapctl byosnap validate-profile --path /Users/DevName/Development/SnapserEngine/
|
|
279
|
+
snapctl byosnap validate-profile --path /Users/DevName/Development/SnapserEngine/byosnap-python
|
|
280
|
+
snapctl byosnap validate-profile --path /Users/DevName/Development/SnapserEngine/byosnap-python --profile-filename my-byosnap-profile.yaml
|
|
265
281
|
```
|
|
266
282
|
|
|
267
283
|
#### 4. byosnap publish
|
|
@@ -291,7 +307,7 @@ snapctl byosnap publish --help
|
|
|
291
307
|
# Snapser choses the default `snapser-byosnap-profile.json` as the filename to validate
|
|
292
308
|
# $skip-build = true/false. Default is false. Pass this flag as true to skip the build and head straight to tag and push. Build step needs to run and tag using the --tag you pass to the publish-image command for this to work. Make sure the tag matches the version number you are passing.
|
|
293
309
|
# Example:
|
|
294
|
-
snapctl byosnap publish --byosnap-id byosnap-jinks-flask --version "v0.0.1" --path /Users/DevName/Development/SnapserEngine/
|
|
310
|
+
snapctl byosnap publish --byosnap-id byosnap-jinks-flask --version "v0.0.1" --path /Users/DevName/Development/SnapserEngine/byosnap-python --profile-filename $profile_filename
|
|
295
311
|
snapctl byosnap publish --byosnap-id $byosnap_id --version $version --path $code_root_path
|
|
296
312
|
byosnap publish --byosnap-id byosnap-python --version "v1.0.0" --path /Users/AJ/Development/byosnap-python --profile-filename my-byosnap-profile.yaml
|
|
297
313
|
```
|
|
@@ -318,7 +334,7 @@ snapctl byosnap sync --help
|
|
|
318
334
|
# $version =
|
|
319
335
|
# $snapend_id = Dev Snapend Id
|
|
320
336
|
# Example:
|
|
321
|
-
snapctl byosnap sync --byosnap-id byosnap-jinks-flask --path /Users/DevName/Development/SnapserEngine/
|
|
337
|
+
snapctl byosnap sync --byosnap-id byosnap-jinks-flask --path /Users/DevName/Development/SnapserEngine/byosnap-python --version "v0.0.11" --snapend-id "jxmmfryo"
|
|
322
338
|
snapctl byosnap sync --byosnap-id $byosnap_id --path $code_root_path --version $version --snapend-id $snapend_id
|
|
323
339
|
```
|
|
324
340
|
|
|
@@ -357,7 +373,7 @@ snapctl byosnap build --help
|
|
|
357
373
|
# $code_root_path = Local code path where your Dockerfile is present
|
|
358
374
|
# $resources_path = Optional path to the resources directory in your Snap. This ensures, you are not forced to put the Dockerfile, swagger.json and README.md in the root directory of your Snap.
|
|
359
375
|
# Example:
|
|
360
|
-
# snapctl byosnap build --byosnap-id byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/
|
|
376
|
+
# snapctl byosnap build --byosnap-id byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/byosnap-python
|
|
361
377
|
snapctl byosnap build --byosnap-id $byosnap_id --tag $image_tag --path $code_root_path
|
|
362
378
|
snapctl byosnap build --byosnap-id $byosnap_id --tag $image_tag --path $code_root_path --resources-path $resources_path
|
|
363
379
|
```
|
|
@@ -391,7 +407,7 @@ snapctl byosnap upload-docs --help
|
|
|
391
407
|
# $image_tag = An image tag for your snap
|
|
392
408
|
# $resources_path = Path to your swagger.json and README.md files
|
|
393
409
|
# Example:
|
|
394
|
-
# snapctl byosnap upload-docs --byosnap-id byosnap-jinks-flask --tag my-first-image --resources-path /Users/DevName/Development/SnapserEngine/
|
|
410
|
+
# snapctl byosnap upload-docs --byosnap-id byosnap-jinks-flask --tag my-first-image --resources-path /Users/DevName/Development/SnapserEngine/byosnap-python
|
|
395
411
|
snapctl byosnap upload-docs --byosnap-id $byosnap_id --tag $image_tag --resources-path $resources_path
|
|
396
412
|
```
|
|
397
413
|
|
|
@@ -415,7 +431,7 @@ snapctl byosnap publish-image --help
|
|
|
415
431
|
# $resources_path = Optional path to the resources directory in your Snap. This ensures, you are not forced to put the Dockerfile, swagger.json and README.md in the root directory of your Snap.
|
|
416
432
|
# $skip-build = true/false. Default is false. Pass this flag as true to skip the build and head straight to tag and push. Build step needs to run and tagged using the --tag you pass to the publish-image command for this to work.
|
|
417
433
|
# Example:
|
|
418
|
-
# snapctl byosnap publish-image --byosnap-id byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/
|
|
434
|
+
# snapctl byosnap publish-image --byosnap-id byosnap-jinks-flask --tag my-first-image --path /Users/DevName/Development/SnapserEngine/byosnap-python
|
|
419
435
|
snapctl byosnap publish-image --byosnap-id $byosnap_id --tag $image_tag --path $code_root_path
|
|
420
436
|
snapctl byosnap publish-image --byosnap-id $byosnap_id --tag $image_tag --path $code_root_path --resources-path $resources_path
|
|
421
437
|
snapctl byosnap publish-image --byosnap-id $byosnap_id --tag $image_tag --skip-build
|
|
@@ -439,54 +455,54 @@ snapctl byosnap publish-version --help
|
|
|
439
455
|
# $version = Semantic version for your snap Eg: v0.0.1
|
|
440
456
|
# $byosnap_profile_path = Path to the snapser-byosnap-profile.json BYOSnap profile to configure dev, stage and prod settings for this snap. You can generate a base version of this file using the `snapctl byosnap generate-profile --out-path $outputPath --profile-filename $profileName` command
|
|
441
457
|
# Example:
|
|
442
|
-
# snapctl byosnap publish-version --byosnap-id byosnap-jinks-flask --tag my-first-image --version v0.0.1 --path /Users/DevName/Development/SnapserEngine/
|
|
458
|
+
# snapctl byosnap publish-version --byosnap-id byosnap-jinks-flask --tag my-first-image --version v0.0.1 --path /Users/DevName/Development/SnapserEngine/byosnap-python
|
|
443
459
|
snapctl byosnap publish-version --byosnap-id $byosnap_id --tag $image_tag --version $version --path $byosnap_profile_path
|
|
444
460
|
```
|
|
445
461
|
|
|
446
|
-
### BYO
|
|
447
|
-
Snapctl commands for your
|
|
448
|
-
|
|
449
|
-
#### 1. byogs help
|
|
462
|
+
### BYO Workstation - Bring your own Workstation
|
|
463
|
+
Snapctl commands for bring your own workstation. This command allows you to attach your workstation to a Snapend. This is useful for testing and debugging your BYOSnap code.
|
|
450
464
|
|
|
465
|
+
#### 1. byows help
|
|
451
466
|
See all the supported commands
|
|
452
467
|
|
|
453
468
|
```bash
|
|
454
|
-
# Help for the
|
|
455
|
-
snapctl
|
|
469
|
+
# Help for the byows command
|
|
470
|
+
snapctl byows --help
|
|
456
471
|
```
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
Build your custom game server image.
|
|
472
|
+
#### 2. byows attach
|
|
473
|
+
Attach your workstation to a Snapend. It should be noted, that this command outputs a file `byows_env_setup.sh|ps1` at `~/.snapser/` directory. This file contains the environment variables that the BYOWS technology will need to route internal calls to the appropriate Snaps.
|
|
461
474
|
|
|
462
475
|
```bash
|
|
463
|
-
#
|
|
464
|
-
|
|
476
|
+
# Attach your workstation to a Snapend
|
|
477
|
+
# $snapend_id = Snapend Id
|
|
478
|
+
# $byosnap_id = BYOSnap Id
|
|
479
|
+
# $http_port = Port that your local server is running on
|
|
480
|
+
snapctl byows attach --snapend-id $snapend_id --byosnap-id $byosnap_id --http-port $http_port
|
|
481
|
+
```
|
|
465
482
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
#
|
|
469
|
-
|
|
470
|
-
#
|
|
471
|
-
|
|
483
|
+
Then run, the following command in a separate terminal window, to setup the BYOWS environment variables.
|
|
484
|
+
```bash
|
|
485
|
+
# MacOSX
|
|
486
|
+
source ~/.snapser/byows_env_setup.sh
|
|
487
|
+
# Windows
|
|
488
|
+
.\.snapser\byows_env_setup.ps1
|
|
472
489
|
```
|
|
473
490
|
|
|
474
|
-
|
|
491
|
+
Then start your BYOSnap local server in the same tab that has the environment variables set up. This will ensure that the BYOSnap code can access the internal SDK and other Snaps in your Snapend.
|
|
475
492
|
|
|
476
|
-
|
|
493
|
+
### BYO Game Server - Bring your own Game Server
|
|
494
|
+
Snapctl commands for your custom game server
|
|
495
|
+
|
|
496
|
+
#### 1. byogs help
|
|
497
|
+
|
|
498
|
+
See all the supported commands
|
|
477
499
|
|
|
478
500
|
```bash
|
|
479
501
|
# Help for the byogs command
|
|
480
|
-
snapctl byogs
|
|
481
|
-
|
|
482
|
-
# Publish a new image
|
|
483
|
-
# $image_tag = An image tag for your snap
|
|
484
|
-
# Example:
|
|
485
|
-
# snapctl byogs push byosnap-jinks-gs --tag my-first-image
|
|
486
|
-
snapctl byogs push --tag $image_tag
|
|
502
|
+
snapctl byogs --help
|
|
487
503
|
```
|
|
488
504
|
|
|
489
|
-
####
|
|
505
|
+
#### 2. byogs publish
|
|
490
506
|
|
|
491
507
|
Publish your custom game server image. This commend replaces the old way of creating, publishing image and
|
|
492
508
|
then publishing the byogs. Now all you have to do is publish your image and create a fleet using the web portal.
|
|
@@ -511,7 +527,7 @@ snapctl byogs publish --tag $image_tag --path $code_root_path --resources-path $
|
|
|
511
527
|
snapctl byogs publish --tag $image_tag --skip-build
|
|
512
528
|
```
|
|
513
529
|
|
|
514
|
-
####
|
|
530
|
+
#### 3. byogs sync
|
|
515
531
|
|
|
516
532
|
This command allows developers to rapidly build, update and push their BYOGs out to a Snapend fleet. Simply, make changes to your code locally, and then run this command to deploy your BYOGs straight to your Snapend fleet.
|
|
517
533
|
|
|
@@ -531,6 +547,38 @@ snapctl byogs sync --path /Users/DevName/Development/SnapserEngine/game_server -
|
|
|
531
547
|
snapctl byosnap sync --path $code_root_path --tag $image_tag --snapend-id $snapend_id --fleet-names $fleet_names
|
|
532
548
|
```
|
|
533
549
|
|
|
550
|
+
#### 4. byogs build
|
|
551
|
+
|
|
552
|
+
Build your custom game server image.
|
|
553
|
+
|
|
554
|
+
```bash
|
|
555
|
+
# Help for the byogs command
|
|
556
|
+
snapctl byogs build --help
|
|
557
|
+
|
|
558
|
+
# Publish a new image
|
|
559
|
+
# $image_tag = An image tag for your snap
|
|
560
|
+
# $code_root_path = Local code path where your Dockerfile is present
|
|
561
|
+
# Example:
|
|
562
|
+
# snapctl byogs build byosnap-jinks-gs --tag my-first-image --path /Users/DevName/Development/SnapserEngine/game_server
|
|
563
|
+
snapctl byogs build --tag $image_tag --path $code_root_path
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
#### 5. byogs push
|
|
567
|
+
|
|
568
|
+
Push your custom game server image.
|
|
569
|
+
|
|
570
|
+
```bash
|
|
571
|
+
# Help for the byogs command
|
|
572
|
+
snapctl byogs push --help
|
|
573
|
+
|
|
574
|
+
# Publish a new image
|
|
575
|
+
# $image_tag = An image tag for your snap
|
|
576
|
+
# Example:
|
|
577
|
+
# snapctl byogs push byosnap-jinks-gs --tag my-first-image
|
|
578
|
+
snapctl byogs push --tag $image_tag
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
|
|
534
582
|
### Game
|
|
535
583
|
Snapctl commands for your game
|
|
536
584
|
|
|
@@ -543,36 +591,18 @@ See all the supported commands
|
|
|
543
591
|
snapctl game --help
|
|
544
592
|
```
|
|
545
593
|
|
|
546
|
-
#### 2.
|
|
594
|
+
#### 2. game create
|
|
547
595
|
Create a game
|
|
548
596
|
```bash
|
|
549
597
|
snapctl game create --name $game_name
|
|
550
598
|
```
|
|
551
599
|
|
|
552
|
-
#### 3.
|
|
600
|
+
#### 3. game enumerate
|
|
553
601
|
List all the games
|
|
554
602
|
```bash
|
|
555
603
|
snapctl game enumerate
|
|
556
604
|
```
|
|
557
605
|
|
|
558
|
-
### Generate
|
|
559
|
-
Generator tool to help generate credentials
|
|
560
|
-
|
|
561
|
-
#### 1. generate help
|
|
562
|
-
See all the supported commands
|
|
563
|
-
```bash
|
|
564
|
-
# Help for the generate command
|
|
565
|
-
snapctl generate --help
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
#### 2. Generate ECR Credentials
|
|
569
|
-
Generate the ECR credentials. Game studios can use these credentials to self publish their images to Snapser.
|
|
570
|
-
|
|
571
|
-
```bash
|
|
572
|
-
snapctl generate credentials --category "ecr" --out-path $output_path
|
|
573
|
-
|
|
574
|
-
```
|
|
575
|
-
|
|
576
606
|
### Snapend
|
|
577
607
|
Snapctl commands for your snapend
|
|
578
608
|
|
|
@@ -585,7 +615,7 @@ See all the supported commands
|
|
|
585
615
|
snapctl snapend --help
|
|
586
616
|
```
|
|
587
617
|
|
|
588
|
-
#### 2.
|
|
618
|
+
#### 2. snapend download
|
|
589
619
|
|
|
590
620
|
Download Manifest, SDKs and Protos for your Snapend
|
|
591
621
|
|
|
@@ -619,7 +649,7 @@ snapctl snapend download --snapend-id $snapend_id --category $category --format
|
|
|
619
649
|
snapctl snapend download --snapend-id $snapend_id --category $category --format $format --type $type --http-lib $http_lib --out-path $out_path
|
|
620
650
|
```
|
|
621
651
|
|
|
622
|
-
#### 3.
|
|
652
|
+
#### 3. snapend clone
|
|
623
653
|
|
|
624
654
|
Clone a Snapend from an existing manifest. Passing the blocking flag ensures your CLI command waits till the new Snapend is up.
|
|
625
655
|
|
|
@@ -638,10 +668,14 @@ snapctl snapend clone --game-id $game_id --name $snapend_name --env $env --manif
|
|
|
638
668
|
snapctl snapend clone --game-id $game_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest" --blocking
|
|
639
669
|
```
|
|
640
670
|
|
|
641
|
-
#### 4.
|
|
671
|
+
#### 4. snapend apply
|
|
672
|
+
|
|
673
|
+
Apply changes to your Snapend from a manifest. You should have the latest manifest before applying changes. Basically, when you download a manifest, Snapser adds an `applied_configuration` section to your manifest, which stores the state of the Snapend during export. Now, if someone manually updates the Snapend or a configuration of a Snap, you are no longer going to have the latest Snapend representation in the `applied_configuration`. This is how Snapser prevents you from stomping over someone elses changes.
|
|
674
|
+
|
|
675
|
+
You can optionally pass a `--force` flag telling Snapser to ignore any diffs it may find in the current state of the Snapend and the one in the `applied_configuration` field of your manifest. Essentially, this flag allows you to stomp over any changes and tell Snapser to force apply.
|
|
676
|
+
|
|
677
|
+
Separately, you can pass a blocking flag to make your CLI wait for the Snapend update to complete.
|
|
642
678
|
|
|
643
|
-
Apply changes to your Snapend from a manifest. You should have the latest manifest before applying changes. This is to prevent
|
|
644
|
-
a user stomping over someone elses changes. Passing the blocking flag ensures your CLI command waits till the update is complete.
|
|
645
679
|
|
|
646
680
|
```bash
|
|
647
681
|
# Help for the apply command
|
|
@@ -649,13 +683,15 @@ snapctl snapend apply --help
|
|
|
649
683
|
|
|
650
684
|
# Apply changes to a snapend via manifest
|
|
651
685
|
# $path_to_manifest = Path to the manifest file; should include the file name
|
|
686
|
+
# --force = Optional flag to tell Snapser that you do not want it to check the diff between the Snapend states and just force apply the changes
|
|
652
687
|
# Example:
|
|
653
|
-
# snapctl snapend apply --manifest-path-filename "C:\Users\name\Downloads\snapser-ox1bcyim-manifest.json" --blocking
|
|
688
|
+
# snapctl snapend apply --manifest-path-filename "C:\Users\name\Downloads\snapser-ox1bcyim-manifest.json" --force --blocking
|
|
654
689
|
snapctl snapend apply --manifest-path-filename "$path_to_manifest"
|
|
655
690
|
snapctl snapend apply --manifest-path-filename "$path_to_manifest" --blocking
|
|
691
|
+
snapctl snapend apply --manifest-path-filename "$path_to_manifest" --force --blocking
|
|
656
692
|
```
|
|
657
693
|
|
|
658
|
-
#### 5.
|
|
694
|
+
#### 5. snapend update
|
|
659
695
|
|
|
660
696
|
Update your BYOSnap or BYOGs versions for the Snapend
|
|
661
697
|
|
|
@@ -675,7 +711,7 @@ snapctl snapend update --help
|
|
|
675
711
|
snapctl snapend update --snapend-id $snapend_id --byosnaps $byosnaps --byogs $byogs --blocking
|
|
676
712
|
```
|
|
677
713
|
|
|
678
|
-
#### 6.
|
|
714
|
+
#### 6. snapend state
|
|
679
715
|
|
|
680
716
|
Get the Snapend state
|
|
681
717
|
|
|
@@ -690,6 +726,25 @@ snapctl snapend state --help
|
|
|
690
726
|
snapctl snapend state $snapend_id
|
|
691
727
|
```
|
|
692
728
|
|
|
729
|
+
### Generate
|
|
730
|
+
Generator tool to help generate credentials
|
|
731
|
+
|
|
732
|
+
#### 1. generate help
|
|
733
|
+
See all the supported commands
|
|
734
|
+
```bash
|
|
735
|
+
# Help for the generate command
|
|
736
|
+
snapctl generate --help
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
#### 2. Generate ECR Credentials
|
|
740
|
+
Generate the ECR credentials. Game studios can use these credentials to self publish their images to Snapser.
|
|
741
|
+
|
|
742
|
+
```bash
|
|
743
|
+
snapctl generate credentials --category "ecr" --out-path $output_path
|
|
744
|
+
|
|
745
|
+
```
|
|
746
|
+
|
|
747
|
+
|
|
693
748
|
## Error codes
|
|
694
749
|
### CLI Return Codes
|
|
695
750
|
| Error Code | Description |
|
|
@@ -744,6 +799,7 @@ snapctl snapend state $snapend_id
|
|
|
744
799
|
| 48 | BYOSNAP update version invalid version error |
|
|
745
800
|
| 49 | BYOSNAP publish error |
|
|
746
801
|
| 86 | BYOSNAP generate-profile |
|
|
802
|
+
| 87 | BYOSNAP swagger error |
|
|
747
803
|
|
|
748
804
|
|
|
749
805
|
### Game Errors
|
|
@@ -777,6 +833,7 @@ snapctl snapend state $snapend_id
|
|
|
777
833
|
| 73 | Snapend update server error |
|
|
778
834
|
| 74 | Snapend update timeout error |
|
|
779
835
|
| 75 | Snapend state error |
|
|
836
|
+
| 76 | Snapend manifest mismatch error |
|
|
780
837
|
|
|
781
838
|
### Generate Errors
|
|
782
839
|
| Error Code | Description |
|
|
@@ -784,3 +841,8 @@ snapctl snapend state $snapend_id
|
|
|
784
841
|
| 80 | Generic generate error |
|
|
785
842
|
| 81 | Generate credentials error |
|
|
786
843
|
|
|
844
|
+
### BYOWS Errors
|
|
845
|
+
| Error Code | Description |
|
|
846
|
+
|------------|----------------------------------------------------------|
|
|
847
|
+
| 95 | Generic byows error |
|
|
848
|
+
|