-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Update CI and Docker images to Ubuntu 22.04 #951
Comments
This package seems to be required for `make` to be present on Ubuntu 20 and 22 pelias/pelias#951
The `python` package does not exist in newer versions of Ubuntu (20 and 22), so we might as well start using the `python3` package now. pelias/pelias#951
@missinglink I'm probably going to spend a little time this weekend updating all our CI configs and Docker base image to use newer ubuntu versions. I agree with you we might as well go straight to Ubuntu 22 in general, and we should select Ubuntu 22 for our Docker baseimage. Do you think there's any value in keeping Ubuntu 20 in our CI as well? It could be nice to support both but would mean more jobs in the matrix. Also I'm thinking I'll use Github Actions variables so we can store the Ubuntu version we use across all projects in one place, and all our CI scripts can be updated without needing a commit to each repo. How's that sound? |
Sounds good, I haven't used variables but it sounds like a nice way of reducing the work to edit Configs across the various repos. I don't see a huge value in keeping ubu 20 in the matrix, for docker we will likely settle on the latest stable OS quickly and for bare-metal, people run really old versions, one of my servers is still on an older version than that, so we'd never be able to cover all of them. That said if we can do it and it's easy then why not, but if it requires a lot of conditional statements to support both i'd prefer to simply support the latest. |
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This is a new approach to managing our Ubuntu version for CI where the version comes from a Github Actions variable instead of being hardcoded. Hopefully this makes it easier for us to change the version in one go across all our repositories instead of having to make dozens of commits that are similar. The variable's value is currently set to ubuntu-22.04, so this also handles pelias/pelias#951 https://github.com/organizations/pelias/settings/variables/actions
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests and integration tests are moved to separate files for reuse - a new pull request workflow is added that only runs on external forks, and runs unit/integration tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This updates CI configuration for this repo with the following changes: - the core configuration for running unit tests is moved to _test.yml so it can be shared - a new pull request workflow is added that only runs on external forks, and runs unit tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
This gives us several more years of a supported Ubuntu version, lots of updated default packages, support for modern versions of Node.js and NPM modules, and more. pelias/pelias#951
As in pelias/docker-libpostal_baseimage#11, Ubuntu 22 has some slightly differing package install semantics where we need to install the `build-essential` package to get `make` and all the other tools needed to compile against libpostal. This Dockerfile uses a builder image to do all the compiling, and then the compiled results are moved to a new, slim, Docker image, so this change doesn't affect the final image much. It's just needed to keep everything working for Ubuntu 22 pelias/pelias#951
Okay, I've gone through all our repos with Docker images and made sure they build on All our CI for our primary repos (services, importers, schema, etc) is now running ubuntu 22 as well. All the supporting library repos (like pelias/query, dbclient, etc) have yet to be updated but those are lower priority since they are implicitly tested by the primary repos. So we can get to them someday :) Using the script below, run from a directory with all the pelias repos checked out, I can confirm everything builds on Ubuntu 22, so pelias/docker-baseimage#27 is now good to merge. After that merges, I'll kick off new Docker image builds using a no-op commit first to the docker-libpostal_baseimage repo (since its Docker image is a dependency for others), and then to all the other repos. Then we should be all 100% moved to Ubuntu 22! 🥳 Script to check that all images build#!/bin/bash
set -euo pipefail
importers="openstreetmap whosonfirst openaddresses polylines geonames transit csv-importer"
services="api placeholder libpostal-service interpolation pip-service"
libpostal_baseimage="docker-libpostal_baseimage"
schema="schema"
modules="pbf2json model query dbclient"
repos="$importers $services $schema"
echo $repos
for repo in $repos; do
echo $repo
pushd $repo
pwd
git stash
git checkout master
git fetch
git pull
git cleanup || true
branch_name="docker-ubuntu-22"
git branch -D $branch_name || true
git checkout -b $branch_name || true
sed -i 's/pelias\/baseimage/pelias\/baseimage\:ubuntu-22/' Dockerfile
sed -i 's/pelias\/libpostal_baseimage/pelias\/libpostal_baseimage\:ubuntu-22/' Dockerfile
docker build . -t pelias/$repo:ubuntu-22
popd
done |
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This is a no-op commit that simply serves to trigger CI to rebuild the Docker image with our new Ubuntu 22 baseimage pelias/pelias#951
This keeps us up to date with this critical project, allows using prebuilt packages for modern Node.js and Ubuntu versions, etc pelias/pelias#951 pelias/pelias#950
Pelias relies on Ubuntu for it's CI and Docker images, and we're currently still running Ubuntu 18.04. This version will have LTS support through 2028, but Github Actions stopped using any Ubuntu 18.04 runners in April 2023.
Most of our CI uses Ubuntu 20.04, but our Docker images are still built on Ubuntu 18.04, so we should ideally move everything to Ubuntu 22.04 (as suggested by @missinglink in pelias/docker-baseimage#20) to stay current and ensure we don't have to mess with much for while longer.
The text was updated successfully, but these errors were encountered: