Commit ea49dea2 authored by David Trattnig's avatar David Trattnig
Browse files

General CLI page.

parent 52f63430
......@@ -5,53 +5,69 @@
Each project as it's own `run.sh` script for limited CLI operations.
> Note: Not yet all projects have CLI support implemented consistently. See [ticket meta#57](https://gitlab.servus.at/aura/meta/-/issues/57) for progress on consolidated functionality.
> Note: Not yet all projects have CLI support implemented consistently. See https://gitlab.servus.at/aura/meta/-/issues/57 for progress on consolidated functionality.
1. [AURA Command Line Interface (CLI)](#aura-command-line-interface-cli)
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)
4. [Best Practices for CLI development](#best-practices-for-cli-development)
## Default action
1. [META CLI for SysOps](#meta-cli-for-sysops)
2. [META CLI for Release Management](#meta-cli-for-release-management)
3. [Project CLI for Development](#project-cli-for-development)
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)
## META CLI for SysOps
> Note: a *META CLI* is planned, but not yet available. See here for current progress https://gitlab.servus.at/aura/meta/-/issues/59.
## META CLI for Release Management
> 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
### Local Commands
### Start Development Server
#### Start Development Server
```bash
./run.sh dev
```
### Start Production Server
#### Start Production Server
```bash
./run.sh prod
```
### Run the test-suite
#### Run the test-suite
```bash
./run.sh test
```
## Docker Commands
### Docker Commands
Every command prefxed with `docker:` issues an Docker operation.
### Docker Build
#### Docker Build
Create a docker build.
......@@ -59,7 +75,7 @@ Create a docker build.
./run.sh docker:build
```
### Docker Push
#### Docker Push
Pushes the build image to https://hub.docker.com/u/autoradio.
......@@ -67,7 +83,7 @@ Pushes the build image to https://hub.docker.com/u/autoradio.
./run.sh docker:push
```
### Docker Run
#### Docker Run
Start the project within a docker container.
......@@ -81,7 +97,7 @@ Substitute %PROJECT% with the project name. In case of Steering use `steering`.
./run.sh docker:%PROJECT%
```
### Docker Test
#### Docker Test
Runs the test suite.
......@@ -89,9 +105,3 @@ Runs the test suite.
./run.sh docker:test
```
## Best Practices for CLI development
* Try to keep the glue-code and configurations DRY
* Re-use CLI commands as much as possible, even across projects
Example: Docker CLI commands are called from the host using `./run.sh docker:engine`, but inside the starting docker container, the CLI command is re-used in their "native version". The `./run.sh` script is called from within the Dockerfile again.
\ No newline at end of file
......@@ -7,7 +7,7 @@
## Maintaining using CLI
> Note a *META CLI* is planned, but not yet available. The [Project CLI](../development/cli.md) provided by each project is *WIP*. See here for current progress https://gitlab.servus.at/aura/meta/-/issues/57.
Check die [AURA CLI](cli.md) page for details.
## Maintaining using Docker Compose
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment