Simplify private repository flow #1

Open
opened 2024-03-23 12:36:30 +00:00 by decentral1se · 2 comments
Owner
https://git.coopcloud.tech/coop-cloud/organising/issues/586
Member

On this step when reading the docs, I find myself asking:

Where do I generate a private deploy key for my site?
Is it just the normal ~/.ssh location where it's saved as the file id_ed25519?
I assume yes, so is the correct step that I am supposed to do this:

Paste the truncated key (with ASCII armor) into the example.org.env file like this:

...
SECRET_DEPLOY_KEY_VERSION=v1

DOCKER_CONTEXT=example.org \
    docker secret create \
    parasol-static-site_example_org_deploy_key_v1 \
    -----BEGIN OPENSSH PRIVATE KEY-----\
    b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW \
    ...
    -----END OPENSSH PRIVATE KEY-----

Or am I referencing a keyfile on disk in ~/.abra/ somewhere? I think the docs mean the former, but after fiddling a bit when I run deploy or secret ls abra fails fails with the following:

abra app deploy example.org
FATA[0000] env file for example.org couldn't be read: Can't separate key from value
On this step when reading the docs, I find myself asking: Where do I generate a private deploy key for my site? Is it just the normal `~/.ssh` location where it's saved as the file `id_ed25519`? I assume yes, so is the correct step that I am supposed to do this: Paste the truncated key (with ASCII armor) into the `example.org.env` file like this: ``` ... SECRET_DEPLOY_KEY_VERSION=v1 DOCKER_CONTEXT=example.org \ docker secret create \ parasol-static-site_example_org_deploy_key_v1 \ -----BEGIN OPENSSH PRIVATE KEY-----\ b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW \ ... -----END OPENSSH PRIVATE KEY----- ``` Or am I referencing a keyfile on disk in `~/.abra/` somewhere? I think the docs mean the former, but after fiddling a bit when I run `deploy` or `secret ls` abra fails fails with the following: ``` abra app deploy example.org FATA[0000] env file for example.org couldn't be read: Can't separate key from value ```
Author
Owner

@basebuilder I ran this for adding the key on my local workstation:

DOCKER_CONTEXT=example.org docker secret create parasol-static-site_example_org_deploy_key_v1 ./foodeploy

Where ./foodeploy is the actual filepath, not the file contents. This doesn't go in the .env files, it's a command you run on your terminal.

Once you docker secret create ... it's made available on the deployment. It is then loaded into the file system of the badger image in https://git.coopcloud.tech/coop-cloud/parasol-static-site/src/branch/main/deploy_key.tmpl at the location of cab6a5531f/compose.private.yml (L10)

Let's improve the docs once you get through this 🤘

@basebuilder I ran this for adding the key on my local workstation: ``` DOCKER_CONTEXT=example.org docker secret create parasol-static-site_example_org_deploy_key_v1 ./foodeploy ``` Where `./foodeploy` is the actual filepath, *not* the file contents. This doesn't go in the `.env` files, it's a command you run on your terminal. Once you `docker secret create ...` it's made available on the deployment. It is then loaded into the file system of the `badger` image in https://git.coopcloud.tech/coop-cloud/parasol-static-site/src/branch/main/deploy_key.tmpl at the location of https://git.coopcloud.tech/coop-cloud/parasol-static-site/src/commit/cab6a5531fd455b4c09aa0367102dc9084ee161a/compose.private.yml#L10 Let's improve the docs once you get through this 🤘
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
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/parasol-static-site#1
No description provided.