-
Notifications
You must be signed in to change notification settings - Fork 694
YQ kqprun added scripts for starting prometheus and connector #14816
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
YQ kqprun added scripts for starting prometheus and connector #14816
Conversation
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢 |
cp ${2:-"$SCRIPT_DIR/configuration/connector_config.yaml"} ./connector_config.yaml | ||
sed -i "s/\${TARGET_PORT}/$1/g" ./connector_config.yaml | ||
|
||
docker run --rm --name=fq-connector-go-$1 --network host -v ./connector_config.yaml:/opt/ydb/cfg/fq-connector-go.yaml ghcr.io/ydb-platform/fq-connector-go:latest |
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.
- Не совсем понятно, зачем коннектору
--network=host
? Ведь вряд ли кто-то будет ходить в коннектор извне, кроме kqprun, который будет работать на той же машине, что и контейнер с коннектором. Да даже если надо ходить - всё равно стандартный паттерн этоdocker run -d -p <host_ip>:<host_port>:<container_port> <image_name>
. Можешь попробовать развернуть какой-нибудь Nginx и сходить на него с другой машины. Если не заработает - это значит, что какие-то яндексовские велосипеды в области файрволла блокируют сетевую доступность, и надо просить Вадима их поправить. Поэтому ты можешь использовать просто стандартные настройки сети (т. е. вообще не указывать параметр--network
), но вместо этого указать маппинг порта коннектора в тот, что тебе нужен, типаdocker run -p внешний_порт:внутренний_порт ...
. Когда всё правильно настроено на хосте,--network=host
никогда не нужен. - Исходя из п. 1, тебе не нужен кастомный конфиг коннектора: не нужно его рендерить из шаблона и не нужно монтировать в контейнер. Внутри образа с коннектором уже есть дефолтный конфиг, и, как мне кажется, его здесь будет вполне достаточно.
cp ${3:-"$SCRIPT_DIR/configuration/prometheus_config.yaml"} ./prometheus_config.yaml | ||
sed -i "s/\${TARGET_PORT}/$1/g" ./prometheus_config.yaml | ||
|
||
docker run --rm --name=prometeus-$1 --network host -v ./prometheus_config.yaml:/etc/prometheus/prometheus.yml prom/prometheus --config.file=/etc/prometheus/prometheus.yml --web.listen-address=:$2 |
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.
Всё вышесказанное относится и к контейнеру с Prometheus в том числе.
3821b24
to
9d9707c
Compare
⚪ Test history | Ya make output | Test bloat
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢 |
⚪ Test history | Ya make output | Test bloat
🟢 |
Changelog entry
Added scripts for starting prometheus and connector in kqprun
Changelog category
Description for reviewers