You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+32-6
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ NOTE: _whirl_ is not intended to replace proper (unit) testing of the logic you
15
15
16
16
_whirl_ relies on [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/). Make sure you have it installed. If using _Docker for Mac_ or _Windows_ ensure that you have configured it with sufficient RAM (8GB or more recommended) for running all your containers.
17
17
18
-
When you want to use _whirl_ in your CI pipeline (currently work in progress), you need to have `jq` installed. For example, with Homebrew:
18
+
When you want to use _whirl_ in your CI pipeline, you need to have `jq` installed. For example, with Homebrew:
19
19
20
20
```bash
21
21
brew install jq
@@ -28,6 +28,8 @@ As of January 2021, Whirl uses Airflow 2.x.x as the default version. A specific
28
28
29
29
## Getting Started
30
30
31
+
### Development
32
+
31
33
Clone this repository:
32
34
33
35
```
@@ -38,6 +40,21 @@ For ease of use you can add the base directory to your `PATH` environment variab
38
40
export PATH=<target directory of whirl>:${PATH}
39
41
```
40
42
43
+
### Use the release
44
+
45
+
Download the [latest Whirl release artifact](https://github.com/godatadriven/whirl/releases/download/latest/whirl-release.tar.gz)
46
+
47
+
Extract the file (for example into `/usr/local/opt`)
48
+
49
+
```bash
50
+
tar -xvzf whirl-release.tar.gz -C /usr/local/opt
51
+
```
52
+
53
+
Make sure the whirl script is available on your path
54
+
```bash
55
+
export PATH=/usr/local/opt/whirl:$PATH
56
+
```
57
+
41
58
## Usage
42
59
43
60
The `whirl` script is used to perform all actions.
@@ -51,18 +68,22 @@ $ whirl --help
51
68
52
69
#### Starting whirl
53
70
54
-
The default action is to start the DAG in your current directory. It expects an environment to be configured. You can pass this as a command line argument or you can configure it in a `.whirl.env` file. (See [Configuring environment variables](#configuring-environment-variables).) The environment refers to a directory with the same name in the `envs` directory located near the _whirl_ script.
71
+
The default action is to start the DAG in your current directory.
72
+
73
+
With the `[-x example]` commandline argument you can run whirl from anywhere and tell whirl which example dag to run. The example refers to a directory with the same name in the `examples` directory located near the _whirl_ script.
74
+
75
+
Whirl expects an environment to be configured. You can pass this as a command line argument `[-e environment]` or you can configure it as environment variable `WHIRL_ENVIRONMENT` in a `.whirl.env` file. (See [Configuring environment variables](#configuring-environment-variables).) The environment refers to a directory with the same name in the `envs` directory located near the _whirl_ script.
Specifying the `start` command line argument is a more explicit way to start _whirl_.
61
82
62
83
#### Stopping whirl
63
84
64
85
```bash
65
-
$ whirl stop [-d <directory>] [-e <environment>]
86
+
$ whirl [-x example] [-e <environment>] stop
66
87
```
67
88
Stops the configured environment.
68
89
@@ -134,8 +155,6 @@ Each example contains it's own README file to explain the specifics of that exam
134
155
135
156
#### Generic running of examples
136
157
137
-
From within the example directory the `whirl` command can be executed.
138
-
139
158
To run a example:
140
159
141
160
```bash
@@ -144,6 +163,13 @@ $ cd ./examples/<example-dag-directory>
144
163
$ whirl -e <environment to use>
145
164
```
146
165
166
+
or
167
+
```bash
168
+
$
169
+
# Note: here we pass the whirl environment as a command-line argument. It can also be configured with the WHIRL_ENVIRONMENT variable
170
+
$ whirl -x <example to run> -e <environment to use>
171
+
```
172
+
147
173
Open your browser to [http://localhost:5000](http://localhost:5000) to access the Airflow UI. Manually enable the DAG and watch the pipeline run to successful completion.
0 commit comments