packaging: Use Ubuntu Jammy for the server builder and base images.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9531
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: ac2121710324ee939c13b8e9239e54a088a525c3
This commit is contained in:
Samir Talwar 2023-06-20 11:33:43 +02:00 committed by hasura-bot
parent f5f3367f31
commit a394510252
3 changed files with 29 additions and 14 deletions

View File

@ -1,6 +1,7 @@
# DATE VERSION: 2023-04-03
# DATE VERSION: 2023-06-13
# Modify the above date version (YYYY-MM-DD) if you want to rebuild the image
FROM ubuntu:focal-20230412
FROM ubuntu:jammy-20230605
### NOTE! Shared libraries here need to be kept in sync with `server-builder.dockerfile`!
@ -15,13 +16,13 @@ RUN set -ex; \
RUN set -ex; \
apt-get update; \
apt-get install -y apt-transport-https curl gnupg2; \
apt-get update; \
apt-get install -y ca-certificates libkrb5-3 libpq5 libssl1.1 libnuma1 unixodbc-dev
apt-get upgrade -y; \
apt-get install -y apt-transport-https ca-certificates curl gnupg2 lsb-release; \
apt-get install -y libkrb5-3 libpq5 libnuma1 unixodbc-dev
RUN set -ex; \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -; \
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list; \
curl -fsS "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list" > /etc/apt/sources.list.d/mssql-release.list; \
curl -fsS 'https://packages.microsoft.com/keys/microsoft.asc' | apt-key add -; \
apt-get update; \
ACCEPT_EULA=Y apt-get install -y msodbcsql18; \
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
@ -33,7 +34,7 @@ RUN set -ex; \
# Install pg_dump
RUN set -ex; \
curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -; \
echo 'deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main' > /etc/apt/sources.list.d/pgdg.list; \
echo 'deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main' > /etc/apt/sources.list.d/pgdg.list; \
apt-get -y update; \
apt-get install -y postgresql-client-15; \
# delete all pg tools except pg_dump to keep the image minimal

View File

@ -256,18 +256,30 @@ function maybe_launch_hasura_container() {
function hasura_wait() {
# Wait for the graphql-engine under bench to be ready
echo -n "Waiting for graphql-engine at $HASURA_URL"
wait_time=120
echo -n "Waiting for graphql-engine at $HASURA_URL for $wait_time seconds"
if [ -z "$REQUESTED_HASURA_DOCKER_IMAGE" ]; then
echo -n " (e.g. from 'dev.sh graphql-engine')"
fi
start_time="$(date +%s)"
until curl -s "$HASURA_URL/v1/query" &>/dev/null; do
if [[ $(( "$(date +%s)" - start_time )) -gt "$wait_time" ]]; then
echo
echo 'Timed out.'
if [ -n "$HASURA_CONTAINER_NAME" ]; then
echo 'Container logs:'
docker logs -f "$HASURA_CONTAINER_NAME" 2>&1 &
docker stop "$HASURA_CONTAINER_NAME" || : >/dev/null
fi
return 1
fi
echo -n '.' && sleep 0.2
done
echo ""
echo " Ok"
echo
echo ' Ok'
echo -n "Sleeping for an additional $POST_SETUP_SLEEP_TIME seconds as requested... "
sleep "$POST_SETUP_SLEEP_TIME"
echo " Ok"
echo ' Ok'
}
#####################

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
import boto3
@ -281,7 +281,9 @@ def run_benchmark_set(benchmark_set, use_spot=True):
break
# Install any extra dependencies (TODO: bake these into AMI)
c.sudo('apt install -y jq')
c.sudo('apt-get update')
c.sudo('apt-get upgrade -y')
c.sudo('apt-get install -y jq')
# In case our heroic exception handling and cleanup attempts here fail,
# make sure this instance shuts down (and is terminated, per