Go to file
Thomas E Lackey 9687d84468
646: Add error message for webapp startup hang (#647)
This fixes three issues:

1. #644 (build output)
2. #646 (error on startup)
3. automatic env quote handling (related to 2)


For the build output we now have:

```
#################################################################

Built host container for /home/telackey/tmp/iglootools-home with tag:

    cerc/iglootools-home:local

To test locally run:

    docker run -p 3000:3000 cerc/iglootools-home:local
```

For the startup error, it was hung waiting for the "success" message from the next generate output (itself a workaround for a nextjs bug fixed by this PR we submitted: https://github.com/vercel/next.js/pull/58276).

I added a timeout which will cause it to wait up to a maximum _n_ seconds before issuing:

```
ERROR: 'npm run cerc_generate' exceeded CERC_MAX_GENERATE_TIME.
```

On the quoting itself, I plan on adding a new run-webapp command, but I realized I had a decent spot to do effect the quote replacement on-the-fly after all when I am already escaping the values for insertion/replacement into JS.

The "dequoting" can be disabled with `CERC_RETAIN_ENV_QUOTES=true`.
2023-11-14 16:07:26 -06:00
.gitea/workflows Add debug commands to test job (#636) 2023-11-08 19:42:19 -07:00
.github/workflows Enable webapp test in GitHub CI. (#627) 2023-11-07 18:27:08 -06:00
docs Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
scripts Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
stack_orchestrator 646: Add error message for webapp startup hang (#647) 2023-11-14 16:07:26 -06:00
tests Allow setting build tool (npm/yarn) and next.js version. (#639) 2023-11-10 17:44:25 -06:00
.gitignore Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
LICENSE Initial version of pip packaging 2022-08-23 11:32:55 -06:00
MANIFEST.in Initial version of pip packaging 2022-08-23 11:32:55 -06:00
README.md Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
requirements.txt Add env var support for k8s (#634) 2023-11-08 17:53:46 -07:00
setup.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
tox.ini Moar complex 2022-10-03 19:43:43 -06:00

Stack Orchestrator

Stack Orchestrator allows building and deployment of a Laconic Stack on a single machine with minimial prerequisites. It is a Python3 CLI tool that runs on any OS with Python3 and Docker. The following diagram summarizes the relevant repositories in the Laconic Stack - and the relationship to Stack Orchestrator.

The Stack

Install

To get started quickly on a fresh Ubuntu instance (e.g, Digital Ocean); try this script. WARNING: always review scripts prior to running them so that you know what is happening on your machine.

For any other installation, follow along below and adapt these instructions based on the specifics of your system.

Ensure that the following are already installed:

  • Python3: python3 --version >= 3.8.10 (the Python3 shipped in Ubuntu 20+ is good to go)
  • Docker: docker --version >= 20.10.21
  • jq: jq --version >= 1.5
  • git: git --version >= 2.10.3

Note: if installing docker-compose via package manager on Linux (as opposed to Docker Desktop), you must install the plugin, e.g. :

mkdir -p ~/.docker/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.11.2/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose

Next decide on a directory where you would like to put the stack-orchestrator program. Typically this would be a "user" binary directory such as ~/bin or perhaps /usr/local/laconic or possibly just the current working directory.

Now, having selected that directory, download the latest release from this page into it (we're using ~/bin below for concreteness but edit to suit if you selected a different directory). Also be sure that the destination directory exists and is writable:

curl -L -o ~/bin/laconic-so https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so

Give it execute permissions:

chmod +x ~/bin/laconic-so

Ensure laconic-so is on the PATH

Verify operation (your version will probably be different, just check here that you see some version output and not an error):

laconic-so version
Version: 1.1.0-7a607c2-202304260513

Save the distribution url to ~/.laconic-so/config.yml:

mkdir ~/.laconic-so
echo "distribution-url: https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so" >  ~/.laconic-so/config.yml

Update

If Stack Orchestrator was installed using the process described above, it is able to subsequently self-update to the current latest version by running:

laconic-so update

Usage

The various stacks each contain instructions for running different stacks based on your use case. For example:

Contributing

See the CONTRIBUTING.md for developer mode install.

Platform Support

Native aarm64 is not currently supported. x64 emulation on ARM64 macos should work (not yet tested).