Skip to content

Commit

Permalink
Upgrade dev and linter containers to Ubuntu 24.04 (#1885)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelnano authored May 14, 2024
1 parent c3bbb02 commit a21bf7d
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 22 deletions.
8 changes: 4 additions & 4 deletions docker.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DOCKER_IMAGE_TAG=202308171823
LINTER_IMAGE_DIGEST=7951055b1a6cfabc9746123c5053499300156458c8be8e743610350c4cb40ee7
DEV_IMAGE_DIGEST=9d0f8e14da751b022311d2107b46be7c4d0a97405f3523b0ce1bc15aede37774
DEV_IMAGE_WITH_EXTRAS_DIGEST=d80a9d02e2b6f01114f128a7116d99e13bbceb688a8e2e6e36f18f5ed84440a7
DOCKER_IMAGE_TAG=202405102250
LINTER_IMAGE_DIGEST=e9987c1c23d0d9c8443b3973f7f3482e5737b10053ce56f58fa59e4cb4f32291
DEV_IMAGE_DIGEST=7e38004cc30aa4f26b800ecad67c8e38fdffdfed8b3be0d3084e1706a60a4f21
DEV_IMAGE_WITH_EXTRAS_DIGEST=c405c9b28a8ed91785ad1115df146b80f275e88f93e4c5a516ad4bb7d4508112
4 changes: 2 additions & 2 deletions tools/chef/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ DEV_IMAGE_WITH_EXTRAS_DIGEST := $$($(DOCKER) inspect --format='{{index .RepoDige
.PHONY: build_and_push_base_image
build_and_push_base_image:
$(PACKER) build \
-var "base_image_and_tag=ubuntu:22.04" \
-var "base_image_and_tag=ubuntu:24.04" \
-var "generated_image_repository=$(REPOSITORY)/base_image" \
-var "generated_image_tag=$(BASE_IMAGE_VERSION)" \
packer_docker_base.json
Expand All @@ -53,7 +53,7 @@ build_and_push_base_image:
.PHONY: build_and_push_dev_images
build_and_push_dev_images:
$(PACKER) build \
-var "base_image_and_tag=ubuntu:22.04" \
-var "base_image_and_tag=ubuntu:24.04" \
-var "generated_image_repository=$(REPOSITORY)/linter_image" \
-var "generated_image_tag=$(DEV_IMAGE_VERSION)" \
packer_docker_linters.json
Expand Down
2 changes: 1 addition & 1 deletion tools/chef/base_image_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
202308171745
202405102217
6 changes: 3 additions & 3 deletions tools/chef/cookbooks/px_dev/attributes/linux_debs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
return
end

default['clang-linters']['version'] = '15.0-pl9'
default['clang-linters']['version'] = '15.0-pl12'
default['clang-linters']['deb'] =
"https://storage.googleapis.com/pixie-dev-public/clang/#{default['clang-linters']['version']}/clang-linters-#{default['clang-linters']['version']}.deb"
"https://github.com/pixie-io/dev-artifacts/releases/download/clang%2F#{default['clang-linters']['version']}/clang-linters-#{default['clang-linters']['version']}.deb"
default['clang-linters']['deb_sha256'] =
'8a954e9a7e89cf97f91a3bea0119422f6c2f8044380bd204e56b96a098637a2c'
'f264b9aa1afab52d732282a0e2177d8a372cefc71d791fd45e6e2e4df4e8ac43'
2 changes: 1 addition & 1 deletion tools/chef/cookbooks/px_dev/recipes/arcanist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

git '/opt/px_dev/tools/arcanist' do
repository 'https://github.com/phacility/arcanist.git'
revision 'stable'
revision 'master'
action :sync
end

Expand Down
2 changes: 1 addition & 1 deletion tools/chef/cookbooks/px_dev/recipes/linters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
end

execute 'install py linters' do
command 'python3 -m pip install flake8 flake8-mypy yamllint --no-cache-dir && python3 -m pip cache purge'
command 'python3 -m pip install --break-system-packages flake8 flake8-mypy yamllint --no-cache-dir && python3 -m pip cache purge'
end

common_remote_bin 'prototool'
Expand Down
3 changes: 1 addition & 2 deletions tools/chef/cookbooks/px_dev/recipes/linux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# Not the newest docker CE from official docker repository, but should suffice.
'docker.io',
'git',
'libncurses5',
'libncurses6',
'lcov',
'podman',
'sudo',
Expand All @@ -52,7 +52,6 @@
'libltdl-dev',
'libunwind-dev',

'qemu',
'qemu-system-arm',
'qemu-system-x86',
'qemu-user-static',
Expand Down
2 changes: 1 addition & 1 deletion tools/chef/cookbooks/px_dev/recipes/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


if node.platform_family?('debian')
apt_package ['python3-pip', 'python3.10', 'python3.10-dev'] do
apt_package ['python3-pip', 'python3.12', 'python3.12-dev'] do
action :upgrade
end

Expand Down
15 changes: 12 additions & 3 deletions tools/chef/cookbooks/px_dev_extras/attributes/linux_debs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,20 @@
return
end

default['clang']['version'] = '15.0-pl9'
default['clang']['version'] = '15.0-pl12'
default['clang']['deb'] =
"https://storage.googleapis.com/pixie-dev-public/clang/#{default['clang']['version']}/clang-#{default['clang']['version']}.deb"
"https://github.com/pixie-io/dev-artifacts/releases/download/clang%2F#{default['clang']['version']}/clang-#{default['clang']['version']}.deb"
default['clang']['deb_sha256'] =
'a7c6aa046cb3a75fae2f61e1ed43abbcce6514dd91f933bdc20f6633113994ed'
'3aef15345f70d00feaf0fada0eb76ac169e190a08576d3c375bef1b04400e552'

# The pixie built clang deb originates from bionic to keep glibc compatibility on older systems (see tools/docker/clang_deb_image/Dockerfile).
# This causes the clang binary installed above to dynamically linking libtinfo5. Starting with Ubuntu 24.04, libtinfo6 is provided upstream
# so we need to install this to have a functional /opt/px_dev clang binary.
default['libtinfo5']['version'] = '6.3-2ubuntu0.1'
default['libtinfo5']['deb'] =
"https://github.com/pixie-io/dev-artifacts/releases/download/libtinfo5%2F#{default['libtinfo5']['version']}/libtinfo5-#{default['libtinfo5']['version']}.deb"
default['libtinfo5']['deb_sha256'] =
'ab89265d8dd18bda6a29d7c796367d6d9f22a39a8fa83589577321e7caf3857b'

default['gperftools']['version'] = '2.10-pl1'
default['gperftools']['deb'] =
Expand Down
16 changes: 16 additions & 0 deletions tools/chef/cookbooks/px_dev_extras/recipes/linux_clang.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@
return
end

remote_file '/tmp/libtinfo5.deb' do
source node['libtinfo5']['deb']
mode '0644'
checksum node['libtinfo5']['deb_sha256']
end

dpkg_package 'libtinfo5' do
source '/tmp/libtinfo5.deb'
action :install
version node['libtinfo5']['version']
end

file '/tmp/libtinfo5.deb' do
action :delete
end

remote_file '/tmp/clang.deb' do
source node['clang']['deb']
mode '0644'
Expand Down
2 changes: 1 addition & 1 deletion tools/chef/packer_docker_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"recipe[px_dev::linux]"
],
"type": "chef-solo",
"version": "17.8.25"
"version": "18.4.12"
},
{
"inline": [
Expand Down
2 changes: 1 addition & 1 deletion tools/chef/packer_docker_dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"recipe[px_dev::cleanup]"
],
"type": "chef-solo",
"version": "17.8.25"
"version": "18.4.12"
},
{
"inline": [
Expand Down
2 changes: 1 addition & 1 deletion tools/chef/packer_docker_dev_extras.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"recipe[px_dev_extras]"
],
"type": "chef-solo",
"version": "17.8.25"
"version": "18.4.12"
},
{
"inline": [
Expand Down
2 changes: 1 addition & 1 deletion tools/chef/packer_docker_linters.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"recipe[px_dev::cleanup]"
],
"type": "chef-solo",
"version": "17.8.25"
"version": "18.4.12"
},
{
"inline": [
Expand Down
16 changes: 16 additions & 0 deletions tools/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ clang_gs_path := gs://pixie-dev-public/clang/$(CLANG_TAG)
clang_deb_image_tag := "gcr.io/pixie-oss/pixie-dev-public/clang_deb_builder_image:$(CLANG_VERSION)"
CLANG_BUILD_DIR := "$(BUILD_DIR)/clang-$(CLANG_TAG)"

## libtinfo5 parameters
# This is the latest libtinfo5 deb from bionic upstream. Since Ubuntu 24.04 and later
# use newer versions, this is needed to make the pixie built clang binary happy by providing
# its dynamically linked dependencies (libtinfo5).
LIBTINFO5_DEB_IMAGE_VERSION := 6.3-2ubuntu0.1
LIBTINFO5_DEB_DOWNLOAD := http://us.archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_$(LIBTINFO5_DEB_IMAGE_VERSION)_amd64.deb
libtinfo5_deb_fname := libtinfo5-$(LIBTINFO5_DEB_IMAGE_VERSION).deb

## gperftools parameters
GPERFTOOLS_DEB_IMAGE_VERSION := 2.10-pl1
gperftools_deb_fname := gperftools-pixie-$(GPERFTOOLS_DEB_IMAGE_VERSION).deb
Expand Down Expand Up @@ -151,6 +159,14 @@ upload_clang_deb: build_clang_deb_image ## Target to build and upload clang deb

cat $(CLANG_BUILD_DIR)/sha256sums

##############################################
# libtinfo5 upload
##############################################
.PHONY: upload_libtinfo5_deb
upload_libtinfo5_deb:
mkdir -p $(BUILD_DIR)
wget $(LIBTINFO5_DEB_DOWNLOAD) -O $(PWD)/$(BUILD_DIR)/$(libtinfo5_deb_fname)
$(GH_RELEASE_UPLOAD) libtinfo5 $(LIBTINFO5_DEB_IMAGE_VERSION) $(PWD)/$(BUILD_DIR)/$(libtinfo5_deb_fname)

##############################################
# GPerftools build
Expand Down

0 comments on commit a21bf7d

Please sign in to comment.