Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

Conversation

@chadwhitacre
Copy link
Member

Here's the documentation to go with getsentry/self-hosted#1543. I pulled it from getsentry/self-hosted@ee2be46 and edited it somewhat.

cc: @goganchic @BYK @aminvakil

@vercel
Copy link

vercel bot commented Jun 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
develop ✅ Ready (Inspect) Visit Preview Jun 29, 2022 at 1:44PM (UTC)

@chadwhitacre
Copy link
Member Author

I considered putting this in "Releases & Upgrades" but it's more about installation. I also considered giving it a separate page like we do for other configs, but it's really about install-time vs. run-time config.

Copy link
Contributor

@emmatyping emmatyping left a comment

Choose a reason for hiding this comment

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

The text and content LGTM. I made 3 minor suggestions.

Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: Ethan Smith <[email protected]>
@chadwhitacre chadwhitacre merged commit cb88821 into master Jun 29, 2022
@chadwhitacre chadwhitacre deleted the cwlw/self-hosted-proxy-docs branch June 29, 2022 17:12
@chadwhitacre
Copy link
Member Author

Merged! Thanks for the contribution @goganchic!

Copy link
Contributor

@aminvakil aminvakil left a comment

Choose a reason for hiding this comment

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

Sorry, I've been late to party!


Here are the steps to follow:

1. Set `http_proxy`, `https_proxy` and `no_proxy` variables in the `/etc/environment` file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really a necessity?

We're using http proxy in some of our servers which are using docker and we have only changed docker systemd file.

Copy link
Contributor

Choose a reason for hiding this comment

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

When you change systemd file - it makes docker daemon to use proxy for docker pull. When you config proxy in .docker/config.json - it makes docker to set env proxy variables during docker run. /etc/environment file is required for docker build, so without it this code fails.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I didn't know that docker build is different, thanks!

https://github.com/getsentry/self-hosted/blob/e028a5ed52f835ef2fefcab0104ff047889e5470/install/build-docker-images.sh#L6 :
$dc build --build-arg "http_proxy=${http_proxy:-}" --build-arg "https_proxy=${https_proxy:-}" --build-arg "no_proxy=${no_proxy:-}" --force-rm web

So if changing /etc/environment is necessary why are we passing these build arguments to docker build and if we are passing these build arguments to docker build why we need to change /etc/environment?

Copy link
Contributor

Choose a reason for hiding this comment

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

/etc/environment provide env variables for shell and the command $dc build --build-arg "http_proxy=${http_proxy:-}" --build-arg "https_proxy=${https_proxy:-}" --build-arg "no_proxy=${no_proxy:-}" --force-rm web passes this variables to docker build. But actually we can remove all --build-arg from docker build and remove proxy args from https://github.com/getsentry/self-hosted/blob/e028a5ed52f835ef2fefcab0104ff047889e5470/install/install-wal2json.sh#L10, because ./docker/config.json does all required things. Actually we don't need /etc/environment, we need only ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants