xolo-server 2.1.0 → 2.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7749e82011acb35cebb065d60d29c6c94148e27a18d0eb936e206165c578023c
4
- data.tar.gz: 732faf4f08115109c815ad866de0029ec46d30da4e44afcf1c4f3b30aaa15dd9
3
+ metadata.gz: 84bf8381f9806f22096c6404f36e62cb49d418384cf8a9cd722bbb4afbfc60d1
4
+ data.tar.gz: 22e325e7e124104589c946006531cad9e5ab3b8db047b8403e66d5bb83166d0f
5
5
  SHA512:
6
- metadata.gz: 3e5d69ac7b0eb7986073bb4415b7779607a84e3fad95425be6cc7e69e144d3b23bfba8d78a631af3077b5f8bf318e1b0a221f19f69c12438542e33108e934aa9
7
- data.tar.gz: 1b99190baff9c56375b01c3b1225a8ce8c1dee53173c2e35b985d6a40a91c2b6ab8143bb7300c96e4a74c59036e492252c56dc32e990396730e4a63fe08b69c2
6
+ metadata.gz: 8dde7e538db3e32619b7828057e7671c8eef1460a60df222f63754624d98093b66b6badf78b8834ef4517343b0464e965471cd1bbb841ec66886b20d5ca98d0a
7
+ data.tar.gz: 738fdb9b8c7cd66cb82c1efe39cbc00aafa011a0adc6b4936f6a2fcaadf1733f64fa88a2648a8a7d8639d4866203328be8ce8baee86103d9982e83b4cf144841
data/data/client/xolo CHANGED
@@ -159,11 +159,23 @@ Options:
159
159
  -V, --version: Show the version of xolo.
160
160
 
161
161
  Commands:
162
- install, i <title>[=<version>] [<title2>[=<version2>] ...]
163
- Install a title, or specific version thereof (e.g. a version currently in pilot)
162
+ install, i <title> [<version>] [...]
163
+ install, i <title>[=<version>] [...]
164
+
165
+ Install one or more titles, or specific versions thereof (e.g. currently in pilot)
164
166
  If no version is specified, the currently released version will be installed.
165
- If you are only installing only one specific version of one title, you can
166
- omit the =, e.g. install <title> <version>.
167
+
168
+ To install more than one item at a time, use 'title=version' if you need a non-
169
+ released version of the title.
170
+
171
+ So 'install <title1> <title2>' installs the current release of each title, and
172
+ 'install <title1> <version1>' installs version1 of title1, but
173
+ 'install <title1>=<version1> <title2>' installs version1 of title1 and the
174
+ current release of title2. You can install as many items as needed this way.
175
+
176
+ In short, you can always use '=' between titles and versions, but you can
177
+ only omit it when the there are only two arguments and they are a title
178
+ and a version.
167
179
 
168
180
  uninstall, u <title> [<title2> ...]
169
181
  Uninstall a title, if possible. Not all titles are uninstallable via xolo.
@@ -10,14 +10,21 @@
10
10
  <key>EnvironmentVariables</key>
11
11
  <dict>
12
12
  <key>GEM_PATH</key>
13
- <string></string>
13
+ <string>/path/to/gems1:/path/to/gems2</string>
14
14
  <key>PATH</key>
15
- <string></string>
15
+ <string>/path/to/things1:/path/to/things2</string>
16
16
  </dict>
17
17
  -->
18
18
  <key>ProgramArguments</key>
19
19
  <array>
20
20
  <string>/usr/local/bin/xoloserver</string>
21
+ <!-- On production servers, uncomment this line:
22
+ <string>-p</string>
23
+ -->
24
+
25
+ <!-- to start the server with debug-logging on, uncomment this line:
26
+ <string>-d</string>
27
+ -->
21
28
  </array>
22
29
  <key>RunAtLoad</key>
23
30
  <true/>
@@ -458,6 +458,31 @@ module Xolo
458
458
  ENDDESC
459
459
  },
460
460
 
461
+ # @!attribute auto_release_delay
462
+ # @return [String] 'none' or an integer in string. How many days before new versions are automatically released?
463
+ # Applies only to subscribed titles with autopkg recipes.
464
+ auto_release_delay: {
465
+ label: 'Automatic Release Delay',
466
+ cli: :A,
467
+ type: :string,
468
+ walkthru_na: :auto_release_delay_na,
469
+ changelog: true,
470
+ invalid_msg: "Must be a non-negative integer, or '#{Xolo::NONE}'.",
471
+ desc: <<~ENDDESC
472
+ Specify how many days after a new version appears before it is automatically released from pilot.
473
+
474
+ This option is only available for titles that are both subscribed, and have an AutoPkg recipe configured. Any other title requires manual release of pilot versions using `xadm release <title> <version>`.
475
+
476
+ Setting this to 7 means that a week after a new version appears as a pilot, it will automatically be released as if someone did `xadm release <title> <version>`. The delay period should be used for piloting the version, either automatically using pilot-groups, or manually. *** USE WITH CAUTION ***
477
+
478
+ Setting it to zero means that new versions will be released at the next nightly auto-release task. *** USE WITH EXTREME CAUTION ***
479
+
480
+ To unset, meaning versions are never auto-released, use '#{Xolo::NONE}'
481
+
482
+ Auto-release happens during the server's nightly maintenance between 2-3am.
483
+ ENDDESC
484
+ },
485
+
461
486
  # @!attribute pilot_groups
462
487
  # @return [Array<String>] Jamf groups that will automatically get new versions installed or
463
488
  # updated when added, for piloting
@@ -474,7 +499,7 @@ module Xolo
474
499
  desc: <<~ENDDESC
475
500
  One or more Jamf Computer Groups whose members will automatically have new versions installed or updated for testing before it is released.
476
501
 
477
- These groups affect both the initial installation of and updates to a title when a version is added, before it is released.
502
+ These groups affect both the initial installation and updates of a title when a version is added, before it is released.
478
503
 
479
504
  These computers will be used for testing not just the software, but the installation process itself. Exclusions win, so computers that are also in an excluded group for the title will not be used as pilots.
480
505
 
@@ -486,6 +511,10 @@ module Xolo
486
511
 
487
512
  When adding a new version, the pilot groups from the previous version will be inherited if you don't specify any. To make the new version have no pilot groups, and fall back to these defined in the title, use '#{Xolo::NONE}'
488
513
 
514
+ Xolos Group Types:
515
+ - Excluded & Target Groups: affect which computers an see a title & its versions.
516
+ - Release & Pilot Groups: affect which computers have the title automatically installed or updated, and when. Note, when a version is released all targeted/non-excluded/non-frozen computers with it installed will get the update.
517
+
489
518
  NOTE: Any non-excluded computer can be used for piloting at any time by manually installing the yet-to-be-released version using `sudo xolo install` or `xadm deploy`. The members of the pilot groups are just the ones that will have it auto-installed.
490
519
  ENDDESC
491
520
  },
@@ -507,7 +536,7 @@ module Xolo
507
536
  readline: :jamf_computer_group_names,
508
537
  invalid_msg: 'Invalid release group(s). Must exist in Jamf and not be excluded.',
509
538
  desc: <<~ENDDESC
510
- One or more Jamf Computer Groups whose members will automatically have this title installed.
539
+ One or more Jamf Computer Groups whose members will automatically have this title installed if it isn't already.
511
540
 
512
541
  These groups affect the _initial_ installation of a title when a version is released. Any Mac with the title installed, will get updates (if not excluded) regardless of the release-groups.
513
542
 
@@ -519,12 +548,16 @@ module Xolo
519
548
 
520
549
  To remove all existing, use '#{Xolo::NONE}'.
521
550
 
551
+ Xolos Group Types:
552
+ - Excluded & Target Groups: affect which computers an see a title & its versions.
553
+ - Release & Pilot Groups: affect which computers have the title automatically installed or updated, and when.
554
+
522
555
  NOTE: When a version is in 'pilot', before it is released, these groups are ignored, but instead a set of 'pilot' groups is defined for each version - and those groups will have that version auto-installed.
523
556
  ENDDESC
524
557
  },
525
558
 
526
559
  # @!attribute excluded_groups
527
- # @return [Array<String>] Jamf groups that are not allowed to install this title
560
+ # @return [Array<String>] Jamf groups that are not allowed to install or update this title
528
561
  excluded_groups: {
529
562
  label: 'Excluded Computer Groups',
530
563
  cli: :x,
@@ -536,7 +569,7 @@ module Xolo
536
569
  readline: :jamf_computer_group_names,
537
570
  invalid_msg: 'Invalid excluded computer group(s). Must exist in Jamf.',
538
571
  desc: <<~ENDDESC
539
- One or more Jamf Computer Groups whose members are not allowed to install this title.
572
+ One or more Jamf Computer Groups whose members are not allowed to install this title. Computers that are members cannot see the title's existance.
540
573
 
541
574
  When a computer is in one of these groups, the title is not available at all, for installation or updates, even if the computer is in a pilot or release group.
542
575
 
@@ -544,7 +577,48 @@ module Xolo
544
577
 
545
578
  To remove all existing, use '#{Xolo::NONE}'.
546
579
 
547
- NOTE: Regardless of the excluded groups set here, if the server has defined a 'forced_exclusion' in its config, that group is always excluded from all xolo titles. Also, computers that are 'frozen' for a title are excluded.
580
+ Xolos Group Types:
581
+ - Excluded & Target Groups: affect which computers an see a title & its versions.
582
+ - Release & Pilot Groups: affect which computers have the title automatically installed or updated, and when. Note, when a version is released all targeted/non-excluded/non-frozen computers with it installed will get the update.
583
+
584
+ Excluding vs Freezing:
585
+ - Excluded Groups are how to prevent members from accessing titles in Xolo. It can be thought of as 'freezing for groups'
586
+ - Freezing (via 'xadm freeze...') is how to prevent individual computers from accessing titles in Xolo. It can be thought of as 'exclusion for individual computers'
587
+
588
+ NOTE: Regardless of the excluded groups set here, if the server has defined a 'forced_exclusion' in its config, that group is always excluded from all xolo titles.
589
+
590
+ See also --target-groups
591
+ ENDDESC
592
+ },
593
+
594
+ # @!attribute target_groups
595
+ # @return [Array<String>] Jamf groups that are exclusively allowed to install or update this title.
596
+ target_groups: {
597
+ label: 'Target Computer Groups',
598
+ cli: :t,
599
+ validate: true,
600
+ type: :string,
601
+ multi: true,
602
+ changelog: true,
603
+ readline_prompt: 'Group Name',
604
+ readline: :jamf_computer_group_names,
605
+ invalid_msg: 'Invalid target computer group(s). Must exist in Jamf.',
606
+ desc: <<~ENDDESC
607
+ One or more Jamf Computer Groups whose members are exclusively allowed to install this title. Computers that are NOT members cannot see the title's existance.
608
+
609
+ This is the opposite of --excluded-groups, however if a computer is in both target and excluded groups, the exclusion wins.
610
+
611
+ When a computer is not in one of these groups, the title is not available at all, for installation or updates, even if the computer is in a pilot or release group.
612
+
613
+ When using the --target-groups CLI option, you can specify more than one group by using the option more than once, or by providing a single option value with the groups separated by commas.
614
+
615
+ To remove all existing, use '#{Xolo::NONE}'.
616
+
617
+ Xolos Group Types:
618
+ - Excluded & Target Groups: affect which computers an see a title & its versions.
619
+ - Release & Pilot Groups: affect which computers have the title automatically installed or updated, and when. Note, when a version is released all targeted/non-excluded/non-frozen computers with it installed will get the update.
620
+
621
+ See also --excluded-groups
548
622
  ENDDESC
549
623
  },
550
624
 
@@ -606,7 +680,7 @@ module Xolo
606
680
  # @!attribute expiration
607
681
  # @return [Integer] Number of days of disuse before the title is uninstalled.
608
682
  expiration: {
609
- label: 'Expire Days',
683
+ label: 'Expiration Days',
610
684
  cli: :e,
611
685
  validate: true,
612
686
  type: :integer,
@@ -659,15 +733,41 @@ module Xolo
659
733
  changelog: true,
660
734
  walkthru_na: :ssvc_na,
661
735
  desc: <<~ENDDESC
662
- Make this title available in Self Service. Only the currently released version will be available.
663
-
664
- While in pilot, a version is installed via its auto-install policy,
665
- or 'sudo xolo install <title> <version>' or updated via its Patch Policy.
736
+ Make this title available in Self Service for initial installation. Only the currently released version will be available. (Pilot versions can be installed based on their --pilot-groups or manally via 'xadm deploy' or 'xolo install')
666
737
 
667
- It will never be available to excluded computers.
738
+ It will never be available to excluded computers, even via self service.
668
739
 
669
740
  Self Service is not available for titles with the release_group 'all'.
670
- To remove the self-service option, use --no-self-service.
741
+
742
+ To explicitly set this to false, use --no-self-service.
743
+
744
+ See also --self-service-updates.
745
+ ENDDESC
746
+ },
747
+
748
+ # @!attribute self_service_updates
749
+ # @return [Boolean] Do versions appear in Self Service for updates?
750
+ self_service_updates: {
751
+ label: 'Self Service Updates?',
752
+ cli: :V,
753
+ type: :boolean,
754
+ validate: :validate_boolean,
755
+ default: false,
756
+ changelog: true,
757
+ desc: <<~ENDDESC
758
+ Make versions available in Self Service for updates. This setting is independent of the --self-service setting for initial installs. Unlike that setting, this can be set when the release-group is 'all'.
759
+
760
+ By default this is false, Patch Policies for versions will be set to 'Install Automatically'.
761
+
762
+ If set to true, Patch Policies for versions will be set to 'Make Available in Self Service' and the version will appear in the Updates section when available. The update won't happen until the user clicks a button, or the 7-day deadline passes. Notifications will be displayed daily.
763
+
764
+ When installing automatically, or the deadline passes, the update will happen at the checkin after the next recon. If the version has any KillApps, the user will be prompted to quit them, with a grace period of 15 minutes before the update starts.
765
+
766
+ Any Self Service icon uploaded for the title will be used for its versions. If needed, upload one for the title with 'xadm edit-title --self-service-icon /path/to/image/file' (the title itself doesn't need to be in Self Service)
767
+
768
+ To explicitly set this to false, use --no-self-service-updates.
769
+
770
+ See also --self-service.
671
771
  ENDDESC
672
772
  },
673
773
 
@@ -684,7 +784,7 @@ module Xolo
684
784
  invalid_msg: 'Invalid category. Must exist in Jamf Pro.',
685
785
  desc: <<~ENDDESC
686
786
  The Category in which to display this title in Self Service.
687
- REQUIRED if self_service is true, ignored otherwise
787
+ REQUIRED if --self-service is true, recommended if --self-service-updates is true.
688
788
  ENDDESC
689
789
  },
690
790
 
@@ -273,9 +273,8 @@ module Xolo
273
273
  ENDDESC
274
274
  },
275
275
 
276
- # @!attribute jamf_pkg
277
- # @return [String] The file name of the installer for the Jamf Package object that
278
- # installs this version. 'xolo-<title>-<version>.pkg' (or .zip)
276
+ # @!attribute pkg_to_upload
277
+ # @return [String] The path to a local pkg, or 'uploaded'
279
278
  pkg_to_upload: {
280
279
  label: 'Upload Package',
281
280
  type: :string,
@@ -288,9 +287,9 @@ module Xolo
288
287
  desc: <<~ENDDESC
289
288
  The path to a local copy of the installer package for this version. Will be uploaded to Xolo and then Jamf Pro distribution point(s), replacing any previously uploaded.
290
289
 
291
- Must be a flat .pkg file, or a .zip compressed old-style bundle package.
290
+ It must be a flat .pkg file. Old-school zipped bundle-style packages are not supported by Xolo.
292
291
 
293
- It will be renamed to 'xolo-<title>-<version>.pkg' (or .zip).
292
+ It will be renamed to 'xolo-<title>-<version>.pkg'.
294
293
  If your Xolo server is confiured to sign unsigned packages, it will do so along the way.
295
294
 
296
295
  Required when creating a new version unless the title is configrued to use autopkg.
@@ -461,7 +460,7 @@ module Xolo
461
460
  desc: <<~ENDDESC
462
461
  When this version was skipped in Xolo.
463
462
  This is when the Xolo sets the status of this version to 'skipped', meaning it was never released in Xolo, and now a newer version has been released.
464
- It will be automatically deleted at the next nightly cleanup, unless the server is configured otherwise.
463
+ It will be automatically deleted at the next nightly maintenance, unless the server is configured otherwise.
465
464
  ENDDESC
466
465
  },
467
466
 
@@ -39,11 +39,13 @@ module Xolo
39
39
 
40
40
  class InvalidTokenError < ConnectionError; end
41
41
 
42
+ class TooSoonError < ConnectionError; end
43
+
42
44
  class ServerError < ConnectionError; end
43
45
 
44
46
  # Parsing errors
45
47
 
46
- class DisallowedYAMLDumpClass; end
48
+ class DisallowedYAMLDumpClass < ConnectionError; end
47
49
 
48
50
  end # module Exceptions
49
51
 
@@ -12,7 +12,7 @@ module Xolo
12
12
 
13
13
  module Version
14
14
 
15
- VERSION = '2.1.0'.freeze
15
+ VERSION = '2.2.0'.freeze
16
16
 
17
17
  end
18
18
 
@@ -111,7 +111,7 @@ module Xolo
111
111
  Xolo::Server.start_time = Time.now
112
112
 
113
113
  Xolo::Server::Log.log_rotation_timer_task.execute
114
- Xolo::Server::Helpers::Maintenance.cleanup_timer_task.execute
114
+ Xolo::Server::Helpers::Maintenance.maint_timer_task.execute
115
115
 
116
116
  # Disable warnings in logs about known scope bug in Jamf Classic API
117
117
  Jamf::Scopable::Scope.do_not_warn_about_policy_scope_bugs
@@ -159,7 +159,7 @@ module Xolo
159
159
  server_admin_jamf_group: {
160
160
  type: :string,
161
161
  desc: <<~ENDDESC
162
- The name of a Jamf account-group (not a User group) that allows the use of the server admin commands of 'xadm', including --run-server-cleanup,
162
+ The name of a Jamf account-group (not a User group) that allows the use of the server admin commands of 'xadm', including --run-server-maint,
163
163
  --update-client-data, --rotate-server-logs and --set-server-log-level.
164
164
 
165
165
  Members of this group can also use the xadm commands that require the 'admin_jamf_group' group.
@@ -353,7 +353,7 @@ module Xolo
353
353
  default: Xolo::Server::Helpers::Maintenance::DFT_DEPRECATED_LIFETIME_DAYS,
354
354
  type: :integer,
355
355
  desc: <<~ENDDESC
356
- When a version is deprecated, it will be automatically deleted by the nightly cleanup this many days later. If set to 0 or less,
356
+ When a version is deprecated, it will be automatically deleted by the nightly maintenance this many days later. If set to 0 or less,
357
357
  deprecated versions will never be deleted.
358
358
 
359
359
  Deprecated versions are those that have been released, but a newer version has been released since then.
@@ -369,7 +369,7 @@ module Xolo
369
369
  default: false,
370
370
  type: :boolean,
371
371
  desc: <<~ENDDESC
372
- Normally, skipped versions are deleted during nightly cleanup. If you set this to true, skipped versions will be kept.
372
+ Normally, skipped versions are deleted during nightly maintenance. If you set this to true, skipped versions will be kept.
373
373
 
374
374
  Skipped versions are those that were never released, but a newer version has been released.
375
375
 
@@ -611,7 +611,7 @@ module Xolo
611
611
  },
612
612
 
613
613
  # @!attribute forced_exclusion
614
- # @return [String] The name of a single Jamf Pro computer groups that will ALWAYS be excluded
614
+ # @return [String] The name of a single Jamf Pro computer group that will ALWAYS be excluded
615
615
  # and will never see any titles or versions in Xolo.
616
616
  forced_exclusion: {
617
617
  type: :string,
@@ -39,14 +39,14 @@ module Xolo
39
39
  # We use routes like this for internal tasks that require a
40
40
  # server-request context.
41
41
  INTERNAL_ROUTES = [
42
- '/maint/cleanup-internal'
42
+ '/maint/maint-internal'
43
43
  ].freeze
44
44
 
45
45
  # these routes must
46
46
  SERVER_ADMIN_ROUTES = [
47
47
  '/maint/threads',
48
48
  '/maint/state',
49
- '/maint/cleanup',
49
+ '/maint/maint-start',
50
50
  '/maint/update-client-data',
51
51
  '/maint/rotate-logs',
52
52
  '/maint/set-log-level',
@@ -74,7 +74,7 @@ module Xolo
74
74
  #
75
75
  # This allows the xolo server to send requests to itself without needing
76
76
  # to authenticate, as is needed for some kinds of maintenance tasks
77
- # such as cleanup.
77
+ # such as maintenance.
78
78
  #
79
79
  # The token value is generated anew at startup and is a long random string, it
80
80
  # is only available to the xolo server itself from its memory, and