lockss-turtles 0.3.0.dev2__py3-none-any.whl → 0.3.0.dev4__py3-none-any.whl

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.
@@ -0,0 +1,802 @@
1
+ Metadata-Version: 2.1
2
+ Name: lockss-turtles
3
+ Version: 0.3.0.dev4
4
+ Summary: Tool to manage LOCKSS plugin sets and LOCKSS plugin repositories
5
+ Home-page: https://www.lockss.org/
6
+ License: BSD-3-Clause
7
+ Author: Thib Guicherd-Callin
8
+ Author-email: thib@cs.stanford.edu
9
+ Requires-Python: >=3.7,<4.0
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: License :: OSI Approved :: BSD License
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Topic :: Utilities
23
+ Requires-Dist: java-manifest (==1.1.0)
24
+ Requires-Dist: jsonschema (==4.17.3)
25
+ Requires-Dist: pyyaml (==6.0)
26
+ Requires-Dist: tabulate (==0.9.0)
27
+ Requires-Dist: xdg (==6.0.0)
28
+ Project-URL: Repository, https://github.com/lockss/turtles
29
+ Description-Content-Type: text/x-rst
30
+
31
+ =======
32
+ Turtles
33
+ =======
34
+
35
+ .. |HELP| replace:: ``--help/-h``
36
+ .. |IDENTIFIER| replace:: ``--identifier/-i``
37
+ .. |IDENTIFIERS| replace:: ``--identifiers/-I``
38
+ .. |JAR| replace:: ``--jar/-j``
39
+ .. |JARS| replace:: ``--jars/-J``
40
+ .. |LAYER| replace:: ``--layer/-l``
41
+ .. |LAYERS| replace:: ``--layers/-L``
42
+ .. |PLUGIN_REGISTRY_CATALOG| replace:: ``--plugin-registry-catalog/-r``
43
+ .. |PLUGIN_SET_CATALOG| replace:: ``--plugin-set-catalog/-s``
44
+ .. |PLUGIN_SIGNING_CREDENTIALS| replace:: ``--plugin-signing-credentials/-c``
45
+ .. |PRODUCTION| replace:: ``--production/-p``
46
+ .. |TESTING| replace:: ``--testing/-t``
47
+
48
+ Turtles is a tool to manage LOCKSS plugin sets and LOCKSS plugin registries.
49
+
50
+ **Latest release:** 0.3.0-dev4 (2023-03-06)
51
+
52
+ -------------
53
+ Prerequisites
54
+ -------------
55
+
56
+ * `Python <https://www.python.org/>`_ 3.7 or greater.
57
+
58
+ * Additional prerequisites depending on the types of `Plugin Set Builders`_ or `Plugin Registry Layouts`_ in use (see their respective requirements).
59
+
60
+ Prerequisites for development work only:
61
+
62
+ * `Poetry <https://python-poetry.org/>`_ 1.4 or greater.
63
+
64
+ ------------
65
+ Installation
66
+ ------------
67
+
68
+ Turtles is available from the `Python Package Index <https://pypi.org/>`_ (PyPI) as ``lockss-turtles``: https://pypi.org/project/lockss-turtles
69
+
70
+ You can install it with ``pip``, in your native environment or in a virtual environment::
71
+
72
+ pip3 install lockss-turtles
73
+
74
+ The installation process adds a ``turtles`` executable to the ``PATH``; you can check that the installation is functional by running ``turtles version`` or ``turtles --help``.
75
+
76
+ ----------
77
+ Invocation
78
+ ----------
79
+
80
+ Turtles is invoked at the command line as::
81
+
82
+ turtles
83
+
84
+ or as a Python module::
85
+
86
+ python3 -m lockss.turtles
87
+
88
+ Help messages and this document use ``turtles`` throughout, but the two invocation styles are interchangeable.
89
+
90
+ Turtles uses `Commands`_, in the style of programs like ``git``, ``dnf``/``yum``, ``apt``/``apt-get``, and the like. You can see the list of available `Commands`_ by invoking ``turtles --help``.
91
+
92
+ -------------------
93
+ Configuration Files
94
+ -------------------
95
+
96
+ All Turtles configuration files are YAML files and have a top-level ``kind`` key that declares what kind of configuration file it is.
97
+
98
+ Some Turtles commands require a `Plugin Set Catalog`_, `Plugin Registry Catalog`_, or `Plugin Signing Credentials`_. You can specify the configuration file to use via the appropriate command line option (for example |PLUGIN_SET_CATALOG|). Otherwise, Turtles will look for then appropriate configuration file (for example ``plugin-set-catalog.yaml``) in several standard directories, in this order:
99
+
100
+ * ``$XDG_CONFIG_HOME/lockss.turtles`` (by default ``$HOME/.config/lockss.turtles``)
101
+
102
+ * ``/usr/local/share/lockss.turtles``
103
+
104
+ * ``/etc/lockss.turtles``
105
+
106
+ ----------------
107
+ Building Plugins
108
+ ----------------
109
+
110
+ To use Turtles to build (package and sign) LOCKSS plugins, you will need to define one or more `Plugin Sets`_, declare them in a `Plugin Set Catalog`_, and declare your `Plugin Signing Credentials`_. You then use the `build-plugin`_ command, or the `release-plugin`_ command (which amounts to `build-plugin`_ followed by `deploy-plugin`_).
111
+
112
+ -----------------
113
+ Deploying Plugins
114
+ -----------------
115
+
116
+ To use Turtles to deploy LOCKSS plugins to LOCKSS plugin registries, you will need to define one or more `Plugin Registries`_ and declare them in a `Plugin Registry Catalog`_. You then use the `deploy-plugin`_ command, or the `release-plugin`_ command (which amounts to `build-plugin`_ followed by `deploy-plugin`_).
117
+
118
+ ------------------
119
+ Plugin Set Catalog
120
+ ------------------
121
+
122
+ Turtles commands that are `Building Plugins`_ (`build-plugin`_, `release-plugin`_) need a plugin set catalog. It can be specified via the |PLUGIN_SET_CATALOG| option, otherwise Turtles looks through `Configuration Files`_ for a file named ``plugin-set-catalog.yaml``.
123
+
124
+ A plugin set catalog is defined by a YAML document::
125
+
126
+ ---
127
+ kind: PluginSetCatalog
128
+ plugin-set-files:
129
+ - /path/to/some/file1.yaml
130
+ - /path/to/another/file2.yaml
131
+ - ...
132
+
133
+ The contents are described below:
134
+
135
+ ``kind``
136
+ *Required.* Must be set to ``PluginSetCatalog``.
137
+
138
+ ``plugin-set-files``
139
+ *Required.* A list of one or more paths to `Plugin Sets`_.
140
+
141
+ -----------
142
+ Plugin Sets
143
+ -----------
144
+
145
+ A plugin set is a project containing the source code of one or more LOCKSS plugins.
146
+
147
+ A plugin set is defined by a YAML document::
148
+
149
+ ---
150
+ kind: PluginSet
151
+ id: mypluginset
152
+ name: My Plugin Set
153
+ builder:
154
+ type: ...
155
+ ...
156
+
157
+ The contents are described below:
158
+
159
+ ``kind``
160
+ *Required.* Must be set to ``PluginSet``.
161
+
162
+ ``id``
163
+ *Required.* A short identifier for the plugin set, for example ``mypluginset``.
164
+
165
+ ``name``
166
+ *Required.* A display name for the plugin set, for example ``My Plugin Set``.
167
+
168
+ ``builder``
169
+ *Required.* An object defining the plugin set's builder together with its options.
170
+
171
+ ``type``
172
+ *Required.* A plugin set builder type. See `Plugin Set Builders`_ below.
173
+
174
+ Other
175
+ Additional properties depending on the plugin set builder type. See `Plugin Set Builders`_ below.
176
+
177
+ -------------------
178
+ Plugin Set Builders
179
+ -------------------
180
+
181
+ Turtles `Plugin Sets`_ support two types of plugin set builders:
182
+
183
+ * `Maven Plugin Set Builder`_
184
+
185
+ * `Ant Plugin Set Builder`_
186
+
187
+ Maven Plugin Set Builder
188
+ ========================
189
+
190
+ This type of plugin set builder is for a Maven project inheriting from ``org.lockss:lockss-plugins-parent-pom``.
191
+
192
+ .. rubric:: Prerequisites
193
+
194
+ * Java Development Kit 8 (JDK).
195
+
196
+ * `Apache Maven <https://maven.apache.org/>`_.
197
+
198
+ .. rubric:: Declaration
199
+
200
+ For this plugin set builder type, the ``builder`` object in the plugin set definition has the following structure:
201
+
202
+ ``type``
203
+ *Required.* Must be set to ``mvn``.
204
+
205
+ ``main``
206
+ *Optional.* The path (relative to the root of the project) to the plugins' source code. *Default:* ``src/main/java``.
207
+
208
+ ``test``
209
+ *Optional.* The path (relative to the root of the project) to the plugins' unit tests. *Default:* ``src/test/java``.
210
+
211
+ Ant Plugin Set Builder
212
+ ======================
213
+
214
+ This type of plugin set builder is for the LOCKSS 1.x (https://github.com/lockss/lockss-daemon) code tree, based on Ant.
215
+
216
+ .. rubric:: Prerequisites
217
+
218
+ * Java Development Kit 8 (JDK).
219
+
220
+ * `Apache Ant <https://ant.apache.org/>`_.
221
+
222
+ * ``JAVA_HOME`` must be set appropriately.
223
+
224
+ .. rubric:: Declaration
225
+
226
+ For this plugin set builder type, the ``builder`` object in the plugin set definition has the following structure:
227
+
228
+ ``type``
229
+ *Required.* Must be set to ``ant``.
230
+
231
+ ``main``
232
+ *Optional.* The path (relative to the root of the project) to the plugins' source code. *Default:* ``plugins/src``.
233
+
234
+ ``test``
235
+ *Optional.* The path (relative to the root of the project) to the plugins' unit tests. *Default:* ``plugins/test/src``.
236
+
237
+ -----------------------
238
+ Plugin Registry Catalog
239
+ -----------------------
240
+
241
+ Turtles commands that are `Deploying Plugins`_ (`deploy-plugin`_, `release-plugin`_) need a plugin registry catalog. It can be specified via the |PLUGIN_REGISTRY_CATALOG| option, otherwise Turtles looks through `Configuration Files`_ for a file named ``plugin-registry-catalog.yaml``.
242
+
243
+ A plugin set catalog is defined by a YAML document::
244
+
245
+ ---
246
+ kind: PluginRegistryCatalog
247
+ plugin-registry-files:
248
+ - /path/to/some/file1.yaml
249
+ - /path/to/another/file2.yaml
250
+ - ...
251
+
252
+ The contents are described below:
253
+
254
+ ``kind``
255
+ *Required.* Must be set to ``PluginRegistryCatalog``.
256
+
257
+ ``plugin-registry-files``
258
+ *Required.* A list of one or more paths to `Plugin Registries`_.
259
+
260
+ -----------------
261
+ Plugin Registries
262
+ -----------------
263
+
264
+ A plugin registry is a structure containing LOCKSS plugins packaged as signed JAR files.
265
+
266
+ Currently the only predefined structures are directory structures local to the file system, which are then typically served by a Web server.
267
+
268
+ A plugin registry is defined by a YAML document::
269
+
270
+ ---
271
+ kind: PluginRegistry
272
+ id: mypluginregistry
273
+ name: My Plugin Registry
274
+ layout:
275
+ type: ...
276
+ ...
277
+ layers:
278
+ - id: testing
279
+ name: My Plugin Registry (Testing)
280
+ path: /path/to/testing
281
+ - id: production
282
+ name: My Plugin Registry (Production)
283
+ path: /path/to/production
284
+ - ...
285
+ plugin-identifiers:
286
+ - edu.myuniversity.plugin.publisherx.PublisherXPlugin
287
+ - edu.myuniversity.plugin.publishery.PublisherYPlugin
288
+ - ...
289
+ suppressed-plugin-identifiers:
290
+ - edu.myuniversity.plugin.old.OldPlugin
291
+ - ...
292
+
293
+ The contents are described below:
294
+
295
+ ``kind``
296
+ *Required.* Must be set to ``PluginRegistry``.
297
+
298
+ ``id``
299
+ *Required.* A short identifier for the plugin registry, for example ``mypluginregistry``.
300
+
301
+ ``name``
302
+ *Required.* A display name for the plugin registry, for example ``My Plugin Registry``.
303
+
304
+ ``layout``
305
+ *Required.* An object defining the plugin registry's layout together with its options.
306
+
307
+ ``type``
308
+ *Required.* A plugin registry layout type. See `Plugin Registry Layouts`_ below.
309
+
310
+ Other
311
+ Additional properties depending on the plugin registry layout type. See `Plugin Registry Layouts`_ below.
312
+
313
+ ``layers``
314
+ *Required.* A list of objects describing the layers of the plugin registry. See `Plugin Registry Layers`_ below.
315
+
316
+ ``plugin-identifiers``
317
+ *Required.* Non-empty list of the plugin identifiers in this plugin registry.
318
+
319
+ ``plugin-identifiers``
320
+ *Optional.* Non-empty list of plugin identifiers that are excluded from this plugin registry.
321
+
322
+ Turtles does not currently do anything with this information, but it can be used to record plugins that have been abandoned or retracted over the lifetime of the plugin registry.
323
+
324
+ -----------------------
325
+ Plugin Registry Layouts
326
+ -----------------------
327
+
328
+ Turtles supports two kinds of plugin registry layouts:
329
+
330
+ * `Directory Plugin Registry Layout`_
331
+
332
+ * `RCS Plugin Registry Layout`_
333
+
334
+ Directory Plugin Registry Layout
335
+ ================================
336
+
337
+ In this type of plugin registry layout, each layer consists of a directory on the local file system where signed plugin JARs are stored, which is then typically served by a Web server. The directory for each layer is designated by the layer's ``path`` property.
338
+
339
+ .. rubric:: Prerequisites
340
+
341
+ None.
342
+
343
+ .. rubric:: Declaration
344
+
345
+ For this plugin registry layout type, the ``layout`` object in the plugin registry definition has the following structure:
346
+
347
+ ``type``
348
+ *Required.* Must be set to ``directory``.
349
+
350
+ Currently, this layout type does not support the ``file-naming-convention`` option of the `RCS Plugin Registry Layout`_, but this feature will be introduced in a future release.
351
+
352
+ RCS Plugin Registry Layout
353
+ ==========================
354
+
355
+ In this specialization of the `Directory Plugin Registry Layout`_, each successive version of a given JAR is kept locally in RCS.
356
+
357
+ .. rubric:: Prerequisites
358
+
359
+ * `GNU RCS <https://www.gnu.org/software/rcs/>`_.
360
+
361
+ .. rubric:: Declaration
362
+
363
+ For this plugin registry layout type, the ``layout`` object in the plugin registry definition has the following structure:
364
+
365
+ ``type``
366
+ *Required.* Must be set to ``rcs``.
367
+
368
+ ``file-naming-convention``
369
+ *Optional.* A rule for what to name each deployed JAR file. If unspecified, the behavior is that of ``identifier``. Can be one of:
370
+
371
+ * ``identifier``: Use the plugin identifier and add ``.jar``. For example ``edu.myuniversity.plugin.publisherx.PublisherXPlugin`` results in ``edu.myuniversity.plugin.publisherx.PublisherXPlugin.jar``.
372
+
373
+ * ``abbreviated``: Use the last component of the plugin identifier and add ``.jar``. For example ``edu.myuniversity.plugin.publisherx.PublisherXPlugin`` results in ``PublisherXPlugin.jar``.
374
+
375
+ ----------------------
376
+ Plugin Registry Layers
377
+ ----------------------
378
+
379
+ A plugin registry consists of one or more layers.
380
+
381
+ Some plugin registries only one layer, in which case the LOCKSS boxes in a network using the plugin registry will get what is released to it. Some plugin registries may have two or more layers, with the additional layers used for plugin development or content processing quality assurance.
382
+
383
+ Layers are sequential in nature; a new version of a plugin is released to the lowest layer first, then to the next layer (after some process), and so on until the highest layer. This sequencing is reflected in the ordering of the ``layers`` list in the plugin registry definition.
384
+
385
+ Although the identifiers (see ``id`` below) and display names (see ``name`` below) of plugin registry layers are arbitrary, the highest layer is commonly referred to as the *production* layer, and when there are exactly two layers, the lower layer is commonly referred to as the *testing* layer. Turtles reflects this common idiom with built-in |PRODUCTION| and |TESTING| options that are shorthand for ``--layer=production`` and ``--layer=testing`` respectively.
386
+
387
+ It is possible for multiple plugin registries to have a layer ``path`` in common. An example would be a team working on several plugin registries for different purposes, having distinct (public) production layer paths, but sharing a single (internal) testing layer path, if they are the only audience for it.
388
+
389
+ A plugin registry layer is defined as one of the objects in the plugin registry definition's ``layers`` list. Each layer object has the following structure:
390
+
391
+ ``id``
392
+ *Required.* A short identifier for the plugin registry layer, for example ``testing``.
393
+
394
+ ``name``
395
+ *Required.* A display name for the plugin registry layer, for example ``My Plugin Registry (Testing)``.
396
+
397
+ ``path``
398
+ *Required.* The local path to the root of the plugin registry layer, for example ``/path/to/testing``.
399
+
400
+ --------------------------
401
+ Plugin Signing Credentials
402
+ --------------------------
403
+
404
+ Turtles commands that are `Building Plugins`_ (`build-plugin`_, `release-plugin`_) need a reference to plugin signing credentials. They can be specified via the |PLUGIN_SIGNING_CREDENTIALS| option, otherwise Turtles looks through `Configuration Files`_ for a file named ``plugin-signing-credentials.yaml``.
405
+
406
+ Plugin signing credentials are defined by a YAML document::
407
+
408
+ ---
409
+ kind: PluginSigningCredentials
410
+ plugin-signing-keystore: /path/to/myalias.keystore
411
+ plugin-signing-alias: myalias
412
+
413
+ The contents are described below:
414
+
415
+ ``kind``
416
+ *Required.* Must be set to ``PluginSigningCredentials``.
417
+
418
+ ``plugin-signing-keystore``
419
+ *Required.* Path to the plugin signing key (keystore).
420
+
421
+ ``plugin-signing-alias``
422
+ *Required.* The alias to use, which must be that of the plugin signing key (keystore) and also found in the LOCKSS network's shared keystore.
423
+
424
+ --------
425
+ Commands
426
+ --------
427
+
428
+ The available commands are:
429
+
430
+ * `build-plugin`_ (bp): build (package and sign) plugins
431
+ * `copyright`_: show copyright and exit
432
+ * `deploy-plugin`_ (dp): deploy plugins
433
+ * `license`_: show license and exit
434
+ * `release-plugin`_ (rp): release (build and deploy) plugins
435
+ * `usage`_: show detailed usage and exit
436
+ * `version`_: show version and exit
437
+
438
+ Top-Level Command
439
+ =================
440
+
441
+ The top-level executable alone does not perform any action or default to a given command. It does define a few options, which you can see by invoking Turtles with the |HELP| option::
442
+
443
+ usage: turtles [-h] [--debug-cli] [--non-interactive] [--output-format FMT]
444
+ COMMAND ...
445
+
446
+ options:
447
+ -h, --help show this help message and exit
448
+ --debug-cli print the result of parsing command line arguments
449
+ --non-interactive, -n
450
+ disallow interactive prompts (default: allow)
451
+ --output-format FMT set tabular output format to FMT (default: simple;
452
+ choices: asciidoc, double_grid, double_outline,
453
+ fancy_grid, fancy_outline, github, grid, heavy_grid,
454
+ heavy_outline, html, jira, latex, latex_booktabs,
455
+ latex_longtable, latex_raw, mediawiki, mixed_grid,
456
+ mixed_outline, moinmoin, orgtbl, outline, pipe, plain,
457
+ presto, pretty, psql, rounded_grid, rounded_outline,
458
+ rst, simple, simple_grid, simple_outline, textile,
459
+ tsv, unsafehtml, youtrack)
460
+
461
+ Turtles' tabular output is performed by the `tabulate <https://pypi.org/project/tabulate>`_ library through the ``--output-format`` option. See its PyPI page for a visual reference of the various output formats available. The **default** is ``simple``.
462
+
463
+ .. _build-plugin:
464
+
465
+ ``build-plugin`` (``bp``)
466
+ =========================
467
+
468
+ The ``build-plugin`` command is used for `Building Plugins`_. It has its own |HELP| option::
469
+
470
+ usage: turtles build-plugin [-h] [--identifier PLUGID] [--identifiers FILE]
471
+ [--password PASS] [--plugin-set-catalog FILE]
472
+ [--plugin-signing-credentials FILE]
473
+ [PLUGID ...]
474
+
475
+ Build (package and sign) plugins
476
+
477
+ positional arguments:
478
+ PLUGID plugin identifier to build
479
+
480
+ options:
481
+ -h, --help show this help message and exit
482
+ --identifier PLUGID, -i PLUGID
483
+ add PLUGID to the list of plugin identifiers to build
484
+ --identifiers FILE, -I FILE
485
+ add the plugin identifiers in FILE to the list of
486
+ plugin identifiers to build
487
+ --password PASS set the plugin signing password
488
+ --plugin-set-catalog FILE, -s FILE
489
+ load plugin set catalog from FILE (default:
490
+ $HOME/.config/lockss.turtles/plugin-set-
491
+ catalog.yaml or
492
+ /usr/local/share/lockss.turtles/plugin-set-
493
+ catalog.yaml or /etc/lockss.turtles/plugin-set-
494
+ catalog.yaml)
495
+ --plugin-signing-credentials FILE, -c FILE
496
+ load plugin signing credentials from FILE (default:
497
+ $HOME/.config/lockss.turtles/plugin-signing-
498
+ credentials.yaml or
499
+ /usr/local/share/lockss.turtles/plugin-signing-
500
+ credentials.yaml or /etc/lockss.turtles/plugin-
501
+ signing-credentials.yaml)
502
+
503
+ The command needs:
504
+
505
+ * `Plugin Signing Credentials`_, either via the |PLUGIN_SIGNING_CREDENTIALS| option or from the `Configuration Files`_.
506
+
507
+ * A `Plugin Set Catalog`_, either via the |PLUGIN_SET_CATALOG| option or from the `Configuration Files`_.
508
+
509
+ * One or more plugin identifiers. The list of plugin identifiers to process is derived from:
510
+
511
+ * The identifiers listed as bare arguments to the command.
512
+
513
+ * The identifiers listed as |IDENTIFIER| options.
514
+
515
+ * The identifiers found in the files listed as |IDENTIFIERS| options.
516
+
517
+ Examples::
518
+
519
+ # Help message
520
+ turtles build-plugin --help
521
+ # Abbreviation
522
+ turtles bp -h
523
+
524
+ # List of plugin identifiers
525
+ turtles build-plugin edu.myuniversity.plugin.publisherx.PublisherXPlugin edu.myuniversity.plugin.publishery.PublisherYPlugin ...
526
+ # Abbreviation
527
+ turtles bp edu.myuniversity.plugin.publisherx.PublisherXPlugin edu.myuniversity.plugin.publishery.PublisherYPlugin ...
528
+
529
+ # Alternative invocation
530
+ turtles build-plugin --identifier=edu.myuniversity.plugin.publisherx.PublisherXPlugin --identifier=edu.myuniversity.plugin.publishery.PublisherYPlugin ...
531
+ # Abbreviation
532
+ turtles bp -i edu.myuniversity.plugin.publisherx.PublisherXPlugin -i edu.myuniversity.plugin.publishery.PublisherYPlugin ...
533
+
534
+ # Alternative invocation
535
+ # /tmp/pluginids.txt has one plugin identifier per line
536
+ turtles build-plugin --identifiers=/tmp/pluginids.txt
537
+ # Abbreviation
538
+ turtles bp -I /tmp/pluginids.txt
539
+
540
+ .. _copyright:
541
+
542
+ ``copyright``
543
+ =============
544
+
545
+ The ``copyright`` command displays the copyright notice for Turtles and exits.
546
+
547
+ .. _deploy-plugin:
548
+
549
+ ``deploy-plugin`` (``dp``)
550
+ ==========================
551
+
552
+ The ``deploy-plugin`` command is used for `Deploying Plugins`_. It has its own |HELP| option::
553
+
554
+ usage: turtles deploy-plugin [-h] [--jar PLUGJAR] [--jars FILE]
555
+ [--layer LAYER] [--layers FILE]
556
+ [--plugin-registry-catalog FILE] [--production]
557
+ [--testing]
558
+ [PLUGJAR ...]
559
+
560
+ Deploy plugins
561
+
562
+ positional arguments:
563
+ PLUGJAR plugin JAR to deploy
564
+
565
+ options:
566
+ -h, --help show this help message and exit
567
+ --jar PLUGJAR, -j PLUGJAR
568
+ add PLUGJAR to the list of plugin JARs to deploy
569
+ --jars FILE, -J FILE add the plugin JARs in FILE to the list of plugin JARs
570
+ to deploy
571
+ --layer LAYER, -l LAYER
572
+ add LAYER to the list of plugin registry layers to
573
+ process
574
+ --layers FILE, -L FILE
575
+ add the layers in FILE to the list of plugin registry
576
+ layers to process
577
+ --plugin-registry-catalog FILE, -r FILE
578
+ load plugin registry catalog from FILE (default:
579
+ $HOME/.config/lockss.turtles/plugin-registry-
580
+ catalog.yaml or
581
+ /usr/local/share/lockss.turtles/plugin-registry-
582
+ catalog.yaml or /etc/lockss.turtles/plugin-registry-
583
+ catalog.yaml)
584
+ --production, -p synonym for --layer=production (i.e. add 'production'
585
+ to the list of plugin registry layers to process)
586
+ --testing, -t synonym for --layer=testing (i.e. add 'testing' to the
587
+ list of plugin registry layers to process)
588
+
589
+ The command needs:
590
+
591
+ * A `Plugin Registry Catalog`_, either via the |PLUGIN_REGISTRY_CATALOG| option or from the `Configuration Files`_.
592
+
593
+ * One or more JAR paths. The list of paths to process is derived from:
594
+
595
+ * The paths listed as bare arguments to the command.
596
+
597
+ * The paths listed as |JAR| options.
598
+
599
+ * The paths found in the files listed as |JARS| options.
600
+
601
+ * One or more plugin registry layer IDs. The list of layer IDs to process is derived from:
602
+
603
+ * The layer IDs listed as |LAYER| options.
604
+
605
+ * The layer IDs found in the files listed as |LAYERS| options.
606
+
607
+ Alternatively:
608
+
609
+ * |TESTING| is a synonym for ``--layer=testing``.
610
+
611
+ * |PRODUCTION| is a synonym for ``--layer=production``.
612
+
613
+ Examples::
614
+
615
+ # Help message
616
+ turtles deploy-plugin --help
617
+ # Abbreviation
618
+ turtles dp -h
619
+
620
+ # List of JARs
621
+ # Deploy to 'testing' layer only
622
+ turtles deploy-plugin --testing /path/to/edu.myuniversity.plugin.publisherx.PublisherXPlugin.jar /path/to/edu.myuniversity.plugin.publishery.PublisherYPlugin.jar ...
623
+ # Abbreviation
624
+ turtles dp -t /path/to/edu.myuniversity.plugin.publisherx.PublisherXPlugin.jar /path/to/edu.myuniversity.plugin.publishery.PublisherYPlugin.jar ...
625
+
626
+ # Alternative invocation
627
+ # Deploy to 'production' layer only
628
+ turtles deploy-plugin --production --jar=/path/to/edu.myuniversity.plugin.publisherx.PublisherXPlugin.jar --jar=/path/to/edu.myuniversity.plugin.publishery.PublisherYPlugin.jar ...
629
+ # Abbreviation
630
+ turtles dp -p -j /path/to/edu.myuniversity.plugin.publisherx.PublisherXPlugin.jar -j /path/to/edu.myuniversity.plugin.publishery.PublisherYPlugin.jar ...
631
+
632
+ # Alternative invocation
633
+ # /tmp/pluginjars.txt has one JAR path per line
634
+ # Deploy to both 'testing' and 'production' layers
635
+ turtles deploy-plugin --testing --production --jars=/tmp/pluginjars.txt
636
+ # Abbreviation
637
+ turtles bp -tp -J /tmp/pluginids.txt
638
+
639
+ .. _license:
640
+
641
+ ``license``
642
+ ===========
643
+
644
+ The ``license`` command displays the license terms for Turtles and exits.
645
+
646
+ .. _release-plugin:
647
+
648
+ ``release-plugin`` (``rp``)
649
+ ===========================
650
+
651
+ The ``release-plugin`` command is used for `Building Plugins`_ and `Deploying Plugins`, being essentially `build-plugin`_ followed by `deploy-plugin`_. It has its own |HELP| option::
652
+
653
+ usage: turtles release-plugin [-h] [--identifier PLUGID] [--identifiers FILE]
654
+ [--layer LAYER] [--layers FILE]
655
+ [--password PASS]
656
+ [--plugin-registry-catalog FILE]
657
+ [--plugin-set-catalog FILE]
658
+ [--plugin-signing-credentials FILE]
659
+ [--production] [--testing]
660
+ [PLUGID ...]
661
+
662
+ Release (build and deploy) plugins
663
+
664
+ positional arguments:
665
+ PLUGID plugin identifier to build
666
+
667
+ options:
668
+ -h, --help show this help message and exit
669
+ --identifier PLUGID, -i PLUGID
670
+ add PLUGID to the list of plugin identifiers to build
671
+ --identifiers FILE, -I FILE
672
+ add the plugin identifiers in FILE to the list of
673
+ plugin identifiers to build
674
+ --layer LAYER, -l LAYER
675
+ add LAYER to the list of plugin registry layers to
676
+ process
677
+ --layers FILE, -L FILE
678
+ add the layers in FILE to the list of plugin registry
679
+ layers to process
680
+ --password PASS set the plugin signing password
681
+ --plugin-registry-catalog FILE, -r FILE
682
+ load plugin registry catalog from FILE (default:
683
+ $HOME/.config/lockss.turtles/plugin-registry-
684
+ catalog.yaml or
685
+ /usr/local/share/lockss.turtles/plugin-registry-
686
+ catalog.yaml or /etc/lockss.turtles/plugin-registry-
687
+ catalog.yaml)
688
+ --plugin-set-catalog FILE, -s FILE
689
+ load plugin set catalog from FILE (default:
690
+ $HOME/.config/lockss.turtles/plugin-set-
691
+ catalog.yaml or
692
+ /usr/local/share/lockss.turtles/plugin-set-
693
+ catalog.yaml or /etc/lockss.turtles/plugin-set-
694
+ catalog.yaml)
695
+ --plugin-signing-credentials FILE, -c FILE
696
+ load plugin signing credentials from FILE (default:
697
+ $HOME/.config/lockss.turtles/plugin-signing-
698
+ credentials.yaml or
699
+ /usr/local/share/lockss.turtles/plugin-signing-
700
+ credentials.yaml or /etc/lockss.turtles/plugin-
701
+ signing-credentials.yaml)
702
+ --production, -p synonym for --layer=production (i.e. add 'production'
703
+ to the list of plugin registry layers to process)
704
+ --testing, -t synonym for --layer=testing (i.e. add 'testing' to the
705
+ list of plugin registry layers to process)
706
+
707
+ The command needs:
708
+
709
+ * `Plugin Signing Credentials`_, either via the |PLUGIN_SIGNING_CREDENTIALS| option or from the `Configuration Files`_.
710
+
711
+ * A `Plugin Set Catalog`_, either via the |PLUGIN_SET_CATALOG| option or from the `Configuration Files`_.
712
+
713
+ * One or more plugin identifiers. The list of plugin identifiers to process is derived from:
714
+
715
+ * The identifiers listed as bare arguments to the command.
716
+
717
+ * The identifiers listed as |IDENTIFIER| options.
718
+
719
+ * The identifiers found in the files listed as |IDENTIFIERS| options.
720
+
721
+ * A `Plugin Registry Catalog`_, either via the |PLUGIN_REGISTRY_CATALOG| option or from the `Configuration Files`_.
722
+
723
+ * One or more plugin registry layer IDs. The list of layer IDs to process is derived from:
724
+
725
+ * The layer IDs listed as |LAYER| options.
726
+
727
+ * The layer IDs found in the files listed as |LAYERS| options.
728
+
729
+ Alternatively:
730
+
731
+ * |TESTING| is a synonym for ``--layer=testing``.
732
+
733
+ * |PRODUCTION| is a synonym for ``--layer=production``.
734
+
735
+ Examples::
736
+
737
+ # Help message
738
+ turtles release-plugin --help
739
+ # Abbreviation
740
+ turtles rp -h
741
+
742
+ # List of plugin identifiers
743
+ # Deploy to 'testing' layer only
744
+ turtles release-plugin --testing edu.myuniversity.plugin.publisherx.PublisherXPlugin edu.myuniversity.plugin.publishery.PublisherYPlugin ...
745
+ # Abbreviation
746
+ turtles rp -t edu.myuniversity.plugin.publisherx.PublisherXPlugin edu.myuniversity.plugin.publishery.PublisherYPlugin ...
747
+
748
+ # Alternative invocation
749
+ # Deploy to 'production' layer only
750
+ turtles release-plugin --production --identifier=edu.myuniversity.plugin.publisherx.PublisherXPlugin --identifier=edu.myuniversity.plugin.publishery.PublisherYPlugin ...
751
+ # Abbreviation
752
+ turtles rp -p -i edu.myuniversity.plugin.publisherx.PublisherXPlugin -i edu.myuniversity.plugin.publishery.PublisherYPlugin ...
753
+
754
+ # Alternative invocation
755
+ # /tmp/pluginids.txt has one plugin identifier per line
756
+ # Deploy to both 'testing' and 'production' layers
757
+ turtles release-plugin --testing --production --identifiers=/tmp/pluginids.txt
758
+ # Abbreviation
759
+ turtles rp -tp -I /tmp/pluginids.txt
760
+
761
+ .. _usage:
762
+
763
+ ``usage``
764
+ =========
765
+
766
+ The ``version`` command displays the usage message of all the Turtles `Commands`_.
767
+
768
+ .. _version:
769
+
770
+ ``version``
771
+ ===========
772
+
773
+ The ``version`` command displays the version number of Turtles and exits.
774
+
775
+ --------
776
+ Examples
777
+ --------
778
+
779
+ Releasing (building and deploying) plugins::
780
+
781
+ # Help message:
782
+ turtles release-plugin --help
783
+
784
+ # List of plugin identifiers
785
+ # Deploy to 'testing' layer only
786
+ turtles release-plugin --testing edu.myuniversity.plugin.publisherx.PublisherXPlugin edu.myuniversity.plugin.publishery.PublisherYPlugin ...
787
+ # Abbreviation
788
+ turtles rp -t edu.myuniversity.plugin.publisherx.PublisherXPlugin edu.myuniversity.plugin.publishery.PublisherYPlugin ...
789
+
790
+ # Alternative invocation
791
+ # Deploy to 'production' layer only
792
+ turtles release-plugin --production --identifier=edu.myuniversity.plugin.publisherx.PublisherXPlugin --identifier=edu.myuniversity.plugin.publishery.PublisherYPlugin ...
793
+ # Abbreviation
794
+ turtles rp -p -i edu.myuniversity.plugin.publisherx.PublisherXPlugin -i edu.myuniversity.plugin.publishery.PublisherYPlugin ...
795
+
796
+ # Alternative invocation
797
+ # /tmp/pluginids.txt has one plugin identifier per line
798
+ # Deploy to both 'testing' and 'production' layers
799
+ turtles release-plugin --testing --production --identifiers=/tmp/pluginids.txt
800
+ # Abbreviation
801
+ turtles rp -tp -I /tmp/pluginids.txt
802
+