Implementing ~/.abra/... #1

Closed
opened 2020-09-07 21:40:44 +00:00 by 3wordchant · 7 comments
Owner

generate secrets, and store in docker secret (and pass) -- see #4
deploy (initially just wrap docker stack deploy to minimise foot-cannons)

One thought was to have a {cocl|tada|abra}.yml file which has something like this:

---
name: mystack

secrets:
  foo:
  bar:
  baz:
    length: 8 # optional, default is some x

Dunno if that is overkill for v0.0.0.0.1 though :)

> > generate secrets, and store in docker secret (and pass) -- see #4 > > deploy (initially just wrap docker stack deploy to minimise foot-cannons) > > One thought was to have a `{cocl|tada|abra}.yml` file which has something like this: > > ```yaml > --- > name: mystack > > secrets: > foo: > bar: > baz: > length: 8 # optional, default is some x > ``` > > Dunno if that is overkill for v0.0.0.0.1 though :)
Owner

yq seems to be pretty damn useful!

https://mikefarah.gitbook.io/yq/commands/read

`yq` seems to be pretty damn useful! > https://mikefarah.gitbook.io/yq/commands/read
Owner

With 91395a5f8e, I was able to run stuff like:

➜  abra (main) ✔ yq r test/abra.yml secrets.bar.length   
➜  abra (main)echo $?
0
➜  abra (main) ✔ yq r test/abra.yml secrets.bar.length -e
Error: No matches found
➜  abra (main)echo $?
1
➜  abra (main) ✔ yq r test/abra.yml secrets.baz.length   
128 
With https://git.autonomic.zone/autonomic-cooperative/abra/commit/91395a5f8e0f4d818a8c47247e111c6db57adaa6, I was able to run stuff like: ```bash ➜ abra (main) ✔ yq r test/abra.yml secrets.bar.length ➜ abra (main) ✔ echo $? 0 ➜ abra (main) ✔ yq r test/abra.yml secrets.bar.length -e Error: No matches found ➜ abra (main) ✔ echo $? 1 ➜ abra (main) ✔ yq r test/abra.yml secrets.baz.length 128 ```
3wordchant added the
enhancement
label 2020-09-13 16:00:22 +00:00
Owner
https://git.autonomic.zone/autonomic-cooperative/abra/commit/f0a17bfd87d0f31d76822be7341d99fb8eb1a30b
Author
Owner

This will also be useful for compose-stacks/planning#8 to help Drone auto-generate secrets during test deployments

This will also be useful for compose-stacks/planning#8 to help Drone auto-generate secrets during test deployments
Owner

I'm gonna rename this issue into the bumper ~/.abra tracker if that is OK?

Here is what the Python thing was doing via asciicast:

https://asciinema.org/a/362759

I think it was like:

  • ~/.abra (root dir)
  • ~/.abra/config.yml (root config, list of contexts + current context)
  • ~/.abra/clones/ (all compose-stack/... repository clones)
  • ~/.abra/default (the local context)
  • ~/.abra/autonomic-swarm (an added context)
  • ~/.abra/autonomic-swarm/fr_multisites.yml (a local save of all secrets/configs versions and arguments that have been passed in when the app got deployed)

Don't have to keep that structure!

I'm gonna rename this issue into the bumper ~/.abra tracker if that is OK? Here is what the Python thing was doing via asciicast: https://asciinema.org/a/362759 I think it was like: - ~/.abra (root dir) - ~/.abra/config.yml (root config, list of contexts + current context) - ~/.abra/clones/ (all compose-stack/... repository clones) - ~/.abra/default (the local context) - ~/.abra/autonomic-swarm (an added context) - ~/.abra/autonomic-swarm/fr_multisites.yml (a local save of all secrets/configs versions and arguments that have been passed in when the app got deployed) Don't have to keep that structure!
decentral1se changed title from Secrets config file to Implementing ~/.abra/... 2020-10-22 13:27:10 +00:00
Author
Owner

Beauty 😍 I will try for this week; it'd be nice not to have gigantic -e ~/Projects/.../stack_service.env arguments on all my abra commands 😬, and this structure would also save us from needing to set DOCKER_CONTEXT or ABRA_STACK_DIR in per-app envs (I have 2 different folders of app configs currently..)

Beauty 😍 I will try for this week; it'd be nice not to have gigantic `-e ~/Projects/.../stack_service.env` arguments on all my `abra` commands 😬, and this structure would also save us from needing to set `DOCKER_CONTEXT` or `ABRA_STACK_DIR` in per-app envs (I have 2 different folders of app configs currently..)
Author
Owner
/home/fox/.abra
├── apps -> /home/fox/Projects/Autonomic/CoopCloud/stacks
└── servers
    ..
    ├── jones.iww.org.uk -> /home/fox/Projects/Autonomic/CoopCloud/apps/jones.iww.org.uk
    ├── swarm.autonomic.zone -> /home/fox/Projects/Autonomic/CoopCloud/apps/swarm.autonomic.zone
    ..

N directories, 0 files

Currently still using .env format pending Great YAML Migration. No per-server config as yet because I couldn't think of any that we need, but I'm sure there will be some..

``` /home/fox/.abra ├── apps -> /home/fox/Projects/Autonomic/CoopCloud/stacks └── servers .. ├── jones.iww.org.uk -> /home/fox/Projects/Autonomic/CoopCloud/apps/jones.iww.org.uk ├── swarm.autonomic.zone -> /home/fox/Projects/Autonomic/CoopCloud/apps/swarm.autonomic.zone .. N directories, 0 files ``` Currently still using `.env` format pending Great YAML Migration. No per-server config as yet because I couldn't think of any that we need, but I'm sure there will be some..
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/abra#1
No description provided.