cli.md 2.9 KB
Newer Older
David Trattnig's avatar
David Trattnig committed
1
2
3
4
5

<img src="../../assets/images/aura-logo.png" width="250" />

# AURA Command Line Interface (CLI)

David Trattnig's avatar
David Trattnig committed
6
7
8
9
There are two types of **Command Line Interfaces**:

- **META CLI**: Perform operations for SysOps and ReleaseManagement.
- **PROJECT CLI**: Each project as it's own `run.sh` script for developer-centric CLI operations.
David Trattnig's avatar
David Trattnig committed
10
11

> Note: Not yet all projects have CLI support implemented consistently. See https://gitlab.servus.at/aura/meta/-/issues/57 for progress on consolidated functionality.
David Trattnig's avatar
David Trattnig committed
12
> TODO: In the future the `run.sh` scripts [should be replaced by a proper CLI Framework](https://gitlab.servus.at/aura/meta/-/issues/45).
David Trattnig's avatar
David Trattnig committed
13
14

1. [AURA Command Line Interface (CLI)](#aura-command-line-interface-cli)
David Trattnig's avatar
David Trattnig committed
15
16
17
18
   1. [META CLI](#meta-cli)
      1. [META CLI for SysOps](#meta-cli-for-sysops)
      2. [META CLI for Release Management](#meta-cli-for-release-management)
   2. [Project CLI for Development](#project-cli-for-development)
David Trattnig's avatar
David Trattnig committed
19
20
21
22
23
24
25
26
27
28
29
30
      1. [Default action](#default-action)
      2. [Local Commands](#local-commands)
         1. [Start Development Server](#start-development-server)
         2. [Start Production Server](#start-production-server)
         3. [Run the test-suite](#run-the-test-suite)
      3. [Docker Commands](#docker-commands)
         1. [Docker Build](#docker-build)
         2. [Docker Push](#docker-push)
         3. [Docker Run](#docker-run)
         4. [Docker Test](#docker-test)


David Trattnig's avatar
David Trattnig committed
31
32
33
## META CLI

### META CLI for SysOps
David Trattnig's avatar
David Trattnig committed
34
35
36

> Note: a *META CLI* is planned, but not yet available. See here for current progress https://gitlab.servus.at/aura/meta/-/issues/59.

David Trattnig's avatar
David Trattnig committed
37
### META CLI for Release Management
David Trattnig's avatar
David Trattnig committed
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

> Note: a *META CLI* is planned, but not yet available. See here for current progress https://gitlab.servus.at/aura/meta/-/issues/59.

## Project CLI for Development

> Note: The [Project CLI](cli.md) provided by each project is *WIP*. See here for current progress https://gitlab.servus.at/aura/meta/-/issues/57.


### Default action

If you start the script with `./run.sh` it usually performs the default action, which is most often required by developers.

In case of e.g. `steering` it's starting the Django development server. In case of `engine-core` it's starting the playout server.

### Local Commands

#### Start Development Server

```bash
./run.sh dev
```

#### Start Production Server

```bash
./run.sh prod
```

#### Run the test-suite

```bash
./run.sh test
```

### Docker Commands

Every command prefxed with `docker:` issues an Docker operation.


#### Docker Build

Create a docker build.

```bash
./run.sh docker:build
```

#### Docker Push

Pushes the build image to https://hub.docker.com/u/autoradio.

```bash
./run.sh docker:push
```

#### Docker Run 

Start the project within a docker container. 

```bash
./run.sh docker:%PROJECT%
```

Substitute %PROJECT% with the project name. In case of Steering use `steering`.

```bash
./run.sh docker:%PROJECT%
```

#### Docker Test

Runs the test suite.

```bash
./run.sh docker:test
```