From 9d2a54b93538f221592e50f575be3aad2ccfe63a Mon Sep 17 00:00:00 2001 From: Damian Szymanski Date: Wed, 4 May 2022 15:07:21 +0200 Subject: [PATCH 01/88] Ubuntu 22.04 preparation --- ci-ubuntu-2204-minimal.yml | 248 +++++++++++++++++ cookbooks/lib/features/basic_spec.rb | 38 +-- .../travis_ci_ubuntu_2204_minimal/.rspec | 4 + .../travis_ci_ubuntu_2204_minimal/README.md | 4 + .../attributes/default.rb | 68 +++++ .../travis_ci_ubuntu_2204_minimal/metadata.rb | 20 ++ .../recipes/default.rb | 69 +++++ packer-assets/ci-ubuntu-2204-packages.txt | 263 ++++++++++++++++++ ...untu-2204-minimal-system-info-commands.yml | 116 ++++++++ packer-assets/ubuntu-2204-normal-purge.txt | 3 + .../ubuntu-2204-system-info-commands.yml | 158 +++++++++++ 11 files changed, 956 insertions(+), 35 deletions(-) create mode 100644 ci-ubuntu-2204-minimal.yml create mode 100644 cookbooks/travis_ci_ubuntu_2204_minimal/.rspec create mode 100644 cookbooks/travis_ci_ubuntu_2204_minimal/README.md create mode 100644 cookbooks/travis_ci_ubuntu_2204_minimal/attributes/default.rb create mode 100644 cookbooks/travis_ci_ubuntu_2204_minimal/metadata.rb create mode 100644 cookbooks/travis_ci_ubuntu_2204_minimal/recipes/default.rb create mode 100644 packer-assets/ci-ubuntu-2204-packages.txt create mode 100644 packer-assets/ubuntu-2204-minimal-system-info-commands.yml create mode 100644 packer-assets/ubuntu-2204-normal-purge.txt create mode 100644 packer-assets/ubuntu-2204-system-info-commands.yml diff --git a/ci-ubuntu-2204-minimal.yml b/ci-ubuntu-2204-minimal.yml new file mode 100644 index 000000000..869b5659b --- /dev/null +++ b/ci-ubuntu-2204-minimal.yml @@ -0,0 +1,248 @@ +--- +description: Travis CI Ubuntu 22.04 build env template +variables: + chef_log_level: info + docker_repository: travisci/ci-ubuntu-2204 + docker_tag: packer-minimal-{{ timestamp }}-<%= git_desc %> + gce_account_file: "{{ env `GCE_ACCOUNT_FILE` }}" + gce_project_id: "{{ env `GCE_PROJECT_ID` }}" + image_name: travis-ci-ubuntu-2204-minimal-{{ timestamp }}-<%= git_desc %> + travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}" + travis_cookbooks_edge_branch: master + travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}" + travis_uid: "{{ env `TRAVIS_UID` }}" + docker_login_username: "{{ env `DOCKER_LOGIN_USERNAME` }}" + docker_login_password: "{{ env `DOCKER_LOGIN_PASSWORD` }}" + docker_login_server: "{{ env `DOCKER_LOGIN_SERVER` }}" +builders: +- type: googlecompute + name: googlecompute + communicator: ssh + ssh_timeout: 10m + ssh_port: 22 + ssh_username: packer + image_description: Travis CI Ubuntu 22.04 + account_file: "{{ user `gce_account_file` }}" + project_id: "{{ user `gce_project_id` }}" + source_image: jammy-20220426 + source_image_project_id: travis-staging-1 + image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] + zone: us-central1-a + image_name: "{{ user `image_name` }}" + machine_type: n2-standard-4 + disk_size: 50 + tags: + - ci + - ubuntu-2204 + - travis-ci-packer-templates +- type: lxd + name: lxd + image: images:ubuntu/jammy + output_image: "{{ user `image_name` }}" + publish_properties: + - description: Travis CI jammy build env template! +- type: docker + name: docker + login: true + login_username: "{{ user `docker_login_username` }}" + login_password: "{{ user `docker_login_password` }}" + login_server: "{{ user `docker_login_server` }}" + ssh_pty: true + <% if RUBY_PLATFORM =~ /powerpc64/ %> + image: "travisci/gce-parity:22.04-ppc64le" + <% else %> + image: "travisci/gce-parity:22.04" + <% end %> + run_command: + - -d + - -v + - <%= Dir.pwd %>/tmp/packer-builder-tmp:/tmp + - --privileged=true + - "{{ .Image }}" + - /sbin/init + commit: true +provisioners: +- type: shell + inline: sleep 10 + only: + - googlecompute +- type: shell + inline: apt-get update -yqq && apt-get install sudo -yqq + # Delay script execution until after /sbin/init has cleared out /tmp, + # otherwise the uploaded script gets deleted before it can be run. + # TODO: Decide if the container startup command should be /bin/bash and the + # /sbin/init call made the first provision step instead of this workaround: + # https://github.com/travis-ci/packer-templates/issues/544#issuecomment-344971947 + pause_before: 5s + only: + - docker +- type: file + source: tmp/travis-cookbooks + destination: /var/tmp/travis-cookbooks +- type: file + source: tmp/git-meta + destination: /var/tmp/git-meta +- type: file + source: packer-assets/ubuntu-2204-normal-purge.txt + destination: /var/tmp/purge.txt +- type: file + source: packer-assets/ci-ubuntu-2204-packages.txt + destination: /var/tmp/packages.txt + only: + - googlecompute + - lxd +- type: file + source: packer-assets/ci-ubuntu-2204-docker-packages.txt + destination: /var/tmp/packages.txt + only: + - docker +- type: shell + scripts: + - packer-scripts/packer-env-dump + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" +- type: shell + scripts: + - packer-scripts/remove-default-users + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" + only: + - docker + - googlecompute + - lxd + # Recommendations for lxd images +- type: shell + inline: "systemctl mask sys-kernel-config.mount" + only: + - lxd +- type: shell + inline: "systemctl mask systemd-modules-load.service" + only: + - lxd +- type: shell + inline: "apt install snapd -y && snap install core" + only: + - lxd +- type: shell + inline: "apt-get remove --purge cloud-init --yes" + only: + - lxd + # end Recommendations +- type: shell + scripts: + - packer-scripts/pre-chef-bootstrap-focal + - packer-scripts/clone-travis-cookbooks + environment_vars: + - SKIP_APT_UPGRADE=1 + - TRAVIS_COOKBOOKS_BRANCH={{ user `travis_cookbooks_branch` }} + - TRAVIS_COOKBOOKS_SHA={{ user `travis_cookbooks_sha` }} + - TRAVIS_UID={{ user `travis_uid` }} + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" +- type: file + source: packer-assets/ubuntu-2204-minimal-system-info-commands.yml + destination: /var/tmp/ubuntu-2204-minimal-system-info-commands.yml +- type: shell + inline: chmod 0644 /var/tmp/ubuntu-2204-minimal-system-info-commands.yml +- type: chef-solo + version: 17.6.18 + config_template: chef-solo.rb.tmpl + <% if ENV['CHEF_PROFILING'] %> + execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo --chef-license accept-silent -F doc --no-color -c {{.ConfigPath}} -j {{.JsonPath}}" + <% else %> + execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo --chef-license accept-silent --no-color -c {{.ConfigPath}} -j {{.JsonPath}}" + <% end %> + <% if ENV['BUILDER'] == "lxd" %> + # packer lxd builder copy cookbooks to wrong directory + execute_command: "rsync -a --delete-after /tmp/packer-chef-solo/cookbooks-0/cookbooks/ /tmp/packer-chef-solo/cookbooks-0/ && \ + {{if .Sudo}}sudo {{end}}chef-solo --chef-license accept-silent --no-color -c {{.ConfigPath}} -j {{.JsonPath}}" + <% end %> + cookbook_paths: + - cookbooks + <% if ENV['COOKBOOKS_LOCAL'] && ENV['TRAVIS_COOKBOOKS_DIR'] %> + - <%= ENV['TRAVIS_COOKBOOKS_DIR'] %>/cookbooks + - <%= ENV['TRAVIS_COOKBOOKS_DIR'] %>/community-cookbooks + <% else %> + remote_cookbook_paths: + - /tmp/chef-stuff/travis-cookbooks/cookbooks + - /tmp/chef-stuff/travis-cookbooks/community-cookbooks + <% end %> + run_list: + - recipe[travis_ci_ubuntu_2204_minimal] + <% if ENV['CHEF_PROFILING'] %> + - recipe[poise-profiler] + <% end %> +- type: shell + scripts: + - packer-scripts/ensure-travis-user + - packer-scripts/purge + - packer-scripts/disable-apparmor + - packer-scripts/run-serverspecs + - packer-scripts/test-system-info-output + - packer-scripts/dump-dpkg-manifest + - packer-scripts/create-bin-lib-checksums + - packer-scripts/cleanup + # - packer-scripts/minimize + environment_vars: + - DISPLAY=:99.0 + - SPEC_SUITES=travis_packer_templates + - TRAVIS_OBFUSCATE_PASSWORD=1 + - TRAVIS_UID={{ user `travis_uid` }} + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" +- type: shell + environment_vars: + - TRAVIS_OBFUSCATE_PASSWORD=1 + - TRAVIS_UID={{ user `travis_uid` }} + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" + inline: + - "find /etc/systemd -type f -o -type l" + # - "rm -v /etc/systemd/system/network-online.target.wants/networking.service" + # - "rm -v /etc/systemd/system/multi-user.target.wants/networking.service" +- type: shell + scripts: + - packer-scripts/create-image-metadata-tarball + environment_vars: + - IMAGE_METADATA_TARBALL=/var/tmp/image-metadata-{{ user `image_name` }}.tar.bz2 + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" +- type: file + source: /var/tmp/image-metadata-{{ user `image_name` }}.tar.bz2 + destination: tmp/image-metadata-{{ user `image_name` }}.tar.bz2 + direction: download +post-processors: +- + - type: docker-tag + repository: "{{ user `docker_repository` }}" + tag: "{{ user `docker_tag` }}" + only: + - docker + - type: shell-local + scripts: bin/docker-push + environment_vars: + - DOCKER_DEST={{ user `docker_repository` }}:{{ user `docker_tag` }} + only: + - docker +- + - type: shell-local + script: bin/job-board-register + environment_vars: + - IMAGE_NAME={{ user `image_name` }} + only: + - googlecompute + - lxd + - type: shell-local + script: bin/job-board-register + environment_vars: + - IMAGE_NAME={{ user `docker_repository` }}:{{ user `docker_tag` }} + only: + - docker +- + - type: shell-local + script: bin/write-latest-image-name + - type: shell-local + script: bin/lxc-export.sh + environment_vars: + - IMAGE_NAME={{ user `image_name` }} + only: + - lxd + - type: shell-local + inline: + - echo {{ user `image_name` }} > /tmp/packer-build-image-name + only: + - lxd diff --git a/cookbooks/lib/features/basic_spec.rb b/cookbooks/lib/features/basic_spec.rb index 41445e6da..ec42757e0 100644 --- a/cookbooks/lib/features/basic_spec.rb +++ b/cookbooks/lib/features/basic_spec.rb @@ -104,32 +104,6 @@ def bzr_project end end -describe 'ccache installation' do - describe command('ccache -V') do - its(:exit_status) { should eq 0 } - end - - describe 'ccache commands are executed' do - describe command('ccache -s') do - its(:stdout) do - should include( - 'cache directory', - 'cache hit', - 'cache miss', - 'files in cache', - 'max cache size' - ) - end - end - - describe command('ccache -M 0.5') do - its(:stdout) do - should match(/Set cache size limit to (512\.0 Mbytes|500\.0 MB)/) - end - end - end -end - if os[:arch] !~ /aarch64|arm64/ describe 'clang installation' do describe command('clang -v') do @@ -465,7 +439,7 @@ def hg_project if os[:arch] !~ /aarch64/ describe command('psql --version') do - its(:stdout) { should match(/^psql.+(9\.[4-6]+\.[0-9]+|10\.[0-9]{1,2}|11\.[0-9]{1,2}|12\.[0-9]{1,2}|13\.[0-9]{1,2})/) } + its(:stdout) { should match(/^psql.+(9\.[4-6]+\.[0-9]+|10\.[0-9]{1,2}|11\.[0-9]{1,2}|12\.[0-9]{1,2}|13\.[0-9]{1,2}|14\.[0-9]{1,2})/) } its(:exit_status) { should eq 0 } end end @@ -521,7 +495,7 @@ def hg_project describe 'rvm commands' do describe command('rvm list') do its(:stdout) { should include('current') } - its(:stdout) { should match(/ruby-2\.[234567]\.\d/) } + its(:stdout) { should match(/ruby-[23]\.[1234567]\.\d/) } its(:stderr) { should be_empty } end @@ -632,12 +606,6 @@ def svn_project it { should be_mounted.with(type: 'tmpfs') } end -describe 'travis_build_environment packages' do - Support.base_packages.each do |package_name| - describe(package(package_name)) { it { should be_installed } } - end -end - describe user('travis') do it { should exist } it { should have_home_directory '/home/travis' } @@ -795,7 +763,7 @@ def test_txt end describe command('ldconfig -p | grep libldap') do - its(:stdout) { should match(/libldap_r/) } + its(:stdout) { should match(/libldap/) } its(:exit_status) { should eq 0 } end diff --git a/cookbooks/travis_ci_ubuntu_2204_minimal/.rspec b/cookbooks/travis_ci_ubuntu_2204_minimal/.rspec new file mode 100644 index 000000000..d8e1838e0 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204_minimal/.rspec @@ -0,0 +1,4 @@ +--color +--format documentation +--require support +--order rand diff --git a/cookbooks/travis_ci_ubuntu_2204_minimal/README.md b/cookbooks/travis_ci_ubuntu_2204_minimal/README.md new file mode 100644 index 000000000..48603692c --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204_minimal/README.md @@ -0,0 +1,4 @@ +travis_ci_ubuntu_1804_minimal Cookbook +============================ + +A wrapper cookbook for the ubuntu 1804 minimal CI image. diff --git a/cookbooks/travis_ci_ubuntu_2204_minimal/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204_minimal/attributes/default.rb new file mode 100644 index 000000000..bbada378d --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204_minimal/attributes/default.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +override['travis_java']['default_version'] = '' +override['travis_java']['alternate_versions'] = [] + +override['travis_phpenv']['prerequisite_recipes'] = [] +override['travis_phpbuild']['prerequisite_recipes'] = [] + +override['travis_perlbrew']['perls'] = [] +override['travis_perlbrew']['modules'] = [] +override['travis_perlbrew']['prerequisite_packages'] = [] + +gimme_versions = %w[ + 1.11.1 +] + +override['travis_build_environment']['gimme']['versions'] = gimme_versions +override['travis_build_environment']['gimme']['default_version'] = gimme_versions.max + +override['travis_build_environment']['pythons'] = [] +override['travis_build_environment']['python_aliases'] = {} +override['travis_build_environment']['pip']['packages'] = {} +override['travis_build_environment']['system_python']['pythons'] = [] + +override['travis_build_environment']['nodejs_default'] = '' +override['travis_build_environment']['nodejs_versions'] = [] +override['travis_build_environment']['nodejs_aliases'] = {} +override['travis_build_environment']['nodejs_default_modules'] = [] + +override['travis_system_info']['commands_file'] = \ + '/var/tmp/ubuntu-2204-minimal-system-info-commands.yml' + +rubies = %w[ + 3.1.2 +] +# override['travis_build_environment']['rubies'] = %w[2.4.6 2.5.5 2.6.3] +override['travis_build_environment']['default_ruby'] = rubies.reject { |n| n =~ /jruby/ }.max +override['travis_build_environment']['rubies'] = rubies +override['travis_build_environment']['php_versions'] = [] +override['travis_build_environment']['php_aliases'] = {} +override['travis_build_environment']['otp_releases'] = [] +override['travis_build_environment']['elixir_versions'] = [] +override['travis_build_environment']['default_elixir_version'] = '' +override['travis_build_environment']['hhvm_enabled'] = false +override['travis_build_environment']['update_hostname'] = false +override['travis_build_environment']['use_tmpfs_for_builds'] = false +override['travis_build_environment']['install_gometalinter_tools'] = false +override['travis_build_environment']['mercurial_install_type'] = 'pip' +override['travis_build_environment']['mercurial_version'] = '5.3' +override['travis_packer_templates']['job_board']['stack'] = 'ubuntu-2204-minimal' +override['travis_packer_templates']['job_board']['features'] = %w[ + basic + disabled-ipv6 + docker + docker-compose + go-toolchain + perl_interpreter + perlbrew + python_interpreter + ruby_interpreter +] +override['travis_packer_templates']['job_board']['languages'] = %w[ + __ubuntu_2204_minimal__ + minimal + bash + shell + sh +] diff --git a/cookbooks/travis_ci_ubuntu_2204_minimal/metadata.rb b/cookbooks/travis_ci_ubuntu_2204_minimal/metadata.rb new file mode 100644 index 000000000..c973adab4 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204_minimal/metadata.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +name 'travis_ci_ubuntu_1804_minimal' +maintainer 'Travis CI GmbH' +maintainer_email 'contact+travis-ci-ubuntu-1804-minimal-cookbook@travis-ci.org' +license 'MIT' +description 'Installs/Configures travis_ci_ubuntu_1804_minimal' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version '0.1.0' +source_url 'https://github.com/travis-ci/packer-templates' +issues_url 'https://github.com/travis-ci/packer-templates/issues' + +depends 'travis_build_environment' +depends 'travis_docker' +depends 'travis_java' +depends 'travis_jdk' +depends 'travis_packer_templates' +depends 'travis_perlbrew' +depends 'travis_postgresql' +depends 'travis_system_info' diff --git a/cookbooks/travis_ci_ubuntu_2204_minimal/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204_minimal/recipes/default.rb new file mode 100644 index 000000000..495d9e87e --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204_minimal/recipes/default.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Cookbook Name:: travis_ci_ubuntu_1804_minimal +# Recipe:: default +# +# Copyright 2017, Travis CI GmbH +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +include_recipe 'travis_build_environment::apt' +include_recipe 'travis_packer_templates' +include_recipe 'travis_build_environment' + +if node['travis_packer_templates']['env']['PACKER_BUILDER_TYPE'] == 'docker' + if node['kernel']['machine'] == 'ppc64le' + include_recipe 'travis_docker::package' + else + include_recipe 'travis_docker::binary' + end +else + if node['travis_packer_templates']['env']['PACKER_BUILDER_TYPE'] == 'lxd' + node.override['travis_docker']['update_grub'] = false + end + include_recipe 'travis_docker' + include_recipe 'travis_build_environment::ramfs' +end + +include_recipe 'travis_docker::compose' +if node['kernel']['machine'] == 'ppc64le' + include_recipe 'travis_java' +else + include_recipe 'travis_jdk' +end +include_recipe 'travis_perlbrew::multi' +include_recipe 'travis_postgresql::pgdg' + +# HACK: peridot-specific shims! +execute 'ln -svf /usr/bin/hashdeep /usr/bin/md5deep' + +log 'trigger writing node attributes' do + notifies :run, 'ruby_block[write node attributes]' +end + +log 'trigger job-board registration' do + notifies :run, 'ruby_block[write job-board registration bits]' +end + +include_recipe 'travis_system_info' + +# HACK: force removal of ~/.pearrc until a decision is reached on if they are +# good or bad +execute 'rm -f /home/travis/.pearrc' diff --git a/packer-assets/ci-ubuntu-2204-packages.txt b/packer-assets/ci-ubuntu-2204-packages.txt new file mode 100644 index 000000000..c2ce672c2 --- /dev/null +++ b/packer-assets/ci-ubuntu-2204-packages.txt @@ -0,0 +1,263 @@ +acpid +adduser +apparmor +apport +apport-symptoms +apt +apt-transport-https +apt-utils +apt-xapian-index +aptitude +aptitude-common +at +autoconf +automake +base-files +base-passwd +bash +bash-completion +bc +bind9-host +binutils-doc +bison +bsdmainutils +bsdutils +build-essential +busybox-initramfs +busybox-static +byobu +bzip2 +bzr +ca-certificates +ccache +command-not-found +console-setup +coreutils +cpio +cron +cryptsetup +cryptsetup-bin +curl +dash +debconf +debconf-i18n +debianutils +dh-python +diffutils +dmsetup +dnsutils +dosfstools +dpkg +e2fslibs +e2fsprogs +eatmydata +ed +eject +emacs-nox +ethtool +file +findutils +flex +friendly-recovery +ftp +fuse +gawk +gcc +gdisk +geoip-database +gettext +gettext-base +gir1.2-glib-2.0 +git +gnupg +gnupg2 +gpgv +grep +groff-base +grub-common +grub2-common +gzip +hashdeep +haveged +hdparm +hostname +imagemagick +info +init-system-helpers +initramfs-tools +initramfs-tools-bin +install-info +iproute2 +iptables +iputils-ping +iputils-tracepath +irqbalance +isc-dhcp-client +isc-dhcp-common +iso-codes +kbd +keyboard-configuration +klibc-utils +kmod +krb5-locales +language-pack-en +laptop-detect +lemon +less +libbz2-dev +libc-client2007e-dev +libcurl4-gnutls-dev +libexpat1-dev +libffi-dev +libfreetype6-dev +libgdbm-dev +libgmp3-dev +libicu-dev +libjpeg8-dev +libkrb5-dev +libldap2-dev +libltdl-dev +libmcrypt-dev +libmhash-dev +libmysqlclient-dev +libncurses5-dev +libncursesw5-dev +libossp-uuid-dev +libpng-dev +libpq-dev +libreadline-dev +libsasl2-dev +libsqlite3-dev +libssl-dev +libtidy-dev +libxml2-dev +libxslt1-dev +libyaml-dev +linux-firmware +locales +lockfile-progs +login +logrotate +lsb-base +lsb-release +lshw +lsof +ltrace +lvm2 +makedev +man-db +manpages +mawk +mime-support +mingw-w64 +mlocate +mount +mtr-tiny +mysql-client +nano +ncurses-base +ncurses-bin +ncurses-term +net-tools +netbase +netcat-openbsd +ntfs-3g +openssh-client +openssh-server +openssh-sftp-server +openssl +os-prober +overlayroot +parted +passwd +patch +pciutils +perl +perl-base +pkg-config +plymouth +plymouth-theme-ubuntu-text +pollinate +postgresql-client +powermgmt-base +procps +psmisc +python3 +python3-apport +python3-apt +python3-commandnotfound +python3-dbus +python3-distupgrade +python3-gdbm +python3-gi +python3-minimal +python3-newt +python3-problem-report +python3-pycurl +python3-software-properties +python3-update-manager +ragel +re2c +readline-common +resolvconf +rsync +rsyslog +ruby +run-one +screen +sed +sensible-utils +sgml-base +shared-mime-info +snapcraft +software-properties-common +sqlite3 +ssh-import-id +strace +subversion +sudo +sysvinit-utils +tar +tasksel +tasksel-data +tcpd +tcpdump +telnet +thin-provisioning-tools +time +tmate +tmux +tzdata +ubuntu-keyring +ubuntu-minimal +ubuntu-release-upgrader-core +ucf +udev +ufw +unzip +update-manager-core +update-notifier-common +usbutils +util-linux +uuid-dev +uuid-runtime +vim +vim-common +vim-runtime +vim-tiny +w3m +wamerican +wget +whiptail +wireless-regdb +x11-utils +xauth +xfsprogs +xkb-data +xml-core +xz-utils +zerofree +zip +zlib1g +zlib1g-dev +ant diff --git a/packer-assets/ubuntu-2204-minimal-system-info-commands.yml b/packer-assets/ubuntu-2204-minimal-system-info-commands.yml new file mode 100644 index 000000000..e91e2aed2 --- /dev/null +++ b/packer-assets/ubuntu-2204-minimal-system-info-commands.yml @@ -0,0 +1,116 @@ +--- +NOTE: this is a generated file +stack: ubuntu_2204_minimal +commands: + linux: + - command: date -u + name: Build image provisioning date and time + - command: lsb_release -a + name: Operating System Details + - command: systemctl --version + name: Systemd Version + pipe: head -n 1 + osx: + - command: date + name: Build image provisioning date and time + - command: sw_vers + name: Operating System Details + common: + - command: git --version + name: git version + - command: bash --version + pipe: head -1 + name: bash version + - command: gcc --version + name: gcc version + pipe: head -n 1 + - command: docker version + name: docker version + - command: clang --version + name: clang version + pipe: head -n 1 + - command: jq --version + name: jq version + - command: bats --version + name: bats version + - command: shellcheck --version + name: shellcheck version + pipe: awk '/^version:/ { print $2 }' + - command: shfmt -version + name: shfmt version + - command: ccache -V + name: ccache version + pipe: awk '/^ccache version/{print $NF; exit}' + - command: cmake --version + name: cmake version + pipe: head -n 1 + - command: heroku version + name: heroku version + - command: convert --version + pipe: head -1 + name: imagemagick version + - command: md5deep -v + name: md5deep version + - command: hg version + name: mercurial version + pipe: awk -F'[)(]' '$2~/version/{print $2; exit}' + - command: mysql --version + name: mysql version + - command: openssl version + name: openssl version + - command: packer --version + name: packer version + - command: psql --version + name: postgresql client version + - command: ragel -v + name: ragel version + pipe: head -n 1 + - command: ssh -V + name: ssh client version + - command: svn --version + name: subversion version + pipe: awk '/^svn, version/{print $0, exit}' + - command: sudo -V + name: sudo version + pipe: awk '/^Sudo version/{print $NF; exit}' + - command: gzip --version + name: gzip version + pipe: head -n 1 + - command: bzip2 --version + name: bzip2 version + - command: zip --version + name: zip version + pipe: awk '/^This is Zip/{print $3, $4; exit}' + - command: unzip --version + name: unzip version + - command: vim --version + name: vim version + pipe: head -n 1 + - command: lsof -v + name: lsof version + pipe: awk '/^ +revision:/ { print $2 }' + - command: iptables --version + name: iptables version + - command: curl --version + pipe: head -1 + name: curl version + - command: wget --version + pipe: head -1 + name: wget version + - command: rsync --version + pipe: head -1 + name: rsync version + - command: gimme --version + name: gimme version + - command: nvm --version + name: nvm version + - command: perlbrew --version + name: perlbrew version + - command: phpenv --version + name: phpenv version + - command: rvm --version + name: rvm version + - command: ruby --version + name: default ruby version + - command: python --version + name: default python version diff --git a/packer-assets/ubuntu-2204-normal-purge.txt b/packer-assets/ubuntu-2204-normal-purge.txt new file mode 100644 index 000000000..83c69bee7 --- /dev/null +++ b/packer-assets/ubuntu-2204-normal-purge.txt @@ -0,0 +1,3 @@ +popularity-contest +sshguard +unattended-upgrades diff --git a/packer-assets/ubuntu-2204-system-info-commands.yml b/packer-assets/ubuntu-2204-system-info-commands.yml new file mode 100644 index 000000000..625358830 --- /dev/null +++ b/packer-assets/ubuntu-2204-system-info-commands.yml @@ -0,0 +1,158 @@ +--- +NOTE: this is a generated file +stack: ubuntu_2204 +commands: + linux: + - command: date -u + name: Build image provisioning date and time + - command: lsb_release -a + name: Operating System Details + - command: systemctl --version + name: Systemd Version + pipe: head -n 1 + osx: + - command: date + name: Build image provisioning date and time + - command: sw_vers + name: Operating System Details + common: + - command: git --version + name: git version + - command: bash --version + pipe: head -1 + name: bash version + - command: gcc --version + name: gcc version + pipe: head -n 1 + - command: docker version + name: docker version + - command: clang --version + name: clang version + pipe: head -n 1 + - command: jq --version + name: jq version + - command: bats --version + name: bats version + - command: shellcheck --version + name: shellcheck version + pipe: awk '/^version:/ { print $2 }' + - command: shfmt -version + name: shfmt version + - command: ccache -V + name: ccache version + pipe: awk '/^ccache version/{print $NF; exit}' + - command: cmake --version + name: cmake version + pipe: head -n 1 + - command: heroku version + name: heroku version + - command: convert --version + pipe: head -1 + name: imagemagick version + - command: md5deep -v + name: md5deep version + - command: hg version + name: mercurial version + pipe: awk -F'[)(]' '$2~/version/{print $2; exit}' + - command: mysql --version + name: mysql version + - command: openssl version + name: openssl version + - command: packer --version + name: packer version + - command: psql --version + name: postgresql client version + - command: ragel -v + name: ragel version + pipe: head -n 1 + - command: ssh -V + name: ssh client version + - command: svn --version + name: subversion version + pipe: awk '/^svn, version/{print $0, exit}' + - command: sudo -V + name: sudo version + pipe: awk '/^Sudo version/{print $NF; exit}' + - command: gzip --version + name: gzip version + pipe: head -n 1 + - command: bzip2 --version + name: bzip2 version + - command: zip --version + name: zip version + pipe: awk '/^This is Zip/{print $3, $4; exit}' + - command: unzip --version + name: unzip version + - command: vim --version + name: vim version + pipe: head -n 1 + - command: lsof -v + name: lsof version + pipe: awk '/^ +revision:/ { print $2 }' + - command: iptables --version + name: iptables version + - command: curl --version + pipe: head -1 + name: curl version + - command: wget --version + pipe: head -1 + name: wget version + - command: rsync --version + pipe: head -1 + name: rsync version + - command: gimme --version + name: gimme version + - command: nvm --version + name: nvm version + - command: perlbrew --version + name: perlbrew version + - command: phpenv --version + name: phpenv version + - command: rvm --version + name: rvm version + - command: ruby --version + name: default ruby version + - command: python --version + name: default python version + - command: couchdb -V + name: CouchDB version + pipe: perl -n -e '/CouchDB ([\d\.]+)/ && {print "couchdb $1\n"}' + - name: ElasticSearch version + port: 9200 + command: curl localhost:9200 + pipe: awk -F\" '/number/ { print $4 }' + - command: ls -d /usr/local/firefox-* + name: Installed Firefox version + pipe: awk -F- '{print "firefox", $2}' + - command: mongod --version + name: MongoDB version + pipe: perl -n -e '/version v(.*)$/ && { print "MongoDB $1\n" }' + - command: "/usr/local/phantomjs/bin/phantomjs --version" + name: PhantomJS version + - command: dpkg -l + name: Pre-installed PostgreSQL versions + pipe: awk '$2 ~ /^postgresql-[0-9]+\.[0-9]+$/ {print $3}' | grep -E --only '^[^-]+' + - command: redis-server --version + name: Redis version + pipe: perl -n -e '/v=([\d\.]+)/ && {print "redis-server $1\n"}' + - command: gimme -l + name: Pre-installed Go versions + - command: ant -version + name: ant version + - command: mvn -version + name: mvn version + pipe: head -n 1 + - command: gradle -version + name: gradle version + pipe: awk '/Welcome to/{print $3, $4}' + - command: lein1 version + - command: lein2 version + - command: lein version + - command: nvm list + name: Pre-installed Node.js versions + pipe: env GREP_COLORS='mt=01;32' egrep -o '(iojs-)?v[0-9\.]+' | sort | uniq + - command: phpenv versions + - command: composer --version + - command: rvm list + name: Pre-installed Ruby versions + pipe: env GREP_COLORS='mt=01;32' egrep -o '(j?ruby|rbx|ree)-[^ ]+' | sort | uniq From 3ff7df0704e166de17f7f050d3d4a5efac857362 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 31 May 2022 10:01:22 +0200 Subject: [PATCH 02/88] ubuntu 2204 initial config for full image --- ci-ubuntu-2204.yml | 274 ++++++++++++++++++ cookbooks/travis_ci_ubuntu_2204/README.md | 4 + .../attributes/default.rb | 210 ++++++++++++++ .../travis_ci_ubuntu_2204/recipes/default.rb | 97 +++++++ .../travis_ci_ubuntu_2204/recipes/erlang.rb | 15 + .../travis_ci_ubuntu_2204/recipes/mariadb.rb | 17 ++ .../travis_ci_ubuntu_2204/recipes/mongodb.rb | 19 ++ .../travis_ci_ubuntu_2204/recipes/mysql.rb | 41 +++ .../recipes/postgresql.rb | 29 ++ .../templates/default/ci_user/dot_my.cnf.erb | 11 + .../templates/default/pg_hba.conf.erb | 103 +++++++ 11 files changed, 820 insertions(+) create mode 100644 ci-ubuntu-2204.yml create mode 100644 cookbooks/travis_ci_ubuntu_2204/README.md create mode 100644 cookbooks/travis_ci_ubuntu_2204/attributes/default.rb create mode 100644 cookbooks/travis_ci_ubuntu_2204/recipes/default.rb create mode 100644 cookbooks/travis_ci_ubuntu_2204/recipes/erlang.rb create mode 100644 cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb create mode 100644 cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb create mode 100644 cookbooks/travis_ci_ubuntu_2204/recipes/mysql.rb create mode 100644 cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb create mode 100644 cookbooks/travis_ci_ubuntu_2204/templates/default/ci_user/dot_my.cnf.erb create mode 100644 cookbooks/travis_ci_ubuntu_2204/templates/default/pg_hba.conf.erb diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml new file mode 100644 index 000000000..9ce712897 --- /dev/null +++ b/ci-ubuntu-2204.yml @@ -0,0 +1,274 @@ +--- +description: Travis CI Ubuntu 22.04 build env template +variables: + chef_log_level: info + docker_repository: travisci/ci-ubuntu-2204 + docker_tag: packer-{{ timestamp }}-<%= git_desc %> + gce_account_file: "{{ env `GCE_ACCOUNT_FILE` }}" + gce_project_id: "{{ env `GCE_PROJECT_ID` }}" + image_name: travis-ci-ubuntu-2204-{{ timestamp }}-<%= git_desc %> + travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}" + travis_cookbooks_edge_branch: master + travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}" + travis_uid: "{{ env `TRAVIS_UID` }}" + travis_subnet_id: "{{ env `TRAVIS_SUBNET_ID` }}" + travis_vpc_id: "{{ env `TRAVIS_VPC_ID` }}" + travis_source_ami: "{{ env `TRAVIS_SOURCE_AMI` }}" +builders: +- type: amazon-ebs + name: amazon-ebs + access_key: "{{ user `aws_access_key` }}" + secret_key: "{{ user `aws_secret_key` }}" + region: us-east-1 + source_ami: "{{ user `travis_source_ami` }}" + ami_name: travis-ci-worker {{ isotime "2006-01-02 15:04:06" | clean_ami_name }} + instance_type: m6g.xlarge + ssh_username: ubuntu + ami_virtualization_type: hvm + tags: + role: worker + associate_public_ip_address: true + subnet_id: "{{ user `travis_subnet_id` }}" + vpc_id: "{{ user `travis_vpc_id` }}" + source_ami_filter: + owners: + - 099720109477 +- type: googlecompute + name: googlecompute + communicator: ssh + ssh_timeout: 10m + ssh_port: 22 + ssh_username: packer + image_description: Travis CI Ubuntu 22.04 + account_file: "{{ user `gce_account_file` }}" + project_id: "{{ user `gce_project_id` }}" + source_image: ubuntu-2204-jammy-v20220423 + image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] + zone: us-central1-a + image_name: "{{ user `image_name` }}" + machine_type: n2-standard-4 + disk_size: 50 + tags: + - ci + - ubuntu-2204 + - travis-ci-packer-templates +- type: lxd + name: lxd + image: ubuntu:jammy #identifier of image taken from https://us.images.linuxcontainers.org/ + output_image: "{{ user `image_name` }}" + publish_properties: + - description: Travis CI jammy build env template! +- type: docker + name: docker + ssh_pty: true + <% if RUBY_PLATFORM =~ /powerpc64/ %> + image: "travisci/gce-parity:22.04-ppc64le" + <% else %> + image: "travisci/gce-parity:22.04" + <% end %> + run_command: + - -d + - -v + - <%= Dir.pwd %>/tmp/packer-builder-tmp:/tmp + - --privileged=true + # Disable on bionic, it's only supported overlay fs on xfs with quota + # - --storage-opt=size=11G + - "{{ .Image }}" + - /sbin/init + commit: true +provisioners: +- type: shell + inline: sleep 10 + only: + - googlecompute +- type: shell + inline: apt-get update -yqq && apt-get install sudo -yqq + # Delay script execution until after /sbin/init has cleared out /tmp, + # otherwise the uploaded script gets deleted before it can be run. + # TODO: Decide if the container startup command should be /bin/bash and the + # /sbin/init call made the first provision step instead of this workaround: + # https://github.com/travis-ci/packer-templates/issues/544#issuecomment-344971947 + pause_before: 5s + only: + - docker +- type: file + source: tmp/git-meta + destination: /var/tmp/git-meta +- type: file + source: packer-assets/ubuntu-2204-normal-purge.txt + destination: /var/tmp/purge.txt +- type: file + source: packer-assets/ci-ubuntu-2204-packages.txt + destination: /var/tmp/packages.txt + only: + - googlecompute + - lxd +- type: file + source: packer-assets/ci-ubuntu-2204-docker-packages.txt + destination: /var/tmp/packages.txt + only: + - docker +- type: shell + scripts: + - packer-scripts/packer-env-dump + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" +- type: shell + scripts: + - packer-scripts/remove-default-users + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" + only: + - docker + - googlecompute + - lxd +- type: shell + inline: "uname -a" + only: + - amazon-ebs + - lxd + # Recommendations for lxd images +- type: shell + inline: "systemctl mask sys-kernel-config.mount" + only: + - lxd +- type: shell + inline: "systemctl mask systemd-modules-load.service" + only: + - lxd +- type: shell + inline: sleep 25 + # Delay command 'snap install' execution. Problem with snap install core. Workaround : error: too early for operation, device not yet seeded..." + only: + - lxd +- type: shell + inline: "apt install snapd -y && snap install core" + only: + - lxd +- type: shell + inline: "apt-get remove --purge cloud-init --yes" + only: + - lxd + # end Recommendations +- type: shell + scripts: + - packer-scripts/pre-chef-bootstrap-jammy + - packer-scripts/clone-travis-cookbooks + environment_vars: + - SKIP_APT_UPGRADE=1 + - TRAVIS_COOKBOOKS_BRANCH={{ user `travis_cookbooks_branch` }} + - TRAVIS_COOKBOOKS_SHA={{ user `travis_cookbooks_sha` }} + - TRAVIS_UID={{ user `travis_uid` }} + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" +- type: file + source: packer-assets/ubuntu-2204-system-info-commands.yml + destination: /var/tmp/ubuntu-2204-system-info-commands.yml +- type: shell + inline: chmod 0644 /var/tmp/ubuntu-2204-system-info-commands.yml +- type: chef-solo + version: 17.6.18 + config_template: chef-solo.rb.tmpl + <% if ENV['CHEF_PROFILING'] %> + execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo --chef-license accept-silent -F doc --no-color -c {{.ConfigPath}} -j {{.JsonPath}}" + <% else %> + execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo --chef-license accept-silent --no-color -c {{.ConfigPath}} -j {{.JsonPath}}" + <% end %> + <% if ENV['BUILDER'] == "lxd" %> + # packer lxd builder copy cookbooks to wrong directory + execute_command: "rsync -a --delete-after /tmp/packer-chef-solo/cookbooks-0/cookbooks/ /tmp/packer-chef-solo/cookbooks-0/ && \ + {{if .Sudo}}sudo {{end}}chef-solo --chef-license accept-silent --no-color -c {{.ConfigPath}} -j {{.JsonPath}}" + <% end %> + cookbook_paths: + - cookbooks + <% if ENV['COOKBOOKS_LOCAL'] && ENV['TRAVIS_COOKBOOKS_DIR'] %> + - <%= ENV['TRAVIS_COOKBOOKS_DIR'] %>/cookbooks + - <%= ENV['TRAVIS_COOKBOOKS_DIR'] %>/community-cookbooks + <% else %> + remote_cookbook_paths: + - /tmp/chef-stuff/travis-cookbooks/cookbooks + - /tmp/chef-stuff/travis-cookbooks/community-cookbooks + <% end %> + run_list: + - recipe[travis_ci_ubuntu_2204] + <% if ENV['CHEF_PROFILING'] %> + - recipe[poise-profiler] + <% end %> +- type: shell + scripts: + - packer-scripts/ensure-travis-user + - packer-scripts/purge + - packer-scripts/disable-apparmor + - packer-scripts/run-serverspecs + - packer-scripts/test-system-info-output + - packer-scripts/dump-dpkg-manifest + - packer-scripts/create-bin-lib-checksums + - packer-scripts/cleanup + # - packer-scripts/minimize + environment_vars: + - DISPLAY=:99.0 + - SPEC_SUITES=travis_packer_templates + - TRAVIS_OBFUSCATE_PASSWORD=1 + - TRAVIS_UID={{ user `travis_uid` }} + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" + #- type: shell + # environment_vars: + # - TRAVIS_OBFUSCATE_PASSWORD=1 + # - TRAVIS_UID={{ user `travis_uid` }} + # execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" + # inline: + # - "find /etc/systemd -type f -o -type l" + # # - "rm -v /etc/systemd/system/network-online.target.wants/networking.service" + # # - "rm -v /etc/systemd/system/multi-user.target.wants/networking.service" +- type: shell + inline: "sudo chown -R couchdb:couchdb /opt/couchdb/" +- type: shell + inline: "ls -lah /opt/couchdb/" +- type: shell + scripts: + - packer-scripts/create-image-metadata-tarball + environment_vars: + - IMAGE_METADATA_TARBALL=/var/tmp/image-metadata-{{ user `image_name` }}.tar.bz2 + execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" +- type: file + source: /var/tmp/image-metadata-{{ user `image_name` }}.tar.bz2 + destination: tmp/image-metadata-{{ user `image_name` }}.tar.bz2 + direction: download +post-processors: +- + - type: docker-tag + repository: "{{ user `docker_repository` }}" + tag: "{{ user `docker_tag` }}" + only: + - docker + - type: shell-local + scripts: bin/docker-push + environment_vars: + - DOCKER_DEST={{ user `docker_repository` }}:{{ user `docker_tag` }} + only: + - docker +- + - type: shell-local + script: bin/job-board-register + environment_vars: + - IMAGE_NAME={{ user `image_name` }} + only: + - googlecompute + - lxd + - type: shell-local + script: bin/job-board-register + environment_vars: + - IMAGE_NAME={{ user `docker_repository` }}:{{ user `docker_tag` }} + only: + - docker +- + - type: shell-local + script: bin/write-latest-image-name + - type: shell-local + script: bin/lxc-export.sh + environment_vars: + - IMAGE_NAME={{ user `image_name` }} + only: + - lxd + - type: shell-local + inline: + - echo {{ user `image_name` }} > /tmp/packer-build-image-name + only: + - lxd diff --git a/cookbooks/travis_ci_ubuntu_2204/README.md b/cookbooks/travis_ci_ubuntu_2204/README.md new file mode 100644 index 000000000..d0455bf97 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/README.md @@ -0,0 +1,4 @@ +travis_ci_ubuntu_2204 Cookbook +========================= + +A wrapper cookbook for the "ubuntu_2204" CI image. diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb new file mode 100644 index 000000000..ce2153138 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +override['maven']['install_java'] = false +override['travis_system_info']['commands_file'] = \ + '/var/tmp/ubuntu-2204-system-info-commands.yml' +override['travis_build_environment']['system_python']['pythons'] = %w[3.8] # apt packages +override['travis_build_environment']['python_aliases'] = { + '3.8.3' => %w[3.8], + '3.7.7' => %w[3.7], + 'pypy2.7-7.3.1' => %w[pypy], + 'pypy3.6-7.3.1' => %w[pypy3] +} +# packages build by Cpython + our repo +pythons = %w[ + 3.7.7 + 3.8.3 + 3.9.0 +] +override['travis_build_environment']['pythons'] = pythons + +override['travis_build_environment']['pip']['packages'] = {} # need to fill in + +# our php builder +php_aliases = { + '7.4' => '7.4.6' +} +override['travis_build_environment']['php_versions'] = php_aliases.values +override['travis_build_environment']['php_default_version'] = php_aliases['7.4'] +override['travis_build_environment']['php_aliases'] = php_aliases + +# if node['kernel']['machine'] == "x86_64" # Is it required +# arch = 'amd64' +# else +# arch = node['kernel']['machine'] +# end + +# version = '7.6.0' +# override['travis_build_environment']['elasticsearch']['version'] = version +# override['travis_build_environment']['elasticsearch']['package_name'] = "elasticsearch-#{version}-#{arch}.deb" + +# if node['kernel']['machine'] == 'ppc64le' # consider removing, for ppc64le creation we use bash scripts +# override['travis_build_environment']['php_versions'] = [] +# override['travis_build_environment']['php_default_version'] = [] +# override['travis_build_environment']['php_aliases'] = {} + +# TODO: remove if/when an HHVM version is available on ppc64 +# override['travis_build_environment']['hhvm_enabled'] = false +# end + +override['travis_perlbrew']['perls'] = [{ name: '5.32.0', version: 'perl-5.32.0' }, { name: '5.33.0', version: 'perl-5.33.0' }] +override['travis_perlbrew']['prerequisite_packages'] = [] + +gimme_versions = %w[ + 1.11.1 +] + +override['travis_build_environment']['gimme']['versions'] = gimme_versions +override['travis_build_environment']['gimme']['default_version'] = gimme_versions.max + +if node['kernel']['machine'] == 'ppc64le' + override['travis_java']['default_version'] = 'openjdk8' + override['travis_java']['alternate_versions'] = %w[openjdk7] +elsif node['kernel']['machine'] == 'aarch64' + override['travis_build_environment']['arch'] = 'arm64' + override['travis_build_environment']['packer']['arm64']['version'] = '1.3.3' + override['travis_build_environment']['packer']['arm64']['checksum'] = \ + 'e08c9542ff6cb231dd03d6f8096f6749e79056734bf69d5399205451b94c9d03' +else + override['travis_jdk']['versions'] = %w[ + openjdk10 + openjdk11 + ] + override['travis_jdk']['default'] = 'openjdk11' +end + +override['leiningen']['home'] = '/home/travis' +override['leiningen']['user'] = 'travis' + +override['travis_build_environment']['cmake']['version'] = '3.16.8' +override['travis_build_environment']['cmake']['checksum'] = '6b5c856158c16307692ae54ba761cfe30df7b2a131d602e83fda42a572973063' +override['travis_build_environment']['cmake']['download_url'] = ::File.join( + 'https://cmake.org/files', + "v#{node['travis_build_environment']['cmake']['version'].split('.')[0, 2].join('.')}", + "cmake-#{node['travis_build_environment']['cmake']['version']}-Linux-x86_64.tar.gz" +) + +override['travis_build_environment']['nodejs_versions'] = %w[ + 12.7.0 + 10.16.0 +] +override['travis_build_environment']['nodejs_default'] = '10.16.0' + +rubies = %w[ + 2.5.7 + 2.5.8 + 2.6.5 + 2.6.6 + 2.7.0 + 2.7.1 +] + +override['travis_build_environment']['virtualenv']['version'] = '20.0.20' + +override['travis_build_environment']['default_ruby'] = rubies.reject { |n| n =~ /jruby/ }.max +override['travis_build_environment']['rubies'] = rubies + +override['travis_build_environment']['otp_releases'] = %w[ + 21.1 +] +elixirs = %w[ + 1.7.4 +] +override['travis_build_environment']['elixir_versions'] = elixirs +override['travis_build_environment']['default_elixir_version'] = elixirs.max + +override['travis_build_environment']['update_hostname'] = false +override['travis_build_environment']['update_hostname'] = true if node['kernel']['machine'] == 'ppc64le' +override['travis_build_environment']['use_tmpfs_for_builds'] = false + +override['travis_build_environment']['mercurial_install_type'] = 'pip' +override['travis_build_environment']['mercurial_version'] = '5.3' +override['travis_build_environment']['ibm_advanced_tool_chain_version'] = 14.0 + +override['travis_packer_templates']['job_board']['stack'] = 'ubuntu_2204' + +# not yet supported +override['travis_postgresql']['default_version'] = '12' +override['travis_postgresql']['alternate_versions'] = %w[] +override['travis_postgresql']['enabled'] = false # is default instance started on machine boot? + +override['travis_packer_templates']['job_board']['features'] = %w[ + basic + couchdb + disabled-ipv6 + docker + docker-compose + elasticsearch + firefox + go-toolchain + google-chrome + jdk + memcached + mongodb + mysql + nodejs_interpreter + perl_interpreter + perlbrew + phantomjs + postgresql + python_interpreter + redis + ruby_interpreter + sqlite + xserver +] +override['travis_packer_templates']['job_board']['languages'] = %w[ + __ubuntu_2204__ + c + c++ + clojure + cplusplus + cpp + default + generic + go + groovy + java + node_js + php + pure_java + python + ruby + scala + julia + erlang +] + +# Override values in array : minimal set of options +override['travis_packer_templates']['job_board']['features'] = %w[ + generic + basic + ruby_interpreter +] +# Set minimal languages +override['travis_packer_templates']['job_board']['languages'] = %w[ + __ubuntu_2204__ + c + c++ + cplusplus + cpp + ruby + python + go + java + php + node_js + smalltalk + csharp + perl + rust + elixir + erlang +] + +override['travis_docker']['version'] = '20.10.7' +override['travis_docker']['binary']['version'] = '20.10.7' +override['travis_docker']['compose']['url'] = 'https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64' +override['travis_docker']['compose']['sha256sum'] = 'f3f10cf3dbb8107e9ba2ea5f23c1d2159ff7321d16f0a23051d68d8e2547b323' +override['travis_docker']['binary']['url'] = 'https://download.docker.com/linux/static/stable/x86_64/docker-20.10.7.tgz' +override['travis_docker']['binary']['checksum'] = '34ad50146fce29b28e5115a1e8510dd5232459c9a4a9f28f65909f92cca314d9' diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb new file mode 100644 index 000000000..f69191343 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Cookbook Name:: travis_ci_ubuntu_2204 +# Recipe:: default +# +# Copyright 2017, Travis CI GmbH +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +include_recipe 'travis_build_environment::apt' +include_recipe 'travis_packer_templates' +include_recipe 'travis_build_environment' + +if node['travis_packer_templates']['env']['PACKER_BUILDER_TYPE'] == 'docker' + if node['kernel']['machine'] == 'ppc64le' + include_recipe 'travis_docker::package' + else + include_recipe 'travis_docker::binary' + end +else + if node['travis_packer_templates']['env']['PACKER_BUILDER_TYPE'] == 'lxd' + node.override['travis_docker']['update_grub'] = false + end + include_recipe 'travis_docker' + include_recipe 'travis_build_environment::ramfs' +end +include_recipe 'travis_docker::compose' +include_recipe 'openssl' +if node['kernel']['machine'] == 'ppc64le' + include_recipe 'travis_java' +else + include_recipe 'travis_jdk' +end +include_recipe 'travis_build_environment::maven' +include_recipe 'travis_build_environment::lein' +include_recipe 'travis_sbt_extras' +include_recipe 'travis_build_environment::gradle' +# include_recipe 'travis_postgresql' +# include_recipe 'travis_build_environment::mysql' +include_recipe 'travis_perlbrew::multi' +include_recipe 'travis_build_environment::redis' +# include_recipe 'travis_build_environment::mongodb' +include_recipe 'memcached' +# TODO: Uncomment when cassandra works on Java 8 again +# https://github.com/travis-ci/packer-templates/issues/589 +# include_recipe 'travis_build_environment::cassandra' +include_recipe 'travis_build_environment::couchdb' +include_recipe 'travis_build_environment::elasticsearch' +include_recipe 'travis_build_environment::xserver' +include_recipe 'travis_build_environment::google_chrome' +include_recipe 'travis_build_environment::firefox' +include_recipe 'travis_build_environment::ibm_advanced_tool_chain' +include_recipe 'travis_phantomjs::2' + +if node['kernel']['machine'] != 'aarch64' + include_recipe '::erlang' + # include_recipe '::couchdb' + include_recipe '::mongodb' + include_recipe '::mysql' + include_recipe '::postgresql' + include_recipe 'travis_build_environment::couchdb' + # include_recipe '::mariadb' +end + +# HACK: ubuntu_1804-specific shims! +execute 'ln -svf /usr/bin/hashdeep /usr/bin/md5deep' + +log 'trigger writing node attributes' do + notifies :run, 'ruby_block[write node attributes]' +end + +log 'trigger job-board registration' do + notifies :run, 'ruby_block[write job-board registration bits]' +end + +include_recipe 'travis_system_info' + +# HACK: force removal of ~/.pearrc until a decision is reached on if they are +# good or bad +execute 'rm -f /home/travis/.pearrc' diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/erlang.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/erlang.rb new file mode 100644 index 000000000..f756f7289 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/erlang.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +execute 'add_erlang_gpg_key' do + command 'wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add -' +end + +execute 'add_erlang_repository' do + command 'echo "deb https://packages.erlang-solutions.com/ubuntu focal contrib" | sudo tee /etc/apt/sources.list.d/rabbitmq.list' +end + +apt_update + +package 'erlang' do + action :install +end diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb new file mode 100644 index 000000000..ec2b57ad3 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +execute 'mariadb_key' do + command 'sudo apt-key adv --fetch-keys \'https://mariadb.org/mariadb_release_signing_key.asc\'' +end + +execute 'mariadb_repo' do + command 'sudo add-apt-repository \'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal main\'' +end + +execute 'mariadb_install' do + command 'sudo apt install mariadb-server mariadb-client -y' +end + +service 'mariadb' do + action [:stop, :disable] +end diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb new file mode 100644 index 000000000..94c79ce2d --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +execute 'add_mongodb_gpg_key' do + command 'sudo wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -' +end + +execute 'add_mongodb_repository' do + command 'sudo echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list' +end + +apt_update + +package 'mongodb' do + action :install +end + +service 'mongodb' do + action [:disable, :stop] +end diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/mysql.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/mysql.rb new file mode 100644 index 000000000..f92cd296f --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/mysql.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +package 'mysql-server' +package 'mysql-client' + +template "#{node['travis_build_environment']['home']}/.my.cnf" do + source 'ci_user/dot_my.cnf.erb' + user node['travis_build_environment']['user'] + group node['travis_build_environment']['group'] + mode 0o640 + variables(socket: node['travis_build_environment']['mysql']['socket']) +end + +bash 'config_mysql' do + code <<-E0H + mysql -u root -e "CREATE USER 'travis'@'%' IDENTIFIED BY ''" + mysql -u root -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('')" + mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'travis'@'%'" + mysql -u root -e "CREATE USER 'travis'@'localhost' IDENTIFIED BY ''" + mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'travis'@'localhost'" + mysql -u root -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY ''" + mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'travis'@'127.0.0.1'" + mysql -u root -e "UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User = 'root'; FLUSH PRIVILEGES;" + E0H +end + +include_recipe 'travis_build_environment::bash_profile_d' + +file ::File.join( + node['travis_build_environment']['home'], + '.bash_profile.d/travis-mysql.bash' +) do + content "export MYSQL_UNIX_PORT=#{node['travis_build_environment']['mysql']['socket']}\n" + owner node['travis_build_environment']['user'] + group node['travis_build_environment']['group'] + mode 0o644 +end + +service 'mysql' do + action [:disable, :stop] +end diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb new file mode 100644 index 000000000..483a085d2 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +apt_repository 'postgresql' do + uri 'http://apt.postgresql.org/pub/repos/apt/' + distribution 'focal-pgdg' + components ['main'] + key 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' +end + +package 'postgresql-13' + +service 'postgresql' do + action [:stop, :disable] +end + +template '/etc/postgresql/13/main/pg_hba.conf' do + source 'pg_hba.conf.erb' + owner 'postgres' + group 'postgres' + mode 0o640 # apply same permissions as in 'pdpg' packages +end + +execute 'change_log_dir_permissions' do + command 'sudo chmod -R 777 /var/log/postgresql' +end + +apt_repository 'postgresql' do + action :remove +end diff --git a/cookbooks/travis_ci_ubuntu_2204/templates/default/ci_user/dot_my.cnf.erb b/cookbooks/travis_ci_ubuntu_2204/templates/default/ci_user/dot_my.cnf.erb new file mode 100644 index 000000000..dfbf40bf9 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/templates/default/ci_user/dot_my.cnf.erb @@ -0,0 +1,11 @@ +# Managed by Chef for <%= node.name %> :heart_eyes_cat: + +[client] +default-character-set = utf8 +port = 3306 +user = root +password = +socket = <%= @socket %> + +[mysql] +default-character-set = utf8 diff --git a/cookbooks/travis_ci_ubuntu_2204/templates/default/pg_hba.conf.erb b/cookbooks/travis_ci_ubuntu_2204/templates/default/pg_hba.conf.erb new file mode 100644 index 000000000..328c8abfd --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/templates/default/pg_hba.conf.erb @@ -0,0 +1,103 @@ +# PostgreSQL Client Authentication Configuration File +# =================================================== +# +# Refer to the "Client Authentication" section in the PostgreSQL +# documentation for a complete description of this file. A short +# synopsis follows. +# +# This file controls: which hosts are allowed to connect, how clients +# are authenticated, which PostgreSQL user names they can use, which +# databases they can access. Records take one of these forms: +# +# local DATABASE USER METHOD [OPTIONS] +# host DATABASE USER ADDRESS METHOD [OPTIONS] +# hostssl DATABASE USER ADDRESS METHOD [OPTIONS] +# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS] +# hostgssenc DATABASE USER ADDRESS METHOD [OPTIONS] +# hostnogssenc DATABASE USER ADDRESS METHOD [OPTIONS] +# +# (The uppercase items must be replaced by actual values.) +# +# The first field is the connection type: "local" is a Unix-domain +# socket, "host" is either a plain or SSL-encrypted TCP/IP socket, +# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a +# non-SSL TCP/IP socket. Similarly, "hostgssenc" uses a +# GSSAPI-encrypted TCP/IP socket, while "hostnogssenc" uses a +# non-GSSAPI socket. +# +# DATABASE can be "all", "sameuser", "samerole", "replication", a +# database name, or a comma-separated list thereof. The "all" +# keyword does not match "replication". Access to replication +# must be enabled in a separate record (see example below). +# +# USER can be "all", a user name, a group name prefixed with "+", or a +# comma-separated list thereof. In both the DATABASE and USER fields +# you can also write a file name prefixed with "@" to include names +# from a separate file. +# +# ADDRESS specifies the set of hosts the record matches. It can be a +# host name, or it is made up of an IP address and a CIDR mask that is +# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that +# specifies the number of significant bits in the mask. A host name +# that starts with a dot (.) matches a suffix of the actual host name. +# Alternatively, you can write an IP address and netmask in separate +# columns to specify the set of hosts. Instead of a CIDR-address, you +# can write "samehost" to match any of the server's own IP addresses, +# or "samenet" to match any address in any subnet that the server is +# directly connected to. +# +# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256", +# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert". +# Note that "password" sends passwords in clear text; "md5" or +# "scram-sha-256" are preferred since they send encrypted passwords. +# +# OPTIONS are a set of options for the authentication in the format +# NAME=VALUE. The available options depend on the different +# authentication methods -- refer to the "Client Authentication" +# section in the documentation for a list of which options are +# available for which authentication methods. +# +# Database and user names containing spaces, commas, quotes and other +# special characters must be quoted. Quoting one of the keywords +# "all", "sameuser", "samerole" or "replication" makes the name lose +# its special character, and just match a database or username with +# that name. +# +# This file is read on server startup and when the server receives a +# SIGHUP signal. If you edit the file on a running system, you have to +# SIGHUP the server for the changes to take effect, run "pg_ctl reload", +# or execute "SELECT pg_reload_conf()". +# +# Put your actual configuration here +# ---------------------------------- +# +# If you want to allow non-local connections, you need to add more +# "host" records. In that case you will also need to make PostgreSQL +# listen on a non-local interface via the listen_addresses +# configuration parameter, or via the -i or -h command line switches. + + + + +# DO NOT DISABLE! +# If you change this first entry you will need to make sure that the +# database superuser can access the database using some other method. +# Noninteractive access to all databases is required during automatic +# maintenance (custom daily cronjobs, replication, and similar tasks). +# +# Database administrative login by Unix domain socket +local all postgres trust + +# TYPE DATABASE USER ADDRESS METHOD + +# "local" is for Unix domain socket connections only +local all all trust +# IPv4 local connections: +host all all 127.0.0.1/32 trust +# IPv6 local connections: +host all all ::1/128 trust +# Allow replication connections from localhost, by a user with the +# replication privilege. +#local replication all peer +#host replication all 127.0.0.1/32 md5 +#host replication all ::1/128 md5 From 300c6c855f5aec37802dbfb94fdf1c8c20d30599 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Mon, 6 Jun 2022 12:01:59 +0200 Subject: [PATCH 03/88] Create pre-chef-bootstrap-jammy --- packer-scripts/pre-chef-bootstrap-jammy | 150 ++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 packer-scripts/pre-chef-bootstrap-jammy diff --git a/packer-scripts/pre-chef-bootstrap-jammy b/packer-scripts/pre-chef-bootstrap-jammy new file mode 100644 index 000000000..cc20afd00 --- /dev/null +++ b/packer-scripts/pre-chef-bootstrap-jammy @@ -0,0 +1,150 @@ +#!/usr/bin/env bash + +set -o errexit + +main() { + set -o xtrace + shopt -s nullglob + + export DEBIAN_FRONTEND='noninteractive' + + if [[ "${PACKER_BUILDER_TYPE}" != docker ]]; then + __disable_ipv6 + fi + if ! [[ "$(uname -m)" =~ ppc64 ]]; then + __enable_i386 + fi + __install_packages + __setup_sshd + __setup_travis_user + __write_pre_chef_env +} + +__disable_ipv6() { + sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 + sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 +} + +__enable_i386() { + dpkg --add-architecture i386 +} + +__install_packages() { + if [[ "${PACKER_BUILDER_TYPE}" =~ vmware ]]; then + APT_GET_INSTALL_PRE_CHEF='open-vm-tools' + fi + + if [[ "${PACKER_BUILDER_TYPE}" =~ googlecompute ]]; then + rm -rvf /etc/apt/sources.list.d/partner.list \ + /var/lib/apt/lists/* + fi + + if [[ "${PACKER_BUILDER_TYPE}" =~ amazon-ebs ]]; then + dpkg --remove-architecture i386 + fi + + apt-get update -yqq + apt-get install -yqq \ + --no-install-suggests \ + --no-install-recommends \ + ca-certificates \ + cron \ + curl \ + gawk \ + git \ + libelf-dev \ + sudo \ + wget \ + rsync \ + python3 \ + python3-pip \ + ${APT_GET_INSTALL_PRE_CHEF} + + # link python ##TODO move this to chef + if ! [ -x "$(command -v python)" ]; then + update-alternatives --install /usr/bin/python python /usr/bin/python3 1 + update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 + fi +} + +__setup_sshd() { + mkdir -p /var/run/sshd + + if ! grep -Eq '^sshd: ALL: ALLOW' /etc/hosts.allow; then + echo 'sshd: ALL: ALLOW' >>/etc/hosts.allow + fi +} + +__setup_travis_user() { + if ! getent passwd travis &>/dev/null; then + if [[ -z "${TRAVIS_UID}" ]]; then + useradd -p travis -s /bin/bash -m travis + else + useradd -p travis -s /bin/bash -m travis -u "${TRAVIS_UID}" + groupmod -g "${TRAVIS_UID}" travis + usermod -u "${TRAVIS_UID}" travis + + fi + fi + + echo travis:travis | chpasswd + + __setup_sudoers + __setup_travis_ssh + + # Save users having to create this directory at runtime (it's already on PATH) + mkdir -p /home/travis/bin + + mkdir -p /opt + chmod 0755 /opt + chown -R travis:travis /home/travis /opt +} + +__setup_sudoers() { + sed -i '/^%/d;/^# /d;/^$/d;/^#$/d;/^#includedir/d' /etc/sudoers + echo '#includedir /etc/sudoers.d' >>/etc/sudoers + + mkdir -p /etc/sudoers.d + + if [[ -f /var/tmp/sudoers.d-travis ]]; then + cp -v /var/tmp/sudoers.d-travis /etc/sudoers.d/travis + else + cat >/etc/sudoers.d/travis <>/home/travis/.ssh/authorized_keys + done + chmod 0600 /home/travis/.ssh/authorized_keys + echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/ssh_config + echo "HostKeyAlgorithms +ssh-rsa" >> /etc/ssh/ssh_config + echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/sshd_config + echo "HostKeyAlgorithms +ssh-rsa" >> /etc/ssh/sshd_config +} + +__write_pre_chef_env() { + local dest=/etc/profile.d/Z99-travis-pre-chef-bootstrap.sh + cat >"${dest}" < Date: Mon, 6 Jun 2022 12:20:00 +0200 Subject: [PATCH 04/88] Create metadata.rb --- cookbooks/travis_ci_ubuntu_2204/metadata.rb | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 cookbooks/travis_ci_ubuntu_2204/metadata.rb diff --git a/cookbooks/travis_ci_ubuntu_2204/metadata.rb b/cookbooks/travis_ci_ubuntu_2204/metadata.rb new file mode 100644 index 000000000..34e473ee7 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_2204/metadata.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +name 'travis_ci_ubuntu_2204' +maintainer 'Travis CI GmbH' +maintainer_email 'contact+packer-templates@travis-ci.org' +license 'MIT' +description 'Installs/Configures travis_ci_ubuntu_2004' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version '0.1.0' +source_url 'https://github.com/travis-ci/packer-templates' +issues_url 'https://github.com/travis-ci/packer-templates/issues' + +depends 'memcached' +depends 'openssl' +depends 'travis_build_environment' +depends 'travis_docker' +depends 'travis_java' +depends 'travis_jdk' +depends 'travis_packer_templates' +depends 'travis_perlbrew' +depends 'travis_phantomjs' +depends 'travis_postgresql' +depends 'travis_sbt_extras' +depends 'travis_system_info' From fd2a51cb04aefd3058ddf32591984e971dc3d55e Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Mon, 6 Jun 2022 13:01:15 +0200 Subject: [PATCH 05/88] Update default.rb --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index ce2153138..0e683eeab 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -91,12 +91,8 @@ override['travis_build_environment']['nodejs_default'] = '10.16.0' rubies = %w[ - 2.5.7 - 2.5.8 - 2.6.5 - 2.6.6 - 2.7.0 - 2.7.1 + 3.0.4 + 3.1.2 ] override['travis_build_environment']['virtualenv']['version'] = '20.0.20' From 2ad2f5079ee0a0e1518276d72b3b31cc131ffda2 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Tue, 7 Jun 2022 15:20:40 +0200 Subject: [PATCH 06/88] Update python_spec.rb --- cookbooks/lib/languages/python_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cookbooks/lib/languages/python_spec.rb b/cookbooks/lib/languages/python_spec.rb index f4bb2d403..c32b540eb 100644 --- a/cookbooks/lib/languages/python_spec.rb +++ b/cookbooks/lib/languages/python_spec.rb @@ -56,6 +56,12 @@ 'python3.7' => '3.7.7', 'python3.8' => '3.8.3' } + elsif 'jammy'.include?(Support.distro) + vers = { + 'python3.8' => '3.8.3', + 'python3.9' => '3.9.13', + 'python3.10' => '3.10.5' + } end vers.each do |python_alias, python_version| From cf23f0bf82b4b9751e7fd96b2a652c458a6f5614 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 7 Jun 2022 17:11:54 +0200 Subject: [PATCH 07/88] set default python --- cookbooks/travis_ci_ubuntu_2004/attributes/default.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb index f7a14305a..5a068621e 100644 --- a/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb @@ -3,8 +3,9 @@ override['maven']['install_java'] = false override['travis_system_info']['commands_file'] = \ '/var/tmp/ubuntu-2004-system-info-commands.yml' -override['travis_build_environment']['system_python']['pythons'] = %w[3.8] # apt packages +override['travis_build_environment']['system_python']['pythons'] = %w[3.10] # apt packages override['travis_build_environment']['python_aliases'] = { + '3.10.5' => %w[3.10], '3.8.3' => %w[3.8], '3.7.7' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], @@ -15,6 +16,7 @@ 3.7.7 3.8.3 3.9.0 + 3.10.5 ] override['travis_build_environment']['pythons'] = pythons From 09074542305b8a6eefa5a2d0050bebe7bf2da58a Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 7 Jun 2022 17:36:26 +0200 Subject: [PATCH 08/88] set default python --- cookbooks/travis_ci_ubuntu_2004/attributes/default.rb | 4 +--- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb index 5a068621e..f7a14305a 100644 --- a/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb @@ -3,9 +3,8 @@ override['maven']['install_java'] = false override['travis_system_info']['commands_file'] = \ '/var/tmp/ubuntu-2004-system-info-commands.yml' -override['travis_build_environment']['system_python']['pythons'] = %w[3.10] # apt packages +override['travis_build_environment']['system_python']['pythons'] = %w[3.8] # apt packages override['travis_build_environment']['python_aliases'] = { - '3.10.5' => %w[3.10], '3.8.3' => %w[3.8], '3.7.7' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], @@ -16,7 +15,6 @@ 3.7.7 3.8.3 3.9.0 - 3.10.5 ] override['travis_build_environment']['pythons'] = pythons diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 0e683eeab..687176c46 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -3,8 +3,9 @@ override['maven']['install_java'] = false override['travis_system_info']['commands_file'] = \ '/var/tmp/ubuntu-2204-system-info-commands.yml' -override['travis_build_environment']['system_python']['pythons'] = %w[3.8] # apt packages +override['travis_build_environment']['system_python']['pythons'] = %w[3.10] # apt packages override['travis_build_environment']['python_aliases'] = { + '3.10.5' => %w[3.10], '3.8.3' => %w[3.8], '3.7.7' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], @@ -15,6 +16,7 @@ 3.7.7 3.8.3 3.9.0 + 3.10.5 ] override['travis_build_environment']['pythons'] = pythons From 3cc6a398cfc8ffc3b4b0ef72b8455b5ad132d873 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Tue, 7 Jun 2022 23:52:34 +0200 Subject: [PATCH 09/88] set source image --- ci-ubuntu-2204.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index 9ce712897..c755cfadf 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -42,7 +42,7 @@ builders: image_description: Travis CI Ubuntu 22.04 account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: ubuntu-2204-jammy-v20220423 + source_image: ubuntu-2204-jammy-v20220607 image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] zone: us-central1-a image_name: "{{ user `image_name` }}" From 272d479ebe1a2da78b885f11910d6e8bf6b769c6 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 00:05:02 +0200 Subject: [PATCH 10/88] Create ci-ubuntu-2204-docker-packages.txt --- packer-assets/ci-ubuntu-2204-docker-packages.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packer-assets/ci-ubuntu-2204-docker-packages.txt diff --git a/packer-assets/ci-ubuntu-2204-docker-packages.txt b/packer-assets/ci-ubuntu-2204-docker-packages.txt new file mode 100644 index 000000000..b02f9a4cd --- /dev/null +++ b/packer-assets/ci-ubuntu-2204-docker-packages.txt @@ -0,0 +1,12 @@ +bridge-utils +ccache +emacs-nox +hashdeep +libmysqlclient-dev +libtidy-dev +locales +mysql-client +postgresql-client +tmate +uuid-dev +ant From ba213439801b92dcfc6f9ff7eaba399580e600b7 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:16:32 +0200 Subject: [PATCH 11/88] try temp key file ed25519 --- ci-ubuntu-2204-minimal.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-ubuntu-2204-minimal.yml b/ci-ubuntu-2204-minimal.yml index 869b5659b..e251b2b88 100644 --- a/ci-ubuntu-2204-minimal.yml +++ b/ci-ubuntu-2204-minimal.yml @@ -31,6 +31,7 @@ builders: image_name: "{{ user `image_name` }}" machine_type: n2-standard-4 disk_size: 50 + temporary_key_pair_type: ed25519 tags: - ci - ubuntu-2204 From 1aa0225d13954d784783ca51a3a4bd68ff2310c3 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:26:01 +0200 Subject: [PATCH 12/88] try ed25519 --- ci-ubuntu-2204-minimal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-2204-minimal.yml b/ci-ubuntu-2204-minimal.yml index e251b2b88..47e87124b 100644 --- a/ci-ubuntu-2204-minimal.yml +++ b/ci-ubuntu-2204-minimal.yml @@ -22,7 +22,7 @@ builders: ssh_port: 22 ssh_username: packer image_description: Travis CI Ubuntu 22.04 - account_file: "{{ user `gce_account_file` }}" + #account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" source_image: jammy-20220426 source_image_project_id: travis-staging-1 From 131a351dbb11ab61b9ae16ac2742155cca50eb5f Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:38:33 +0200 Subject: [PATCH 13/88] fix name --- ci-ubuntu-2204-minimal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-2204-minimal.yml b/ci-ubuntu-2204-minimal.yml index 47e87124b..8b385b6ee 100644 --- a/ci-ubuntu-2204-minimal.yml +++ b/ci-ubuntu-2204-minimal.yml @@ -129,7 +129,7 @@ provisioners: # end Recommendations - type: shell scripts: - - packer-scripts/pre-chef-bootstrap-focal + - packer-scripts/pre-chef-bootstrap-jammy - packer-scripts/clone-travis-cookbooks environment_vars: - SKIP_APT_UPGRADE=1 From 35d85579cdfc1aaa0a4c098ed95a798ccd0a19b1 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:43:07 +0200 Subject: [PATCH 14/88] Update ci-ubuntu-2204-minimal.yml --- ci-ubuntu-2204-minimal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-2204-minimal.yml b/ci-ubuntu-2204-minimal.yml index 8b385b6ee..dcfaa4774 100644 --- a/ci-ubuntu-2204-minimal.yml +++ b/ci-ubuntu-2204-minimal.yml @@ -24,7 +24,7 @@ builders: image_description: Travis CI Ubuntu 22.04 #account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: jammy-20220426 + source_image: ubuntu-minimal-2204-jammy-v20220607 source_image_project_id: travis-staging-1 image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] zone: us-central1-a From ec5647eafdeff7bb42f7cca724be45eee86f608c Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:53:56 +0200 Subject: [PATCH 15/88] use image with rsa enabled --- ci-ubuntu-2204-minimal.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-ubuntu-2204-minimal.yml b/ci-ubuntu-2204-minimal.yml index dcfaa4774..b5ab4d3b1 100644 --- a/ci-ubuntu-2204-minimal.yml +++ b/ci-ubuntu-2204-minimal.yml @@ -22,10 +22,10 @@ builders: ssh_port: 22 ssh_username: packer image_description: Travis CI Ubuntu 22.04 - #account_file: "{{ user `gce_account_file` }}" + account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: ubuntu-minimal-2204-jammy-v20220607 - source_image_project_id: travis-staging-1 + source_image: jammy-minimal-rsa + source_image_project_id: eco-emissary-99515 image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] zone: us-central1-a image_name: "{{ user `image_name` }}" From 23558348fe9b8c03cfe25a698c6e860024b11ece Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:59:38 +0200 Subject: [PATCH 16/88] Update ci-ubuntu-2204.yml --- ci-ubuntu-2204.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index c755cfadf..1a9bbe30a 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -42,7 +42,8 @@ builders: image_description: Travis CI Ubuntu 22.04 account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: ubuntu-2204-jammy-v20220607 + source_image: jammy-minimal-rsa + source_image_project_id: eco-emissary-99515 image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] zone: us-central1-a image_name: "{{ user `image_name` }}" From c3397b6b4babd475162504d4bdda11ac90a30e3f Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 12:02:57 +0200 Subject: [PATCH 17/88] Update ci-ubuntu-2204.yml --- ci-ubuntu-2204.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index 1a9bbe30a..ee90671f6 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -42,13 +42,13 @@ builders: image_description: Travis CI Ubuntu 22.04 account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: jammy-minimal-rsa - source_image_project_id: eco-emissary-99515 + source_image: ubuntu-2204-jammy-v20220607 image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] zone: us-central1-a image_name: "{{ user `image_name` }}" machine_type: n2-standard-4 disk_size: 50 + temporary_key_pair_type: ed25519 tags: - ci - ubuntu-2204 From b6a331477e4b5bdf0a38381655849d9464be0628 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 12:05:42 +0200 Subject: [PATCH 18/88] Update ci-ubuntu-2204.yml --- ci-ubuntu-2204.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index ee90671f6..774555145 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -48,7 +48,7 @@ builders: image_name: "{{ user `image_name` }}" machine_type: n2-standard-4 disk_size: 50 - temporary_key_pair_type: ed25519 + #temporary_key_pair_type: ed25519 tags: - ci - ubuntu-2204 From 7acbd1e46540bb8afe050ea6505189ab4a1fd2d6 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Wed, 8 Jun 2022 12:07:54 +0200 Subject: [PATCH 19/88] Update ci-ubuntu-2204.yml --- ci-ubuntu-2204.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index 774555145..ee90671f6 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -48,7 +48,7 @@ builders: image_name: "{{ user `image_name` }}" machine_type: n2-standard-4 disk_size: 50 - #temporary_key_pair_type: ed25519 + temporary_key_pair_type: ed25519 tags: - ci - ubuntu-2204 From b39560bb1c4b49cc1b53cc3357b0931fa60ee729 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Wed, 8 Jun 2022 12:15:52 +0200 Subject: [PATCH 20/88] update packer --- Makefile | 2 +- bin/packer-build-install | 2 +- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index cf498efea..496e8c91b 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ UNAME := $(shell uname | tr '[:upper:]' '[:lower:]') BUILDER ?= googlecompute -PACKER_VERSION ?= 1.3.3 +PACKER_VERSION ?= 1.8.1. CURL ?= curl GIT ?= git diff --git a/bin/packer-build-install b/bin/packer-build-install index fa2436055..a5fe99bd2 100755 --- a/bin/packer-build-install +++ b/bin/packer-build-install @@ -12,7 +12,7 @@ if [[ -n "${GCE_ACCOUNT_FILE_B64_BZ2}" ]]; then bunzip2 >tmp/gce.json fi -if [[ ! "$(packer version 2>/dev/null)" =~ Packer\ v1.3.3 ]]; then +if [[ ! "$(packer version 2>/dev/null)" =~ Packer\ v1.8.1 ]]; then make install-packer fi diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 687176c46..fe0334519 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -64,7 +64,7 @@ override['travis_java']['alternate_versions'] = %w[openjdk7] elsif node['kernel']['machine'] == 'aarch64' override['travis_build_environment']['arch'] = 'arm64' - override['travis_build_environment']['packer']['arm64']['version'] = '1.3.3' + override['travis_build_environment']['packer']['arm64']['version'] = '1.8.1' override['travis_build_environment']['packer']['arm64']['checksum'] = \ 'e08c9542ff6cb231dd03d6f8096f6749e79056734bf69d5399205451b94c9d03' else From 561381826e0c0698f9849bb5ed74cc1900f34d0b Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Wed, 8 Jun 2022 12:17:50 +0200 Subject: [PATCH 21/88] update packer --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 496e8c91b..4431e04f6 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ UNAME := $(shell uname | tr '[:upper:]' '[:lower:]') BUILDER ?= googlecompute -PACKER_VERSION ?= 1.8.1. +PACKER_VERSION ?= 1.8.1 CURL ?= curl GIT ?= git From 5c366ca5677cf8b32d54a90323519eb4fd7b02c6 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Wed, 8 Jun 2022 13:08:24 +0200 Subject: [PATCH 22/88] disable cookbooks file in minimal --- ci-ubuntu-2204-minimal.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-ubuntu-2204-minimal.yml b/ci-ubuntu-2204-minimal.yml index b5ab4d3b1..f50cbfa22 100644 --- a/ci-ubuntu-2204-minimal.yml +++ b/ci-ubuntu-2204-minimal.yml @@ -77,9 +77,9 @@ provisioners: pause_before: 5s only: - docker -- type: file - source: tmp/travis-cookbooks - destination: /var/tmp/travis-cookbooks +# - type: file +# source: tmp/travis-cookbooks +# destination: /var/tmp/travis-cookbooks - type: file source: tmp/git-meta destination: /var/tmp/git-meta From b1b9373d5e99f5f70efc9ada768d3e3589f6f9e7 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Wed, 8 Jun 2022 13:10:39 +0200 Subject: [PATCH 23/88] set minimal imagE --- ci-ubuntu-2204-minimal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-2204-minimal.yml b/ci-ubuntu-2204-minimal.yml index f50cbfa22..94d922541 100644 --- a/ci-ubuntu-2204-minimal.yml +++ b/ci-ubuntu-2204-minimal.yml @@ -24,7 +24,7 @@ builders: image_description: Travis CI Ubuntu 22.04 account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: jammy-minimal-rsa + source_image: ubuntu-minimal-2204-jammy-v20220607 source_image_project_id: eco-emissary-99515 image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] zone: us-central1-a From 516f6a3354a82039c384b29221b4821714df59d9 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Wed, 8 Jun 2022 13:12:47 +0200 Subject: [PATCH 24/88] set minimal image --- ci-ubuntu-2204-minimal.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci-ubuntu-2204-minimal.yml b/ci-ubuntu-2204-minimal.yml index 94d922541..d1039316f 100644 --- a/ci-ubuntu-2204-minimal.yml +++ b/ci-ubuntu-2204-minimal.yml @@ -25,7 +25,6 @@ builders: account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" source_image: ubuntu-minimal-2204-jammy-v20220607 - source_image_project_id: eco-emissary-99515 image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] zone: us-central1-a image_name: "{{ user `image_name` }}" From 932d42b721e354d6fcee8b4e6c14fa2fccf27099 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Wed, 8 Jun 2022 13:59:10 +0200 Subject: [PATCH 25/88] fix sshd rsa config --- packer-scripts/pre-chef-bootstrap-jammy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packer-scripts/pre-chef-bootstrap-jammy b/packer-scripts/pre-chef-bootstrap-jammy index cc20afd00..a84116bd9 100644 --- a/packer-scripts/pre-chef-bootstrap-jammy +++ b/packer-scripts/pre-chef-bootstrap-jammy @@ -73,6 +73,8 @@ __setup_sshd() { if ! grep -Eq '^sshd: ALL: ALLOW' /etc/hosts.allow; then echo 'sshd: ALL: ALLOW' >>/etc/hosts.allow fi + echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/sshd_config + echo "HostKeyAlgorithms +ssh-rsa" >> /etc/ssh/sshd_config } __setup_travis_user() { @@ -130,8 +132,6 @@ __setup_travis_ssh() { chmod 0600 /home/travis/.ssh/authorized_keys echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/ssh_config echo "HostKeyAlgorithms +ssh-rsa" >> /etc/ssh/ssh_config - echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/sshd_config - echo "HostKeyAlgorithms +ssh-rsa" >> /etc/ssh/sshd_config } __write_pre_chef_env() { From 8ab6083eb9837c9f58523e119abca53a0475b73a Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Thu, 9 Jun 2022 09:40:36 +0200 Subject: [PATCH 26/88] fix sshd rsa config --- packer-scripts/cleanup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packer-scripts/cleanup b/packer-scripts/cleanup index b37b5de67..9bcb09cf4 100755 --- a/packer-scripts/cleanup +++ b/packer-scripts/cleanup @@ -70,3 +70,6 @@ fi if test -f /etc/cloud/cloud.cfg >&/dev/null; then sed -i '/package-update-upgrade-install/d' /etc/cloud/cloud.cfg fi + +echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/sshd_config +echo "HostKeyAlgorithms +ssh-rsa" >> /etc/ssh/sshd_config From ebcbbd9e58087d90cab9ff8abfe654b17260cddc Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Fri, 10 Jun 2022 11:05:47 +0200 Subject: [PATCH 27/88] update erlang --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index fe0334519..76594ef44 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -103,10 +103,10 @@ override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ - 21.1 + 24 ] elixirs = %w[ - 1.7.4 + 1.12.2 ] override['travis_build_environment']['elixir_versions'] = elixirs override['travis_build_environment']['default_elixir_version'] = elixirs.max From 94fc528835ce7a79e0cc61996a3994151efcc3d1 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Fri, 10 Jun 2022 11:20:57 +0200 Subject: [PATCH 28/88] update php --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 76594ef44..bdd85cca3 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -24,10 +24,10 @@ # our php builder php_aliases = { - '7.4' => '7.4.6' + '8.1' => '8.1.2' } override['travis_build_environment']['php_versions'] = php_aliases.values -override['travis_build_environment']['php_default_version'] = php_aliases['7.4'] +override['travis_build_environment']['php_default_version'] = php_aliases['8.1'] override['travis_build_environment']['php_aliases'] = php_aliases # if node['kernel']['machine'] == "x86_64" # Is it required From 078db532512b442cee2a4b0b14432bced6d044ff Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Fri, 10 Jun 2022 11:53:39 +0200 Subject: [PATCH 29/88] update erlang --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index bdd85cca3..76f563584 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -103,7 +103,7 @@ override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ - 24 + 24.0 ] elixirs = %w[ 1.12.2 From 1675174ffa216d00af4583ea8da25a59be16894c Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Fri, 10 Jun 2022 14:28:29 +0200 Subject: [PATCH 30/88] update erlang --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 76f563584..2c5c88e3f 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -103,7 +103,7 @@ override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ - 24.0 + 24.2.1 ] elixirs = %w[ 1.12.2 From d8daf6f5c0f32a23a70587890031535f9ede56c8 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 01:00:06 +0200 Subject: [PATCH 31/88] remove redis and setup perl --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 2c5c88e3f..d53625302 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -49,7 +49,7 @@ # override['travis_build_environment']['hhvm_enabled'] = false # end -override['travis_perlbrew']['perls'] = [{ name: '5.32.0', version: 'perl-5.32.0' }, { name: '5.33.0', version: 'perl-5.33.0' }] +override['travis_perlbrew']['perls'] = [{ name: '5.33.0', version: 'perl-5.33.0' }, { name: '5.34.0', version: 'perl-5.34.0' }] override['travis_perlbrew']['prerequisite_packages'] = [] gimme_versions = %w[ @@ -146,7 +146,6 @@ phantomjs postgresql python_interpreter - redis ruby_interpreter sqlite xserver From b2393c2c1abd4dfbb5a02f2dfd4db2cd26838c2c Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 09:40:05 +0200 Subject: [PATCH 32/88] remove redis --- cookbooks/travis_ci_ubuntu_2204/recipes/default.rb | 2 +- packer-assets/ubuntu-2204-system-info-commands.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index f69191343..d55b48993 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -55,7 +55,7 @@ # include_recipe 'travis_postgresql' # include_recipe 'travis_build_environment::mysql' include_recipe 'travis_perlbrew::multi' -include_recipe 'travis_build_environment::redis' +#include_recipe 'travis_build_environment::redis' # include_recipe 'travis_build_environment::mongodb' include_recipe 'memcached' # TODO: Uncomment when cassandra works on Java 8 again diff --git a/packer-assets/ubuntu-2204-system-info-commands.yml b/packer-assets/ubuntu-2204-system-info-commands.yml index 625358830..314c25a76 100644 --- a/packer-assets/ubuntu-2204-system-info-commands.yml +++ b/packer-assets/ubuntu-2204-system-info-commands.yml @@ -132,9 +132,9 @@ commands: - command: dpkg -l name: Pre-installed PostgreSQL versions pipe: awk '$2 ~ /^postgresql-[0-9]+\.[0-9]+$/ {print $3}' | grep -E --only '^[^-]+' - - command: redis-server --version - name: Redis version - pipe: perl -n -e '/v=([\d\.]+)/ && {print "redis-server $1\n"}' + # - command: redis-server --version + # name: Redis version + # pipe: perl -n -e '/v=([\d\.]+)/ && {print "redis-server $1\n"}' - command: gimme -l name: Pre-installed Go versions - command: ant -version From 5f29559559f455163aef87e9eee8db4474da0f5a Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 09:50:25 +0200 Subject: [PATCH 33/88] setup gce --- ci-ubuntu-2204.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index ee90671f6..54bcbe34b 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -46,7 +46,7 @@ builders: image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] zone: us-central1-a image_name: "{{ user `image_name` }}" - machine_type: n2-standard-4 + machine_type: n2-standard-16 disk_size: 50 temporary_key_pair_type: ed25519 tags: From adf23a0ffdcc3739d67e87219099e7d5897e907c Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 09:58:38 +0200 Subject: [PATCH 34/88] Adding jdk and gcp support --- ci-ubuntu-2204.yml | 2 +- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- cookbooks/travis_ci_ubuntu_2204/metadata.rb | 2 +- packer-assets/ci-ubuntu-2204-packages.txt | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index ee90671f6..0a117bce0 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -165,7 +165,7 @@ provisioners: - type: shell inline: chmod 0644 /var/tmp/ubuntu-2204-system-info-commands.yml - type: chef-solo - version: 17.6.18 + version: 17.10.3 config_template: chef-solo.rb.tmpl <% if ENV['CHEF_PROFILING'] %> execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo --chef-license accept-silent -F doc --no-color -c {{.ConfigPath}} -j {{.JsonPath}}" diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 2c5c88e3f..f6e1f69b0 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -69,8 +69,8 @@ 'e08c9542ff6cb231dd03d6f8096f6749e79056734bf69d5399205451b94c9d03' else override['travis_jdk']['versions'] = %w[ - openjdk10 openjdk11 + openjdk17 ] override['travis_jdk']['default'] = 'openjdk11' end diff --git a/cookbooks/travis_ci_ubuntu_2204/metadata.rb b/cookbooks/travis_ci_ubuntu_2204/metadata.rb index 34e473ee7..9ca704d73 100644 --- a/cookbooks/travis_ci_ubuntu_2204/metadata.rb +++ b/cookbooks/travis_ci_ubuntu_2204/metadata.rb @@ -4,7 +4,7 @@ maintainer 'Travis CI GmbH' maintainer_email 'contact+packer-templates@travis-ci.org' license 'MIT' -description 'Installs/Configures travis_ci_ubuntu_2004' +description 'Installs/Configures travis_ci_ubuntu_2204' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.1.0' source_url 'https://github.com/travis-ci/packer-templates' diff --git a/packer-assets/ci-ubuntu-2204-packages.txt b/packer-assets/ci-ubuntu-2204-packages.txt index c2ce672c2..dc3ecd8c9 100644 --- a/packer-assets/ci-ubuntu-2204-packages.txt +++ b/packer-assets/ci-ubuntu-2204-packages.txt @@ -63,6 +63,7 @@ ftp fuse gawk gcc +gcc-11-base gdisk geoip-database gettext From 3487751640254e29a2c31e1cc1c55d8db3c20c5e Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 10:22:10 +0200 Subject: [PATCH 35/88] disable couchdb --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- cookbooks/travis_ci_ubuntu_2204/recipes/default.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index a89aeb373..5309e53f5 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -128,7 +128,7 @@ override['travis_packer_templates']['job_board']['features'] = %w[ basic - couchdb + # couchdb disabled-ipv6 docker docker-compose diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index d55b48993..de936cb3a 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -61,7 +61,7 @@ # TODO: Uncomment when cassandra works on Java 8 again # https://github.com/travis-ci/packer-templates/issues/589 # include_recipe 'travis_build_environment::cassandra' -include_recipe 'travis_build_environment::couchdb' +# include_recipe 'travis_build_environment::couchdb' include_recipe 'travis_build_environment::elasticsearch' include_recipe 'travis_build_environment::xserver' include_recipe 'travis_build_environment::google_chrome' @@ -75,7 +75,7 @@ include_recipe '::mongodb' include_recipe '::mysql' include_recipe '::postgresql' - include_recipe 'travis_build_environment::couchdb' + # include_recipe 'travis_build_environment::couchdb' # include_recipe '::mariadb' end From 2b5b4031cd03166a743132f49e011867556725bb Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 10:26:08 +0200 Subject: [PATCH 36/88] Removing jdk17 --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index a89aeb373..08aa3a167 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -70,7 +70,6 @@ else override['travis_jdk']['versions'] = %w[ openjdk11 - openjdk17 ] override['travis_jdk']['default'] = 'openjdk11' end From f8c6ac6f9fb6a1121ef13b9501415195229c02f8 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 10:58:22 +0200 Subject: [PATCH 37/88] disable ibm toolchain --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- cookbooks/travis_ci_ubuntu_2204/recipes/default.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index e4f437dd8..2ed5383c9 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -116,7 +116,7 @@ override['travis_build_environment']['mercurial_install_type'] = 'pip' override['travis_build_environment']['mercurial_version'] = '5.3' -override['travis_build_environment']['ibm_advanced_tool_chain_version'] = 14.0 +# override['travis_build_environment']['ibm_advanced_tool_chain_version'] = 14.0 override['travis_packer_templates']['job_board']['stack'] = 'ubuntu_2204' diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index de936cb3a..4a4b0f1a2 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -66,7 +66,7 @@ include_recipe 'travis_build_environment::xserver' include_recipe 'travis_build_environment::google_chrome' include_recipe 'travis_build_environment::firefox' -include_recipe 'travis_build_environment::ibm_advanced_tool_chain' +# include_recipe 'travis_build_environment::ibm_advanced_tool_chain' include_recipe 'travis_phantomjs::2' if node['kernel']['machine'] != 'aarch64' From f1ebd521566f257df01d86f1a3b43b4f1577dca4 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 11:26:15 +0200 Subject: [PATCH 38/88] disable mongo --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- cookbooks/travis_ci_ubuntu_2204/recipes/default.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 2ed5383c9..3b8b48eba 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -137,7 +137,7 @@ google-chrome jdk memcached - mongodb + # mongodb mysql nodejs_interpreter perl_interpreter diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index 4a4b0f1a2..6fd4cb1d1 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -72,7 +72,7 @@ if node['kernel']['machine'] != 'aarch64' include_recipe '::erlang' # include_recipe '::couchdb' - include_recipe '::mongodb' + # include_recipe '::mongodb' include_recipe '::mysql' include_recipe '::postgresql' # include_recipe 'travis_build_environment::couchdb' From 7c94507e9625393897646c6d4cb0fb3eb23d2067 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 12:32:14 +0200 Subject: [PATCH 39/88] Using Postgresql 14 --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 3b8b48eba..bae13ea7f 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -121,7 +121,7 @@ override['travis_packer_templates']['job_board']['stack'] = 'ubuntu_2204' # not yet supported -override['travis_postgresql']['default_version'] = '12' +override['travis_postgresql']['default_version'] = '14' override['travis_postgresql']['alternate_versions'] = %w[] override['travis_postgresql']['enabled'] = false # is default instance started on machine boot? From 51ce04d40fc4ab325e2535f412a6fe70ac8c6663 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 12:43:27 +0200 Subject: [PATCH 40/88] Using Postgresql 14 --- cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb index 483a085d2..6bf528516 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb @@ -2,18 +2,18 @@ apt_repository 'postgresql' do uri 'http://apt.postgresql.org/pub/repos/apt/' - distribution 'focal-pgdg' + distribution 'jammy-pgdg' components ['main'] key 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' end -package 'postgresql-13' +package 'postgresql-14' service 'postgresql' do action [:stop, :disable] end -template '/etc/postgresql/13/main/pg_hba.conf' do +template '/etc/postgresql/14/main/pg_hba.conf' do source 'pg_hba.conf.erb' owner 'postgres' group 'postgres' From 0fd41de8876fd847d18b45f05aa170536ca14a83 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 12:59:52 +0200 Subject: [PATCH 41/88] test --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index bae13ea7f..fb5cd9833 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -11,6 +11,7 @@ 'pypy2.7-7.3.1' => %w[pypy], 'pypy3.6-7.3.1' => %w[pypy3] } + # packages build by Cpython + our repo pythons = %w[ 3.7.7 From 6291dedc50eaf7f7b8c53e7d28675fba0bc59cef Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 13:00:31 +0200 Subject: [PATCH 42/88] test --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index fb5cd9833..bae13ea7f 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -11,7 +11,6 @@ 'pypy2.7-7.3.1' => %w[pypy], 'pypy3.6-7.3.1' => %w[pypy3] } - # packages build by Cpython + our repo pythons = %w[ 3.7.7 From 5ef2cd8dd7307a385945cf877cc6ccd0912883c6 Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Tue, 14 Jun 2022 13:21:35 +0200 Subject: [PATCH 43/88] update python spec for jammy --- cookbooks/lib/languages/python_spec.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cookbooks/lib/languages/python_spec.rb b/cookbooks/lib/languages/python_spec.rb index c32b540eb..438937998 100644 --- a/cookbooks/lib/languages/python_spec.rb +++ b/cookbooks/lib/languages/python_spec.rb @@ -21,9 +21,16 @@ its(:stdout) { should match(/^wheel \d+\.\d+\.\d+/) } end - describe pycommand('py.test --version') do - its(:stdout) { should be_empty } - its(:stderr) { should match(/pytest (version )?\d+\.\d+\.\d+/) } + if %w[xenial bionic].include?(Support.distro) + describe pycommand('py.test --version') do + its(:stdout) { should be_empty } + its(:stderr) { should match(/pytest (version )?\d+\.\d+\.\d+/) } + end + elsif 'focal'.include?(Support.distro) || 'jammy'.include?(Support.distro) + describe pycommand('py.test --version') do + its(:stderr) { should be_empty } + its(:stdout) { should match(/pytest (version )?\d+\.\d+\.\d+/) } + end end describe pycommand('nosetests --version') do From e0a301125586d40323d09afd604898f6d347b03d Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Tue, 14 Jun 2022 13:23:55 +0200 Subject: [PATCH 44/88] Update python_spec.rb --- cookbooks/lib/languages/python_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/lib/languages/python_spec.rb b/cookbooks/lib/languages/python_spec.rb index 438937998..afc3b565e 100644 --- a/cookbooks/lib/languages/python_spec.rb +++ b/cookbooks/lib/languages/python_spec.rb @@ -26,7 +26,7 @@ its(:stdout) { should be_empty } its(:stderr) { should match(/pytest (version )?\d+\.\d+\.\d+/) } end - elsif 'focal'.include?(Support.distro) || 'jammy'.include?(Support.distro) + elsif %w[focal jammy].include?(Support.distro) describe pycommand('py.test --version') do its(:stderr) { should be_empty } its(:stdout) { should match(/pytest (version )?\d+\.\d+\.\d+/) } From 257f1d90c73f2d42b14fc6f4a6420ebc7602cb2c Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 13:52:21 +0200 Subject: [PATCH 45/88] add python alias --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index bae13ea7f..092744a3e 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -6,6 +6,7 @@ override['travis_build_environment']['system_python']['pythons'] = %w[3.10] # apt packages override['travis_build_environment']['python_aliases'] = { '3.10.5' => %w[3.10], + '3.9.0' => %w[3.9] '3.8.3' => %w[3.8], '3.7.7' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], From 834c5847062003dc24eb5633deeba48c71ba2d50 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 13:52:52 +0200 Subject: [PATCH 46/88] add python alias --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 092744a3e..0794afce8 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -6,7 +6,7 @@ override['travis_build_environment']['system_python']['pythons'] = %w[3.10] # apt packages override['travis_build_environment']['python_aliases'] = { '3.10.5' => %w[3.10], - '3.9.0' => %w[3.9] + '3.9.0' => %w[3.9], '3.8.3' => %w[3.8], '3.7.7' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], From 7a8cea50001ac9082734791052978b794582fa05 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 14:52:36 +0200 Subject: [PATCH 47/88] change python ver --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 0794afce8..7bfc103f1 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -6,7 +6,7 @@ override['travis_build_environment']['system_python']['pythons'] = %w[3.10] # apt packages override['travis_build_environment']['python_aliases'] = { '3.10.5' => %w[3.10], - '3.9.0' => %w[3.9], + '3.9.13' => %w[3.9], '3.8.3' => %w[3.8], '3.7.7' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], @@ -16,7 +16,7 @@ pythons = %w[ 3.7.7 3.8.3 - 3.9.0 + 3.9.13 3.10.5 ] override['travis_build_environment']['pythons'] = pythons From fad4bbb1d843d9c4603b2add20021fff1746c6ac Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Tue, 14 Jun 2022 17:27:40 +0200 Subject: [PATCH 48/88] Adding new PHP modules --- cookbooks/lib/languages/php_spec.rb | 78 +++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/cookbooks/lib/languages/php_spec.rb b/cookbooks/lib/languages/php_spec.rb index 033c4da38..ccecfdc3b 100644 --- a/cookbooks/lib/languages/php_spec.rb +++ b/cookbooks/lib/languages/php_spec.rb @@ -11,9 +11,16 @@ its(:stdout) { should match(/^PHP \d+\.\d+\.\d+.+fpm-fcgi/) } end - describe phpcommand('php -m --version') do - # Running `php -m` hangs, but adding more args doesn't (???) - its(:stdout) { should include(*PHP_MODULES) } + if %w[xenial bionic focal].include?(Support.distro) + describe phpcommand('php -m --version') do + # Running `php -m` hangs, but adding more args doesn't (???) + its(:stdout) { should include(*PHP_MODULES_OLDER) } + end + elsif 'jammy'.include?(Support.distro) + describe phpcommand('php -m --version') do + # Running `php -m` hangs, but adding more args doesn't (???) + its(:stdout) { should include(*PHP_MODULES_NEWER) } + end end describe file('/home/travis/.pearrc') do @@ -22,7 +29,7 @@ end end -PHP_MODULES = <<~EOF.split("\n") +PHP_MODULES_OLDER = <<~EOF.split("\n") Core PDO Phar @@ -58,3 +65,66 @@ zip zlib EOF + +PHP_MODULES_NEWER = <<~EOF.split("\n") + bcmath + bz2 + calendar + Core + ctype + curl + date + dba + dom + exif + fileinfo + filter + ftp + gd + gettext + gmp + hash + iconv + imap + intl + json + ldap + libxml + mbstring + mysqli + mysqlnd + openssl + pcntl + pcre + PDO + pdo_mysql + pdo_pgsql + pdo_sqlite + pgsql + Phar + posix + readline + Reflection + session + shmop + SimpleXML + soap + sockets + sodium + SPL + sqlite3 + standard + sysvmsg + sysvsem + sysvshm + tidy + tokenizer + xdebug + xml + xmlreader + xmlwriter + xsl + Zend OPcache + zip + zlib +EOF From d41d268f12d9ca3c8a4462be1bf3531c5b110d94 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Wed, 15 Jun 2022 09:09:54 +0200 Subject: [PATCH 49/88] Commenting couchdb settings --- ci-ubuntu-2204.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index d7df51056..1106d5c58 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -218,10 +218,10 @@ provisioners: # - "find /etc/systemd -type f -o -type l" # # - "rm -v /etc/systemd/system/network-online.target.wants/networking.service" # # - "rm -v /etc/systemd/system/multi-user.target.wants/networking.service" -- type: shell - inline: "sudo chown -R couchdb:couchdb /opt/couchdb/" -- type: shell - inline: "ls -lah /opt/couchdb/" +#- type: shell #no couchdb for jammy yet, needs to be commented till +# inline: "sudo chown -R couchdb:couchdb /opt/couchdb/" +#- type: shell +# inline: "ls -lah /opt/couchdb/" #here - type: shell scripts: - packer-scripts/create-image-metadata-tarball From 3f7fc5d47722181157418f9e78ac8d0e31bcfa1f Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Thu, 16 Jun 2022 11:06:59 +0200 Subject: [PATCH 50/88] set nodejs version --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 7bfc103f1..358eeb475 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -87,10 +87,11 @@ ) override['travis_build_environment']['nodejs_versions'] = %w[ - 12.7.0 - 10.16.0 + 14.18.1 + 16.13.0 + 17.1.0 ] -override['travis_build_environment']['nodejs_default'] = '10.16.0' +override['travis_build_environment']['nodejs_default'] = '14.18.1' rubies = %w[ 3.0.4 From a4385a3ec92dd318939da482b2caa3c901e59309 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Thu, 16 Jun 2022 11:17:46 +0200 Subject: [PATCH 51/88] add pypy --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 358eeb475..c906d0a8a 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -10,7 +10,8 @@ '3.8.3' => %w[3.8], '3.7.7' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], - 'pypy3.6-7.3.1' => %w[pypy3] + 'pypy3.6-7.3.1' => %w[pypy3], + 'pypy3.9-7.3.9' => %w[pypy3.9] } # packages build by Cpython + our repo pythons = %w[ From e86ed12415d6203041899fd9e1bdedb704ae277a Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Thu, 16 Jun 2022 16:57:37 +0200 Subject: [PATCH 52/88] setup go --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index c906d0a8a..f3a584244 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -55,7 +55,7 @@ override['travis_perlbrew']['prerequisite_packages'] = [] gimme_versions = %w[ - 1.11.1 + 1.18 ] override['travis_build_environment']['gimme']['versions'] = gimme_versions From 094da8c9b0a9613f4c4e44dca6d89e0af6b05048 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Fri, 17 Jun 2022 10:12:01 +0200 Subject: [PATCH 53/88] setup go --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index f3a584244..3c6b52daf 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -55,7 +55,7 @@ override['travis_perlbrew']['prerequisite_packages'] = [] gimme_versions = %w[ - 1.18 + 1.18.3 ] override['travis_build_environment']['gimme']['versions'] = gimme_versions From 51c4f5b8b4f77c00b4baf008835eb574d3649441 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Fri, 17 Jun 2022 14:03:01 +0200 Subject: [PATCH 54/88] add java --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 3c6b52daf..12a9ffb92 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -71,7 +71,9 @@ 'e08c9542ff6cb231dd03d6f8096f6749e79056734bf69d5399205451b94c9d03' else override['travis_jdk']['versions'] = %w[ + openjdk8 openjdk11 + openjdk17 ] override['travis_jdk']['default'] = 'openjdk11' end From 7acf801be0548537fd7c20ed3e8eab7f24306605 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Fri, 17 Jun 2022 14:26:08 +0200 Subject: [PATCH 55/88] add java --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 12a9ffb92..b943065f8 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -73,7 +73,6 @@ override['travis_jdk']['versions'] = %w[ openjdk8 openjdk11 - openjdk17 ] override['travis_jdk']['default'] = 'openjdk11' end From a2b904bff9db3ec64ce3b496751cb7e0c8883397 Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Fri, 17 Jun 2022 14:32:14 +0200 Subject: [PATCH 56/88] add java 17 --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index b943065f8..12a9ffb92 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -73,6 +73,7 @@ override['travis_jdk']['versions'] = %w[ openjdk8 openjdk11 + openjdk17 ] override['travis_jdk']['default'] = 'openjdk11' end From 283ee5ec48c0bfd3066585f4054c782f7ffcfb6f Mon Sep 17 00:00:00 2001 From: Robert Mazur <105283980+rob-mazur@users.noreply.github.com> Date: Mon, 20 Jun 2022 10:23:59 +0200 Subject: [PATCH 57/88] Update mariadb.rb --- cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb index ec2b57ad3..ebe2cb862 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb @@ -5,7 +5,7 @@ end execute 'mariadb_repo' do - command 'sudo add-apt-repository \'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal main\'' + command 'sudo add-apt-repository \'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.9/ubuntu focal main\'' end execute 'mariadb_install' do From 514d06ba90e6b8fe9766dd7617921ba2944856dd Mon Sep 17 00:00:00 2001 From: Robert Mazur Date: Mon, 11 Jul 2022 13:29:03 +0200 Subject: [PATCH 58/88] add generic lang to jammy --- cookbooks/travis_ci_ubuntu_2004/attributes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb index f7a14305a..04b453b4c 100644 --- a/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2004/attributes/default.rb @@ -200,6 +200,7 @@ rust elixir erlang + generic ] override['travis_docker']['version'] = '20.10.7' From a725fd0f2cf6e1e9812c0df997fc2783a9293d7f Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 14 Jul 2022 10:54:18 +0200 Subject: [PATCH 59/88] Adding Perforce for Jammy --- ci-ubuntu-2204.yml | 1 + packer-scripts/perforce-install | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 packer-scripts/perforce-install diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index 1106d5c58..c74adf8a0 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -198,6 +198,7 @@ provisioners: - packer-scripts/purge - packer-scripts/disable-apparmor - packer-scripts/run-serverspecs + - packer-scrupts/perforce-install - packer-scripts/test-system-info-output - packer-scripts/dump-dpkg-manifest - packer-scripts/create-bin-lib-checksums diff --git a/packer-scripts/perforce-install b/packer-scripts/perforce-install new file mode 100755 index 000000000..6549e3eb9 --- /dev/null +++ b/packer-scripts/perforce-install @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -o errexit + +main() { + + machine=$(lsb_release -sc) + + # Add Perforce packaging key + wget -qO - https://package.perforce.com/perforce.pubkey | sudo apt-key add - + + # Add Perforce repository + echo "deb http://package.perforce.com/apt/ubuntu ${machine} release" | sudo tee /etc/apt/sources.list.d/perforce.list + + apt-get update + + # Install Perforce + sudo apt-get install helix-p4d +} + +main "$@" From f835261b15c876c5b5d7748cda6676f3b3968065 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 14 Jul 2022 10:57:28 +0200 Subject: [PATCH 60/88] Small style changes --- ci-ubuntu-2004.yml | 2 +- ci-ubuntu-2204.yml | 2 +- tfw.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-ubuntu-2004.yml b/ci-ubuntu-2004.yml index 4c5531a19..40e6d5987 100644 --- a/ci-ubuntu-2004.yml +++ b/ci-ubuntu-2004.yml @@ -21,7 +21,7 @@ builders: secret_key: "{{ user `aws_secret_key` }}" region: us-east-1 source_ami: "{{ user `travis_source_ami` }}" - ami_name: travis-ci-worker {{ isotime "2006-01-02 15:04:06" | clean_ami_name }} + ami_name: travis-ci-worker {{ isotime "2006-01-02 15:04:06" | clean_resource_name }} instance_type: m6g.xlarge ssh_username: ubuntu ami_virtualization_type: hvm diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index c74adf8a0..d4e87eef4 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -21,7 +21,7 @@ builders: secret_key: "{{ user `aws_secret_key` }}" region: us-east-1 source_ami: "{{ user `travis_source_ami` }}" - ami_name: travis-ci-worker {{ isotime "2006-01-02 15:04:06" | clean_ami_name }} + ami_name: travis-ci-worker {{ isotime "2006-01-02 15:04:06" | clean_resource_name }} instance_type: m6g.xlarge ssh_username: ubuntu ami_virtualization_type: hvm diff --git a/tfw.yml b/tfw.yml index 4bf6c1e65..f98f2f385 100644 --- a/tfw.yml +++ b/tfw.yml @@ -51,7 +51,7 @@ builders: owners: - 099720109477 most_recent: true - ami_name: tfw {{ isotime "2006-01-02 15:04:06" | clean_ami_name }} + ami_name: tfw {{ isotime "2006-01-02 15:04:06" | clean_resource_name }} instance_type: t2.large ssh_username: ubuntu ami_virtualization_type: hvm From 3bcfa8b7103a922045f2c2c727954e12eee11db0 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 14 Jul 2022 11:04:12 +0200 Subject: [PATCH 61/88] Small style changes --- ci-ubuntu-2204.yml | 2 +- jupiter-brain.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index d4e87eef4..be8e55091 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -198,7 +198,7 @@ provisioners: - packer-scripts/purge - packer-scripts/disable-apparmor - packer-scripts/run-serverspecs - - packer-scrupts/perforce-install + - packer-scripts/perforce-install - packer-scripts/test-system-info-output - packer-scripts/dump-dpkg-manifest - packer-scripts/create-bin-lib-checksums diff --git a/jupiter-brain.yml b/jupiter-brain.yml index b765b223b..5ee4c5faf 100644 --- a/jupiter-brain.yml +++ b/jupiter-brain.yml @@ -12,7 +12,7 @@ builders: secret_key: "{{ user `aws_secret_key` }}" region: us-east-1 source_ami: ami-8e0b9499 - ami_name: travis-ci-jupiter-brain {{ isotime "2006-01-02 15:04:06" | clean_ami_name }} <%= git_desc %> + ami_name: travis-ci-jupiter-brain {{ isotime "2006-01-02 15:04:06" | clean_resource_name }} <%= git_desc %> instance_type: t2.micro ssh_username: jupiterbrain ami_virtualization_type: hvm From e14751d004d79b4b9ca844c2a41976e81bb0a747 Mon Sep 17 00:00:00 2001 From: Arek Rus <57007917+r-arek@users.noreply.github.com> Date: Thu, 27 Oct 2022 10:24:46 +0200 Subject: [PATCH 62/88] Update default.rb --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 12a9ffb92..a5325c728 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -103,7 +103,7 @@ override['travis_build_environment']['virtualenv']['version'] = '20.0.20' -override['travis_build_environment']['default_ruby'] = rubies.reject { |n| n =~ /jruby/ }.max +override['travis_build_environment']['default_ruby'] = '2.7.6' override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ From 03e05ae0c862a28e27e06abc42b9e4cecdcecdb5 Mon Sep 17 00:00:00 2001 From: Arek Rus <57007917+r-arek@users.noreply.github.com> Date: Thu, 27 Oct 2022 10:25:12 +0200 Subject: [PATCH 63/88] Update default.rb --- cookbooks/travis_ci_ubuntu_2204_minimal/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204_minimal/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204_minimal/attributes/default.rb index bbada378d..7a2a29532 100644 --- a/cookbooks/travis_ci_ubuntu_2204_minimal/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204_minimal/attributes/default.rb @@ -34,7 +34,7 @@ 3.1.2 ] # override['travis_build_environment']['rubies'] = %w[2.4.6 2.5.5 2.6.3] -override['travis_build_environment']['default_ruby'] = rubies.reject { |n| n =~ /jruby/ }.max +override['travis_build_environment']['default_ruby'] = '2.7.6' override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['php_versions'] = [] override['travis_build_environment']['php_aliases'] = {} From def2df685106f36f2bd9666a105fe14755605c4c Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 2 Feb 2023 14:19:20 +0100 Subject: [PATCH 64/88] Adding git repository --- cookbooks/travis_ci_ubuntu_2204/recipes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index 6fd4cb1d1..200d90366 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -62,6 +62,7 @@ # https://github.com/travis-ci/packer-templates/issues/589 # include_recipe 'travis_build_environment::cassandra' # include_recipe 'travis_build_environment::couchdb' +include_recipe 'travis_build_environment::git' include_recipe 'travis_build_environment::elasticsearch' include_recipe 'travis_build_environment::xserver' include_recipe 'travis_build_environment::google_chrome' From 6de61bed3746a527d827c52ebd90b2f19372de7d Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 9 Feb 2023 15:07:13 +0100 Subject: [PATCH 65/88] Fixing Jammy syntax, updating git --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index a5325c728..577bed58c 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -6,7 +6,6 @@ override['travis_build_environment']['system_python']['pythons'] = %w[3.10] # apt packages override['travis_build_environment']['python_aliases'] = { '3.10.5' => %w[3.10], - '3.9.13' => %w[3.9], '3.8.3' => %w[3.8], '3.7.7' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], @@ -15,9 +14,8 @@ } # packages build by Cpython + our repo pythons = %w[ - 3.7.7 + 3.7.13 3.8.3 - 3.9.13 3.10.5 ] override['travis_build_environment']['pythons'] = pythons @@ -103,7 +101,7 @@ override['travis_build_environment']['virtualenv']['version'] = '20.0.20' -override['travis_build_environment']['default_ruby'] = '2.7.6' +override['travis_build_environment']['default_ruby'] = '3.1.2' override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ From b634da89361c7340855f24f70454de83bff20832 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 9 Feb 2023 15:37:07 +0100 Subject: [PATCH 66/88] Fixing Jammy syntax, updating git --- cookbooks/lib/languages/python_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/lib/languages/python_spec.rb b/cookbooks/lib/languages/python_spec.rb index afc3b565e..3671e9d36 100644 --- a/cookbooks/lib/languages/python_spec.rb +++ b/cookbooks/lib/languages/python_spec.rb @@ -65,8 +65,8 @@ } elsif 'jammy'.include?(Support.distro) vers = { + 'python3.7' => '3.7.13', 'python3.8' => '3.8.3', - 'python3.9' => '3.9.13', 'python3.10' => '3.10.5' } end From b05cfc5b1552a3153458af60842a4c303f396765 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 4 May 2023 11:48:43 +0200 Subject: [PATCH 67/88] Bumping cmake version --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 577bed58c..484519260 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -79,8 +79,8 @@ override['leiningen']['home'] = '/home/travis' override['leiningen']['user'] = 'travis' -override['travis_build_environment']['cmake']['version'] = '3.16.8' -override['travis_build_environment']['cmake']['checksum'] = '6b5c856158c16307692ae54ba761cfe30df7b2a131d602e83fda42a572973063' +override['travis_build_environment']['cmake']['version'] = '3.26.3' +override['travis_build_environment']['cmake']['checksum'] = '28d4d1d0db94b47d8dfd4f7dec969a3c747304f4a28ddd6fd340f553f2384dc2' override['travis_build_environment']['cmake']['download_url'] = ::File.join( 'https://cmake.org/files', "v#{node['travis_build_environment']['cmake']['version'].split('.')[0, 2].join('.')}", From 6ec8e02067058fca4030dc3eadecd7cda848f463 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 4 May 2023 12:30:04 +0200 Subject: [PATCH 68/88] Syntax fix --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 484519260..4609e5c3d 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -84,7 +84,7 @@ override['travis_build_environment']['cmake']['download_url'] = ::File.join( 'https://cmake.org/files', "v#{node['travis_build_environment']['cmake']['version'].split('.')[0, 2].join('.')}", - "cmake-#{node['travis_build_environment']['cmake']['version']}-Linux-x86_64.tar.gz" + "cmake-#{node['travis_build_environment']['cmake']['version']}-linux-x86_64.tar.gz" ) override['travis_build_environment']['nodejs_versions'] = %w[ From 62d3a19758a6bd90c5b7c3f9eb5c091b61492114 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Mon, 15 May 2023 16:00:59 +0200 Subject: [PATCH 69/88] Bumping clang version and fixing mongodb --- .../travis_ci_ubuntu_2204/recipes/default.rb | 2 +- .../travis_ci_ubuntu_2204/recipes/mongodb.rb | 15 +++++++++------ packer-assets/ci-ubuntu-2204-packages.txt | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index 200d90366..0d1c48d9a 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -58,6 +58,7 @@ #include_recipe 'travis_build_environment::redis' # include_recipe 'travis_build_environment::mongodb' include_recipe 'memcached' +include_recipe '::mongodb' # TODO: Uncomment when cassandra works on Java 8 again # https://github.com/travis-ci/packer-templates/issues/589 # include_recipe 'travis_build_environment::cassandra' @@ -73,7 +74,6 @@ if node['kernel']['machine'] != 'aarch64' include_recipe '::erlang' # include_recipe '::couchdb' - # include_recipe '::mongodb' include_recipe '::mysql' include_recipe '::postgresql' # include_recipe 'travis_build_environment::couchdb' diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb index 94c79ce2d..8c1836474 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb @@ -1,19 +1,22 @@ # frozen_string_literal: true execute 'add_mongodb_gpg_key' do - command 'sudo wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -' + command 'sudo wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb.gpg > /dev/null' end execute 'add_mongodb_repository' do - command 'sudo echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list' + command 'sudo echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list' end -apt_update +execute 'update_repositories' do + command 'sudo apt-get update -y' +end -package 'mongodb' do +package 'mongodb-org' do action :install end -service 'mongodb' do - action [:disable, :stop] +service 'mongod' do + action %i[stop disable] + not_if { node['travis_build_environment']['mongodb']['service_enabled'] } end diff --git a/packer-assets/ci-ubuntu-2204-packages.txt b/packer-assets/ci-ubuntu-2204-packages.txt index dc3ecd8c9..9a1162737 100644 --- a/packer-assets/ci-ubuntu-2204-packages.txt +++ b/packer-assets/ci-ubuntu-2204-packages.txt @@ -121,6 +121,7 @@ libltdl-dev libmcrypt-dev libmhash-dev libmysqlclient-dev +libncurses5 libncurses5-dev libncursesw5-dev libossp-uuid-dev From 33962b0dd46de6c5947f550fa326a0a6ca28eee6 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Tue, 16 May 2023 16:25:03 +0200 Subject: [PATCH 70/88] Adding shell lang support --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 4609e5c3d..cb5d67fd0 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -194,6 +194,7 @@ php node_js smalltalk + shell csharp perl rust From 8ec5e018eaa4bcfcbc9194be923e5b962ec6ab9b Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Wed, 31 May 2023 13:10:01 +0200 Subject: [PATCH 71/88] Adding libonig-dev package to Jammy --- packer-assets/ci-ubuntu-2204-packages.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/packer-assets/ci-ubuntu-2204-packages.txt b/packer-assets/ci-ubuntu-2204-packages.txt index 9a1162737..def284c83 100644 --- a/packer-assets/ci-ubuntu-2204-packages.txt +++ b/packer-assets/ci-ubuntu-2204-packages.txt @@ -125,6 +125,7 @@ libncurses5 libncurses5-dev libncursesw5-dev libossp-uuid-dev +libonig-dev libpng-dev libpq-dev libreadline-dev From cfd84dc771669f52253a1f954cb538c53560e390 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 2 Nov 2023 14:25:22 +0100 Subject: [PATCH 72/88] Ruby2.7 made default --- .../travis_ci_ubuntu_2204/attributes/default.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index cb5d67fd0..29041c51f 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -7,7 +7,7 @@ override['travis_build_environment']['python_aliases'] = { '3.10.5' => %w[3.10], '3.8.3' => %w[3.8], - '3.7.7' => %w[3.7], + '3.7.13' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], 'pypy3.6-7.3.1' => %w[pypy3], 'pypy3.9-7.3.9' => %w[pypy3.9] @@ -88,20 +88,22 @@ ) override['travis_build_environment']['nodejs_versions'] = %w[ - 14.18.1 - 16.13.0 - 17.1.0 + 16.20.2 + 18.18.2 ] -override['travis_build_environment']['nodejs_default'] = '14.18.1' +override['travis_build_environment']['nodejs_default'] = '18.18.2' rubies = %w[ + 2.7.8 3.0.4 3.1.2 ] override['travis_build_environment']['virtualenv']['version'] = '20.0.20' -override['travis_build_environment']['default_ruby'] = '3.1.2' + +# changing default ruby version due to dpl issues +override['travis_build_environment']['default_ruby'] = '2.7.8' override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ From 7a1a9a36de4c79ff969b4b85dd0373ab58e5533b Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 2 Nov 2023 14:33:27 +0100 Subject: [PATCH 73/88] Adding redis service --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 1 + cookbooks/travis_ci_ubuntu_2204/recipes/default.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 29041c51f..f26387f8b 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -150,6 +150,7 @@ phantomjs postgresql python_interpreter + redis ruby_interpreter sqlite xserver diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index 0d1c48d9a..d9933efad 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -55,7 +55,7 @@ # include_recipe 'travis_postgresql' # include_recipe 'travis_build_environment::mysql' include_recipe 'travis_perlbrew::multi' -#include_recipe 'travis_build_environment::redis' +include_recipe 'travis_build_environment::redis' # include_recipe 'travis_build_environment::mongodb' include_recipe 'memcached' include_recipe '::mongodb' From a20cf743d47ff4a1bc096efc71e7bcaa192cbe36 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Fri, 7 Jun 2024 13:34:46 +0200 Subject: [PATCH 74/88] Jammy image updates, changing default ruby --- ci-ubuntu-2204.yml | 93 ++------------ cookbooks/lib/languages/python_spec.rb | 7 +- .../attributes/default.rb | 118 ++++++------------ .../travis_ci_ubuntu_2204/recipes/default.rb | 10 -- .../travis_ci_ubuntu_2204/recipes/mariadb.rb | 2 +- .../travis_ci_ubuntu_2204/recipes/mongodb.rb | 26 ++-- .../recipes/postgresql.rb | 2 + .../ubuntu-2204-system-info-commands.yml | 6 +- packer-scripts/cosign-install | 47 +++++++ packer-scripts/pre-chef-bootstrap-jammy | 23 +++- packer-scripts/pyenv-install | 16 +++ packer-scripts/updates | 34 +++++ 12 files changed, 187 insertions(+), 197 deletions(-) create mode 100644 packer-scripts/cosign-install create mode 100644 packer-scripts/pyenv-install create mode 100644 packer-scripts/updates diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index be8e55091..1bf3a4150 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -15,24 +15,6 @@ variables: travis_vpc_id: "{{ env `TRAVIS_VPC_ID` }}" travis_source_ami: "{{ env `TRAVIS_SOURCE_AMI` }}" builders: -- type: amazon-ebs - name: amazon-ebs - access_key: "{{ user `aws_access_key` }}" - secret_key: "{{ user `aws_secret_key` }}" - region: us-east-1 - source_ami: "{{ user `travis_source_ami` }}" - ami_name: travis-ci-worker {{ isotime "2006-01-02 15:04:06" | clean_resource_name }} - instance_type: m6g.xlarge - ssh_username: ubuntu - ami_virtualization_type: hvm - tags: - role: worker - associate_public_ip_address: true - subnet_id: "{{ user `travis_subnet_id` }}" - vpc_id: "{{ user `travis_vpc_id` }}" - source_ami_filter: - owners: - - 099720109477 - type: googlecompute name: googlecompute communicator: ssh @@ -42,7 +24,7 @@ builders: image_description: Travis CI Ubuntu 22.04 account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: ubuntu-2204-jammy-v20220607 + source_image_family: ubuntu-2204-lts image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] zone: us-central1-a image_name: "{{ user `image_name` }}" @@ -53,12 +35,6 @@ builders: - ci - ubuntu-2204 - travis-ci-packer-templates -- type: lxd - name: lxd - image: ubuntu:jammy #identifier of image taken from https://us.images.linuxcontainers.org/ - output_image: "{{ user `image_name` }}" - publish_properties: - - description: Travis CI jammy build env template! - type: docker name: docker ssh_pty: true @@ -103,7 +79,6 @@ provisioners: destination: /var/tmp/packages.txt only: - googlecompute - - lxd - type: file source: packer-assets/ci-ubuntu-2204-docker-packages.txt destination: /var/tmp/packages.txt @@ -120,35 +95,6 @@ provisioners: only: - docker - googlecompute - - lxd -- type: shell - inline: "uname -a" - only: - - amazon-ebs - - lxd - # Recommendations for lxd images -- type: shell - inline: "systemctl mask sys-kernel-config.mount" - only: - - lxd -- type: shell - inline: "systemctl mask systemd-modules-load.service" - only: - - lxd -- type: shell - inline: sleep 25 - # Delay command 'snap install' execution. Problem with snap install core. Workaround : error: too early for operation, device not yet seeded..." - only: - - lxd -- type: shell - inline: "apt install snapd -y && snap install core" - only: - - lxd -- type: shell - inline: "apt-get remove --purge cloud-init --yes" - only: - - lxd - # end Recommendations - type: shell scripts: - packer-scripts/pre-chef-bootstrap-jammy @@ -165,7 +111,7 @@ provisioners: - type: shell inline: chmod 0644 /var/tmp/ubuntu-2204-system-info-commands.yml - type: chef-solo - version: 17.10.3 + version: 18.4.12 config_template: chef-solo.rb.tmpl <% if ENV['CHEF_PROFILING'] %> execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo --chef-license accept-silent -F doc --no-color -c {{.ConfigPath}} -j {{.JsonPath}}" @@ -199,6 +145,9 @@ provisioners: - packer-scripts/disable-apparmor - packer-scripts/run-serverspecs - packer-scripts/perforce-install + - packer-scripts/pyenv-install + - packer-scripts/cosign-install + - packer-scripts/updates - packer-scripts/test-system-info-output - packer-scripts/dump-dpkg-manifest - packer-scripts/create-bin-lib-checksums @@ -210,20 +159,12 @@ provisioners: - TRAVIS_OBFUSCATE_PASSWORD=1 - TRAVIS_UID={{ user `travis_uid` }} execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" - #- type: shell - # environment_vars: - # - TRAVIS_OBFUSCATE_PASSWORD=1 - # - TRAVIS_UID={{ user `travis_uid` }} - # execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" - # inline: - # - "find /etc/systemd -type f -o -type l" - # # - "rm -v /etc/systemd/system/network-online.target.wants/networking.service" - # # - "rm -v /etc/systemd/system/multi-user.target.wants/networking.service" -#- type: shell #no couchdb for jammy yet, needs to be commented till -# inline: "sudo chown -R couchdb:couchdb /opt/couchdb/" -#- type: shell -# inline: "ls -lah /opt/couchdb/" #here -- type: shell +# STILL ISSUE WITH COUCHDB 2024 +# - type: shell +# inline: "sudo chown -R couchdb:couchdb /opt/couchdb/" +# - type: shell +# inline: "ls -lah /opt/couchdb/" +# - type: shell scripts: - packer-scripts/create-image-metadata-tarball environment_vars: @@ -253,7 +194,6 @@ post-processors: - IMAGE_NAME={{ user `image_name` }} only: - googlecompute - - lxd - type: shell-local script: bin/job-board-register environment_vars: @@ -263,14 +203,3 @@ post-processors: - - type: shell-local script: bin/write-latest-image-name - - type: shell-local - script: bin/lxc-export.sh - environment_vars: - - IMAGE_NAME={{ user `image_name` }} - only: - - lxd - - type: shell-local - inline: - - echo {{ user `image_name` }} > /tmp/packer-build-image-name - only: - - lxd diff --git a/cookbooks/lib/languages/python_spec.rb b/cookbooks/lib/languages/python_spec.rb index 3671e9d36..d4e448f30 100644 --- a/cookbooks/lib/languages/python_spec.rb +++ b/cookbooks/lib/languages/python_spec.rb @@ -65,9 +65,10 @@ } elsif 'jammy'.include?(Support.distro) vers = { - 'python3.7' => '3.7.13', - 'python3.8' => '3.8.3', - 'python3.10' => '3.10.5' + 'python3.7' => '3.7.17', + 'python3.8' => '3.8.18', + 'python3.10' => '3.10.14', + 'python3.12' => '3.12.2' } end diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index f26387f8b..414eeed1e 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -5,18 +5,19 @@ '/var/tmp/ubuntu-2204-system-info-commands.yml' override['travis_build_environment']['system_python']['pythons'] = %w[3.10] # apt packages override['travis_build_environment']['python_aliases'] = { - '3.10.5' => %w[3.10], - '3.8.3' => %w[3.8], - '3.7.13' => %w[3.7], + '3.12.2' => %w[3.12], + '3.10.14' => %w[3.10], + '3.8.18' => %w[3.8], + '3.7.17' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], 'pypy3.6-7.3.1' => %w[pypy3], - 'pypy3.9-7.3.9' => %w[pypy3.9] } # packages build by Cpython + our repo pythons = %w[ - 3.7.13 - 3.8.3 - 3.10.5 + 3.7.17 + 3.8.18 + 3.10.14 + 3.12.2 ] override['travis_build_environment']['pythons'] = pythons @@ -30,25 +31,6 @@ override['travis_build_environment']['php_default_version'] = php_aliases['8.1'] override['travis_build_environment']['php_aliases'] = php_aliases -# if node['kernel']['machine'] == "x86_64" # Is it required -# arch = 'amd64' -# else -# arch = node['kernel']['machine'] -# end - -# version = '7.6.0' -# override['travis_build_environment']['elasticsearch']['version'] = version -# override['travis_build_environment']['elasticsearch']['package_name'] = "elasticsearch-#{version}-#{arch}.deb" - -# if node['kernel']['machine'] == 'ppc64le' # consider removing, for ppc64le creation we use bash scripts -# override['travis_build_environment']['php_versions'] = [] -# override['travis_build_environment']['php_default_version'] = [] -# override['travis_build_environment']['php_aliases'] = {} - -# TODO: remove if/when an HHVM version is available on ppc64 -# override['travis_build_environment']['hhvm_enabled'] = false -# end - override['travis_perlbrew']['perls'] = [{ name: '5.33.0', version: 'perl-5.33.0' }, { name: '5.34.0', version: 'perl-5.34.0' }] override['travis_perlbrew']['prerequisite_packages'] = [] @@ -56,25 +38,20 @@ 1.18.3 ] + +override['travis_build_environment']['shfmt_url'] = 'https://github.com/mvdan/sh/releases/download/v3.7.0/shfmt_v3.7.0_linux_amd64' +default['travis_build_environment']['shfmt_checksum'] = '0264c424278b18e22453fe523ec01a19805ce3b8ebf18eaf3aadc1edc23f42e3' + override['travis_build_environment']['gimme']['versions'] = gimme_versions override['travis_build_environment']['gimme']['default_version'] = gimme_versions.max -if node['kernel']['machine'] == 'ppc64le' - override['travis_java']['default_version'] = 'openjdk8' - override['travis_java']['alternate_versions'] = %w[openjdk7] -elsif node['kernel']['machine'] == 'aarch64' - override['travis_build_environment']['arch'] = 'arm64' - override['travis_build_environment']['packer']['arm64']['version'] = '1.8.1' - override['travis_build_environment']['packer']['arm64']['checksum'] = \ - 'e08c9542ff6cb231dd03d6f8096f6749e79056734bf69d5399205451b94c9d03' -else - override['travis_jdk']['versions'] = %w[ - openjdk8 - openjdk11 - openjdk17 - ] - override['travis_jdk']['default'] = 'openjdk11' -end +override['travis_jdk']['versions'] = %w[ + openjdk8 + openjdk11 + openjdk17 +] + +override['travis_jdk']['default'] = 'openjdk11' override['leiningen']['home'] = '/home/travis' override['leiningen']['user'] = 'travis' @@ -95,15 +72,15 @@ rubies = %w[ 2.7.8 - 3.0.4 3.1.2 + 3.3.0 ] -override['travis_build_environment']['virtualenv']['version'] = '20.0.20' +override['travis_build_environment']['virtualenv']['version'] = '20.24.6' # changing default ruby version due to dpl issues -override['travis_build_environment']['default_ruby'] = '2.7.8' +override['travis_build_environment']['default_ruby'] = '3.3.0' override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ @@ -121,7 +98,11 @@ override['travis_build_environment']['mercurial_install_type'] = 'pip' override['travis_build_environment']['mercurial_version'] = '5.3' -# override['travis_build_environment']['ibm_advanced_tool_chain_version'] = 14.0 +override['travis_build_environment']['ibm_advanced_tool_chain_version'] = 14.0 + +override['travis_build_environment']['packer']['amd64']['version'] = '1.9.4' +override['travis_build_environment']['packer']['amd64']['checksum'] = \ +'6cd5269c4245aa8c99e551d1b862460d63fe711c58bec618fade25f8492e80d9' override['travis_packer_templates']['job_board']['stack'] = 'ubuntu_2204' @@ -132,7 +113,6 @@ override['travis_packer_templates']['job_board']['features'] = %w[ basic - # couchdb disabled-ipv6 docker docker-compose @@ -142,7 +122,7 @@ google-chrome jdk memcached - # mongodb + mongodb mysql nodejs_interpreter perl_interpreter @@ -155,35 +135,7 @@ sqlite xserver ] -override['travis_packer_templates']['job_board']['languages'] = %w[ - __ubuntu_2204__ - c - c++ - clojure - cplusplus - cpp - default - generic - go - groovy - java - node_js - php - pure_java - python - ruby - scala - julia - erlang -] -# Override values in array : minimal set of options -override['travis_packer_templates']['job_board']['features'] = %w[ - generic - basic - ruby_interpreter -] -# Set minimal languages override['travis_packer_templates']['job_board']['languages'] = %w[ __ubuntu_2204__ c @@ -195,6 +147,8 @@ go java php + generic + shell node_js smalltalk shell @@ -205,9 +159,9 @@ erlang ] -override['travis_docker']['version'] = '20.10.7' -override['travis_docker']['binary']['version'] = '20.10.7' -override['travis_docker']['compose']['url'] = 'https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64' -override['travis_docker']['compose']['sha256sum'] = 'f3f10cf3dbb8107e9ba2ea5f23c1d2159ff7321d16f0a23051d68d8e2547b323' -override['travis_docker']['binary']['url'] = 'https://download.docker.com/linux/static/stable/x86_64/docker-20.10.7.tgz' -override['travis_docker']['binary']['checksum'] = '34ad50146fce29b28e5115a1e8510dd5232459c9a4a9f28f65909f92cca314d9' +override['travis_docker']['version'] = '24.0.5' +override['travis_docker']['binary']['version'] = '24.0.5' +override['travis_docker']['compose']['url'] = 'https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-Linux-x86_64' +override['travis_docker']['compose']['sha256sum'] = 'f45e4cb687df8b48a57f656097ce7175fa8e8bef70be407b011e29ff663f475f' +override['travis_docker']['binary']['url'] = 'https://download.docker.com/linux/static/stable/x86_64/docker-24.0.5.tgz' +override['travis_docker']['binary']['checksum'] = '0a5f3157ce25532c5c1261a97acf3b25065cfe25940ef491fa01d5bea18ddc86' \ No newline at end of file diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index d9933efad..9d371535e 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -56,7 +56,6 @@ # include_recipe 'travis_build_environment::mysql' include_recipe 'travis_perlbrew::multi' include_recipe 'travis_build_environment::redis' -# include_recipe 'travis_build_environment::mongodb' include_recipe 'memcached' include_recipe '::mongodb' # TODO: Uncomment when cassandra works on Java 8 again @@ -71,15 +70,6 @@ # include_recipe 'travis_build_environment::ibm_advanced_tool_chain' include_recipe 'travis_phantomjs::2' -if node['kernel']['machine'] != 'aarch64' - include_recipe '::erlang' - # include_recipe '::couchdb' - include_recipe '::mysql' - include_recipe '::postgresql' - # include_recipe 'travis_build_environment::couchdb' - # include_recipe '::mariadb' -end - # HACK: ubuntu_1804-specific shims! execute 'ln -svf /usr/bin/hashdeep /usr/bin/md5deep' diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb index ebe2cb862..ab6693a75 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/mariadb.rb @@ -5,7 +5,7 @@ end execute 'mariadb_repo' do - command 'sudo add-apt-repository \'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.9/ubuntu focal main\'' + command 'sudo add-apt-repository \'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/11.4.1/ubuntu jammy main\'' end execute 'mariadb_install' do diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb index 8c1836474..65aba3199 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb @@ -1,22 +1,24 @@ # frozen_string_literal: true -execute 'add_mongodb_gpg_key' do - command 'sudo wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb.gpg > /dev/null' +apt_repository 'mongodb-6.0' do + uri 'http://repo.mongodb.org/apt/ubuntu' + distribution 'jammy/mongodb-org/6.0' + components %w[multiverse] + key 'https://www.mongodb.org/static/pgp/server-6.0.asc' + retries 2 + retry_delay 30 end -execute 'add_mongodb_repository' do - command 'sudo echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list' -end - -execute 'update_repositories' do - command 'sudo apt-get update -y' -end - -package 'mongodb-org' do - action :install +execute 'mongodb_install' do + command 'sudo apt install mongodb-org -y' end service 'mongod' do action %i[stop disable] not_if { node['travis_build_environment']['mongodb']['service_enabled'] } end + +apt_repository 'mongodb-6.0' do + action :remove + not_if { node['travis_build_environment']['mongodb']['keep_repo'] } +end diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb index 6bf528516..16d6e9ccc 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb @@ -8,6 +8,8 @@ end package 'postgresql-14' + action :install +end service 'postgresql' do action [:stop, :disable] diff --git a/packer-assets/ubuntu-2204-system-info-commands.yml b/packer-assets/ubuntu-2204-system-info-commands.yml index 314c25a76..e20ccc458 100644 --- a/packer-assets/ubuntu-2204-system-info-commands.yml +++ b/packer-assets/ubuntu-2204-system-info-commands.yml @@ -114,9 +114,9 @@ commands: name: default ruby version - command: python --version name: default python version - - command: couchdb -V - name: CouchDB version - pipe: perl -n -e '/CouchDB ([\d\.]+)/ && {print "couchdb $1\n"}' + # - command: couchdb -V + # name: CouchDB version + # pipe: perl -n -e '/CouchDB ([\d\.]+)/ && {print "couchdb $1\n"}' - name: ElasticSearch version port: 9200 command: curl localhost:9200 diff --git a/packer-scripts/cosign-install b/packer-scripts/cosign-install new file mode 100644 index 000000000..d0456927c --- /dev/null +++ b/packer-scripts/cosign-install @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +set -o errexit +set -o xtrace + +main() { + + # Cosign installation + local COSIGN_VERSION="v2.2.4" + wget -q "https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/cosign-linux-amd64" + # rename the binary + sudo mv cosign-linux-amd64 /usr/local/bin/not_cosign + sudo chmod +x /usr/local/bin/not_cosign + not_cosign version + + # Rekor-cli installtion + local REKOR_VERSION="v1.3.6" + wget -q "https://github.com/sigstore/rekor/releases/download/${REKOR_VERSION}/rekor-cli-linux-amd64" + sudo mv rekor-cli-linux-amd64 /usr/local/bin/rekor-cli + sudo chmod +x /usr/local/bin/rekor-cli + rekor-cli version + + # create dummy cosign script + cat <<'EOF' >>cosign + #!/usr/bin/env bash + + set -o errexit + set -o xtrace + + main() { + + args="$@" + # call original cosign binary and send arguments + not_cosign $args + +} + +main "$@" + +EOF + + # make cosign script executable and move to /usr/local/bin + sudo chmod +x cosign && sudo mv cosign /usr/local/bin/cosign + +} + +main "$@" diff --git a/packer-scripts/pre-chef-bootstrap-jammy b/packer-scripts/pre-chef-bootstrap-jammy index a84116bd9..00173a2b3 100644 --- a/packer-scripts/pre-chef-bootstrap-jammy +++ b/packer-scripts/pre-chef-bootstrap-jammy @@ -30,6 +30,7 @@ __enable_i386() { } __install_packages() { + if [[ "${PACKER_BUILDER_TYPE}" =~ vmware ]]; then APT_GET_INSTALL_PRE_CHEF='open-vm-tools' fi @@ -39,11 +40,8 @@ __install_packages() { /var/lib/apt/lists/* fi - if [[ "${PACKER_BUILDER_TYPE}" =~ amazon-ebs ]]; then - dpkg --remove-architecture i386 - fi - apt-get update -yqq + apt-get upgrade -y apt-get install -yqq \ --no-install-suggests \ --no-install-recommends \ @@ -52,19 +50,36 @@ __install_packages() { curl \ gawk \ git \ + git-lfs \ libelf-dev \ sudo \ wget \ rsync \ + rabbitmq-server \ python3 \ + python3.10 \ python3-pip \ ${APT_GET_INSTALL_PRE_CHEF} + # curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py + # python3.10 get-pip.py + pip install setuptools --upgrade + # link python ##TODO move this to chef if ! [ -x "$(command -v python)" ]; then update-alternatives --install /usr/bin/python python /usr/bin/python3 1 update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 fi + +} + +__setup_redis() { + echo "Installing the newest redis" + curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list + sudo apt-get update -y + sudo apt-get install redis redis-tools redis-server -y + sed -ie 's/^bind.*/bind 127.0.0.1/' /etc/redis/redis.conf } __setup_sshd() { diff --git a/packer-scripts/pyenv-install b/packer-scripts/pyenv-install new file mode 100644 index 000000000..171b75a9c --- /dev/null +++ b/packer-scripts/pyenv-install @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -o errexit +set -o xtrace + +main() { + + # Install pyenv-update plugin + git config --global --add safe.directory /opt/pyenv + cd /opt/pyenv/bin/ + git checkout master + git clone https://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update + pyenv update + pyenv rehash && hash -r + +} \ No newline at end of file diff --git a/packer-scripts/updates b/packer-scripts/updates new file mode 100644 index 000000000..e69ac259a --- /dev/null +++ b/packer-scripts/updates @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +set -o errexit +set -o xtrace + +main() { + + echo "Appling main updates" + + apt-get update -yqq + apt-get dist-upgrade -y + apt full-upgrade -y + apt-get autoremove -y + apt-get clean -y + + echo "Installing pip-review" + + # wget https://bootstrap.pypa.io/get-pip.py + # sudo python3 get-pip.py + pip install pip-review + pip-review --auto + + echo "Appling docker buildx fix" + sudo install -m 0755 -d /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + sudo chmod a+r /etc/apt/keyrings/docker.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get update -y + sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + #pip install --upgrade pip pyopenssl certifi rsa pytest oauthlib testresources setuptools numpy + +} + +main "$@" From e817b4aa0419ffc6665cea74df616e8906d7a2b4 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Fri, 7 Jun 2024 13:45:58 +0200 Subject: [PATCH 75/88] Modifying cosign script, docker+cmake+packer+otp+shfmt+virtualenv updates --- ci-ubuntu-2204.yml | 2 +- .../attributes/default.rb | 34 ++++++++++--------- packer-scripts/cosign-install | 2 +- packer-scripts/updates | 2 +- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index 1bf3a4150..f6629a711 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -164,7 +164,7 @@ provisioners: # inline: "sudo chown -R couchdb:couchdb /opt/couchdb/" # - type: shell # inline: "ls -lah /opt/couchdb/" -# - type: shell +- type: shell scripts: - packer-scripts/create-image-metadata-tarball environment_vars: diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 414eeed1e..40363be0b 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -39,8 +39,8 @@ ] -override['travis_build_environment']['shfmt_url'] = 'https://github.com/mvdan/sh/releases/download/v3.7.0/shfmt_v3.7.0_linux_amd64' -default['travis_build_environment']['shfmt_checksum'] = '0264c424278b18e22453fe523ec01a19805ce3b8ebf18eaf3aadc1edc23f42e3' +override['travis_build_environment']['shfmt_url'] = 'https://github.com/mvdan/sh/releases/download/v3.8.0/shfmt_v3.8.0_linux_amd64' +override['travis_build_environment']['shfmt_checksum'] = '27b3c6f9d9592fc5b4856c341d1ff2c88856709b9e76469313642a1d7b558fe0' override['travis_build_environment']['gimme']['versions'] = gimme_versions override['travis_build_environment']['gimme']['default_version'] = gimme_versions.max @@ -56,8 +56,8 @@ override['leiningen']['home'] = '/home/travis' override['leiningen']['user'] = 'travis' -override['travis_build_environment']['cmake']['version'] = '3.26.3' -override['travis_build_environment']['cmake']['checksum'] = '28d4d1d0db94b47d8dfd4f7dec969a3c747304f4a28ddd6fd340f553f2384dc2' +override['travis_build_environment']['cmake']['version'] = '3.29.0' +override['travis_build_environment']['cmake']['checksum'] = 'f06258f52c5649752dfb10c4c2e1d8167c760c8826f078c6f5c332fa9d976bf8' override['travis_build_environment']['cmake']['download_url'] = ::File.join( 'https://cmake.org/files', "v#{node['travis_build_environment']['cmake']['version'].split('.')[0, 2].join('.')}", @@ -66,9 +66,9 @@ override['travis_build_environment']['nodejs_versions'] = %w[ 16.20.2 - 18.18.2 + 18.20.3 ] -override['travis_build_environment']['nodejs_default'] = '18.18.2' +override['travis_build_environment']['nodejs_default'] = '18.20.3' rubies = %w[ 2.7.8 @@ -84,7 +84,7 @@ override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ - 24.2.1 + 25.3.2.6 ] elixirs = %w[ 1.12.2 @@ -97,15 +97,17 @@ override['travis_build_environment']['use_tmpfs_for_builds'] = false override['travis_build_environment']['mercurial_install_type'] = 'pip' -override['travis_build_environment']['mercurial_version'] = '5.3' +override['travis_build_environment']['mercurial_version'] = '6.5.2' override['travis_build_environment']['ibm_advanced_tool_chain_version'] = 14.0 -override['travis_build_environment']['packer']['amd64']['version'] = '1.9.4' +override['travis_build_environment']['packer']['amd64']['version'] = '1.11.0' override['travis_build_environment']['packer']['amd64']['checksum'] = \ -'6cd5269c4245aa8c99e551d1b862460d63fe711c58bec618fade25f8492e80d9' +'dcac06a4c671bbb71e916da5abe947ebf4d6aa35c197e21c7c7b1d68cb8b7cad' override['travis_packer_templates']['job_board']['stack'] = 'ubuntu_2204' +override['travis_build_environment']['firefox_version'] = '99.0' + # not yet supported override['travis_postgresql']['default_version'] = '14' override['travis_postgresql']['alternate_versions'] = %w[] @@ -159,9 +161,9 @@ erlang ] -override['travis_docker']['version'] = '24.0.5' -override['travis_docker']['binary']['version'] = '24.0.5' -override['travis_docker']['compose']['url'] = 'https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-Linux-x86_64' -override['travis_docker']['compose']['sha256sum'] = 'f45e4cb687df8b48a57f656097ce7175fa8e8bef70be407b011e29ff663f475f' -override['travis_docker']['binary']['url'] = 'https://download.docker.com/linux/static/stable/x86_64/docker-24.0.5.tgz' -override['travis_docker']['binary']['checksum'] = '0a5f3157ce25532c5c1261a97acf3b25065cfe25940ef491fa01d5bea18ddc86' \ No newline at end of file +override['travis_docker']['version'] = '26.1.3' +override['travis_docker']['binary']['version'] = '26.1.3' +override['travis_docker']['compose']['url'] = 'https://github.com/docker/compose/releases/download/v2.27.1/docker-compose-Linux-x86_64' +override['travis_docker']['compose']['sha256sum'] = 'ddc876fe2a89d5b7ea455146b0975bfe52904eecba9b192193377d6f99d69ad9' +override['travis_docker']['binary']['url'] = 'https://download.docker.com/linux/static/stable/x86_64/docker-26.1.3.tgz' +override['travis_docker']['binary']['checksum'] = 'a50076d372d3bbe955664707af1a4ce4f5df6b2d896e68b12ecc74e724d1db31' \ No newline at end of file diff --git a/packer-scripts/cosign-install b/packer-scripts/cosign-install index d0456927c..d84747448 100644 --- a/packer-scripts/cosign-install +++ b/packer-scripts/cosign-install @@ -31,7 +31,7 @@ main() { args="$@" # call original cosign binary and send arguments - not_cosign $args + echo y | not_cosign $args } diff --git a/packer-scripts/updates b/packer-scripts/updates index e69ac259a..bc711ac7a 100644 --- a/packer-scripts/updates +++ b/packer-scripts/updates @@ -8,8 +8,8 @@ main() { echo "Appling main updates" apt-get update -yqq - apt-get dist-upgrade -y apt full-upgrade -y + apt install linux-headers-generic -y apt-get autoremove -y apt-get clean -y From b90444d88b7508879f08af7592ef2d5f5be73af8 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Mon, 10 Jun 2024 11:54:40 +0200 Subject: [PATCH 76/88] Adding easy_install --- packer-assets/ci-ubuntu-2204-packages.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packer-assets/ci-ubuntu-2204-packages.txt b/packer-assets/ci-ubuntu-2204-packages.txt index def284c83..e1b0f6a73 100644 --- a/packer-assets/ci-ubuntu-2204-packages.txt +++ b/packer-assets/ci-ubuntu-2204-packages.txt @@ -185,6 +185,8 @@ postgresql-client powermgmt-base procps psmisc +python-setuptools +python3-setuptools python3 python3-apport python3-apt From e6786c2becc93c01a6a76bb4514ea5ec2a0aa2fb Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Mon, 10 Jun 2024 14:34:11 +0200 Subject: [PATCH 77/88] Adding rabbitmq-install script --- ci-ubuntu-2204.yml | 1 + packer-scripts/rabbitmq-install | 44 +++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 packer-scripts/rabbitmq-install diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index f6629a711..57cf6bdb6 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -147,6 +147,7 @@ provisioners: - packer-scripts/perforce-install - packer-scripts/pyenv-install - packer-scripts/cosign-install + - packer-scripts/rabbitmq-install - packer-scripts/updates - packer-scripts/test-system-info-output - packer-scripts/dump-dpkg-manifest diff --git a/packer-scripts/rabbitmq-install b/packer-scripts/rabbitmq-install new file mode 100644 index 000000000..658d2f4c7 --- /dev/null +++ b/packer-scripts/rabbitmq-install @@ -0,0 +1,44 @@ +#!/bin/bash + +sudo apt-get install curl gnupg apt-transport-https -y + +## Team RabbitMQ's main signing key +curl -1sLf "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null +## Community mirror of Cloudsmith: modern Erlang repository +curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg > /dev/null +## Community mirror of Cloudsmith: RabbitMQ repository +curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.9F4587F226208342.gpg > /dev/null + +## Add apt repositories maintained by Team RabbitMQ +sudo tee /etc/apt/sources.list.d/rabbitmq.list < Date: Wed, 12 Jun 2024 16:38:39 +0200 Subject: [PATCH 78/88] Updates --- .../travis_ci_ubuntu_2204/attributes/default.rb | 1 - packer-scripts/updates | 12 ++++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 40363be0b..737517bce 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -150,7 +150,6 @@ java php generic - shell node_js smalltalk shell diff --git a/packer-scripts/updates b/packer-scripts/updates index bc711ac7a..be90f4258 100644 --- a/packer-scripts/updates +++ b/packer-scripts/updates @@ -17,7 +17,7 @@ main() { # wget https://bootstrap.pypa.io/get-pip.py # sudo python3 get-pip.py - pip install pip-review + pip install --upgrade pip pyopenssl certifi rsa pytest oauthlib testresources setuptools dbus-python numpy pip-review pip-review --auto echo "Appling docker buildx fix" @@ -27,7 +27,15 @@ main() { echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update -y sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - #pip install --upgrade pip pyopenssl certifi rsa pytest oauthlib testresources setuptools numpy + + # Install required clang + clang_version=18 + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh $clang_version + + # Update composer + /home/travis/.phpenv/shims/composer self-update } From d2d1c371f74db75da96ca16a396c64a48b1fcef0 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Tue, 18 Jun 2024 11:37:13 +0200 Subject: [PATCH 79/88] Image fixes, syntax update, SSH important fix --- .travis.yml | 2 +- Gemfile.lock | 106 ++++++++++-------- .../attributes/default.rb | 2 +- packer-scripts/cleanup | 2 +- packer-scripts/rabbitmq-install | 49 ++------ packer-scripts/run-serverspecs | 6 +- packer-scripts/updates | 13 ++- 7 files changed, 76 insertions(+), 104 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1acc8a72e..a7fdcf481 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ install: fi - export GIT_DESC="$(git describe --always --dirty --tags)" - rvm use 2.7.4 --install --binary --fuzzy -- gem install bundler:2.2.27 +- gem install bundler:2.5.13 - bundle install --jobs=3 --retry=2 --path=vendor/bundle - ./bin/packer-build-install - ln -sv "${TRAVIS_BUILD_DIR}" "${TRAVIS_BUILD_DIR}/tmp/packer-chef-local" diff --git a/Gemfile.lock b/Gemfile.lock index 7bf95fadb..736ee9803 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,24 +10,24 @@ GIT GEM remote: https://rubygems.org/ specs: - activesupport (5.2.6) + activesupport (5.2.8.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) coderay (1.1.3) - concurrent-ruby (1.1.9) - diff-lcs (1.4.4) + concurrent-ruby (1.3.3) + diff-lcs (1.5.1) docile (1.4.0) erubis (2.7.0) - faraday (0.17.4) + faraday (0.17.6) multipart-post (>= 1.2, < 3) faraday_middleware (0.14.0) faraday (>= 0.7.4, < 1.0) - ffi-yajl (2.4.0) + ffi-yajl (2.6.0) libyajl2 (>= 1.2) foodcritic (16.3.0) erubis @@ -44,73 +44,81 @@ GEM multi_json (~> 1.0) net-http-persistent (~> 2.9) net-http-pipeline - git (1.9.1) + git (1.19.1) + addressable (~> 2.8) rchardet (~> 1.8) - i18n (1.8.10) + i18n (1.14.5) concurrent-ruby (~> 1.0) + json (2.7.2) + language_server-protocol (3.17.0.3) libyajl2 (2.1.0) - method_source (1.0.0) - mini_portile2 (2.6.1) - minitest (5.14.4) + method_source (1.1.0) + mini_portile2 (2.8.7) + minitest (5.23.1) multi_json (1.15.0) - multipart-post (2.1.1) + multipart-post (2.4.1) net-http-persistent (2.9.4) net-http-pipeline (1.0.1) - nokogiri (1.12.5) - mini_portile2 (~> 2.6.1) + nokogiri (1.16.6) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - parallel (1.21.0) - parser (3.0.2.0) + parallel (1.25.1) + parser (3.3.3.0) ast (~> 2.4.1) + racc polyglot (0.3.5) - pry (0.14.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (4.0.6) - racc (1.6.0) - rainbow (3.0.0) - rake (13.0.6) + public_suffix (5.1.1) + racc (1.8.0) + rainbow (3.1.1) + rake (13.2.1) rchardet (1.8.0) - regexp_parser (2.1.1) - rexml (3.2.5) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + regexp_parser (2.9.2) + rexml (3.3.0) + strscan + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-support (3.10.2) - rubocop (1.22.3) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rubocop (1.64.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.12.0, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.12.0) - parser (>= 3.0.1.1) - ruby-progressbar (1.11.0) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + ruby-progressbar (1.13.0) rufus-lru (1.1.0) - simplecov (0.21.2) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) - simplecov_json_formatter (0.1.3) + simplecov_json_formatter (0.1.4) + strscan (3.1.0) thread_safe (0.3.6) - treetop (1.6.11) + treetop (1.6.12) polyglot (~> 0.3) - tzinfo (1.2.9) + tzinfo (1.2.11) thread_safe (~> 0.1) - unicode-display_width (2.1.0) + unicode-display_width (2.5.0) PLATFORMS ruby @@ -124,4 +132,4 @@ DEPENDENCIES travis-packer-build! BUNDLED WITH - 2.1.4 + 2.5.3 diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 737517bce..a898528b8 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -80,7 +80,7 @@ # changing default ruby version due to dpl issues -override['travis_build_environment']['default_ruby'] = '3.3.0' +override['travis_build_environment']['default_ruby'] = '3.3.1' override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ diff --git a/packer-scripts/cleanup b/packer-scripts/cleanup index 9bcb09cf4..80371627b 100755 --- a/packer-scripts/cleanup +++ b/packer-scripts/cleanup @@ -5,13 +5,13 @@ set -o xtrace shopt -s nullglob # clear the APT cache and delete everything from /var/cache/apt/archives/ +# removed /etc/ssh/ssh_host_* \ - this probably caused issues with ssh connection for some reason.. apt clean rm -rf \ /etc/apparmor* \ /etc/profile.d/jdk.csh \ /etc/profile.d/jdk.sh \ - /etc/ssh/ssh_host_* \ /lib/recovery-mode \ /opt/chef* \ /tmp/* \ diff --git a/packer-scripts/rabbitmq-install b/packer-scripts/rabbitmq-install index 658d2f4c7..45a713de6 100644 --- a/packer-scripts/rabbitmq-install +++ b/packer-scripts/rabbitmq-install @@ -1,44 +1,9 @@ #!/bin/bash -sudo apt-get install curl gnupg apt-transport-https -y - -## Team RabbitMQ's main signing key -curl -1sLf "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null -## Community mirror of Cloudsmith: modern Erlang repository -curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg > /dev/null -## Community mirror of Cloudsmith: RabbitMQ repository -curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.9F4587F226208342.gpg > /dev/null - -## Add apt repositories maintained by Team RabbitMQ -sudo tee /etc/apt/sources.list.d/rabbitmq.list < Date: Fri, 12 Jul 2024 13:01:17 +0200 Subject: [PATCH 80/88] Disk size increase, not-so-needed SSH fix --- ci-ubuntu-2204.yml | 9 +++++++-- cookbooks/lib/languages/python_spec.rb | 1 - cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 8 +++----- cookbooks/travis_ci_ubuntu_2204/recipes/default.rb | 4 ++-- cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb | 6 ------ packer-scripts/pre-chef-bootstrap-jammy | 6 +++--- packer-scripts/updates | 10 ++-------- 7 files changed, 17 insertions(+), 27 deletions(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index 57cf6bdb6..930133d4c 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -29,7 +29,8 @@ builders: zone: us-central1-a image_name: "{{ user `image_name` }}" machine_type: n2-standard-16 - disk_size: 50 + # Dont go over 70 - worker won't boot the image + disk_size: 70 temporary_key_pair_type: ed25519 tags: - ci @@ -147,7 +148,7 @@ provisioners: - packer-scripts/perforce-install - packer-scripts/pyenv-install - packer-scripts/cosign-install - - packer-scripts/rabbitmq-install + # - packer-scripts/rabbitmq-install - packer-scripts/updates - packer-scripts/test-system-info-output - packer-scripts/dump-dpkg-manifest @@ -165,6 +166,10 @@ provisioners: # inline: "sudo chown -R couchdb:couchdb /opt/couchdb/" # - type: shell # inline: "ls -lah /opt/couchdb/" +- type: shell + inline: "sudo systemctl disable --now ssh.socket && sudo systemctl enable --now ssh.service && sudo systemctl daemon-reload && sudo systemctl restart ssh" +# - type: shell +# inline: "sudo ssh-keygen -A && sudo dpkg-reconfigure openssh-server" - type: shell scripts: - packer-scripts/create-image-metadata-tarball diff --git a/cookbooks/lib/languages/python_spec.rb b/cookbooks/lib/languages/python_spec.rb index d4e448f30..eabc6c9bf 100644 --- a/cookbooks/lib/languages/python_spec.rb +++ b/cookbooks/lib/languages/python_spec.rb @@ -65,7 +65,6 @@ } elsif 'jammy'.include?(Support.distro) vers = { - 'python3.7' => '3.7.17', 'python3.8' => '3.8.18', 'python3.10' => '3.10.14', 'python3.12' => '3.12.2' diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index a898528b8..1215e906d 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -8,13 +8,11 @@ '3.12.2' => %w[3.12], '3.10.14' => %w[3.10], '3.8.18' => %w[3.8], - '3.7.17' => %w[3.7], 'pypy2.7-7.3.1' => %w[pypy], 'pypy3.6-7.3.1' => %w[pypy3], } # packages build by Cpython + our repo pythons = %w[ - 3.7.17 3.8.18 3.10.14 3.12.2 @@ -73,7 +71,7 @@ rubies = %w[ 2.7.8 3.1.2 - 3.3.0 + 3.3.1 ] override['travis_build_environment']['virtualenv']['version'] = '20.24.6' @@ -100,9 +98,9 @@ override['travis_build_environment']['mercurial_version'] = '6.5.2' override['travis_build_environment']['ibm_advanced_tool_chain_version'] = 14.0 -override['travis_build_environment']['packer']['amd64']['version'] = '1.11.0' +override['travis_build_environment']['packer']['amd64']['version'] = '1.11.1' override['travis_build_environment']['packer']['amd64']['checksum'] = \ -'dcac06a4c671bbb71e916da5abe947ebf4d6aa35c197e21c7c7b1d68cb8b7cad' +'07a9d92fe98d7bb4be09392c06ef6c4f9ffbc905fe6c29fff0622432367f01cc' override['travis_packer_templates']['job_board']['stack'] = 'ubuntu_2204' diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index 9d371535e..6cea6fee7 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -52,8 +52,8 @@ include_recipe 'travis_build_environment::lein' include_recipe 'travis_sbt_extras' include_recipe 'travis_build_environment::gradle' -# include_recipe 'travis_postgresql' -# include_recipe 'travis_build_environment::mysql' +include_recipe '::mysql' +include_recipe '::postgresql' include_recipe 'travis_perlbrew::multi' include_recipe 'travis_build_environment::redis' include_recipe 'memcached' diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb index 16d6e9ccc..852e393c4 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/postgresql.rb @@ -8,8 +8,6 @@ end package 'postgresql-14' - action :install -end service 'postgresql' do action [:stop, :disable] @@ -25,7 +23,3 @@ execute 'change_log_dir_permissions' do command 'sudo chmod -R 777 /var/log/postgresql' end - -apt_repository 'postgresql' do - action :remove -end diff --git a/packer-scripts/pre-chef-bootstrap-jammy b/packer-scripts/pre-chef-bootstrap-jammy index 00173a2b3..9e5ae0a6e 100644 --- a/packer-scripts/pre-chef-bootstrap-jammy +++ b/packer-scripts/pre-chef-bootstrap-jammy @@ -40,9 +40,9 @@ __install_packages() { /var/lib/apt/lists/* fi - apt-get update -yqq - apt-get upgrade -y - apt-get install -yqq \ + apt update -yqq + apt full-upgrade -y + apt install -yqq \ --no-install-suggests \ --no-install-recommends \ ca-certificates \ diff --git a/packer-scripts/updates b/packer-scripts/updates index 02d574370..b6120f11f 100644 --- a/packer-scripts/updates +++ b/packer-scripts/updates @@ -5,13 +5,7 @@ set -o xtrace main() { - echo "Appling main updates" - - apt-get update -yqq - # apt full-upgrade -y - # apt install linux-headers-generic -y - # apt-get autoremove -y - # apt-get clean -y + apt install linux-headers-generic -y echo "Installing pip-review" @@ -39,7 +33,7 @@ main() { # Update bundler gem install bundler - + } main "$@" From b417d10ca78bcdfd52271ff143cca31a2ac3dc56 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 25 Jul 2024 11:58:18 +0200 Subject: [PATCH 81/88] Adding python 3.12.4 --- cookbooks/lib/languages/python_spec.rb | 2 +- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbooks/lib/languages/python_spec.rb b/cookbooks/lib/languages/python_spec.rb index eabc6c9bf..78823c201 100644 --- a/cookbooks/lib/languages/python_spec.rb +++ b/cookbooks/lib/languages/python_spec.rb @@ -67,7 +67,7 @@ vers = { 'python3.8' => '3.8.18', 'python3.10' => '3.10.14', - 'python3.12' => '3.12.2' + 'python3.12' => '3.12.4' } end diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 1215e906d..df33fbf4d 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -5,7 +5,7 @@ '/var/tmp/ubuntu-2204-system-info-commands.yml' override['travis_build_environment']['system_python']['pythons'] = %w[3.10] # apt packages override['travis_build_environment']['python_aliases'] = { - '3.12.2' => %w[3.12], + '3.12.4' => %w[3.12], '3.10.14' => %w[3.10], '3.8.18' => %w[3.8], 'pypy2.7-7.3.1' => %w[pypy], @@ -15,7 +15,7 @@ pythons = %w[ 3.8.18 3.10.14 - 3.12.2 + 3.12.4 ] override['travis_build_environment']['pythons'] = pythons From 4bb3d32e6951b6eca7598dcfede451e88f1686ea Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Mon, 29 Jul 2024 11:12:55 +0200 Subject: [PATCH 82/88] Adding rabbitmq different mirror --- packer-scripts/pre-chef-bootstrap-jammy | 1 - packer-scripts/rabbitmq-install | 52 +++++++++++++++++++++---- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/packer-scripts/pre-chef-bootstrap-jammy b/packer-scripts/pre-chef-bootstrap-jammy index 9e5ae0a6e..7b39c811d 100644 --- a/packer-scripts/pre-chef-bootstrap-jammy +++ b/packer-scripts/pre-chef-bootstrap-jammy @@ -55,7 +55,6 @@ __install_packages() { sudo \ wget \ rsync \ - rabbitmq-server \ python3 \ python3.10 \ python3-pip \ diff --git a/packer-scripts/rabbitmq-install b/packer-scripts/rabbitmq-install index 45a713de6..26cce1530 100644 --- a/packer-scripts/rabbitmq-install +++ b/packer-scripts/rabbitmq-install @@ -1,9 +1,47 @@ #!/bin/bash - sudo apt remove --purge rabbitmq-server erlang* - curl -1sLf 'https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/setup.deb.sh' | sudo -E bash - sudo apt update -y - sudo apt install --upgrade erlang -y - wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.13.3/rabbitmq-server_3.13.3-1_all.deb - sudo dpkg -i rabbitmq-server_3.13.3-1_all.deb - rm rabbitmq-server_3.13.3-1_all.deb +sudo apt remove --purge rabbitmq-server erlang* + +sudo apt-get update -y + +sudo apt-get install curl gnupg apt-transport-https -y + +## Team RabbitMQ's main signing key +curl -1sLf "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null +## Community mirror of Cloudsmith: modern Erlang repository +curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg > /dev/null +## Community mirror of Cloudsmith: RabbitMQ repository +curl -1sLf https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/rabbitmq.9F4587F226208342.gpg > /dev/null + +sudo tee /etc/apt/sources.list.d/rabbitmq.list < Date: Mon, 29 Jul 2024 11:54:54 +0200 Subject: [PATCH 83/88] Adding rabbitmq different mirror --- ci-ubuntu-2204.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-2204.yml b/ci-ubuntu-2204.yml index 930133d4c..0377451aa 100644 --- a/ci-ubuntu-2204.yml +++ b/ci-ubuntu-2204.yml @@ -148,7 +148,7 @@ provisioners: - packer-scripts/perforce-install - packer-scripts/pyenv-install - packer-scripts/cosign-install - # - packer-scripts/rabbitmq-install + - packer-scripts/rabbitmq-install - packer-scripts/updates - packer-scripts/test-system-info-output - packer-scripts/dump-dpkg-manifest From e38579652144cdeef922b86701442304875ff3e6 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Wed, 31 Jul 2024 15:46:50 +0200 Subject: [PATCH 84/88] Adding clang-18 --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 10 +++++++++- packer-scripts/updates | 6 ------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index df33fbf4d..784d3882b 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -36,7 +36,15 @@ 1.18.3 ] - +override['travis_build_environment']['clang']['version'] = '18.1.8' +override['travis_build_environment']['clang']['download_url'] = ::File.join( + "https://github.com/llvm/llvm-project/releases/download/llvmorg-#{node['travis_build_environment']['clang']['version']}", + "clang+llvm-#{node['travis_build_environment']['clang']['version']}-x86_64-linux-gnu-ubuntu-18.04.tar.xz" +) + +override['travis_build_environment']['clang']['checksum'] = '54ec30358afcc9fb8aa74307db3046f5187f9fb89fb37064cdde906e062ebf36' + + override['travis_build_environment']['shfmt_url'] = 'https://github.com/mvdan/sh/releases/download/v3.8.0/shfmt_v3.8.0_linux_amd64' override['travis_build_environment']['shfmt_checksum'] = '27b3c6f9d9592fc5b4856c341d1ff2c88856709b9e76469313642a1d7b558fe0' diff --git a/packer-scripts/updates b/packer-scripts/updates index b6120f11f..39ce21482 100644 --- a/packer-scripts/updates +++ b/packer-scripts/updates @@ -22,12 +22,6 @@ main() { sudo apt-get update -y sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - # Install required clang - clang_version=18 - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh $clang_version - # Update composer /home/travis/.phpenv/shims/composer self-update From 937cd90f3b642b9ff383e66c0f4214245f55d057 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Wed, 31 Jul 2024 16:37:39 +0200 Subject: [PATCH 85/88] Updating packer 1.11.1->1.11.2 --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 784d3882b..05e972068 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -106,9 +106,9 @@ override['travis_build_environment']['mercurial_version'] = '6.5.2' override['travis_build_environment']['ibm_advanced_tool_chain_version'] = 14.0 -override['travis_build_environment']['packer']['amd64']['version'] = '1.11.1' +override['travis_build_environment']['packer']['amd64']['version'] = '1.11.2' override['travis_build_environment']['packer']['amd64']['checksum'] = \ -'07a9d92fe98d7bb4be09392c06ef6c4f9ffbc905fe6c29fff0622432367f01cc' +'ced13efc257d0255932d14b8ae8f38863265133739a007c430cae106afcfc45a' override['travis_packer_templates']['job_board']['stack'] = 'ubuntu_2204' From e6334595f9bc4990b33452be185bbcc5ac63f06d Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Thu, 1 Aug 2024 13:52:22 +0200 Subject: [PATCH 86/88] gimme bump --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 05e972068..3c9fa8570 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -33,7 +33,7 @@ override['travis_perlbrew']['prerequisite_packages'] = [] gimme_versions = %w[ - 1.18.3 + 1.22.5 ] override['travis_build_environment']['clang']['version'] = '18.1.8' From ea248cd55ffddcf32795b4769ec1f6072d340722 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Wed, 4 Sep 2024 12:13:58 +0200 Subject: [PATCH 87/88] Ruby 3.3.5 added, gems update --- Gemfile.lock | 38 +++++++++---------- .../attributes/default.rb | 5 +-- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 736ee9803..436103e49 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,13 +15,13 @@ GEM i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) coderay (1.1.3) - concurrent-ruby (1.3.3) + concurrent-ruby (1.3.4) diff-lcs (1.5.1) - docile (1.4.0) + docile (1.4.1) erubis (2.7.0) faraday (0.17.6) multipart-post (>= 1.2, < 3) @@ -54,55 +54,52 @@ GEM libyajl2 (2.1.0) method_source (1.1.0) mini_portile2 (2.8.7) - minitest (5.23.1) + minitest (5.25.1) multi_json (1.15.0) multipart-post (2.4.1) net-http-persistent (2.9.4) net-http-pipeline (1.0.1) - nokogiri (1.16.6) + nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) - parallel (1.25.1) - parser (3.3.3.0) + parallel (1.26.3) + parser (3.3.4.2) ast (~> 2.4.1) racc polyglot (0.3.5) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.1.1) - racc (1.8.0) + public_suffix (6.0.1) + racc (1.8.1) rainbow (3.1.1) rake (13.2.1) rchardet (1.8.0) regexp_parser (2.9.2) - rexml (3.3.0) - strscan rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.0) + rspec-core (3.13.1) rspec-support (~> 3.13.0) - rspec-expectations (3.13.1) + rspec-expectations (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.1) - rubocop (1.64.1) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) + rubocop-ast (1.32.2) parser (>= 3.3.1.0) ruby-progressbar (1.13.0) rufus-lru (1.1.0) @@ -112,7 +109,6 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - strscan (3.1.0) thread_safe (0.3.6) treetop (1.6.12) polyglot (~> 0.3) @@ -132,4 +128,4 @@ DEPENDENCIES travis-packer-build! BUNDLED WITH - 2.5.3 + 2.5.18 diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 3c9fa8570..6892e02f0 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -78,15 +78,14 @@ rubies = %w[ 2.7.8 - 3.1.2 - 3.3.1 + 3.3.5 ] override['travis_build_environment']['virtualenv']['version'] = '20.24.6' # changing default ruby version due to dpl issues -override['travis_build_environment']['default_ruby'] = '3.3.1' +override['travis_build_environment']['default_ruby'] = '3.3.5' override['travis_build_environment']['rubies'] = rubies override['travis_build_environment']['otp_releases'] = %w[ From c1c46c8c74ed4bdcebaffedc9a41455080129aca Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Fri, 6 Sep 2024 12:40:02 +0200 Subject: [PATCH 88/88] GO update to 1.23 --- cookbooks/travis_ci_ubuntu_2204/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb index 6892e02f0..839d13ae1 100644 --- a/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/attributes/default.rb @@ -33,7 +33,7 @@ override['travis_perlbrew']['prerequisite_packages'] = [] gimme_versions = %w[ - 1.22.5 + 1.23.0 ] override['travis_build_environment']['clang']['version'] = '18.1.8'