Skip to content
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

Infra Fog: Protocol #10641

Merged
merged 13 commits into from
Dec 13, 2024
Merged

Infra Fog: Protocol #10641

merged 13 commits into from
Dec 13, 2024

Conversation

endline
Copy link
Contributor

@endline endline commented Dec 6, 2024

Description

A consolidation of efforts to navigate the infra fog that is audius-docker-compose, audius-d, audius-ctl and audiusd.

RELATED


Draws on works from previous PRs and branches namely


Steps to liberation after merging this PR:

  • replace core + mediorum + caddy with audiusd PR
  • only up discprov containers on wl hosts PR
  • remove wrapper container PR

How Has This Been Tested?

Ongoing...

Local sync node to various networks

make build-audiusd-local

# sync a local node to stage
docker run --rm -ti -p 80:80 -e NETWORK=stage  audius/audiusd:current

open http://localhost/console/overview

Audius docker compose testing

view healthz for stage

Copy link

changeset-bot bot commented Dec 6, 2024

⚠️ No Changeset found

Latest commit: 8aee1a1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

gitguardian bot commented Dec 6, 2024

⚠️ GitGuardian has uncovered 4 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
2460751 Triggered Generic High Entropy Secret 7be2793 cmd/audiusd/env/prod.env View secret
2416686 Triggered Generic High Entropy Secret 7be2793 cmd/audiusd/env/stage.env View secret
9412812 Triggered Generic Password e237959 cmd/audiusd/entrypoint.sh View secret
14086629 Triggered Generic Password e237959 cmd/audiusd/entrypoint.sh View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Dec 6, 2024
@endline endline changed the title Infra Fog Infra Fog: Protocol Dec 6, 2024
cmd/audiusd/Dockerfile Show resolved Hide resolved
cmd/audiusd/README.md Outdated Show resolved Hide resolved
@endline endline marked this pull request as ready for review December 12, 2024 14:43
@@ -320,6 +320,7 @@ func setupNode(logger *common.Logger) (*config.Config, *cconfig.Config, error) {

// https://docs.cometbft.com/main/references/config/config.toml#log_level
cometConfig.LogLevel = envConfig.LogLevel
logger.Infof("Setting cometConfig.LogLevel = envConfig.LogLevel: %s, %s", cometConfig.LogLevel, envConfig.LogLevel)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will follow up with a separate logging PR

@endline endline requested a review from alecsavvy December 13, 2024 00:18
Comment on lines +55 to +62
**CLOUDFLARE PROXY**

If you are using Cloudflare Proxy, and want to use auto TLS, you will need to start with DNS-only mode:
- Configure Cloudflare in DNS-only mode initially (not proxied)
- Let the node obtain its LetsEncrypt certificate (requires HTTP access)
- Once certificate is obtained, you can enable Cloudflare proxy

See Cloudflare [ssl-mode docs](https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent

POSTGRES_USER="postgres"
POSTGRES_PASSWORD="postgres"
POSTGRES_DATA_DIR=${POSTGRES_DATA_DIR:-/data/postgres}
export dbUrl="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?sslmode=disable"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this not override dbUrl needed for remote postgres, e.g. in dn4?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good eye!.
yeah i need to come back and work out how to handle discovery.
we will use a much simpler entrypoint control flow there (i.e. skip the entire postgres part of this script) as discovery will still use a pg container.
furthermore, discovery only needs the core app and not all the encoding deps, so we may produce a different docker artifact altogether. that would be say 10mb and not 1.5gb!

@endline endline merged commit 1aed8b5 into main Dec 13, 2024
7 of 9 checks passed
@endline endline deleted the endl/fog branch December 13, 2024 01:23
audius-infra pushed a commit that referenced this pull request Dec 13, 2024
[1aed8b5] Infra Fog: Protocol (#10641) endline
[1f27a8e] Add non-genesis validators to comet consensus (#10693) Danny
[cbcb93d] [PAY-3622] Update encryption patterns and add manager delegation (#10690) Farid Salau
[e1fe442] [C-5519, C-5521] Add guest mode UI in claim rewards email (#10697) Dylan Jeffers
[05ee385] [C-5520] Add guest checkout UI in purchase and sale emails (#10696) Dylan Jeffers
[1811158] aa backfill program (#10645) alecsavvy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants