Skip to content

Commit

Permalink
feat mongo: packetize into 24.04 docker image
Browse files Browse the repository at this point in the history
commit_hash:c609ba4842c761f4edbaef1191d35c0efce6750e
  • Loading branch information
segoon committed Feb 10, 2025
1 parent 1174984 commit 5df43e2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -3686,6 +3686,7 @@
"scripts/human_logs.py":"taxi/uservices/userver/scripts/human_logs.py",
"scripts/kafka/ubuntu_install_kafka.sh":"taxi/uservices/userver/scripts/kafka/ubuntu_install_kafka.sh",
"scripts/migrate_from_legacy_redis_ns.sh":"taxi/uservices/userver/scripts/migrate_from_legacy_redis_ns.sh",
"scripts/mongo/ubuntu-install-mongodb.sh":"taxi/uservices/userver/scripts/mongo/ubuntu-install-mongodb.sh",
"scripts/perf-blocking-syscall":"taxi/uservices/userver/scripts/perf-blocking-syscall",
"scripts/postgres/pg_sql_codes.py":"taxi/uservices/userver/scripts/postgres/pg_sql_codes.py",
"scripts/postgres/ubuntu-install-postgresql-includes.sh":"taxi/uservices/userver/scripts/postgres/ubuntu-install-postgresql-includes.sh",
Expand Down
2 changes: 2 additions & 0 deletions scripts/docker/ubuntu-24.04-base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ RUN \
&& locale-gen en_US.UTF-8 \
&& update-locale LC_ALL="en_US.UTF-8" LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"

COPY scripts/mongo/ubuntu-install-mongodb.sh /userver_tmp/
RUN /userver_tmp/ubuntu-install-mongodb.sh

COPY scripts/clickhouse/ubuntu-install-clickhouse.sh /userver_tmp/
RUN /userver_tmp/ubuntu-install-clickhouse.sh
Expand Down
17 changes: 17 additions & 0 deletions scripts/mongo/ubuntu-install-mongodb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Exit on any error and treat unset variables as errors, print all commands
set -euox pipefail

apt install curl lsb-release

# Download mongo's GPG key
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb.gpg
chmod a+r /usr/share/keyrings/mongodb.gpg

# Add mongo to apt
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb.gpg ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/8.0 multiverse" \
| tee /etc/apt/sources.list.d/mongodb-org-8.0.list

apt update
apt install -y --no-install-recommends mongodb-org

0 comments on commit 5df43e2

Please sign in to comment.