Skip to content

Commit b3f4227

Browse files
committed
Improve "running xcengine" docs, etc.
1 parent a822f31 commit b3f4227

File tree

3 files changed

+87
-66
lines changed

3 files changed

+87
-66
lines changed

docs/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ An Application Package consists of two parts:
2424
which defines how the code in the container image should be run,
2525
and what its available parameters, inputs, and outputs are.
2626

27-
Application Packages are designed to be run on cloud processing
28-
platforms, but can also be tested locally. Application Packages provide
29-
a great deal of power and flexibility; partly because of this flexibility, they
30-
can be complex and challenging to build from scratch.
27+
Application Packages are designed to be run on cloud processing platforms, but
28+
can also be tested locally. Application Packages provide a great deal of power
29+
and flexibility; partly because of this flexibility, they can be complex and
30+
challenging to build from scratch.
3131

3232
## xcube Server and Viewer
3333

docs/testing.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Testing and running Application Packages
22

3-
Application Packages are generally deployed to cloud platforms, but there are also
4-
ways to run CWL files and complete Application Packages locally.
3+
Application Packages are generally deployed to cloud platforms, but there are
4+
also ways to run CWL files and complete Application Packages locally.
55

66
## Running with cwltool
77

8-
[cwltool](https://www.commonwl.org/user_guide/introduction/quick-start.html) is the
9-
reference runner for CWL files. It doesn't implement the full Application Package
10-
best practice (so there is no stage-in / stage-out functionality) but can nevertheless
11-
be used to run CWL files that implement Application Packages.
8+
[cwltool](https://www.commonwl.org/user_guide/introduction/quick-start.html)
9+
is the reference runner for CWL files. It doesn't implement the full
10+
Application Package best practice (so there is no stage-in / stage-out
11+
functionality) but can nevertheless be used to run CWL files that implement
12+
Application Packages.
1213

1314
## Running with ZOO-Project and the DRU extensions
1415

@@ -18,3 +19,10 @@ use the [ZOO-Project](https://zoo-project.org/) with the optional
1819
[minikube](https://minikube.sigs.k8s.io/docs/). The
1920
[EOEPCA+ documentation](https://eoepca.readthedocs.io/projects/deploy/en/2.0-rc1/building-blocks/oapip-engine/)
2021
gives detailed instructions for installation.
22+
23+
## Deploying your Application Package to a platform
24+
25+
Once your container image has been pushed to a registry, the CWL file can be
26+
deployed to a cloud platform to make your Application Package available to
27+
users of this platform. The process for deploying the CWL file varies; consult
28+
the platform documentation or support for details.

docs/xcetool.md

Lines changed: 69 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -19,76 +19,89 @@ a CWL file defining a corresponding application package.
1919

2020
Options:
2121

22-
- `-b`, `--build-dir` `DIRECTORY`: Build directory to use for preparing the Docker
23-
image. If not specified, an automatically created temporary directory will be used.
24-
This option is mainly useful for debugging.
25-
- `-e`, `--environment` `FILE`: Conda environment file to use in Docker image.
26-
If no environment file is specified here or in the notebook, xcetool will try to
27-
reproduce the current environment as a last resort, but this is not recommended.
28-
- `-t`, `--tag` `TEXT`: Tag to apply to the Docker image. If not specified, a
29-
timestamp-based tag will be generated automatically.
30-
- `-a`, `--eoap` `PATH`: Write a CWL file defining an Earth Observation Application
31-
Package to the specified path.
22+
- `-b`, `--build-dir` `DIRECTORY`: Build directory to use for preparing the
23+
Docker image. If not specified, an automatically created temporary
24+
directory will be used.
25+
This option is mainly useful for debugging.
26+
- `-e`, `--environment` `FILE`:
27+
Conda environment file to use in Docker image.
28+
If no environment file is specified here or in the notebook,
29+
xcetool will try to reproduce the current environment
30+
as a last resort, but this is not recommended.
31+
- `-t`, `--tag` `TEXT`: Tag to apply to the Docker image.
32+
If not specified, a
33+
timestamp-based tag will be generated automatically.
34+
- `-a`, `--eoap` `PATH`: Write a CWL file defining an Earth Observation
35+
Application Package to the specified path.
36+
- `--help`: Show a help message for this subcommand and exit.
3237

3338
### `xcetool image run`
3439

3540
Usage: `xcetool image run [OPTIONS] IMAGE`
3641

37-
```text
3842
Options:
39-
-b, --batch Run the compute engine as a batch script.
40-
Use with the --output option to copy output
41-
out of the container.
42-
-s, --server Run the compute engine as an xcube server.
43-
-p, --port INTEGER Host port for xcube server (default: 8080).
44-
Implies --server.
45-
-f, --from-saved If --batch and --server both used, serve
46-
datasets from saved Zarrs rather than
47-
computing them on the fly.
48-
-o, --output DIRECTORY Write any output data to this directory,
49-
which will be created if it does not exist
50-
already.
51-
-k, --keep Keep container after it has finished
52-
running.
53-
--help Show this message and exit.
54-
```
55-
56-
This subcommand runs an xcengine container image. An image can also be run using the
57-
`docker run` command, but `xcetool image run` provides some additional convenience
58-
(e.g. easy configuration of a server HTTP port).
59-
60-
If you use the `--server` option with `xcetool image run`, the image will be run in
61-
xcube server mode: after the code from the input notebook is used to generate datasets,
62-
those datasets will be made available in an xcube server instance. You can also use
63-
the `--port` option to select the HTTP port where the xcube server should be exposed.
64-
The server also includes an interactive web viewer component. On start-up, `xcetool`
65-
will print the URLs of the xcube server and viewer to the standard output.
66-
67-
If you give the `--server` or `--port` options, `xcetool` will run the container
68-
indefinitely as an xcube server and viewer instance. You can stop the container and
69-
force `xcetool` to exit by pressing ctrl-C on the command line (or by sending it an
70-
interrupt signal in some other way).
43+
44+
- `-b`, `--batch`: Run the compute engine as a batch script.
45+
Use with the `--output` option to copy output
46+
out of the container.
47+
- `-s`, `--server`: Run the compute engine as an xcube server.
48+
- `-p`, `--port` INTEGER: Host port for xcube server (default: 8080).
49+
Implies `--server`.
50+
- `-f`, `--from-saved`: If `--batch` and `--server` both used, serve
51+
datasets from saved Zarrs rather than
52+
computing them on the fly.
53+
- `-o`, `--output` DIRECTORY Write any output data to this directory,
54+
which will be created if it does not exist
55+
already.
56+
- `-k`, `--keep`: Keep container after it has finished
57+
running.
58+
- `--help`: Show a help message for this subcommand and exit.
59+
60+
This subcommand runs an xcengine container image. An image can also be run
61+
using the `docker run` command, but `xcetool image run` provides some
62+
additional convenience (e.g. easy configuration of a server HTTP port).
63+
64+
If you use the `--server` option with `xcetool image run`, the image will be
65+
run in xcube server mode: after the code from the input notebook is used to
66+
generate datasets, those datasets will be made available in an xcube server
67+
instance. You can also use the `--port` option to select the HTTP port where
68+
the xcube server should be exposed. The server also includes an interactive
69+
web viewer component. On start-up, `xcetool` will print the URLs of the xcube
70+
server and viewer to the standard output.
71+
72+
If you give the `--server` or `--port` options, `xcetool` will run the
73+
container indefinitely as an xcube server and viewer instance. You can stop
74+
the container and force `xcetool` to exit by pressing ctrl-C on the command
75+
line (or by sending it an interrupt signal in some other way).
7176

7277
### `xcetool make-script`
7378

74-
This subcommand does not generate a container image, but a directory containing
75-
the main contents that the image would have had: a script derived from the notebook
76-
along with some supporting files. The `make-script` subcommand is mainly useful for
77-
debugging.
79+
This subcommand does not generate a container image, but a directory
80+
containing the main contents that the image would have had: a script derived
81+
from the notebook along with some supporting files. The `make-script`
82+
subcommand is mainly useful for debugging.
83+
84+
Usage: `xcetool make-script [OPTIONS] NOTEBOOK OUTPUT_DIR`
85+
86+
Create a compute engine script on the host system. The output directory will
87+
be used for the generated script, supporting code modules, and any output
88+
produced by running the script.
89+
90+
Options:
91+
92+
- `-b`, `--batch`: Run as batch script after creating
93+
- `-s`, `--server`: Run the script as an xcube server after creating it.
94+
- `-f`, `--from-saved`: If `--batch` and `--server` both used, serve datasets from saved Zarrs rather than computing them on the fly.
95+
- `-c`, `--clear`: Clear output directory before writing to it
96+
- `--help`: Show a help message for this subcommand and exit.
7897

7998
## Publishing your container image
8099

81100
Once you have built your container image locally, you can push it to an online
82101
registry. The tag is used to determine the registry and repository to which to
83102
push the image. For example, if an image is tagged `quay.io/alice/helloworld:1.0`,
84103
pushing it will attempt to upload the image to the repository `helloworld`
85-
under the account `alice` on the registry `quay.io`.
86-
87-
88-
## Deploying your Application Package
89-
90-
Once your container image has been pushed to a registry, the CWL file can be deployed
91-
to a cloud platform to make your Application Package available to users of this
92-
platform. The process for deploying the CWL file varies; consult the platform
93-
documentation or support for details.
104+
under the account `alice` on the registry `quay.io`. See the [Docker
105+
documentation](https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-a-registry/)
106+
for more details.
94107

0 commit comments

Comments
 (0)