snapctl 1.0.4__tar.gz → 1.1.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.

Files changed (54) hide show
  1. {snapctl-1.0.4 → snapctl-1.1.0}/PKG-INFO +158 -35
  2. {snapctl-1.0.4 → snapctl-1.1.0}/README.md +157 -34
  3. {snapctl-1.0.4 → snapctl-1.1.0}/pyproject.toml +1 -1
  4. snapctl-1.1.0/snapctl/commands/application.py +135 -0
  5. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/commands/game.py +3 -3
  6. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/commands/snapend.py +246 -28
  7. snapctl-1.1.0/snapctl/commands/snapend_manifest.py +541 -0
  8. snapctl-1.1.0/snapctl/commands/snaps.py +109 -0
  9. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/config/constants.py +18 -2
  10. snapctl-1.1.0/snapctl/data/releases/1.1.0.mdx +20 -0
  11. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/main.py +157 -10
  12. snapctl-1.1.0/snapctl/utils/exceptions.py +8 -0
  13. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/utils/helper.py +2 -1
  14. {snapctl-1.0.4 → snapctl-1.1.0}/LICENSE +0 -0
  15. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/__init__.py +0 -0
  16. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/__main__.py +0 -0
  17. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/commands/__init__.py +0 -0
  18. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/commands/byogs.py +0 -0
  19. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/commands/byosnap.py +0 -0
  20. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/commands/byows.py +0 -0
  21. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/commands/generate.py +0 -0
  22. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/commands/release_notes.py +0 -0
  23. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/config/__init__.py +0 -0
  24. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/config/app.py +0 -0
  25. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/config/endpoints.py +0 -0
  26. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/config/hashes.py +0 -0
  27. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/__init__.py +0 -0
  28. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/profiles/__init__.py +0 -0
  29. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/profiles/snapser-byosnap-profile.json +0 -0
  30. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/profiles/snapser-byosnap-profile.yaml +0 -0
  31. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/profiles/snapser-byosnap-profile.yml +0 -0
  32. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/1.0.0.mdx +0 -0
  33. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/1.0.2.mdx +0 -0
  34. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/1.0.3.mdx +0 -0
  35. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/1.0.4.mdx +0 -0
  36. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/__init__.py +0 -0
  37. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.46.0.mdx +0 -0
  38. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.46.4.mdx +0 -0
  39. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.47.0.mdx +0 -0
  40. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.47.1.mdx +0 -0
  41. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.47.2.mdx +0 -0
  42. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.48.0.mdx +0 -0
  43. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.49.0.mdx +0 -0
  44. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.49.1.mdx +0 -0
  45. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.49.2.mdx +0 -0
  46. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.49.3.mdx +0 -0
  47. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.50.0.mdx +0 -0
  48. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.51.0.mdx +0 -0
  49. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/data/releases/beta-0.53.1.mdx +0 -0
  50. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/types/__init__.py +0 -0
  51. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/types/definitions.py +0 -0
  52. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/utils/__init__.py +0 -0
  53. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/utils/echo.py +0 -0
  54. {snapctl-1.0.4 → snapctl-1.1.0}/snapctl/utils/telemetry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snapctl
3
- Version: 1.0.4
3
+ Version: 1.1.0
4
4
  Summary: Snapser CLI Tool
5
5
  Author: Ajinkya Apte
6
6
  Author-email: aj@snapser.com
@@ -232,7 +232,27 @@ Run the following to see the list of commands Snapser supports
232
232
  snapctl --help
233
233
  ```
234
234
 
235
- ### BYO Snap - Bring your own Snap
235
+ ### 1. Snaps
236
+ Snapctl commands for snaps
237
+
238
+ #### 1. snaps help
239
+ See all the supported commands.
240
+
241
+ ```bash
242
+ # Help for the byosnap command
243
+ snapctl snaps --help
244
+ ```
245
+
246
+ #### 2. snaps enumerate
247
+ See all the supported commands.
248
+
249
+ ```bash
250
+ # Enumerate details for all the available snaps
251
+ # $output_path = Optional path to where you want snapctl to save snap details
252
+ snapctl snaps enumerate --out-path
253
+ ```
254
+
255
+ ### 2. BYO Snap - Bring your own Snap
236
256
  Snapctl commands for your custom code
237
257
 
238
258
  #### 1. byosnap help
@@ -463,7 +483,7 @@ snapctl byosnap publish-version --help
463
483
  snapctl byosnap publish-version --byosnap-id $byosnap_id --tag $image_tag --version $version --path $byosnap_profile_path
464
484
  ```
465
485
 
466
- ### BYO Workstation - Bring your own Workstation
486
+ ### 3. BYO Workstation - Bring your own Workstation
467
487
  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.
468
488
 
469
489
  #### 1. byows help
@@ -494,7 +514,7 @@ source ~/.snapser/byows_env_setup.sh
494
514
 
495
515
  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.
496
516
 
497
- ### BYO Game Server - Bring your own Game Server
517
+ ### 4. BYO Game Server - Bring your own Game Server
498
518
  Snapctl commands for your custom game server
499
519
 
500
520
  #### 1. byogs help
@@ -582,32 +602,99 @@ snapctl byogs push --help
582
602
  snapctl byogs push --tag $image_tag
583
603
  ```
584
604
 
605
+ ### 5. Application
606
+ Snapctl commands for your application
585
607
 
586
- ### Game
587
- Snapctl commands for your game
608
+ #### 1. application help
588
609
 
589
- #### 1. game help
610
+ See all the supported commands
611
+
612
+ ```bash
613
+ # Help for the byogs command
614
+ snapctl application --help
615
+ ```
616
+
617
+ #### 2. application create
618
+ Create an application
619
+ ```bash
620
+ snapctl application create --name $app_name
621
+ ```
622
+
623
+ #### 3. application enumerate
624
+ List all the applications
625
+ ```bash
626
+ snapctl application enumerate
627
+ ```
628
+
629
+ ### 6. Snapend Manifest
630
+ Snapctl commands for the Snapend manifest. Manifest is the representation of your Snapser backend
631
+ stored as a JSON or YAML. The manifest can then be used to create, update your backend.
632
+
633
+ #### 1. snapend-manifest help
590
634
 
591
635
  See all the supported commands
592
636
 
593
637
  ```bash
594
638
  # Help for the byogs command
595
- snapctl game --help
639
+ snapctl snapend-manifest --help
596
640
  ```
597
641
 
598
- #### 2. game create
599
- Create a game
642
+ #### 2. Snapend Manifest Create
643
+
644
+ Create a Snapend manifest. The output manifest file can then be used with the `snapend create` or `snapend clone` commands.
645
+
600
646
  ```bash
601
- snapctl game create --name $game_name
647
+ # Create a Snapend manifest file
648
+ # $name = Name for your backend, which is stored in the outputted manifest
649
+ # $env = One of DEVELOPMENT, STAGING or PRODUCTION
650
+ # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
651
+ # $snaps = Comma separated list of snap ids you want to add. You can get the snap ids from the
652
+ # `snapctl snaps enumerate --out-path ./snaps.json` command
653
+ # $features = Pass `WEB_SOCKETS` if you want to enable web sockets for your backend.
654
+ # Note: One of snaps or features is required
655
+ # Example:
656
+ # snapend-manifest create --name my-dev-snapend --env DEVELOPMENT --snaps auth,analytics --add-features WEB_SOCKETS --out-path ./snapend-manifest.json
657
+ snapctl snapend-manifest create --name $name$ --env $env$ --snaps $snaps --features $features --out-path-filename $output_path_filename
602
658
  ```
603
659
 
604
- #### 3. game enumerate
605
- List all the games
660
+ #### 3. Snapend Manifest Update
661
+
662
+ Update an existing Snapend manifest.
663
+
606
664
  ```bash
607
- snapctl game enumerate
665
+ # Update a Snapend manifest file
666
+ # $input_manifest = Path and file name of the current manifest. The filename should end with .json or .yaml
667
+ # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
668
+ # $snaps = Comma separated list of snap ids you want to have at the end. You can get the snap ids from # the `snapctl snaps enumerate --out-path ./snaps.json` command.
669
+ # IMPORTANT: If your manifest has a snap but your --snaps does not. It will be removed.
670
+ # $features = Pass `WEB_SOCKETS` if you want to enable web sockets for your backend.
671
+ # IMPORTANT: If your manifest has a feature but your --features does not. It will be removed.
672
+ # Note: One of snaps, and features is required
673
+ # Example:
674
+ # snapctl snapend-manifest update --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --add-snaps game-server-fleets --remove-snaps analytics --remove-features WEB_SOCKETS --out-path ./snapend-updated-manifest.yaml
675
+
676
+ snapctl snapend-manifest update --manifest-path-filename $input_manifest --snaps $snaps --features $features--out-path-filename $output_path_filename
608
677
  ```
609
678
 
610
- ### Snapend
679
+ #### 4. Snapend Manifest Upgrade
680
+
681
+ Upgrade all snaps or a list of snaps to the latest version
682
+
683
+ ```bash
684
+ # Update a Snapend manifest file
685
+ # $input_manifest = Path and file name of the current manifest. The filename should end with .json or .yaml
686
+ # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
687
+ # $snaps = (Optional) Comma separated list of snap ids you want to upgrade. You can get the snap ids
688
+ # from the `snapctl snaps enumerate --out-path ./snaps.json` command
689
+ # IMPORTANT: If the --snaps parameter is not provided then all snaps in the manifest will be upgraded
690
+ # Example:
691
+ # snapctl snapend-manifest upgrade --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --snaps game-server-fleets --out-path ./snapend-updated-manifest.yaml
692
+ # snapctl snapend-manifest upgrade --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --out-path ./snapend-updated-manifest.yaml
693
+
694
+ snapctl snapend-manifest upgrade --manifest-path-filename $input_manifest --snaps $snaps --out-path-filename $output_path_filename
695
+ ```
696
+
697
+ ### 7. Snapend
611
698
  Snapctl commands for your snapend
612
699
 
613
700
  #### 1. snapend help
@@ -653,7 +740,26 @@ snapctl snapend download --snapend-id $snapend_id --category $category --format
653
740
  snapctl snapend download --snapend-id $snapend_id --category $category --format $format --type $type --http-lib $http_lib --out-path $out_path
654
741
  ```
655
742
 
656
- #### 3. snapend clone
743
+ #### 3. snapend create
744
+
745
+ Create a Snapend from an existing manifest. Passing the blocking flag ensures your CLI command waits till the new Snapend is up.
746
+
747
+ ```bash
748
+ # Help for the crete command
749
+ snapctl snapend create --help
750
+
751
+ # Create a Snapend
752
+ # $app_id = App Id
753
+ # $path_to_manifest = Path to the manifest file; should include the file name
754
+ # Optionally override name and environment by passing the --name and --environment overrides
755
+ # Example:
756
+ # snapctl snapend create --manifest-path-filename $path_to_manifest --app-id $app_id --blocking
757
+ snapctl snapend create --manifest-path-filename $path_to_manifest --app-id $app_id
758
+ snapctl snapend create --manifest-path-filename $path_to_manifest --app-id $app_id --blocking
759
+ snapctl snapend create --name $name --env $env --manifest-path-filename $path_to_manifest --app-id $app_id --blocking
760
+ ```
761
+
762
+ #### 4. snapend clone
657
763
 
658
764
  Clone a Snapend from an existing manifest. Passing the blocking flag ensures your CLI command waits till the new Snapend is up.
659
765
 
@@ -662,17 +768,17 @@ Clone a Snapend from an existing manifest. Passing the blocking flag ensures you
662
768
  snapctl snapend clone --help
663
769
 
664
770
  # Clone your Snapend
665
- # $game_id = Game Id
771
+ # $app_id = App Id
666
772
  # $snapend_name = Name of your new Snapend
667
773
  # $env = One of development, staging
668
774
  # $path_to_manifest = Path to the manifest file; should include the file name
669
775
  # Example:
670
- # snapctl snapend clone --game-id 2581d802-aca-496c-8a76-1953ad0db165 --name new-snapend --env development --manifest-path-filename "C:\Users\name\Downloads\snapser-ox1bcyim-manifest.json" --blocking
671
- snapctl snapend clone --game-id $game_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest"
672
- snapctl snapend clone --game-id $game_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest" --blocking
776
+ # snapctl snapend clone --app-id 2581d802-aca-496c-8a76-1953ad0db165 --name new-snapend --env development --manifest-path-filename "C:\Users\name\Downloads\snapser-ox1bcyim-manifest.json" --blocking
777
+ snapctl snapend clone --app-id $app_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest"
778
+ snapctl snapend clone --app-id $app_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest" --blocking
673
779
  ```
674
780
 
675
- #### 4. snapend apply
781
+ #### 5. snapend apply
676
782
 
677
783
  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.
678
784
 
@@ -695,7 +801,7 @@ snapctl snapend apply --manifest-path-filename "$path_to_manifest" --blocking
695
801
  snapctl snapend apply --manifest-path-filename "$path_to_manifest" --force --blocking
696
802
  ```
697
803
 
698
- #### 5. snapend update
804
+ #### 6. snapend update
699
805
 
700
806
  Update your BYOSnap or BYOGs versions for the Snapend
701
807
 
@@ -715,7 +821,7 @@ snapctl snapend update --help
715
821
  snapctl snapend update --snapend-id $snapend_id --byosnaps $byosnaps --byogs $byogs --blocking
716
822
  ```
717
823
 
718
- #### 6. snapend state
824
+ #### 7. snapend state
719
825
 
720
826
  Get the Snapend state
721
827
 
@@ -730,7 +836,7 @@ snapctl snapend state --help
730
836
  snapctl snapend state $snapend_id
731
837
  ```
732
838
 
733
- ### Generate
839
+ ### 8. Generate
734
840
  Generator tool to help generate credentials
735
841
 
736
842
  #### 1. generate help
@@ -757,6 +863,7 @@ snapctl generate credentials --category "ecr" --out-path $output_path
757
863
  | 1 | General error |
758
864
  | 2 | Input error |
759
865
  | 3 | Resource not found |
866
+ | 4 | Internal server error |
760
867
 
761
868
  ### Configuration Errors
762
869
  | Error Code | Description |
@@ -765,10 +872,23 @@ snapctl generate credentials --category "ecr" --out-path $output_path
765
872
  | 11 | Configuration error |
766
873
  | 12 | Dependency missing |
767
874
 
875
+ ### Snaps Errors
876
+ | Error Code | Description |
877
+ |------------|----------------------------------------------------------|
878
+ | 13 | Snaps Generic error |
879
+ | 14 | Snaps Enumerate error |
880
+
881
+ ### Snapend Manifest Errors
882
+ | Error Code | Description |
883
+ |------------|----------------------------------------------------------|
884
+ | 16 | Snapend Manifest create error |
885
+ | 17 | Snapend Manifest update error |
886
+ | 18 | Snapend Manifest upgrade error |
887
+
768
888
  ### BYOGS Errors
769
889
  | Error Code | Description |
770
890
  |------------|----------------------------------------------------------|
771
- | 3 | BYOGs resource not found |
891
+ | 3 | Resource not found: BYOGs resource not found |
772
892
  | 20 | Generic BYOGS error |
773
893
  | 21 | BYOGS dependency missing |
774
894
  | 22 | BYOGS ECR login error |
@@ -781,7 +901,7 @@ snapctl generate credentials --category "ecr" --out-path $output_path
781
901
  ### BYOSNAP Errors
782
902
  | Error Code | Description |
783
903
  |------------|----------------------------------------------------------|
784
- | 3 | BYOSnap resource not found |
904
+ | 3 | Resource not found: BYOSnap resource not found |
785
905
  | 30 | Generic BYOSNAP error |
786
906
  | 31 | BYOSNAP dependency missing |
787
907
  | 32 | BYOSNAP ECR login error |
@@ -806,21 +926,21 @@ snapctl generate credentials --category "ecr" --out-path $output_path
806
926
  | 87 | BYOSNAP swagger error |
807
927
 
808
928
 
809
- ### Game Errors
929
+ ### Application Errors
810
930
  | Error Code | Description |
811
931
  |------------|----------------------------------------------------------|
812
- | 3 | Game resource not found |
813
- | 50 | Generic game error |
814
- | 51 | Game create error |
815
- | 52 | Game create permission error |
816
- | 53 | Game create limit error |
817
- | 54 | Game create duplicate name error |
818
- | 55 | Game enumerate error |
932
+ | 3 | Resource not found: Application resource not found |
933
+ | 50 | Generic application error |
934
+ | 51 | Application create error |
935
+ | 52 | Application create permission error |
936
+ | 53 | Application create limit error |
937
+ | 54 | Application create duplicate name error |
938
+ | 55 | Application enumerate error |
819
939
 
820
940
  ### Snapend Errors
821
941
  | Error Code | Description |
822
942
  |------------|----------------------------------------------------------|
823
- | 3 | Snapend resource not found |
943
+ | 3 | Resource not found: Snapend resource not found |
824
944
  | 60 | Generic snapend error |
825
945
  | 61 | Snapend enumerate error |
826
946
  | 62 | Snapend clone error |
@@ -838,6 +958,9 @@ snapctl generate credentials --category "ecr" --out-path $output_path
838
958
  | 74 | Snapend update timeout error |
839
959
  | 75 | Snapend state error |
840
960
  | 76 | Snapend manifest mismatch error |
961
+ | 77 | Snapend create error |
962
+ | 78 | Snapend create server error |
963
+ | 79 | Snapend create timeout error |
841
964
 
842
965
  ### Generate Errors
843
966
  | Error Code | Description |
@@ -211,7 +211,27 @@ Run the following to see the list of commands Snapser supports
211
211
  snapctl --help
212
212
  ```
213
213
 
214
- ### BYO Snap - Bring your own Snap
214
+ ### 1. Snaps
215
+ Snapctl commands for snaps
216
+
217
+ #### 1. snaps help
218
+ See all the supported commands.
219
+
220
+ ```bash
221
+ # Help for the byosnap command
222
+ snapctl snaps --help
223
+ ```
224
+
225
+ #### 2. snaps enumerate
226
+ See all the supported commands.
227
+
228
+ ```bash
229
+ # Enumerate details for all the available snaps
230
+ # $output_path = Optional path to where you want snapctl to save snap details
231
+ snapctl snaps enumerate --out-path
232
+ ```
233
+
234
+ ### 2. BYO Snap - Bring your own Snap
215
235
  Snapctl commands for your custom code
216
236
 
217
237
  #### 1. byosnap help
@@ -442,7 +462,7 @@ snapctl byosnap publish-version --help
442
462
  snapctl byosnap publish-version --byosnap-id $byosnap_id --tag $image_tag --version $version --path $byosnap_profile_path
443
463
  ```
444
464
 
445
- ### BYO Workstation - Bring your own Workstation
465
+ ### 3. BYO Workstation - Bring your own Workstation
446
466
  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.
447
467
 
448
468
  #### 1. byows help
@@ -473,7 +493,7 @@ source ~/.snapser/byows_env_setup.sh
473
493
 
474
494
  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
495
 
476
- ### BYO Game Server - Bring your own Game Server
496
+ ### 4. BYO Game Server - Bring your own Game Server
477
497
  Snapctl commands for your custom game server
478
498
 
479
499
  #### 1. byogs help
@@ -561,32 +581,99 @@ snapctl byogs push --help
561
581
  snapctl byogs push --tag $image_tag
562
582
  ```
563
583
 
584
+ ### 5. Application
585
+ Snapctl commands for your application
564
586
 
565
- ### Game
566
- Snapctl commands for your game
587
+ #### 1. application help
567
588
 
568
- #### 1. game help
589
+ See all the supported commands
590
+
591
+ ```bash
592
+ # Help for the byogs command
593
+ snapctl application --help
594
+ ```
595
+
596
+ #### 2. application create
597
+ Create an application
598
+ ```bash
599
+ snapctl application create --name $app_name
600
+ ```
601
+
602
+ #### 3. application enumerate
603
+ List all the applications
604
+ ```bash
605
+ snapctl application enumerate
606
+ ```
607
+
608
+ ### 6. Snapend Manifest
609
+ Snapctl commands for the Snapend manifest. Manifest is the representation of your Snapser backend
610
+ stored as a JSON or YAML. The manifest can then be used to create, update your backend.
611
+
612
+ #### 1. snapend-manifest help
569
613
 
570
614
  See all the supported commands
571
615
 
572
616
  ```bash
573
617
  # Help for the byogs command
574
- snapctl game --help
618
+ snapctl snapend-manifest --help
575
619
  ```
576
620
 
577
- #### 2. game create
578
- Create a game
621
+ #### 2. Snapend Manifest Create
622
+
623
+ Create a Snapend manifest. The output manifest file can then be used with the `snapend create` or `snapend clone` commands.
624
+
579
625
  ```bash
580
- snapctl game create --name $game_name
626
+ # Create a Snapend manifest file
627
+ # $name = Name for your backend, which is stored in the outputted manifest
628
+ # $env = One of DEVELOPMENT, STAGING or PRODUCTION
629
+ # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
630
+ # $snaps = Comma separated list of snap ids you want to add. You can get the snap ids from the
631
+ # `snapctl snaps enumerate --out-path ./snaps.json` command
632
+ # $features = Pass `WEB_SOCKETS` if you want to enable web sockets for your backend.
633
+ # Note: One of snaps or features is required
634
+ # Example:
635
+ # snapend-manifest create --name my-dev-snapend --env DEVELOPMENT --snaps auth,analytics --add-features WEB_SOCKETS --out-path ./snapend-manifest.json
636
+ snapctl snapend-manifest create --name $name$ --env $env$ --snaps $snaps --features $features --out-path-filename $output_path_filename
581
637
  ```
582
638
 
583
- #### 3. game enumerate
584
- List all the games
639
+ #### 3. Snapend Manifest Update
640
+
641
+ Update an existing Snapend manifest.
642
+
585
643
  ```bash
586
- snapctl game enumerate
644
+ # Update a Snapend manifest file
645
+ # $input_manifest = Path and file name of the current manifest. The filename should end with .json or .yaml
646
+ # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
647
+ # $snaps = Comma separated list of snap ids you want to have at the end. You can get the snap ids from # the `snapctl snaps enumerate --out-path ./snaps.json` command.
648
+ # IMPORTANT: If your manifest has a snap but your --snaps does not. It will be removed.
649
+ # $features = Pass `WEB_SOCKETS` if you want to enable web sockets for your backend.
650
+ # IMPORTANT: If your manifest has a feature but your --features does not. It will be removed.
651
+ # Note: One of snaps, and features is required
652
+ # Example:
653
+ # snapctl snapend-manifest update --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --add-snaps game-server-fleets --remove-snaps analytics --remove-features WEB_SOCKETS --out-path ./snapend-updated-manifest.yaml
654
+
655
+ snapctl snapend-manifest update --manifest-path-filename $input_manifest --snaps $snaps --features $features--out-path-filename $output_path_filename
587
656
  ```
588
657
 
589
- ### Snapend
658
+ #### 4. Snapend Manifest Upgrade
659
+
660
+ Upgrade all snaps or a list of snaps to the latest version
661
+
662
+ ```bash
663
+ # Update a Snapend manifest file
664
+ # $input_manifest = Path and file name of the current manifest. The filename should end with .json or .yaml
665
+ # $output_path_filename = Path and file name to store the manifest. The filename should end with .json or .yaml
666
+ # $snaps = (Optional) Comma separated list of snap ids you want to upgrade. You can get the snap ids
667
+ # from the `snapctl snaps enumerate --out-path ./snaps.json` command
668
+ # IMPORTANT: If the --snaps parameter is not provided then all snaps in the manifest will be upgraded
669
+ # Example:
670
+ # snapctl snapend-manifest upgrade --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --snaps game-server-fleets --out-path ./snapend-updated-manifest.yaml
671
+ # snapctl snapend-manifest upgrade --manifest-path-filename ./snapser-jn86b0dv-manifest.yaml --out-path ./snapend-updated-manifest.yaml
672
+
673
+ snapctl snapend-manifest upgrade --manifest-path-filename $input_manifest --snaps $snaps --out-path-filename $output_path_filename
674
+ ```
675
+
676
+ ### 7. Snapend
590
677
  Snapctl commands for your snapend
591
678
 
592
679
  #### 1. snapend help
@@ -632,7 +719,26 @@ snapctl snapend download --snapend-id $snapend_id --category $category --format
632
719
  snapctl snapend download --snapend-id $snapend_id --category $category --format $format --type $type --http-lib $http_lib --out-path $out_path
633
720
  ```
634
721
 
635
- #### 3. snapend clone
722
+ #### 3. snapend create
723
+
724
+ Create a Snapend from an existing manifest. Passing the blocking flag ensures your CLI command waits till the new Snapend is up.
725
+
726
+ ```bash
727
+ # Help for the crete command
728
+ snapctl snapend create --help
729
+
730
+ # Create a Snapend
731
+ # $app_id = App Id
732
+ # $path_to_manifest = Path to the manifest file; should include the file name
733
+ # Optionally override name and environment by passing the --name and --environment overrides
734
+ # Example:
735
+ # snapctl snapend create --manifest-path-filename $path_to_manifest --app-id $app_id --blocking
736
+ snapctl snapend create --manifest-path-filename $path_to_manifest --app-id $app_id
737
+ snapctl snapend create --manifest-path-filename $path_to_manifest --app-id $app_id --blocking
738
+ snapctl snapend create --name $name --env $env --manifest-path-filename $path_to_manifest --app-id $app_id --blocking
739
+ ```
740
+
741
+ #### 4. snapend clone
636
742
 
637
743
  Clone a Snapend from an existing manifest. Passing the blocking flag ensures your CLI command waits till the new Snapend is up.
638
744
 
@@ -641,17 +747,17 @@ Clone a Snapend from an existing manifest. Passing the blocking flag ensures you
641
747
  snapctl snapend clone --help
642
748
 
643
749
  # Clone your Snapend
644
- # $game_id = Game Id
750
+ # $app_id = App Id
645
751
  # $snapend_name = Name of your new Snapend
646
752
  # $env = One of development, staging
647
753
  # $path_to_manifest = Path to the manifest file; should include the file name
648
754
  # Example:
649
- # snapctl snapend clone --game-id 2581d802-aca-496c-8a76-1953ad0db165 --name new-snapend --env development --manifest-path-filename "C:\Users\name\Downloads\snapser-ox1bcyim-manifest.json" --blocking
650
- snapctl snapend clone --game-id $game_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest"
651
- snapctl snapend clone --game-id $game_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest" --blocking
755
+ # snapctl snapend clone --app-id 2581d802-aca-496c-8a76-1953ad0db165 --name new-snapend --env development --manifest-path-filename "C:\Users\name\Downloads\snapser-ox1bcyim-manifest.json" --blocking
756
+ snapctl snapend clone --app-id $app_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest"
757
+ snapctl snapend clone --app-id $app_id --name $snapend_name --env $env --manifest-path-filename "$path_to_manifest" --blocking
652
758
  ```
653
759
 
654
- #### 4. snapend apply
760
+ #### 5. snapend apply
655
761
 
656
762
  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.
657
763
 
@@ -674,7 +780,7 @@ snapctl snapend apply --manifest-path-filename "$path_to_manifest" --blocking
674
780
  snapctl snapend apply --manifest-path-filename "$path_to_manifest" --force --blocking
675
781
  ```
676
782
 
677
- #### 5. snapend update
783
+ #### 6. snapend update
678
784
 
679
785
  Update your BYOSnap or BYOGs versions for the Snapend
680
786
 
@@ -694,7 +800,7 @@ snapctl snapend update --help
694
800
  snapctl snapend update --snapend-id $snapend_id --byosnaps $byosnaps --byogs $byogs --blocking
695
801
  ```
696
802
 
697
- #### 6. snapend state
803
+ #### 7. snapend state
698
804
 
699
805
  Get the Snapend state
700
806
 
@@ -709,7 +815,7 @@ snapctl snapend state --help
709
815
  snapctl snapend state $snapend_id
710
816
  ```
711
817
 
712
- ### Generate
818
+ ### 8. Generate
713
819
  Generator tool to help generate credentials
714
820
 
715
821
  #### 1. generate help
@@ -736,6 +842,7 @@ snapctl generate credentials --category "ecr" --out-path $output_path
736
842
  | 1 | General error |
737
843
  | 2 | Input error |
738
844
  | 3 | Resource not found |
845
+ | 4 | Internal server error |
739
846
 
740
847
  ### Configuration Errors
741
848
  | Error Code | Description |
@@ -744,10 +851,23 @@ snapctl generate credentials --category "ecr" --out-path $output_path
744
851
  | 11 | Configuration error |
745
852
  | 12 | Dependency missing |
746
853
 
854
+ ### Snaps Errors
855
+ | Error Code | Description |
856
+ |------------|----------------------------------------------------------|
857
+ | 13 | Snaps Generic error |
858
+ | 14 | Snaps Enumerate error |
859
+
860
+ ### Snapend Manifest Errors
861
+ | Error Code | Description |
862
+ |------------|----------------------------------------------------------|
863
+ | 16 | Snapend Manifest create error |
864
+ | 17 | Snapend Manifest update error |
865
+ | 18 | Snapend Manifest upgrade error |
866
+
747
867
  ### BYOGS Errors
748
868
  | Error Code | Description |
749
869
  |------------|----------------------------------------------------------|
750
- | 3 | BYOGs resource not found |
870
+ | 3 | Resource not found: BYOGs resource not found |
751
871
  | 20 | Generic BYOGS error |
752
872
  | 21 | BYOGS dependency missing |
753
873
  | 22 | BYOGS ECR login error |
@@ -760,7 +880,7 @@ snapctl generate credentials --category "ecr" --out-path $output_path
760
880
  ### BYOSNAP Errors
761
881
  | Error Code | Description |
762
882
  |------------|----------------------------------------------------------|
763
- | 3 | BYOSnap resource not found |
883
+ | 3 | Resource not found: BYOSnap resource not found |
764
884
  | 30 | Generic BYOSNAP error |
765
885
  | 31 | BYOSNAP dependency missing |
766
886
  | 32 | BYOSNAP ECR login error |
@@ -785,21 +905,21 @@ snapctl generate credentials --category "ecr" --out-path $output_path
785
905
  | 87 | BYOSNAP swagger error |
786
906
 
787
907
 
788
- ### Game Errors
908
+ ### Application Errors
789
909
  | Error Code | Description |
790
910
  |------------|----------------------------------------------------------|
791
- | 3 | Game resource not found |
792
- | 50 | Generic game error |
793
- | 51 | Game create error |
794
- | 52 | Game create permission error |
795
- | 53 | Game create limit error |
796
- | 54 | Game create duplicate name error |
797
- | 55 | Game enumerate error |
911
+ | 3 | Resource not found: Application resource not found |
912
+ | 50 | Generic application error |
913
+ | 51 | Application create error |
914
+ | 52 | Application create permission error |
915
+ | 53 | Application create limit error |
916
+ | 54 | Application create duplicate name error |
917
+ | 55 | Application enumerate error |
798
918
 
799
919
  ### Snapend Errors
800
920
  | Error Code | Description |
801
921
  |------------|----------------------------------------------------------|
802
- | 3 | Snapend resource not found |
922
+ | 3 | Resource not found: Snapend resource not found |
803
923
  | 60 | Generic snapend error |
804
924
  | 61 | Snapend enumerate error |
805
925
  | 62 | Snapend clone error |
@@ -817,6 +937,9 @@ snapctl generate credentials --category "ecr" --out-path $output_path
817
937
  | 74 | Snapend update timeout error |
818
938
  | 75 | Snapend state error |
819
939
  | 76 | Snapend manifest mismatch error |
940
+ | 77 | Snapend create error |
941
+ | 78 | Snapend create server error |
942
+ | 79 | Snapend create timeout error |
820
943
 
821
944
  ### Generate Errors
822
945
  | Error Code | Description |
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "snapctl"
3
- version = "1.0.4"
3
+ version = "1.1.0"
4
4
  description = "Snapser CLI Tool"
5
5
  authors = ["Ajinkya Apte <aj@snapser.com>"]
6
6
  readme = "README.md"