Skip to content

Commit

Permalink
Jammy image updates, changing default ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
smokodon committed Jun 7, 2024
1 parent 7a1a9a3 commit a20cf74
Show file tree
Hide file tree
Showing 12 changed files with 187 additions and 197 deletions.
93 changes: 11 additions & 82 deletions ci-ubuntu-2204.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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` }}"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}}"
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -253,7 +194,6 @@ post-processors:
- IMAGE_NAME={{ user `image_name` }}
only:
- googlecompute
- lxd
- type: shell-local
script: bin/job-board-register
environment_vars:
Expand All @@ -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
7 changes: 4 additions & 3 deletions cookbooks/lib/languages/python_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
118 changes: 36 additions & 82 deletions cookbooks/travis_ci_ubuntu_2204/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -30,51 +31,27 @@
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'] = []

gimme_versions = %w[
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'
Expand All @@ -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[
Expand All @@ -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'

Expand All @@ -132,7 +113,6 @@

override['travis_packer_templates']['job_board']['features'] = %w[
basic
# couchdb
disabled-ipv6
docker
docker-compose
Expand All @@ -142,7 +122,7 @@
google-chrome
jdk
memcached
# mongodb
mongodb
mysql
nodejs_interpreter
perl_interpreter
Expand All @@ -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
Expand All @@ -195,6 +147,8 @@
go
java
php
generic
shell
node_js
smalltalk
shell
Expand All @@ -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'
10 changes: 0 additions & 10 deletions cookbooks/travis_ci_ubuntu_2204/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'

Expand Down
Loading

0 comments on commit a20cf74

Please sign in to comment.