This repository has been archived on 2020-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
magic-app/spikes
2020-07-05 14:34:03 +02:00
..
static Merge branch 'master' of ssh://git.autonomic.zone:2222/autonomic-cooperative/magic-app 2020-07-05 14:34:03 +02:00
templates Merge branch 'master' of ssh://git.autonomic.zone:2222/autonomic-cooperative/magic-app 2020-07-05 14:34:03 +02:00
first.py Convert to a django-list structure 2020-07-04 13:12:31 +02:00
README.md Convert to a django-list structure 2020-07-04 13:12:31 +02:00
requirements.txt Convert to a django-list structure 2020-07-04 13:12:31 +02:00
second.py Merge branch 'master' of ssh://git.autonomic.zone:2222/autonomic-cooperative/magic-app 2020-07-05 14:34:03 +02:00

Run It

$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt
$ python first.py / second.py / third.py

first.py

  • List apps from an app.json (points to https://git.autonomic.zone/compose-stacks)
  • Clone selected app template and parse configuration for inputs (env vars and secrets)
  • Generate a form so those values can be filled out and allow it to be saved
  • Save the form inputs to a db.json (as a start)
  • Deploy an applicaiton to a local swarm (assumes access to local docker socket)
  • Create an "edit app" page where the db.json is re-called and can be updated
  • Make sure re-deploy works (taking care of updating secret and app versions)

second.py

  • Don't try to be smart with the auto-generation, hard-code everything. We maintain the app template (compose.yml) and this code anyway, so we just need to be aware of each other and keep in sync. This would optimise for trust and collaboration and not "smart" code.
  • Hard-code the secrets/configs required to make the code for generating versions simpler as well.