Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • meta meta
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • AURA
  • metameta
  • Issues
  • #57
Closed
Open
Created Nov 11, 2021 by David Trattnig@davidOwner

[EPIC] AURA CLI

Improve and implement a command line interface providing targets for building, running dev and prod servers, testing and more (native and Docker). See the documentation stubs to get a first idea: https://gitlab.servus.at/aura/meta/-/blob/master/docs/administration/cli.md

Specification

  • Where possible, specification and documentation shall be provided before implementation: https://gitlab.servus.at/aura/meta/-/blob/master/docs/administration/cli.md
  • Not all projects have an existing run.sh script already. If it is not existing yet, create such file. If it is missing some simple targets (e.g. to start the dev or prod server) add them. Check out run.sh of Engine & Engine-Core to get an idea of an complete, but basic target set.
  • Discuss: Should parts of the script be extracted to some Makefile which is called by the run script? Does it make sense to replace the run.sh by make completely (feedback from @oyla).
  • Discuss: Does it make sense to improve the existing run.sh at all, or does it make more sense to implement a more advanced CLI (see #45) or replace it with Earthly now, to cover Makefile, Dockerfile and Bash Scripts altogether.

Best Practices for CLI development

  • Check out the Google Shell Style Guide for inspirations on writing better scripts e.g. Let's replace run.sh with run executable?
  • Keep it simple stupid (KISS) - we want to encapsulate, not re-create the complexity of lengthy docker run ... commands
  • Try to keep the glue-code and configurations D.R.Y.
  • Re-use CLI commands as much as possible, even across projects + inside & outside of a Docker container

Example: Project specific Docker CLI commands are called from the host using ./run.sh docker:engine (compare https://gitlab.servus.at/aura/engine/-/blob/master/run.sh), but inside the starting docker container, the CLI command is re-used in its "native version". The ./run.sh script is called from within the Dockerfile again (https://gitlab.servus.at/aura/engine/-/blob/master/Dockerfile).

TODO

  • #58 Improve and consolidate existing PROJECT CLI
  • #59 Provide a simple META CLI for maintaining Docker & Docker Compose. Integrate with an concept for dealing with App config files and Environment variables with Docker
  • OPTIONAL FOR CURRENT RELEASE: #45 [EPIC ] Advanced CLI - Replace the existing run.sh scripts with some proven CLI Framework
Edited Nov 30, 2021 by David Trattnig
Assignee
Assign to
Time tracking