-
Notifications
You must be signed in to change notification settings - Fork 1
/
commands.html
605 lines (447 loc) · 21.9 KB
/
commands.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Command Reference — datacats 1.2.0 documentation</title>
<link rel="stylesheet" href="_static/css/datacats_theme.css" type="text/css" />
<link rel="top" title="datacats 1.2.0 documentation" href="index.html"/>
<link rel="next" title="Change Log" href="changelog.html"/>
<link rel="prev" title="How datacats uses Docker" href="docker.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> datacats
</a>
<div class="version">
1.2.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="guide.html">User Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="docker.html">How datacats uses Docker</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Command Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#help">help</a></li>
<li class="toctree-l2"><a class="reference internal" href="#create">create</a></li>
<li class="toctree-l2"><a class="reference internal" href="#info">info</a></li>
<li class="toctree-l2"><a class="reference internal" href="#init">init</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install">install</a></li>
<li class="toctree-l2"><a class="reference internal" href="#less">less</a></li>
<li class="toctree-l2"><a class="reference internal" href="#list">list</a></li>
<li class="toctree-l2"><a class="reference internal" href="#logs">logs</a></li>
<li class="toctree-l2"><a class="reference internal" href="#migrate">migrate</a></li>
<li class="toctree-l2"><a class="reference internal" href="#open">open</a></li>
<li class="toctree-l2"><a class="reference internal" href="#paster">paster</a></li>
<li class="toctree-l2"><a class="reference internal" href="#pull">pull</a></li>
<li class="toctree-l2"><a class="reference internal" href="#purge">purge</a></li>
<li class="toctree-l2"><a class="reference internal" href="#reload">reload</a></li>
<li class="toctree-l2"><a class="reference internal" href="#reset">reset</a></li>
<li class="toctree-l2"><a class="reference internal" href="#shell">shell</a></li>
<li class="toctree-l2"><a class="reference internal" href="#start">start</a></li>
<li class="toctree-l2"><a class="reference internal" href="#stop">stop</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tweak">tweak</a></li>
<li class="toctree-l2"><a class="reference internal" href="#datacats-lesscd">datacats-lesscd</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Change Log</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">datacats</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Command Reference</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<span id="forkongithub"><a href="https://github.com/datacats/datacats">Fork me on GitHub</a></span>
<div class="section" id="command-reference">
<h1>Command Reference<a class="headerlink" href="#command-reference" title="Permalink to this headline">¶</a></h1>
<div class="section" id="help">
<h2>help<a class="headerlink" href="#help" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>datacats command line interface
Usage:
datacats COMMAND [ARGUMENTS...]
datacats --help [COMMAND]
datacats --version
The datacats commands available are:
create Create a new environment
info Display information about environment and running containers
init Initialize a purged environment or copied environment directory
install Install or reinstall Python packages within this environment
less Recompile less files in an environment
list List all environments for this user
logs Display or follow container logs
migrate Migrates an environment to the newest datadir format
open Open web browser window to this environment
paster Run a paster command from the current directory
pull Download or update required datacats docker images
purge Purge environment database and uploaded files
reload Reload environment source and configuration
reset Resets a site to the default state
shell Run a command or interactive shell within this environment
start Create containers and start serving environment
stop Stop serving environment and remove all its containers
tweak Commands operating on environment data
See 'datacats help COMMAND' for information about options and
arguments available to each command.
</pre></div>
</div>
</div>
<div class="section" id="create">
<h2>create<a class="headerlink" href="#create" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Create a new environment
Usage:
datacats create [-bin] [--interactive] [-s NAME] [--address=IP] [--syslog]
[--ckan=CKAN_VERSION] [--no-datapusher] [--site-url SITE_URL]
[--no-init-db] ENVIRONMENT_DIR [PORT]
Options:
--address=IP Address to listen on (Linux-only)
--ckan=CKAN_VERSION Use CKAN version CKAN_VERSION [default: 2.3]
-b --bare Bare CKAN site with no example extension
-i --image-only Create the environment but don't start containers
--interactive Doesn't detach from the web container
--no-datapusher Don't install/enable ckanext-datapusher
--no-init-db Don't initialize the database. Useful for importing CKANs.
-n --no-sysadmin Don't prompt for an initial sysadmin user account
-s --site=NAME Pick a site to create [default: primary]
--site-url SITE_URL The site_url to use in API responses (e.g. http://example.org:{port}/)
--syslog Log to the syslog
ENVIRONMENT_DIR is a path for the new environment directory. The last
part of this path will be used as the environment name.
</pre></div>
</div>
</div>
<div class="section" id="info">
<h2>info<a class="headerlink" href="#info" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Display information about environment and running containers
Usage:
datacats info [-qr] [ENVIRONMENT]
Options:
-q --quiet Echo only the web URL or nothing if not running
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="init">
<h2>init<a class="headerlink" href="#init" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Initialize a purged environment or copied environment directory
Usage:
datacats init [-in] [--syslog] [-s NAME] [--address=IP] [--interactive]
[--site-url SITE_URL] [ENVIRONMENT_DIR [PORT]] [--no-init-db]
Options:
--address=IP Address to listen on (Linux-only)
--interactive Don't detach from the web container
-i --image-only Create the environment but don't start containers
--no-init-db Don't initialize the database. Useful for importing other CKANs
-n --no-sysadmin Don't prompt for an initial sysadmin user account
-s --site=NAME Pick a site to initialize [default: primary]
--site-url SITE_URL The site_url to use in API responses (e.g. http://example.org:{port}/)
--syslog Log to the syslog
ENVIRONMENT_DIR is an existing datacats environment directory. Defaults to '.'
</pre></div>
</div>
</div>
<div class="section" id="install">
<h2>install<a class="headerlink" href="#install" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Install or reinstall Python packages within this environment
Usage:
datacats install [-q] [--address=IP] [ENVIRONMENT [PACKAGE ...]]
datacats install -c [q] [--address=IP] [ENVIRONMENT]
Options:
--address=IP The address to bind to when reloading after install
-c --clean Reinstall packages into a clean virtualenv
-q --quiet Do not show output from installing packages and requirements.
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="less">
<h2>less<a class="headerlink" href="#less" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Recompiles less files in an environment.
Usage:
datacats less [ENVIRONMENT]
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="list">
<h2>list<a class="headerlink" href="#list" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>List all environments for this user
Usage:
datacats list
</pre></div>
</div>
</div>
<div class="section" id="logs">
<h2>logs<a class="headerlink" href="#logs" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Display or follow container logs
Usage:
datacats logs [--postgres | --solr | --datapusher] [-s NAME] [-tr] [--tail=LINES] [ENVIRONMENT]
datacats logs -f [--postgres | --solr | --datapusher] [-s NAME] [-r] [ENVIRONMENT]
Options:
--datapusher Show logs for datapusher instead of web logs
--postgres Show postgres database logs instead of web logs
-f --follow Follow logs instead of exiting immediately
--solr Show solr search logs instead of web logs
-t --timestamps Add timestamps to log lines
-s --site=NAME Specify a site for logs if needed [default: primary]
--tail=LINES Number of lines to show [default: all]
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="migrate">
<h2>migrate<a class="headerlink" href="#migrate" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Migrate an environment to a given revision of the datadir format.
Usage:
datacats migrate [-y] [-r VERSION] [ENVIRONMENT_DIR]
Options:
-r --revision=VERSION The version of the datadir format you want
to convert to [default: 2]
-y --yes Answer yes to all questions.
Defaults to '.' if ENVIRONMENT_DIR isn't specified.
</pre></div>
</div>
</div>
<div class="section" id="open">
<h2>open<a class="headerlink" href="#open" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Open web browser window to this environment
Usage:
datacats open [-r] [-s NAME] [ENVIRONMENT]
Options:
-s --site=NAME Choose a site to open [default: primary]
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="paster">
<h2>paster<a class="headerlink" href="#paster" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Run a paster command from the current directory
Usage:
datacats paster [-d] [-s NAME] [COMMAND...]
Options:
-s --site=NAME Specify a site to run this paster command on [default: primary]
-d --detach Run the resulting container in the background
You must be inside a datacats environment to run this. The paster command will
run within your current directory inside the environment. You don't need to
specify the --plugin option. The --config option also need not be specified.
</pre></div>
</div>
</div>
<div class="section" id="pull">
<h2>pull<a class="headerlink" href="#pull" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Download or update required datacats docker images
Usage:
datacats pull [-a]
Options:
-a --all Pull optional images as well as required
images. Optional images will be pulled
when needed, but you can use this to make
sure you have all the images you need if
you are going offline.
</pre></div>
</div>
</div>
<div class="section" id="purge">
<h2>purge<a class="headerlink" href="#purge" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Purge environment database and uploaded files
Usage:
datacats purge [-s NAME | --delete-environment] [-y] [ENVIRONMENT]
Options:
--delete-environment Delete environment directory as well as its data, as
well as the data for **all** sites.
-s --site=NAME Specify a site to be purge [default: primary]
-y --yes Respond yes to all prompts (i.e. force)
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="reload">
<h2>reload<a class="headerlink" href="#reload" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Reload environment source and configuration
Usage:
datacats reload [-b] [-p|--no-watch] [--syslog] [-s NAME] [--site-url=SITE_URL]
[-i] [--address=IP] [ENVIRONMENT [PORT]]
datacats reload -r [-b] [--syslog] [-s NAME] [--address=IP] [--site-url=SITE_URL]
[-i] [ENVIRONMENT]
Options:
--address=IP Address to listen on (Linux-only)
-i --interactive Calls out to docker via the command line, allowing
for interactivity with the web image.
--site-url=SITE_URL The site_url to use in API responses. Can use Python template syntax
to insert the port and address (e.g. http://example.org:{port}/)
-b --background Don't wait for response from web server
--no-watch Do not automatically reload templates and .py files on change
-p --production Reload with apache and debug=false
-s --site=NAME Specify a site to reload [default: primary]
--syslog Log to the syslog
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="reset">
<h2>reset<a class="headerlink" href="#reset" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Resets a site to the default state. This will re-initialize the
database and recreate the administrator account.
Usage:
datacats reset [-iyn] [-s NAME] [ENVIRONMENT]
Options:
-i --interactive Don't detach from the web container
-s --site=NAME The site to reset [default: primary]
-y --yes Respond yes to all questions
-n --no-sysadmin Don't prompt for a sysadmin password
</pre></div>
</div>
</div>
<div class="section" id="shell">
<h2>shell<a class="headerlink" href="#shell" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Run a command or interactive shell within this environment
Usage:
datacats [-d] [-s NAME] shell [ENVIRONMENT [COMMAND...]]
Options:
-d --detach Run the resulting container in the background
-s --site=NAME Specify a site to run the shell on [default: primary]
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="start">
<h2>start<a class="headerlink" href="#start" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Create containers and start serving environment
Usage:
datacats start [-b] [--site-url SITE_URL] [-p|--no-watch] [-s NAME]
[-i] [--syslog] [--address=IP] [ENVIRONMENT [PORT]]
datacats start -r [-b] [--site-url SITE_URL] [-s NAME] [--syslog]
[-i] [--address=IP] [ENVIRONMENT]
Options:
--address=IP Address to listen on (Linux-only)
-b --background Don't wait for response from web server
--no-watch Do not automatically reload templates and .py files on change
-i --interactive Calls out to docker via the command line, allowing
for interactivity with the web image.
-p --production Start with apache and debug=false
-s --site=NAME Specify a site to start [default: primary]
--syslog Log to the syslog
--site-url SITE_URL The site_url to use in API responses. Defaults to old setting or
will attempt to determine it. (e.g. http://example.org:{port}/)
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="stop">
<h2>stop<a class="headerlink" href="#stop" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Stop serving environment and remove all its containers
Usage:
datacats stop [-r] [-s NAME] [ENVIRONMENT]
Options:
-s --site=NAME Specify a site to stop. [default: primary]
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="tweak">
<h2>tweak<a class="headerlink" href="#tweak" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Commands operating on environment data
Usage:
datacats tweak --install-postgis [ENVIRONMENT]
datacats tweak --add-redis [ENVIRONMENT]
datacats tweak --admin-password [ENVIRONMENT]
Options:
--install-postgis Install postgis in ckan database
--add-redis Adds redis next time this environment reloads
-s --site=NAME Choose a site to tweak [default: primary]
-p --admin-password Prompt to change the admin password
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
<div class="section" id="datacats-lesscd">
<h2>datacats-lesscd<a class="headerlink" href="#datacats-lesscd" title="Permalink to this headline">¶</a></h2>
<div class="highlight-text"><div class="highlight"><pre>Watches a CKAN environment for changes in its .less files, and recompiles them when they do.
Usage:
datacats-lesscd [--help] ENVIRONMENT
--help -h Show this help and quit.
ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'
</pre></div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="changelog.html" class="btn btn-neutral float-right" title="Change Log" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="docker.html" class="btn btn-neutral" title="How datacats uses Docker" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2015, boxkite.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.2.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>