-
Notifications
You must be signed in to change notification settings - Fork 0
Use lets-encrypt for certs #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
c651c78
Use acme_buddy
weshinsley 68e2fa8
Lint
weshinsley 0728d4c
Tests
weshinsley b26e899
Fix test
weshinsley de06a0b
Fix test
weshinsley 4285849
Bump version
weshinsley 00e289d
Merge branch 'main' into mrc-6805
weshinsley 051d2d2
Use acme in constellation
weshinsley 8b45575
Lint for now
weshinsley a96dd34
Bit more lint
weshinsley 984baed
Match constellation acme suppoer
weshinsley d9967e1
Update src/packit_deploy/packit_constellation.py
weshinsley 612f6cf
Update
weshinsley 8c82b26
Lint/whitespace
weshinsley 1eec23d
More format
weshinsley f5b53d6
Remove noqa
weshinsley 8912e5d
Various fixes
weshinsley 7eaa1ab
Lint
weshinsley 447eb85
Attempt lint appeasement
weshinsley 20e34bd
Fix mystery lint issue by utter guesswork
weshinsley 6af3e5b
Working?
weshinsley 8471910
Merge branch 'main' into mrc-6805
weshinsley 310c8ae
Lint lines
weshinsley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,24 +87,28 @@ orderly-runner: | |
| ## network | ||
| proxy: | ||
| enabled: true | ||
| ssl: | ||
| ## This section describes how to get the certificate in. We | ||
| ## support two sources: | ||
| ## | ||
| ## 1. self signed certificates - just leave this section blank | ||
| ## | ||
| ## 2. certificates from strings - include the strings directly in | ||
| ## the keys here, or more likely use a VAULT:<path>:<key> | ||
| ## string to extract them from the vault. | ||
| certificate: "VAULT:secret/cert:value" | ||
| key: "VAULT:secret/key:value" | ||
| hostname: localhost | ||
| port_http: 80 | ||
| port_https: 443 | ||
| image: | ||
| name: packit-proxy | ||
| tag: main | ||
|
|
||
| ## Standard configuration for using LetsEncrypt certs with acme-buddy. | ||
| ## If this section is not included, the proxy will create | ||
| ## a self-signed certificate. | ||
| acme_buddy: | ||
| image: | ||
| repo: ghcr.io/reside-ic | ||
| name: acme-buddy | ||
| tag: main | ||
| dns_provider: hdb | ||
| email: [email protected] | ||
| env: | ||
| HDB_ACME_USERNAME: VAULT:secret/certbot-hdb/credentials:username | ||
| HDB_ACME_PASSWORD: VAULT:secret/certbot-hdb/credentials:password | ||
| port: 2112 | ||
|
|
||
| vault: | ||
| ## Address of the vault server. This should be a string if it is | ||
| ## present. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| ## The name of the docker network that containers will be attached to. | ||
| ## If you want to proxy Packit to the host, you will need to | ||
| ## arrange a proxy on this network, or use dev_mode in the web section | ||
| ## below. | ||
| ## Prefix for container names; we'll use {container_prefix}-(container_name) | ||
| container_prefix: packit | ||
|
|
||
| ## Set this flag to true to prevent use of --volumes in the cli to remove | ||
| ## volumes on stop | ||
| protect_data: false | ||
|
|
||
| ## Docker org for images | ||
| repo: ghcr.io/mrc-ide | ||
|
|
||
| ## The name of the docker network that containers will be attached to. | ||
| ## If you want to proxy Packit to the host, you will need to | ||
| ## arrange a proxy on this network | ||
| network: packit-network | ||
|
|
||
| ## Names of the docker volumes to use: | ||
| ## | ||
| ## outpack: stores the outpack metadata | ||
| ## proxy_logs: stores logs from the reverse proxy (only used if proxy is given) | ||
| ## (More volumes are anticipated as the tool develops) | ||
| volumes: | ||
| outpack: outpack_volume | ||
| proxy_logs: packit_proxy_logs | ||
| packit_db: packit_db | ||
| packit_db_backup: packit_db_backup | ||
| orderly_library: orderly_library | ||
| orderly_logs: orderly_logs | ||
|
|
||
| outpack: | ||
| server: | ||
| name: outpack_server | ||
| tag: main | ||
| migrate: | ||
| name: outpack.orderly | ||
| tag: main | ||
|
|
||
| packit: | ||
| base_url: https://localhost | ||
| api: | ||
| name: packit-api | ||
| tag: main | ||
| app: | ||
| name: packit | ||
| tag: main | ||
| db: | ||
| name: packit-db | ||
| tag: main | ||
| user: VAULT:secret/db/user:value | ||
| password: VAULT:secret/db/password:value | ||
| auth: | ||
| enabled: true | ||
| auth_method: github | ||
| expiry_days: 1 | ||
| github_api_org: mrc-ide | ||
| github_api_team: packit | ||
| # Details of your Github OAuth app, which should be kept in the vault. The app's Authorization callback url must | ||
| # have the same root as the packit_api_root specified below, and should be of the form | ||
| # {PACKIT_API_ROOT}/login/oauth2/code/github | ||
| github_client: | ||
| id: VAULT:secret/auth/githubclient/id:value | ||
| secret: VAULT:secret/auth/githubclient/secret:value | ||
| jwt: | ||
| # Secret used to generate JWT tokens - this can be any string, the secret at this key in the vault is a random | ||
| # 32 char string, and is probably fine to re-use | ||
| secret: VAULT:secret/auth/jwt/secret:value | ||
| oauth2: | ||
| redirect: | ||
| # Root url which OAuth2 app will use to redirect back to packit api - must match OAuth2 app's registered url | ||
| packit_api_root: "https://packit/api" | ||
| url: "https://packit/redirect" # Url for redirecting back to the front end after successful authentication | ||
| cors_allowed_origins: "https://packit.example.com" | ||
|
|
||
| orderly-runner: | ||
| image: | ||
| name: orderly.runner | ||
| tag: main | ||
| git: | ||
| url: https://github.com/reside-ic/orderly2-example.git | ||
| workers: 1 | ||
| env: | ||
| FOO: bar | ||
|
|
||
| ## If running a proxy directly, fill this section in. Otherwise you | ||
| ## are responsible for proxying the application out of the docker | ||
| ## network | ||
| proxy: | ||
| enabled: true | ||
| hostname: localhost | ||
| port_http: 80 | ||
| port_https: 443 | ||
| image: | ||
| name: packit-proxy | ||
| tag: main | ||
|
|
||
| ## Standard configuration for using LetsEncrypt certs with acme-buddy. | ||
| ## If this section is not included, the proxy will create | ||
| ## a self-signed certificate. | ||
| acme_buddy: | ||
| image: | ||
| repo: ghcr.io/reside-ic | ||
| name: acme-buddy | ||
| tag: main | ||
| email: [email protected] | ||
| env: | ||
| ACME_BUDDY_SELF_SIGNED: 1 | ||
| port: 2112 | ||
|
|
||
| vault: | ||
| ## Address of the vault server. This should be a string if it is | ||
| ## present. | ||
| addr: ~ | ||
| auth: | ||
| ## Authentication type - must be either "token" or the name of a | ||
| ## supported authentication method. These seem to be poorly | ||
| ## documented in the hvac, but include "github" for github | ||
| ## authentication. | ||
| ## | ||
| ## On a vault client object, see auth.implemented_class_names for | ||
| ## a list, which is currently | ||
| ## | ||
| ## azure, github, gcp, kubernetes, ldap, mfa, okta | ||
| method: token |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # SPDX-FileCopyrightText: 2023-present Alex Hill <[email protected]> | ||
| # | ||
| # SPDX-License-Identifier: MIT | ||
| __version__ = "0.1.3" | ||
| __version__ = "0.1.4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ def test_environment_with_private_runner_contains_url_and_key(): | |
| env = packit_api_get_env(cfg) | ||
| assert env["PACKIT_ORDERLY_RUNNER_URL"] == "http://packit-orderly-runner-api:8001" | ||
| assert env["PACKIT_ORDERLY_RUNNER_REPOSITORY_URL"] == "[email protected]:reside-ic/orderly2-example-private.git" | ||
| assert type(env["PACKIT_ORDERLY_RUNNER_REPOSITORY_SSH_KEY"]) is str | ||
| assert isinstance(env["PACKIT_ORDERLY_RUNNER_REPOSITORY_SSH_KEY"], str) | ||
| assert env["PACKIT_ORDERLY_RUNNER_LOCATION_URL"] == "http://packit-outpack-server:8000" | ||
|
|
||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For another time - if constellation's
AcmeBuddyConfighad been a dataclass you would get this for free now: reside-ic/constellation#38There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - I'll do that...