From f08fcdb2bc04a8c4e619c722f735233996ad5127 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Fri, 10 May 2019 17:42:02 +0200 Subject: [PATCH 01/11] create a single ubuntu-1604 image this updates the naming from opal, stevonnie, and sardonyx to the linux release + version additionally, we can now take advantage of GCE image family names --- ci-ubuntu-1604.yml | 211 ++++++++ cookbooks/travis_ci_ubuntu_1604/.rspec | 4 + cookbooks/travis_ci_ubuntu_1604/README.md | 4 + .../attributes/default.rb | 209 ++++++++ cookbooks/travis_ci_ubuntu_1604/metadata.rb | 24 + .../travis_ci_ubuntu_1604/recipes/default.rb | 84 +++ packer-assets/ubuntu-1604-ci-packages.txt | 490 ++++++++++++++++++ packer-assets/ubuntu-1604-normal-purge.txt | 6 + .../ubuntu-1604-system-info-commands.yml | 158 ++++++ 9 files changed, 1190 insertions(+) create mode 100644 ci-ubuntu-1604.yml create mode 100644 cookbooks/travis_ci_ubuntu_1604/.rspec create mode 100644 cookbooks/travis_ci_ubuntu_1604/README.md create mode 100644 cookbooks/travis_ci_ubuntu_1604/attributes/default.rb create mode 100644 cookbooks/travis_ci_ubuntu_1604/metadata.rb create mode 100644 cookbooks/travis_ci_ubuntu_1604/recipes/default.rb create mode 100644 packer-assets/ubuntu-1604-ci-packages.txt create mode 100644 packer-assets/ubuntu-1604-normal-purge.txt create mode 100644 packer-assets/ubuntu-1604-system-info-commands.yml diff --git a/ci-ubuntu-1604.yml b/ci-ubuntu-1604.yml new file mode 100644 index 000000000..78c7ceef7 --- /dev/null +++ b/ci-ubuntu-1604.yml @@ -0,0 +1,211 @@ +--- +description: Travis CI Ubuntu 16.04 build environment template +variables: + docker_repository: travisci/ci-ubuntu-1604 + 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-1604-{{ timestamp }}-<%= git_desc %> + image_family: travis-ci-ubuntu-1604-edge + openstack_source_image_name: "{{ env `OS_SOURCE_IMAGE_XENIAL` }}" + travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}" + travis_cookbooks_edge_branch: master + travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}" + travis_uid: "{{ env `TRAVIS_UID` }}" + github_token: "{{ env `GITHUB_NOSCOPE_TOKEN` }}" + openstack_zone: "{{ env `OS_ZONE` }}" + openstack_key_path: "{{ env `OS_SSH_KEY_PATH`}}" + openstack_key_name: "{{ env `OS_SSH_KEY` }}" +builders: +- type: googlecompute + name: googlecompute + communicator: ssh + ssh_timeout: 10m + ssh_port: 22 + ssh_username: packer + image_description: Travis CI Ubuntu 16.04 + account_file: "{{ user `gce_account_file` }}" + project_id: "{{ user `gce_project_id` }}" + source_image_family: ubuntu-1604-lts + image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] + zone: us-central1-a + image_name: "{{ user `image_name` }}" + image_family: "{{ user `image_family` }}" + machine_type: n1-standard-4 + disk_size: 15 + tags: + - ci + - ubuntu-16.04 + - travis-ci-packer-templates +- type: docker + name: docker + ssh_pty: true + <% if RUBY_PLATFORM =~ /powerpc64/ %> + image: "travisci/gce-parity:16.04-ppc64le" + <% else %> + image: "travisci/gce-parity:16.04" + <% end %> + run_command: + - -d + - -v + - <%= Dir.pwd %>/tmp/packer-builder-tmp:/tmp + - --privileged=true + - --storage-opt=size=15G + - "{{ .Image }}" + - /sbin/init + commit: true +# Openstack builds disabled for failing with an error that's not possible to debug +# until a fix for the Packer error reporting is released: +# https://github.com/travis-ci/packer-templates/issues/555 +- type: openstack + name: openstack + flavor: m1.large + insecure: true + image_name: "{{ user `image_name` }}" + ssh_username: ubuntu + networks: + <% ENV['OS_NETWORKS'].to_s.split(',').map(&:strip).each do |network| %> + - <%= network %> + <% end %> + source_image_name: "{{ user `openstack_source_image_name` }}" + availability_zone: "{{ user `openstack_zone` }}" + ssh_keypair_name: "{{ user `openstack_key_name` }}" + ssh_private_key_file: "{{ user `openstack_key_path` }}" +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-1604-normal-purge.txt + destination: /var/tmp/purge.txt +- type: file + source: packer-assets/ubuntu-1604-ci-packages.txt + destination: /var/tmp/packages.txt + only: + - googlecompute + - openstack +- type: file + source: packer-assets/ubuntu-xenial-ci-sardonyx-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 +- type: shell + scripts: + - packer-scripts/pre-chef-bootstrap + - 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-16-04-system-info-commands.yml + destination: /var/tmp/ubuntu-16-04-system-info-commands.yml +- type: shell + inline: chmod 0644 /var/tmp/ubuntu-16-04-system-info-commands.yml +- type: chef-solo + version: 13.8.5 + config_template: chef-solo.rb.tmpl + <% if ENV['CHEF_PROFILING'] %> + execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo -F doc --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 %> + json: + travis_packer_build: + github_token: "{{ user `github_token` }}" + run_list: + - recipe[travis_ci_ubuntu_1604] + <% 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 + 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 + - 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 diff --git a/cookbooks/travis_ci_ubuntu_1604/.rspec b/cookbooks/travis_ci_ubuntu_1604/.rspec new file mode 100644 index 000000000..d8e1838e0 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1604/.rspec @@ -0,0 +1,4 @@ +--color +--format documentation +--require support +--order rand diff --git a/cookbooks/travis_ci_ubuntu_1604/README.md b/cookbooks/travis_ci_ubuntu_1604/README.md new file mode 100644 index 000000000..a775298d1 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1604/README.md @@ -0,0 +1,4 @@ +travis_ci_ubuntu_1604 Cookbook +========================= + +A wrapper cookbook for the "ubuntu_1604" CI image. diff --git a/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb b/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb new file mode 100644 index 000000000..41c93bae4 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb @@ -0,0 +1,209 @@ +# frozen_string_literal: true + +override['maven']['install_java'] = false + +default['travis_ci_ubuntu_1604']['prerequisite_packages'] = %w[ + cron + curl + git + sudo + wget +] + +override['travis_system_info']['commands_file'] = \ + '/var/tmp/ubuntu-1604-system-info-commands.yml' + +php_aliases = { + '5.6' => '5.6.40', + '7.1' => '7.1.27', + '7.2' => '7.2.15' +} +override['travis_build_environment']['php_versions'] = php_aliases.values +override['travis_build_environment']['php_default_version'] = php_aliases['7.2'] +override['travis_build_environment']['php_aliases'] = php_aliases + +if node['kernel']['machine'] == 'ppc64le' + 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.26', version: 'perl-5.26.2' }, + { name: '5.26-extras', version: 'perl-5.26.2', + arguments: '-Duseshrplib -Duseithreads', alias: '5.26-shrplib' }, + { name: '5.24', version: 'perl-5.24.0' }, + { name: '5.24-extras', version: 'perl-5.24.0', + arguments: '-Duseshrplib -Duseithreads', alias: '5.24-shrplib' } +] +override['travis_perlbrew']['modules'] = %w[ + Dist::Zilla + Dist::Zilla::Plugin::Bootstrap::lib + ExtUtils::MakeMaker + LWP + Module::Install + Moose + Test::Exception + Test::Most + Test::Pod + Test::Pod::Coverage +] +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 + + +ghc_versions = %w[ + 7.10.3 + 8.0.2 +] +cabal_versions = %w[ + 1.22 + 1.24 +] + +override['travis_build_environment']['haskell_ghc_versions'] = ghc_versions +override['travis_build_environment']['haskell_cabal_versions'] = cabal_versions +override['travis_build_environment']['haskell_default_ghc'] = ghc_versions.max +override['travis_build_environment']['haskell_default_cabal'] = cabal_versions.max + + +if node['kernel']['machine'] == 'ppc64le' + override['travis_java']['default_version'] = 'openjdk8' + override['travis_java']['alternate_versions'] = %w[openjdk7] +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']['nodejs_versions'] = %w[ + 11.0.0 + 8.12.0 +] +override['travis_build_environment']['nodejs_default'] = '8.12.0' + +pythons = %w[ + 2.7.15 + 3.6.7 + 3.7.1 +] + +# Reorder pythons so that default python2 and python3 come first +# as this affects the ordering in $PATH. +%w[3 2].each do |pyver| + pythons.select { |p| p =~ /^#{pyver}/ }.max.tap do |py| + pythons.unshift(pythons.delete(py)) + end +end + +def python_aliases(full_name) + nodash = full_name.split('-').first + return [nodash] unless nodash.include?('.') + + [nodash[0, 3]] +end + +override['travis_build_environment']['pythons'] = pythons +pythons.each do |full_name| + override['travis_build_environment']['python_aliases'][full_name] = \ + python_aliases(full_name) +end + +rubies = %w[ + 2.3.8 + 2.4.5 + 2.5.3 +] + +override['travis_build_environment']['default_ruby'] = rubies.reject { |n| n =~ /jruby/ }.max +override['travis_build_environment']['rubies'] = rubies + +override['travis_build_environment']['otp_releases'] = ["21.1"] +override['travis_build_environment']['elixir_versions'] = ["1.7.4"] +override['travis_build_environment']['default_elixir_version'] = "1.7.4" + +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'] = '4.8' + +override['travis_packer_templates']['job_board']['stack'] = 'ubuntu-1604' + +override['travis_postgresql']['default_version'] = '9.6' +override['travis_postgresql']['alternate_versions'] = %w[9.4 9.5 10] +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[ + __sardonyx__ + c + c++ + clojure + cplusplus + cpp + crystal + csharp + d + dart + default + elixir + erlang + generic + go + groovy + haskell + haxe + java + julia + node_js + perl + perl6 + php + pure_java + python + r + ruby + rust + scala +] diff --git a/cookbooks/travis_ci_ubuntu_1604/metadata.rb b/cookbooks/travis_ci_ubuntu_1604/metadata.rb new file mode 100644 index 000000000..5842dc866 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1604/metadata.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +name 'travis_ci_ubuntu_1604' +maintainer 'Travis CI GmbH' +maintainer_email 'contact+packer-templates@travis-ci.com' +license 'MIT' +description 'Installs/Configures travis_ci_ubuntu_1604' +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' diff --git a/cookbooks/travis_ci_ubuntu_1604/recipes/default.rb b/cookbooks/travis_ci_ubuntu_1604/recipes/default.rb new file mode 100644 index 000000000..f2333222f --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1604/recipes/default.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Cookbook Name:: travis_ci_ubuntu_1604 +# 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' +include_recipe 'travis_build_environment::haskell' if node['kernel']['machine'] != 'ppc64le' + +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 + 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_phantomjs::2' + +# HACK: sardonyx-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/ubuntu-1604-ci-packages.txt b/packer-assets/ubuntu-1604-ci-packages.txt new file mode 100644 index 000000000..5923b5055 --- /dev/null +++ b/packer-assets/ubuntu-1604-ci-packages.txt @@ -0,0 +1,490 @@ +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 +btrfs-tools +build-essential +busybox-initramfs +busybox-static +byobu +bzip2 +bzr +ca-certificates +ccache +command-not-found +command-not-found-data +console-setup +coreutils +cpio +crda +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 +fonts-ubuntu-font-family-console +friendly-recovery +ftp +fuse +gawk +gcc +gcc-4.8-base +gcc-4.9-base +gcc-6-base +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 +ifupdown +imagemagick +info +init-system-helpers +initramfs-tools +initramfs-tools-bin +initscripts +insserv +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 +libacl1 +libapparmor-perl +libapparmor1 +libapt-inst2.0 +libapt-pkg5.0 +libarchive-extract-perl +libasn1-8-heimdal +libasprintf0v5 +libattr1 +libaudit-common +libaudit1 +libbind9-140 +libblkid1 +libboost-iostreams1.58.0 +libbsd0 +libbz2-1.0 +libbz2-dev +libc-bin +libc-client2007e-dev +libc6 +libcap-ng0 +libcap2 +libcap2-bin +libcgmanager0 +libck-connector0 +libclass-accessor-perl +libcomerr2 +libcryptsetup4 +libcurl3 +libcurl3-gnutls +libcurl4-gnutls-dev +libcwidget3v5 +libdb5.3 +libdbus-1-3 +libdbus-glib-1-2 +libdebconfclient0 +libdevmapper1.02.1 +libdns162 +libdrm2 +libdumbnet1 +libedit2 +libelf1 +libept1.5.0 +libestr0 +libevent-2.0-5 +libevent-2.0-5 +libexpat1 +libexpat1-dev +libffi-dev +libffi6 +libfreetype6 +libfreetype6-dev +libfribidi0 +libfuse2 +libgc1c2 +libgcc1 +libgcrypt20 +libgdbm-dev +libgdbm3 +libgeoip1 +libgirepository-1.0-1 +libgl1-mesa-glx +libglib2.0-0 +libglib2.0-data +libgmp3-dev +libgnutls-openssl27 +libgnutls30 +libgpg-error0 +libgpm2 +libgssapi-krb5-2 +libgssapi3-heimdal +libhcrypto4-heimdal +libheimbase1-heimdal +libheimntlm0-heimdal +libhx509-5-heimdal +libicu-dev +libicu55 +libidn11 +libio-string-perl +libisc160 +libisccc140 +libisccfg140 +libjpeg8-dev +libjson-c2 +libjson0 +libk5crypto3 +libkeyutils1 +libklibc +libkmod2 +libkrb5-26-heimdal +libkrb5-3 +libkrb5-dev +libkrb5support0 +libldap-2.4-2 +libldap-2.4-2 +libldap2-dev +liblocale-gettext-perl +liblockfile-bin +liblockfile1 +liblog-message-simple-perl +libltdl-dev +liblwres141 +liblzma5 +libmagic1 +libmagickwand-dev +libmcrypt-dev +libmhash-dev +libmodule-pluggable-perl +libmount1 +libmpdec2 +libmysqlclient-dev +libncurses5 +libncurses5-dev +libncursesw5 +libncursesw5-dev +libnewt0.52 +libnfnetlink0 +libnih-dbus1 +libnih1 +libnl-3-200 +libnl-genl-3-200 +libnuma1 +libopts25 +libossp-uuid-dev +libp11-kit0 +libpam-cap +libpam-modules +libpam-modules-bin +libpam-runtime +libpam0g +libparse-debianchangelog-perl +libparted2 +libpcap0.8 +libpci3 +libpcre3 +libpipeline1 +libplymouth4 +libpng12-0 +libpng12-dev +libpod-latex-perl +libpopt0 +libpq-dev +libprocps4 +libpython-stdlib +libpython2.7 +libpython2.7-minimal +libpython2.7-stdlib +libpython3-stdlib +libpython3.5-minimal +libpython3.5-stdlib +libqt4-dev +libreadline-dev +libreadline6 +libreadline6 +libroken18-heimdal +librtmp1 +libsasl2-2 +libsasl2-dev +libsasl2-modules +libsasl2-modules-db +libselinux1 +libsemanage-common +libsemanage1 +libsepol1 +libsigc++-2.0-0v5 +libsigsegv2 +libslang2 +libsqlite3-0 +libsqlite3-dev +libss2 +libssl-dev +libssl1.0.0 +libssl1.0.0 +libstdc++6 +libsub-name-perl +libtasn1-6 +libterm-ui-perl +libtext-charwidth-perl +libtext-iconv-perl +libtext-soundex-perl +libtext-wrapi18n-perl +libtidy-dev +libtimedate-perl +libtinfo5 +libtool +libudev1 +libusb-0.1-4 +libusb-1.0-0 +libustr-1.0-1 +libuuid1 +libwind0-heimdal +libwrap0 +libx11-6 +libx11-data +libxapian22v5 +libxau6 +libxcb1 +libxdmcp6 +libxext6 +libxml2 +libxml2-dev +libxmuu1 +libxslt1-dev +libxtables11 +libyaml-0-2 +libyaml-0-2 +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 +module-init-tools +mount +mountall +mtr-tiny +multiarch-support +nano +ncurses-base +ncurses-bin +ncurses-term +net-tools +netbase +netcat-openbsd +ntfs-3g +ntp +ntpdate +openssh-client +openssh-server +openssh-sftp-server +openssl +os-prober +overlayroot +parted +passwd +patch +pciutils +perl +perl-base +perl-modules-5.22 +pkg-config +plymouth +plymouth-theme-ubuntu-text +pollinate +postgresql-client +powermgmt-base +procps +psmisc +python +python-apt +python-apt-common +python-boto +python-chardet +python-cheetah +python-configobj +python-debian +python-gdbm +python-json-pointer +python-jsonpatch +python-minimal +python-oauth +python-openssl +python-pam +python-pkg-resources +python-prettytable +python-pycurl +python-requests +python-serial +python-six +python-twisted-bin +python-twisted-core +python-twisted-names +python-twisted-web +python-urllib3 +python-xapian +python-yaml +python-zope.interface +python2.7 +python2.7-minimal +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 +python3.5 +python3.5-minimal +qt4-qmake +ragel +re2c +readline-common +resolvconf +rsync +rsyslog +ruby +run-one +screen +sed +sensible-utils +sgml-base +shared-mime-info +software-properties-common +sqlite3 +ssh-import-id +strace +subversion +sudo +sysv-rc +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 +upstart +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 diff --git a/packer-assets/ubuntu-1604-normal-purge.txt b/packer-assets/ubuntu-1604-normal-purge.txt new file mode 100644 index 000000000..533dce031 --- /dev/null +++ b/packer-assets/ubuntu-1604-normal-purge.txt @@ -0,0 +1,6 @@ +popularity-contest +ppp +pppconfig +pppoeconf +sshguard +unattended-upgrades diff --git a/packer-assets/ubuntu-1604-system-info-commands.yml b/packer-assets/ubuntu-1604-system-info-commands.yml new file mode 100644 index 000000000..fba6f5280 --- /dev/null +++ b/packer-assets/ubuntu-1604-system-info-commands.yml @@ -0,0 +1,158 @@ +--- +NOTE: this is a generated file +stack: ubuntu-1604 +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 671d80bd0b8a5ff01adeaf667c8be6234239183c Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Sat, 11 May 2019 13:25:40 +0200 Subject: [PATCH 02/11] corrections to the ubuntu 1604 config --- ci-ubuntu-1604.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci-ubuntu-1604.yml b/ci-ubuntu-1604.yml index 78c7ceef7..f024e38bb 100644 --- a/ci-ubuntu-1604.yml +++ b/ci-ubuntu-1604.yml @@ -32,10 +32,10 @@ builders: image_name: "{{ user `image_name` }}" image_family: "{{ user `image_family` }}" machine_type: n1-standard-4 - disk_size: 15 + disk_size: 20 tags: - ci - - ubuntu-16.04 + - ubuntu-1604 - travis-ci-packer-templates - type: docker name: docker @@ -125,10 +125,10 @@ provisioners: - TRAVIS_UID={{ user `travis_uid` }} execute_command: "{{ .Vars }} exec sudo -E -S bash '{{ .Path }}'" - type: file - source: packer-assets/ubuntu-16-04-system-info-commands.yml - destination: /var/tmp/ubuntu-16-04-system-info-commands.yml + source: packer-assets/ubuntu-1604-system-info-commands.yml + destination: /var/tmp/ubuntu-1604-system-info-commands.yml - type: shell - inline: chmod 0644 /var/tmp/ubuntu-16-04-system-info-commands.yml + inline: chmod 0644 /var/tmp/ubuntu-1604-system-info-commands.yml - type: chef-solo version: 13.8.5 config_template: chef-solo.rb.tmpl From c26383de4fc2520bd0cede4a57ee3a93b1e806de Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Sat, 11 May 2019 13:25:56 +0200 Subject: [PATCH 03/11] updates to elixir and erlang --- cookbooks/travis_ci_ubuntu_1604/attributes/default.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb b/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb index 41c93bae4..bd5131bbb 100644 --- a/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb @@ -133,9 +133,9 @@ def python_aliases(full_name) override['travis_build_environment']['default_ruby'] = rubies.reject { |n| n =~ /jruby/ }.max override['travis_build_environment']['rubies'] = rubies -override['travis_build_environment']['otp_releases'] = ["21.1"] -override['travis_build_environment']['elixir_versions'] = ["1.7.4"] -override['travis_build_environment']['default_elixir_version'] = "1.7.4" +override['travis_build_environment']['otp_releases'] = ["21.3"] +override['travis_build_environment']['elixir_versions'] = ["1.8.1"] +override['travis_build_environment']['default_elixir_version'] = "1.8.1" override['travis_build_environment']['update_hostname'] = false override['travis_build_environment']['update_hostname'] = true if node['kernel']['machine'] == 'ppc64le' From 2cd2063f5b03a9b4840d862ac2ba51628b3f7f6c Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Sat, 11 May 2019 13:37:09 +0200 Subject: [PATCH 04/11] fix some specs --- cookbooks/travis_ci_ubuntu_1604/attributes/default.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb b/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb index bd5131bbb..16016e26b 100644 --- a/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_1604/attributes/default.rb @@ -53,7 +53,6 @@ ] override['travis_perlbrew']['prerequisite_packages'] = [] - gimme_versions = %w[ 1.11.1 ] @@ -61,7 +60,6 @@ override['travis_build_environment']['gimme']['versions'] = gimme_versions override['travis_build_environment']['gimme']['default_version'] = gimme_versions.max - ghc_versions = %w[ 7.10.3 8.0.2 @@ -76,7 +74,6 @@ override['travis_build_environment']['haskell_default_ghc'] = ghc_versions.max override['travis_build_environment']['haskell_default_cabal'] = cabal_versions.max - if node['kernel']['machine'] == 'ppc64le' override['travis_java']['default_version'] = 'openjdk8' override['travis_java']['alternate_versions'] = %w[openjdk7] @@ -133,9 +130,9 @@ def python_aliases(full_name) override['travis_build_environment']['default_ruby'] = rubies.reject { |n| n =~ /jruby/ }.max override['travis_build_environment']['rubies'] = rubies -override['travis_build_environment']['otp_releases'] = ["21.3"] -override['travis_build_environment']['elixir_versions'] = ["1.8.1"] -override['travis_build_environment']['default_elixir_version'] = "1.8.1" +override['travis_build_environment']['otp_releases'] = ['21.3'] +override['travis_build_environment']['elixir_versions'] = ['1.8.1'] +override['travis_build_environment']['default_elixir_version'] = '1.8.1' override['travis_build_environment']['update_hostname'] = false override['travis_build_environment']['update_hostname'] = true if node['kernel']['machine'] == 'ppc64le' From db092d22c9db4b0003855d5aa881e5454e2ab862 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 16 May 2019 16:38:38 +0200 Subject: [PATCH 05/11] foundations for an ubuntu 18.04 image --- ci-ubuntu-1804.yml | 211 ++++++++ cookbooks/travis_ci_ubuntu_1804/.rspec | 4 + cookbooks/travis_ci_ubuntu_1804/README.md | 4 + .../attributes/default.rb | 206 ++++++++ cookbooks/travis_ci_ubuntu_1804/metadata.rb | 24 + .../travis_ci_ubuntu_1804/recipes/default.rb | 84 +++ packer-assets/ubuntu-1804-ci-packages.txt | 490 ++++++++++++++++++ packer-assets/ubuntu-1804-normal-purge.txt | 6 + .../ubuntu-1804-system-info-commands.yml | 158 ++++++ 9 files changed, 1187 insertions(+) create mode 100644 ci-ubuntu-1804.yml create mode 100644 cookbooks/travis_ci_ubuntu_1804/.rspec create mode 100644 cookbooks/travis_ci_ubuntu_1804/README.md create mode 100644 cookbooks/travis_ci_ubuntu_1804/attributes/default.rb create mode 100644 cookbooks/travis_ci_ubuntu_1804/metadata.rb create mode 100644 cookbooks/travis_ci_ubuntu_1804/recipes/default.rb create mode 100644 packer-assets/ubuntu-1804-ci-packages.txt create mode 100644 packer-assets/ubuntu-1804-normal-purge.txt create mode 100644 packer-assets/ubuntu-1804-system-info-commands.yml diff --git a/ci-ubuntu-1804.yml b/ci-ubuntu-1804.yml new file mode 100644 index 000000000..d01befa78 --- /dev/null +++ b/ci-ubuntu-1804.yml @@ -0,0 +1,211 @@ +--- +description: Travis CI Ubuntu 18.04 build environment template +variables: + docker_repository: travisci/ci-ubuntu-1804 + 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-1804-{{ timestamp }}-<%= git_desc %> + image_family: travis-ci-ubuntu-1804-edge + openstack_source_image_name: "{{ env `OS_SOURCE_IMAGE_XENIAL` }}" + travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}" + travis_cookbooks_edge_branch: master + travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}" + travis_uid: "{{ env `TRAVIS_UID` }}" + github_token: "{{ env `GITHUB_NOSCOPE_TOKEN` }}" + openstack_zone: "{{ env `OS_ZONE` }}" + openstack_key_path: "{{ env `OS_SSH_KEY_PATH`}}" + openstack_key_name: "{{ env `OS_SSH_KEY` }}" +builders: +- type: googlecompute + name: googlecompute + communicator: ssh + ssh_timeout: 10m + ssh_port: 22 + ssh_username: packer + image_description: Travis CI Ubuntu 18.04 + account_file: "{{ user `gce_account_file` }}" + project_id: "{{ user `gce_project_id` }}" + source_image_family: ubuntu-1804-lts + image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] + zone: us-central1-a + image_name: "{{ user `image_name` }}" + image_family: "{{ user `image_family` }}" + machine_type: n1-standard-4 + disk_size: 20 + tags: + - ci + - ubuntu-1804 + - travis-ci-packer-templates +- type: docker + name: docker + ssh_pty: true + <% if RUBY_PLATFORM =~ /powerpc64/ %> + image: "travisci/gce-parity:18.04-ppc64le" + <% else %> + image: "travisci/gce-parity:18.04" + <% end %> + run_command: + - -d + - -v + - <%= Dir.pwd %>/tmp/packer-builder-tmp:/tmp + - --privileged=true + - --storage-opt=size=15G + - "{{ .Image }}" + - /sbin/init + commit: true +# Openstack builds disabled for failing with an error that's not possible to debug +# until a fix for the Packer error reporting is released: +# https://github.com/travis-ci/packer-templates/issues/555 +- type: openstack + name: openstack + flavor: m1.large + insecure: true + image_name: "{{ user `image_name` }}" + ssh_username: ubuntu + networks: + <% ENV['OS_NETWORKS'].to_s.split(',').map(&:strip).each do |network| %> + - <%= network %> + <% end %> + source_image_name: "{{ user `openstack_source_image_name` }}" + availability_zone: "{{ user `openstack_zone` }}" + ssh_keypair_name: "{{ user `openstack_key_name` }}" + ssh_private_key_file: "{{ user `openstack_key_path` }}" +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-1804-normal-purge.txt + destination: /var/tmp/purge.txt +- type: file + source: packer-assets/ubuntu-1804-ci-packages.txt + destination: /var/tmp/packages.txt + only: + - googlecompute + - openstack +- type: file + source: packer-assets/ubuntu-xenial-ci-sardonyx-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 +- type: shell + scripts: + - packer-scripts/pre-chef-bootstrap + - 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-1804-system-info-commands.yml + destination: /var/tmp/ubuntu-1804-system-info-commands.yml +- type: shell + inline: chmod 0644 /var/tmp/ubuntu-1804-system-info-commands.yml +- type: chef-solo + version: 13.8.5 + config_template: chef-solo.rb.tmpl + <% if ENV['CHEF_PROFILING'] %> + execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo -F doc --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 %> + json: + travis_packer_build: + github_token: "{{ user `github_token` }}" + run_list: + - recipe[travis_ci_ubuntu_1804] + <% 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 + 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 + - 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 diff --git a/cookbooks/travis_ci_ubuntu_1804/.rspec b/cookbooks/travis_ci_ubuntu_1804/.rspec new file mode 100644 index 000000000..d8e1838e0 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1804/.rspec @@ -0,0 +1,4 @@ +--color +--format documentation +--require support +--order rand diff --git a/cookbooks/travis_ci_ubuntu_1804/README.md b/cookbooks/travis_ci_ubuntu_1804/README.md new file mode 100644 index 000000000..e3c4bd93b --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1804/README.md @@ -0,0 +1,4 @@ +travis_ci_ubuntu_1804 Cookbook +========================= + +A wrapper cookbook for the "ubuntu_1804" CI image. diff --git a/cookbooks/travis_ci_ubuntu_1804/attributes/default.rb b/cookbooks/travis_ci_ubuntu_1804/attributes/default.rb new file mode 100644 index 000000000..b0b86eefe --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1804/attributes/default.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +override['maven']['install_java'] = false + +default['travis_ci_ubuntu_1604']['prerequisite_packages'] = %w[ + cron + curl + git + sudo + wget +] + +override['travis_system_info']['commands_file'] = \ + '/var/tmp/ubuntu-1804-system-info-commands.yml' + +php_aliases = { + '5.6' => '5.6.40', + '7.1' => '7.1.27', + '7.2' => '7.2.15' +} +override['travis_build_environment']['php_versions'] = php_aliases.values +override['travis_build_environment']['php_default_version'] = php_aliases['7.2'] +override['travis_build_environment']['php_aliases'] = php_aliases + +if node['kernel']['machine'] == 'ppc64le' + 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.26', version: 'perl-5.26.2' }, + { name: '5.26-extras', version: 'perl-5.26.2', + arguments: '-Duseshrplib -Duseithreads', alias: '5.26-shrplib' }, + { name: '5.24', version: 'perl-5.24.0' }, + { name: '5.24-extras', version: 'perl-5.24.0', + arguments: '-Duseshrplib -Duseithreads', alias: '5.24-shrplib' } +] +override['travis_perlbrew']['modules'] = %w[ + Dist::Zilla + Dist::Zilla::Plugin::Bootstrap::lib + ExtUtils::MakeMaker + LWP + Module::Install + Moose + Test::Exception + Test::Most + Test::Pod + Test::Pod::Coverage +] +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 + +ghc_versions = %w[ + 7.10.3 + 8.0.2 +] +cabal_versions = %w[ + 1.22 + 1.24 +] + +override['travis_build_environment']['haskell_ghc_versions'] = ghc_versions +override['travis_build_environment']['haskell_cabal_versions'] = cabal_versions +override['travis_build_environment']['haskell_default_ghc'] = ghc_versions.max +override['travis_build_environment']['haskell_default_cabal'] = cabal_versions.max + +if node['kernel']['machine'] == 'ppc64le' + override['travis_java']['default_version'] = 'openjdk8' + override['travis_java']['alternate_versions'] = %w[openjdk7] +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']['nodejs_versions'] = %w[ + 11.0.0 + 8.12.0 +] +override['travis_build_environment']['nodejs_default'] = '8.12.0' + +pythons = %w[ + 2.7.15 + 3.6.7 + 3.7.1 +] + +# Reorder pythons so that default python2 and python3 come first +# as this affects the ordering in $PATH. +%w[3 2].each do |pyver| + pythons.select { |p| p =~ /^#{pyver}/ }.max.tap do |py| + pythons.unshift(pythons.delete(py)) + end +end + +def python_aliases(full_name) + nodash = full_name.split('-').first + return [nodash] unless nodash.include?('.') + + [nodash[0, 3]] +end + +override['travis_build_environment']['pythons'] = pythons +pythons.each do |full_name| + override['travis_build_environment']['python_aliases'][full_name] = \ + python_aliases(full_name) +end + +rubies = %w[ + 2.3.8 + 2.4.5 + 2.5.3 +] + +override['travis_build_environment']['default_ruby'] = rubies.reject { |n| n =~ /jruby/ }.max +override['travis_build_environment']['rubies'] = rubies + +override['travis_build_environment']['otp_releases'] = ['21.3'] +override['travis_build_environment']['elixir_versions'] = ['1.8.1'] +override['travis_build_environment']['default_elixir_version'] = '1.8.1' + +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'] = '4.8' + +override['travis_packer_templates']['job_board']['stack'] = 'ubuntu-1604' + +override['travis_postgresql']['default_version'] = '9.6' +override['travis_postgresql']['alternate_versions'] = %w[9.4 9.5 10] +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[ + __sardonyx__ + c + c++ + clojure + cplusplus + cpp + crystal + csharp + d + dart + default + elixir + erlang + generic + go + groovy + haskell + haxe + java + julia + node_js + perl + perl6 + php + pure_java + python + r + ruby + rust + scala +] diff --git a/cookbooks/travis_ci_ubuntu_1804/metadata.rb b/cookbooks/travis_ci_ubuntu_1804/metadata.rb new file mode 100644 index 000000000..f7f776e0b --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1804/metadata.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +name 'travis_ci_ubuntu_1804' +maintainer 'Travis CI GmbH' +maintainer_email 'contact+packer-templates@travis-ci.com' +license 'MIT' +description 'Installs/Configures travis_ci_ubuntu_1804' +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' diff --git a/cookbooks/travis_ci_ubuntu_1804/recipes/default.rb b/cookbooks/travis_ci_ubuntu_1804/recipes/default.rb new file mode 100644 index 000000000..2282691ae --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1804/recipes/default.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Cookbook Name:: travis_ci_ubuntu_1804 +# 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' +include_recipe 'travis_build_environment::haskell' if node['kernel']['machine'] != 'ppc64le' + +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 + 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_phantomjs::2' + +# HACK: sardonyx-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/ubuntu-1804-ci-packages.txt b/packer-assets/ubuntu-1804-ci-packages.txt new file mode 100644 index 000000000..5923b5055 --- /dev/null +++ b/packer-assets/ubuntu-1804-ci-packages.txt @@ -0,0 +1,490 @@ +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 +btrfs-tools +build-essential +busybox-initramfs +busybox-static +byobu +bzip2 +bzr +ca-certificates +ccache +command-not-found +command-not-found-data +console-setup +coreutils +cpio +crda +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 +fonts-ubuntu-font-family-console +friendly-recovery +ftp +fuse +gawk +gcc +gcc-4.8-base +gcc-4.9-base +gcc-6-base +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 +ifupdown +imagemagick +info +init-system-helpers +initramfs-tools +initramfs-tools-bin +initscripts +insserv +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 +libacl1 +libapparmor-perl +libapparmor1 +libapt-inst2.0 +libapt-pkg5.0 +libarchive-extract-perl +libasn1-8-heimdal +libasprintf0v5 +libattr1 +libaudit-common +libaudit1 +libbind9-140 +libblkid1 +libboost-iostreams1.58.0 +libbsd0 +libbz2-1.0 +libbz2-dev +libc-bin +libc-client2007e-dev +libc6 +libcap-ng0 +libcap2 +libcap2-bin +libcgmanager0 +libck-connector0 +libclass-accessor-perl +libcomerr2 +libcryptsetup4 +libcurl3 +libcurl3-gnutls +libcurl4-gnutls-dev +libcwidget3v5 +libdb5.3 +libdbus-1-3 +libdbus-glib-1-2 +libdebconfclient0 +libdevmapper1.02.1 +libdns162 +libdrm2 +libdumbnet1 +libedit2 +libelf1 +libept1.5.0 +libestr0 +libevent-2.0-5 +libevent-2.0-5 +libexpat1 +libexpat1-dev +libffi-dev +libffi6 +libfreetype6 +libfreetype6-dev +libfribidi0 +libfuse2 +libgc1c2 +libgcc1 +libgcrypt20 +libgdbm-dev +libgdbm3 +libgeoip1 +libgirepository-1.0-1 +libgl1-mesa-glx +libglib2.0-0 +libglib2.0-data +libgmp3-dev +libgnutls-openssl27 +libgnutls30 +libgpg-error0 +libgpm2 +libgssapi-krb5-2 +libgssapi3-heimdal +libhcrypto4-heimdal +libheimbase1-heimdal +libheimntlm0-heimdal +libhx509-5-heimdal +libicu-dev +libicu55 +libidn11 +libio-string-perl +libisc160 +libisccc140 +libisccfg140 +libjpeg8-dev +libjson-c2 +libjson0 +libk5crypto3 +libkeyutils1 +libklibc +libkmod2 +libkrb5-26-heimdal +libkrb5-3 +libkrb5-dev +libkrb5support0 +libldap-2.4-2 +libldap-2.4-2 +libldap2-dev +liblocale-gettext-perl +liblockfile-bin +liblockfile1 +liblog-message-simple-perl +libltdl-dev +liblwres141 +liblzma5 +libmagic1 +libmagickwand-dev +libmcrypt-dev +libmhash-dev +libmodule-pluggable-perl +libmount1 +libmpdec2 +libmysqlclient-dev +libncurses5 +libncurses5-dev +libncursesw5 +libncursesw5-dev +libnewt0.52 +libnfnetlink0 +libnih-dbus1 +libnih1 +libnl-3-200 +libnl-genl-3-200 +libnuma1 +libopts25 +libossp-uuid-dev +libp11-kit0 +libpam-cap +libpam-modules +libpam-modules-bin +libpam-runtime +libpam0g +libparse-debianchangelog-perl +libparted2 +libpcap0.8 +libpci3 +libpcre3 +libpipeline1 +libplymouth4 +libpng12-0 +libpng12-dev +libpod-latex-perl +libpopt0 +libpq-dev +libprocps4 +libpython-stdlib +libpython2.7 +libpython2.7-minimal +libpython2.7-stdlib +libpython3-stdlib +libpython3.5-minimal +libpython3.5-stdlib +libqt4-dev +libreadline-dev +libreadline6 +libreadline6 +libroken18-heimdal +librtmp1 +libsasl2-2 +libsasl2-dev +libsasl2-modules +libsasl2-modules-db +libselinux1 +libsemanage-common +libsemanage1 +libsepol1 +libsigc++-2.0-0v5 +libsigsegv2 +libslang2 +libsqlite3-0 +libsqlite3-dev +libss2 +libssl-dev +libssl1.0.0 +libssl1.0.0 +libstdc++6 +libsub-name-perl +libtasn1-6 +libterm-ui-perl +libtext-charwidth-perl +libtext-iconv-perl +libtext-soundex-perl +libtext-wrapi18n-perl +libtidy-dev +libtimedate-perl +libtinfo5 +libtool +libudev1 +libusb-0.1-4 +libusb-1.0-0 +libustr-1.0-1 +libuuid1 +libwind0-heimdal +libwrap0 +libx11-6 +libx11-data +libxapian22v5 +libxau6 +libxcb1 +libxdmcp6 +libxext6 +libxml2 +libxml2-dev +libxmuu1 +libxslt1-dev +libxtables11 +libyaml-0-2 +libyaml-0-2 +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 +module-init-tools +mount +mountall +mtr-tiny +multiarch-support +nano +ncurses-base +ncurses-bin +ncurses-term +net-tools +netbase +netcat-openbsd +ntfs-3g +ntp +ntpdate +openssh-client +openssh-server +openssh-sftp-server +openssl +os-prober +overlayroot +parted +passwd +patch +pciutils +perl +perl-base +perl-modules-5.22 +pkg-config +plymouth +plymouth-theme-ubuntu-text +pollinate +postgresql-client +powermgmt-base +procps +psmisc +python +python-apt +python-apt-common +python-boto +python-chardet +python-cheetah +python-configobj +python-debian +python-gdbm +python-json-pointer +python-jsonpatch +python-minimal +python-oauth +python-openssl +python-pam +python-pkg-resources +python-prettytable +python-pycurl +python-requests +python-serial +python-six +python-twisted-bin +python-twisted-core +python-twisted-names +python-twisted-web +python-urllib3 +python-xapian +python-yaml +python-zope.interface +python2.7 +python2.7-minimal +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 +python3.5 +python3.5-minimal +qt4-qmake +ragel +re2c +readline-common +resolvconf +rsync +rsyslog +ruby +run-one +screen +sed +sensible-utils +sgml-base +shared-mime-info +software-properties-common +sqlite3 +ssh-import-id +strace +subversion +sudo +sysv-rc +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 +upstart +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 diff --git a/packer-assets/ubuntu-1804-normal-purge.txt b/packer-assets/ubuntu-1804-normal-purge.txt new file mode 100644 index 000000000..533dce031 --- /dev/null +++ b/packer-assets/ubuntu-1804-normal-purge.txt @@ -0,0 +1,6 @@ +popularity-contest +ppp +pppconfig +pppoeconf +sshguard +unattended-upgrades diff --git a/packer-assets/ubuntu-1804-system-info-commands.yml b/packer-assets/ubuntu-1804-system-info-commands.yml new file mode 100644 index 000000000..84ab36972 --- /dev/null +++ b/packer-assets/ubuntu-1804-system-info-commands.yml @@ -0,0 +1,158 @@ +--- +NOTE: this is a generated file +stack: ubuntu-1804 +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 4d266e5211a99e77f8744e64f2752ab8829eb4f2 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Thu, 16 May 2019 16:57:03 +0200 Subject: [PATCH 06/11] foundations for an ubuntu 14.04 image --- ci-ubuntu-1404.yml | 211 ++++++++ cookbooks/travis_ci_ubuntu_1404/.rspec | 4 + cookbooks/travis_ci_ubuntu_1404/README.md | 4 + .../attributes/default.rb | 206 ++++++++ cookbooks/travis_ci_ubuntu_1404/metadata.rb | 24 + .../travis_ci_ubuntu_1404/recipes/default.rb | 84 +++ packer-assets/ubuntu-1404-ci-packages.txt | 490 ++++++++++++++++++ packer-assets/ubuntu-1404-normal-purge.txt | 6 + .../ubuntu-1404-system-info-commands.yml | 158 ++++++ 9 files changed, 1187 insertions(+) create mode 100644 ci-ubuntu-1404.yml create mode 100644 cookbooks/travis_ci_ubuntu_1404/.rspec create mode 100644 cookbooks/travis_ci_ubuntu_1404/README.md create mode 100644 cookbooks/travis_ci_ubuntu_1404/attributes/default.rb create mode 100644 cookbooks/travis_ci_ubuntu_1404/metadata.rb create mode 100644 cookbooks/travis_ci_ubuntu_1404/recipes/default.rb create mode 100644 packer-assets/ubuntu-1404-ci-packages.txt create mode 100644 packer-assets/ubuntu-1404-normal-purge.txt create mode 100644 packer-assets/ubuntu-1404-system-info-commands.yml diff --git a/ci-ubuntu-1404.yml b/ci-ubuntu-1404.yml new file mode 100644 index 000000000..d6675868d --- /dev/null +++ b/ci-ubuntu-1404.yml @@ -0,0 +1,211 @@ +--- +description: Travis CI Ubuntu 14.04 build environment template +variables: + docker_repository: travisci/ci-ubuntu-1404 + 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-1404-{{ timestamp }}-<%= git_desc %> + image_family: travis-ci-ubuntu-1404-edge + openstack_source_image_name: "{{ env `OS_SOURCE_IMAGE_XENIAL` }}" + travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}" + travis_cookbooks_edge_branch: master + travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}" + travis_uid: "{{ env `TRAVIS_UID` }}" + github_token: "{{ env `GITHUB_NOSCOPE_TOKEN` }}" + openstack_zone: "{{ env `OS_ZONE` }}" + openstack_key_path: "{{ env `OS_SSH_KEY_PATH`}}" + openstack_key_name: "{{ env `OS_SSH_KEY` }}" +builders: +- type: googlecompute + name: googlecompute + communicator: ssh + ssh_timeout: 10m + ssh_port: 22 + ssh_username: packer + image_description: Travis CI Ubuntu 14.04 + account_file: "{{ user `gce_account_file` }}" + project_id: "{{ user `gce_project_id` }}" + source_image_family: ubuntu-1404-lts + image_licenses: ["projects/vm-options/global/licenses/enable-vmx"] + zone: us-central1-a + image_name: "{{ user `image_name` }}" + image_family: "{{ user `image_family` }}" + machine_type: n1-standard-4 + disk_size: 20 + tags: + - ci + - ubuntu-1404 + - travis-ci-packer-templates +- type: docker + name: docker + ssh_pty: true + <% if RUBY_PLATFORM =~ /powerpc64/ %> + image: "travisci/gce-parity:14.04-ppc64le" + <% else %> + image: "travisci/gce-parity:14.04" + <% end %> + run_command: + - -d + - -v + - <%= Dir.pwd %>/tmp/packer-builder-tmp:/tmp + - --privileged=true + - --storage-opt=size=15G + - "{{ .Image }}" + - /sbin/init + commit: true +# Openstack builds disabled for failing with an error that's not possible to debug +# until a fix for the Packer error reporting is released: +# https://github.com/travis-ci/packer-templates/issues/555 +- type: openstack + name: openstack + flavor: m1.large + insecure: true + image_name: "{{ user `image_name` }}" + ssh_username: ubuntu + networks: + <% ENV['OS_NETWORKS'].to_s.split(',').map(&:strip).each do |network| %> + - <%= network %> + <% end %> + source_image_name: "{{ user `openstack_source_image_name` }}" + availability_zone: "{{ user `openstack_zone` }}" + ssh_keypair_name: "{{ user `openstack_key_name` }}" + ssh_private_key_file: "{{ user `openstack_key_path` }}" +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-1404-normal-purge.txt + destination: /var/tmp/purge.txt +- type: file + source: packer-assets/ubuntu-1404-ci-packages.txt + destination: /var/tmp/packages.txt + only: + - googlecompute + - openstack +- type: file + source: packer-assets/ubuntu-xenial-ci-sardonyx-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 +- type: shell + scripts: + - packer-scripts/pre-chef-bootstrap + - 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-1404-system-info-commands.yml + destination: /var/tmp/ubuntu-1404-system-info-commands.yml +- type: shell + inline: chmod 0644 /var/tmp/ubuntu-1404-system-info-commands.yml +- type: chef-solo + version: 13.8.5 + config_template: chef-solo.rb.tmpl + <% if ENV['CHEF_PROFILING'] %> + execute_command: "{{if .Sudo}}sudo {{end}}CI=yes chef-solo -F doc --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 %> + json: + travis_packer_build: + github_token: "{{ user `github_token` }}" + run_list: + - recipe[travis_ci_ubuntu_1404] + <% 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 + 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 + - 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 diff --git a/cookbooks/travis_ci_ubuntu_1404/.rspec b/cookbooks/travis_ci_ubuntu_1404/.rspec new file mode 100644 index 000000000..d8e1838e0 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1404/.rspec @@ -0,0 +1,4 @@ +--color +--format documentation +--require support +--order rand diff --git a/cookbooks/travis_ci_ubuntu_1404/README.md b/cookbooks/travis_ci_ubuntu_1404/README.md new file mode 100644 index 000000000..32a2151b4 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1404/README.md @@ -0,0 +1,4 @@ +travis_ci_ubuntu_1404 Cookbook +========================= + +A wrapper cookbook for the "ubuntu_1404" CI image. diff --git a/cookbooks/travis_ci_ubuntu_1404/attributes/default.rb b/cookbooks/travis_ci_ubuntu_1404/attributes/default.rb new file mode 100644 index 000000000..8d384a678 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1404/attributes/default.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +override['maven']['install_java'] = false + +default['travis_ci_ubuntu_1404']['prerequisite_packages'] = %w[ + cron + curl + git + sudo + wget +] + +override['travis_system_info']['commands_file'] = \ + '/var/tmp/ubuntu-1404-system-info-commands.yml' + +php_aliases = { + '5.6' => '5.6.40', + '7.1' => '7.1.27', + '7.2' => '7.2.15' +} +override['travis_build_environment']['php_versions'] = php_aliases.values +override['travis_build_environment']['php_default_version'] = php_aliases['7.2'] +override['travis_build_environment']['php_aliases'] = php_aliases + +if node['kernel']['machine'] == 'ppc64le' + 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.26', version: 'perl-5.26.2' }, + { name: '5.26-extras', version: 'perl-5.26.2', + arguments: '-Duseshrplib -Duseithreads', alias: '5.26-shrplib' }, + { name: '5.24', version: 'perl-5.24.0' }, + { name: '5.24-extras', version: 'perl-5.24.0', + arguments: '-Duseshrplib -Duseithreads', alias: '5.24-shrplib' } +] +override['travis_perlbrew']['modules'] = %w[ + Dist::Zilla + Dist::Zilla::Plugin::Bootstrap::lib + ExtUtils::MakeMaker + LWP + Module::Install + Moose + Test::Exception + Test::Most + Test::Pod + Test::Pod::Coverage +] +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 + +ghc_versions = %w[ + 7.10.3 + 8.0.2 +] +cabal_versions = %w[ + 1.22 + 1.24 +] + +override['travis_build_environment']['haskell_ghc_versions'] = ghc_versions +override['travis_build_environment']['haskell_cabal_versions'] = cabal_versions +override['travis_build_environment']['haskell_default_ghc'] = ghc_versions.max +override['travis_build_environment']['haskell_default_cabal'] = cabal_versions.max + +if node['kernel']['machine'] == 'ppc64le' + override['travis_java']['default_version'] = 'openjdk8' + override['travis_java']['alternate_versions'] = %w[openjdk7] +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']['nodejs_versions'] = %w[ + 11.0.0 + 8.12.0 +] +override['travis_build_environment']['nodejs_default'] = '8.12.0' + +pythons = %w[ + 2.7.15 + 3.6.7 + 3.7.1 +] + +# Reorder pythons so that default python2 and python3 come first +# as this affects the ordering in $PATH. +%w[3 2].each do |pyver| + pythons.select { |p| p =~ /^#{pyver}/ }.max.tap do |py| + pythons.unshift(pythons.delete(py)) + end +end + +def python_aliases(full_name) + nodash = full_name.split('-').first + return [nodash] unless nodash.include?('.') + + [nodash[0, 3]] +end + +override['travis_build_environment']['pythons'] = pythons +pythons.each do |full_name| + override['travis_build_environment']['python_aliases'][full_name] = \ + python_aliases(full_name) +end + +rubies = %w[ + 2.3.8 + 2.4.5 + 2.5.3 +] + +override['travis_build_environment']['default_ruby'] = rubies.reject { |n| n =~ /jruby/ }.max +override['travis_build_environment']['rubies'] = rubies + +override['travis_build_environment']['otp_releases'] = ['21.3'] +override['travis_build_environment']['elixir_versions'] = ['1.8.1'] +override['travis_build_environment']['default_elixir_version'] = '1.8.1' + +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'] = '4.8' + +override['travis_packer_templates']['job_board']['stack'] = 'ubuntu-1604' + +override['travis_postgresql']['default_version'] = '9.6' +override['travis_postgresql']['alternate_versions'] = %w[9.4 9.5 10] +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[ + __sardonyx__ + c + c++ + clojure + cplusplus + cpp + crystal + csharp + d + dart + default + elixir + erlang + generic + go + groovy + haskell + haxe + java + julia + node_js + perl + perl6 + php + pure_java + python + r + ruby + rust + scala +] diff --git a/cookbooks/travis_ci_ubuntu_1404/metadata.rb b/cookbooks/travis_ci_ubuntu_1404/metadata.rb new file mode 100644 index 000000000..12f951a63 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1404/metadata.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +name 'travis_ci_ubuntu_1404' +maintainer 'Travis CI GmbH' +maintainer_email 'contact+packer-templates@travis-ci.com' +license 'MIT' +description 'Installs/Configures travis_ci_ubuntu_1404' +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' diff --git a/cookbooks/travis_ci_ubuntu_1404/recipes/default.rb b/cookbooks/travis_ci_ubuntu_1404/recipes/default.rb new file mode 100644 index 000000000..287427946 --- /dev/null +++ b/cookbooks/travis_ci_ubuntu_1404/recipes/default.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Cookbook Name:: travis_ci_ubuntu_1404 +# 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' +include_recipe 'travis_build_environment::haskell' if node['kernel']['machine'] != 'ppc64le' + +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 + 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_phantomjs::2' + +# HACK: sardonyx-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/ubuntu-1404-ci-packages.txt b/packer-assets/ubuntu-1404-ci-packages.txt new file mode 100644 index 000000000..5923b5055 --- /dev/null +++ b/packer-assets/ubuntu-1404-ci-packages.txt @@ -0,0 +1,490 @@ +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 +btrfs-tools +build-essential +busybox-initramfs +busybox-static +byobu +bzip2 +bzr +ca-certificates +ccache +command-not-found +command-not-found-data +console-setup +coreutils +cpio +crda +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 +fonts-ubuntu-font-family-console +friendly-recovery +ftp +fuse +gawk +gcc +gcc-4.8-base +gcc-4.9-base +gcc-6-base +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 +ifupdown +imagemagick +info +init-system-helpers +initramfs-tools +initramfs-tools-bin +initscripts +insserv +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 +libacl1 +libapparmor-perl +libapparmor1 +libapt-inst2.0 +libapt-pkg5.0 +libarchive-extract-perl +libasn1-8-heimdal +libasprintf0v5 +libattr1 +libaudit-common +libaudit1 +libbind9-140 +libblkid1 +libboost-iostreams1.58.0 +libbsd0 +libbz2-1.0 +libbz2-dev +libc-bin +libc-client2007e-dev +libc6 +libcap-ng0 +libcap2 +libcap2-bin +libcgmanager0 +libck-connector0 +libclass-accessor-perl +libcomerr2 +libcryptsetup4 +libcurl3 +libcurl3-gnutls +libcurl4-gnutls-dev +libcwidget3v5 +libdb5.3 +libdbus-1-3 +libdbus-glib-1-2 +libdebconfclient0 +libdevmapper1.02.1 +libdns162 +libdrm2 +libdumbnet1 +libedit2 +libelf1 +libept1.5.0 +libestr0 +libevent-2.0-5 +libevent-2.0-5 +libexpat1 +libexpat1-dev +libffi-dev +libffi6 +libfreetype6 +libfreetype6-dev +libfribidi0 +libfuse2 +libgc1c2 +libgcc1 +libgcrypt20 +libgdbm-dev +libgdbm3 +libgeoip1 +libgirepository-1.0-1 +libgl1-mesa-glx +libglib2.0-0 +libglib2.0-data +libgmp3-dev +libgnutls-openssl27 +libgnutls30 +libgpg-error0 +libgpm2 +libgssapi-krb5-2 +libgssapi3-heimdal +libhcrypto4-heimdal +libheimbase1-heimdal +libheimntlm0-heimdal +libhx509-5-heimdal +libicu-dev +libicu55 +libidn11 +libio-string-perl +libisc160 +libisccc140 +libisccfg140 +libjpeg8-dev +libjson-c2 +libjson0 +libk5crypto3 +libkeyutils1 +libklibc +libkmod2 +libkrb5-26-heimdal +libkrb5-3 +libkrb5-dev +libkrb5support0 +libldap-2.4-2 +libldap-2.4-2 +libldap2-dev +liblocale-gettext-perl +liblockfile-bin +liblockfile1 +liblog-message-simple-perl +libltdl-dev +liblwres141 +liblzma5 +libmagic1 +libmagickwand-dev +libmcrypt-dev +libmhash-dev +libmodule-pluggable-perl +libmount1 +libmpdec2 +libmysqlclient-dev +libncurses5 +libncurses5-dev +libncursesw5 +libncursesw5-dev +libnewt0.52 +libnfnetlink0 +libnih-dbus1 +libnih1 +libnl-3-200 +libnl-genl-3-200 +libnuma1 +libopts25 +libossp-uuid-dev +libp11-kit0 +libpam-cap +libpam-modules +libpam-modules-bin +libpam-runtime +libpam0g +libparse-debianchangelog-perl +libparted2 +libpcap0.8 +libpci3 +libpcre3 +libpipeline1 +libplymouth4 +libpng12-0 +libpng12-dev +libpod-latex-perl +libpopt0 +libpq-dev +libprocps4 +libpython-stdlib +libpython2.7 +libpython2.7-minimal +libpython2.7-stdlib +libpython3-stdlib +libpython3.5-minimal +libpython3.5-stdlib +libqt4-dev +libreadline-dev +libreadline6 +libreadline6 +libroken18-heimdal +librtmp1 +libsasl2-2 +libsasl2-dev +libsasl2-modules +libsasl2-modules-db +libselinux1 +libsemanage-common +libsemanage1 +libsepol1 +libsigc++-2.0-0v5 +libsigsegv2 +libslang2 +libsqlite3-0 +libsqlite3-dev +libss2 +libssl-dev +libssl1.0.0 +libssl1.0.0 +libstdc++6 +libsub-name-perl +libtasn1-6 +libterm-ui-perl +libtext-charwidth-perl +libtext-iconv-perl +libtext-soundex-perl +libtext-wrapi18n-perl +libtidy-dev +libtimedate-perl +libtinfo5 +libtool +libudev1 +libusb-0.1-4 +libusb-1.0-0 +libustr-1.0-1 +libuuid1 +libwind0-heimdal +libwrap0 +libx11-6 +libx11-data +libxapian22v5 +libxau6 +libxcb1 +libxdmcp6 +libxext6 +libxml2 +libxml2-dev +libxmuu1 +libxslt1-dev +libxtables11 +libyaml-0-2 +libyaml-0-2 +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 +module-init-tools +mount +mountall +mtr-tiny +multiarch-support +nano +ncurses-base +ncurses-bin +ncurses-term +net-tools +netbase +netcat-openbsd +ntfs-3g +ntp +ntpdate +openssh-client +openssh-server +openssh-sftp-server +openssl +os-prober +overlayroot +parted +passwd +patch +pciutils +perl +perl-base +perl-modules-5.22 +pkg-config +plymouth +plymouth-theme-ubuntu-text +pollinate +postgresql-client +powermgmt-base +procps +psmisc +python +python-apt +python-apt-common +python-boto +python-chardet +python-cheetah +python-configobj +python-debian +python-gdbm +python-json-pointer +python-jsonpatch +python-minimal +python-oauth +python-openssl +python-pam +python-pkg-resources +python-prettytable +python-pycurl +python-requests +python-serial +python-six +python-twisted-bin +python-twisted-core +python-twisted-names +python-twisted-web +python-urllib3 +python-xapian +python-yaml +python-zope.interface +python2.7 +python2.7-minimal +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 +python3.5 +python3.5-minimal +qt4-qmake +ragel +re2c +readline-common +resolvconf +rsync +rsyslog +ruby +run-one +screen +sed +sensible-utils +sgml-base +shared-mime-info +software-properties-common +sqlite3 +ssh-import-id +strace +subversion +sudo +sysv-rc +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 +upstart +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 diff --git a/packer-assets/ubuntu-1404-normal-purge.txt b/packer-assets/ubuntu-1404-normal-purge.txt new file mode 100644 index 000000000..533dce031 --- /dev/null +++ b/packer-assets/ubuntu-1404-normal-purge.txt @@ -0,0 +1,6 @@ +popularity-contest +ppp +pppconfig +pppoeconf +sshguard +unattended-upgrades diff --git a/packer-assets/ubuntu-1404-system-info-commands.yml b/packer-assets/ubuntu-1404-system-info-commands.yml new file mode 100644 index 000000000..fba6f5280 --- /dev/null +++ b/packer-assets/ubuntu-1404-system-info-commands.yml @@ -0,0 +1,158 @@ +--- +NOTE: this is a generated file +stack: ubuntu-1604 +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 207fbf0df3dc9a3653110f13e8ec32986504812a Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 20 May 2019 12:05:40 +0200 Subject: [PATCH 07/11] update the 14.04 packages list --- packer-assets/ubuntu-1404-ci-packages.txt | 325 ++++++++++++---------- 1 file changed, 171 insertions(+), 154 deletions(-) diff --git a/packer-assets/ubuntu-1404-ci-packages.txt b/packer-assets/ubuntu-1404-ci-packages.txt index 5923b5055..52c4c02a1 100644 --- a/packer-assets/ubuntu-1404-ci-packages.txt +++ b/packer-assets/ubuntu-1404-ci-packages.txt @@ -31,6 +31,7 @@ bzip2 bzr ca-certificates ccache +chromium-browser command-not-found command-not-found-data console-setup @@ -47,16 +48,19 @@ debconf-i18n debianutils dh-python diffutils +dmidecode dmsetup dnsutils +dosemu dosfstools dpkg -e2fslibs +e2fslibs:amd64 e2fsprogs eatmydata ed eject -emacs-nox +emacs +emacs23-nox ethtool file findutils @@ -67,9 +71,8 @@ ftp fuse gawk gcc -gcc-4.8-base -gcc-4.9-base -gcc-6-base +gcc-4.8-base:amd64 +gcc-4.9-base:amd64 gdisk geoip-database gettext @@ -82,9 +85,11 @@ gpgv grep groff-base grub-common +grub-gfxpayload-lists +grub-pc +grub-pc-bin grub2-common gzip -hashdeep haveged hdparm hostname @@ -114,182 +119,186 @@ language-pack-en laptop-detect lemon less -libacl1 +libacl1:amd64 libapparmor-perl -libapparmor1 -libapt-inst2.0 -libapt-pkg5.0 +libapparmor1:amd64 +libapt-inst1.5:amd64 +libapt-pkg4.12:amd64 libarchive-extract-perl -libasn1-8-heimdal -libasprintf0v5 -libattr1 +libasn1-8-heimdal:amd64 +libasprintf0c2:amd64 +libattr1:amd64 libaudit-common -libaudit1 -libbind9-140 -libblkid1 -libboost-iostreams1.58.0 -libbsd0 -libbz2-1.0 +libaudit1:amd64 +libbind9-90 +libblkid1:amd64 +libboost-iostreams1.54.0:amd64 +libbsd0:amd64 +libbz2-1.0:amd64 libbz2-dev libc-bin libc-client2007e-dev -libc6 +libc6:amd64 libcap-ng0 -libcap2 libcap2-bin -libcgmanager0 -libck-connector0 +libcap2:amd64 +libcgmanager0:amd64 +libck-connector0:amd64 libclass-accessor-perl -libcomerr2 +libcomerr2:amd64 libcryptsetup4 -libcurl3 -libcurl3-gnutls +libcurl3-gnutls:amd64 +libcurl3:amd64 libcurl4-gnutls-dev -libcwidget3v5 -libdb5.3 -libdbus-1-3 -libdbus-glib-1-2 -libdebconfclient0 -libdevmapper1.02.1 -libdns162 -libdrm2 +libcwidget3 +libdb5.3:amd64 +libdbus-1-3:amd64 +libdbus-glib-1-2:amd64 +libdebconfclient0:amd64 +libdevmapper1.02.1:amd64 +libdns100 +libdrm2:amd64 libdumbnet1 -libedit2 -libelf1 -libept1.5.0 +libedit2:amd64 +libelf1:amd64 +libept1.4.12:amd64 libestr0 libevent-2.0-5 -libevent-2.0-5 -libexpat1 +libevent-2.0-5:amd64 libexpat1-dev +libexpat1:amd64 libffi-dev -libffi6 -libfreetype6 +libffi6:amd64 libfreetype6-dev -libfribidi0 -libfuse2 -libgc1c2 -libgcc1 -libgcrypt20 +libfreetype6:amd64 +libfribidi0:amd64 +libfuse2:amd64 +libgc1c2:amd64 +libgcc1:amd64 +libgcrypt11:amd64 libgdbm-dev -libgdbm3 -libgeoip1 +libgdbm3:amd64 +libgeoip1:amd64 libgirepository-1.0-1 libgl1-mesa-glx -libglib2.0-0 +libglib2.0-0:amd64 libglib2.0-data libgmp3-dev -libgnutls-openssl27 -libgnutls30 -libgpg-error0 -libgpm2 -libgssapi-krb5-2 -libgssapi3-heimdal -libhcrypto4-heimdal -libheimbase1-heimdal -libheimntlm0-heimdal -libhx509-5-heimdal +libgnutls-openssl27:amd64 +libgnutls26:amd64 +libgpg-error0:amd64 +libgpm2:amd64 +libgssapi-krb5-2:amd64 +libgssapi3-heimdal:amd64 +libhcrypto4-heimdal:amd64 +libheimbase1-heimdal:amd64 +libheimntlm0-heimdal:amd64 +libhx509-5-heimdal:amd64 libicu-dev -libicu55 -libidn11 +libicu52:amd64 +libidn11:amd64 libio-string-perl -libisc160 -libisccc140 -libisccfg140 +libisc95 +libisccc90 +libisccfg90 libjpeg8-dev -libjson-c2 -libjson0 -libk5crypto3 -libkeyutils1 +libjson-c2:amd64 +libjson0:amd64 +libk5crypto3:amd64 +libkeyutils1:amd64 libklibc -libkmod2 -libkrb5-26-heimdal -libkrb5-3 +libkmod2:amd64 +libkrb5-26-heimdal:amd64 +libkrb5-3:amd64 libkrb5-dev -libkrb5support0 -libldap-2.4-2 +libkrb5support0:amd64 libldap-2.4-2 +libldap-2.4-2:amd64 libldap2-dev liblocale-gettext-perl liblockfile-bin -liblockfile1 +liblockfile1:amd64 liblog-message-simple-perl libltdl-dev -liblwres141 -liblzma5 -libmagic1 +liblwres90 +liblzma5:amd64 +libmagic1:amd64 libmagickwand-dev libmcrypt-dev libmhash-dev libmodule-pluggable-perl -libmount1 -libmpdec2 -libmysqlclient-dev -libncurses5 +libmount1:amd64 +libmpdec2:amd64 libncurses5-dev -libncursesw5 +libncurses5:amd64 libncursesw5-dev -libnewt0.52 -libnfnetlink0 -libnih-dbus1 -libnih1 -libnl-3-200 -libnl-genl-3-200 -libnuma1 -libopts25 +libncursesw5:amd64 +libnewt0.52:amd64 +libnfnetlink0:amd64 +libnih-dbus1:amd64 +libnih1:amd64 +libnl-3-200:amd64 +libnl-genl-3-200:amd64 +libnuma1:amd64 +libopts25:amd64 libossp-uuid-dev -libp11-kit0 -libpam-cap -libpam-modules +libp11-kit0:amd64 +libpam-cap:amd64 libpam-modules-bin +libpam-modules:amd64 libpam-runtime -libpam0g +libpam0g:amd64 libparse-debianchangelog-perl -libparted2 -libpcap0.8 -libpci3 -libpcre3 -libpipeline1 -libplymouth4 -libpng12-0 +libparted0debian1:amd64 +libpcap0.8:amd64 +libpci3:amd64 +libpcre3:amd64 +libpipeline1:amd64 +libplymouth2:amd64 +libpng12-0:amd64 libpng12-dev libpod-latex-perl -libpopt0 +libpopt0:amd64 libpq-dev -libprocps4 -libpython-stdlib -libpython2.7 -libpython2.7-minimal -libpython2.7-stdlib -libpython3-stdlib -libpython3.5-minimal -libpython3.5-stdlib +libprocps3:amd64 +libpython-stdlib:amd64 +libpython2.7-minimal:amd64 +libpython2.7-stdlib:amd64 +libpython2.7:amd64 +libpython3-stdlib:amd64 +libpython3.4-minimal:amd64 +libpython3.4-stdlib:amd64 libqt4-dev +libqt4-opengl +libqt4-opengl-dev +libqtwebkit-dev +libqtwebkit4 libreadline-dev libreadline6 -libreadline6 -libroken18-heimdal -librtmp1 -libsasl2-2 +libreadline6:amd64 +libroken18-heimdal:amd64 +librtmp0:amd64 +libsasl2-2:amd64 libsasl2-dev -libsasl2-modules -libsasl2-modules-db -libselinux1 +libsasl2-modules-db:amd64 +libsasl2-modules:amd64 +libselinux1:amd64 libsemanage-common -libsemanage1 -libsepol1 -libsigc++-2.0-0v5 -libsigsegv2 -libslang2 -libsqlite3-0 +libsemanage1:amd64 +libsepol1:amd64 +libsigc++-2.0-0c2a:amd64 +libsigsegv2:amd64 +libslang2:amd64 +libsqlite3-0:amd64 libsqlite3-dev -libss2 +libss2:amd64 libssl-dev -libssl1.0.0 -libssl1.0.0 -libstdc++6 +libssl0.9.8 +libssl1.0.0:amd64 +libstdc++6:amd64 libsub-name-perl -libtasn1-6 +libt1-dev +libtasn1-6:amd64 libterm-ui-perl libtext-charwidth-perl libtext-iconv-perl @@ -297,29 +306,29 @@ libtext-soundex-perl libtext-wrapi18n-perl libtidy-dev libtimedate-perl -libtinfo5 +libtinfo5:amd64 libtool -libudev1 -libusb-0.1-4 -libusb-1.0-0 -libustr-1.0-1 -libuuid1 -libwind0-heimdal -libwrap0 -libx11-6 +libudev1:amd64 +libusb-0.1-4:amd64 +libusb-1.0-0:amd64 +libustr-1.0-1:amd64 +libuuid1:amd64 +libwind0-heimdal:amd64 +libwrap0:amd64 +libx11-6:amd64 libx11-data -libxapian22v5 -libxau6 -libxcb1 -libxdmcp6 -libxext6 -libxml2 +libxapian22 +libxau6:amd64 +libxcb1:amd64 +libxdmcp6:amd64 +libxext6:amd64 libxml2-dev -libxmuu1 +libxml2:amd64 +libxmuu1:amd64 libxslt1-dev -libxtables11 -libyaml-0-2 +libxtables10 libyaml-0-2 +libyaml-0-2:amd64 libyaml-dev linux-firmware locales @@ -336,8 +345,9 @@ makedev man-db manpages mawk +md5deep mime-support -mingw-w64 +mingw32 mlocate module-init-tools mount @@ -354,6 +364,7 @@ netcat-openbsd ntfs-3g ntp ntpdate +open-vm-tools openssh-client openssh-server openssh-sftp-server @@ -366,7 +377,7 @@ patch pciutils perl perl-base -perl-modules-5.22 +perl-modules pkg-config plymouth plymouth-theme-ubuntu-text @@ -412,7 +423,7 @@ python3-apt python3-commandnotfound python3-dbus python3-distupgrade -python3-gdbm +python3-gdbm:amd64 python3-gi python3-minimal python3-newt @@ -420,8 +431,8 @@ python3-problem-report python3-pycurl python3-software-properties python3-update-manager -python3.5 -python3.5-minimal +python3.4 +python3.4-minimal qt4-qmake ragel re2c @@ -429,8 +440,9 @@ readline-common resolvconf rsync rsyslog -ruby +ruby2.0 run-one +scons screen sed sensible-utils @@ -439,6 +451,7 @@ shared-mime-info software-properties-common sqlite3 ssh-import-id +sshguard strace subversion sudo @@ -452,7 +465,6 @@ tcpdump telnet thin-provisioning-tools time -tmate tmux tzdata ubuntu-keyring @@ -461,6 +473,7 @@ ubuntu-release-upgrader-core ucf udev ufw +unattended-upgrades unzip update-manager-core update-notifier-common @@ -479,12 +492,16 @@ wget whiptail wireless-regdb x11-utils +x11-xserver-utils xauth xfsprogs xkb-data xml-core +xserver-xorg-core +xserver-xorg-video-all +xvfb xz-utils zerofree zip -zlib1g zlib1g-dev +zlib1g:amd64 \ No newline at end of file From f9534ea29fdba83f2d56ef5f726a6a1c1d555545 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 20 May 2019 12:05:56 +0200 Subject: [PATCH 08/11] remove job board registration for now --- ci-ubuntu-1404.yml | 6 ------ ci-ubuntu-1604.yml | 6 ------ ci-ubuntu-1804.yml | 6 ------ 3 files changed, 18 deletions(-) diff --git a/ci-ubuntu-1404.yml b/ci-ubuntu-1404.yml index d6675868d..e16dfc132 100644 --- a/ci-ubuntu-1404.yml +++ b/ci-ubuntu-1404.yml @@ -194,12 +194,6 @@ post-processors: only: - docker - - - type: shell-local - script: bin/job-board-register - environment_vars: - - IMAGE_NAME={{ user `image_name` }} - only: - - googlecompute - type: shell-local script: bin/job-board-register environment_vars: diff --git a/ci-ubuntu-1604.yml b/ci-ubuntu-1604.yml index f024e38bb..df0067f4b 100644 --- a/ci-ubuntu-1604.yml +++ b/ci-ubuntu-1604.yml @@ -194,12 +194,6 @@ post-processors: only: - docker - - - type: shell-local - script: bin/job-board-register - environment_vars: - - IMAGE_NAME={{ user `image_name` }} - only: - - googlecompute - type: shell-local script: bin/job-board-register environment_vars: diff --git a/ci-ubuntu-1804.yml b/ci-ubuntu-1804.yml index d01befa78..6170bc9b7 100644 --- a/ci-ubuntu-1804.yml +++ b/ci-ubuntu-1804.yml @@ -194,12 +194,6 @@ post-processors: only: - docker - - - type: shell-local - script: bin/job-board-register - environment_vars: - - IMAGE_NAME={{ user `image_name` }} - only: - - googlecompute - type: shell-local script: bin/job-board-register environment_vars: From 919a44da63bf6e6541a63f3c57cbd93900870a80 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 20 May 2019 12:22:42 +0200 Subject: [PATCH 09/11] use source_image_family with all templates this removes the need for us to continuosly update the source image id --- .travis.yml | 10 ++++++-- bin/gce-image-update | 61 -------------------------------------------- ci-opal.yml | 2 +- ci-sardonyx.yml | 2 +- ci-stevonnie.yml | 2 +- 5 files changed, 11 insertions(+), 66 deletions(-) delete mode 100755 bin/gce-image-update diff --git a/.travis.yml b/.travis.yml index d38d23809..a5f45e57d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,17 @@ language: __sardonyx__ + dist: xenial -group: edge + services: - postgresql + filter_secrets: false + cache: bundler: true directories: - ${HOME}/bin + env: matrix: - TRAVIS_JOB_BOARD_REGISTER_YML="${TRAVIS_BUILD_DIR}/.example-job-board-register-sardonyx.yml" @@ -23,6 +27,7 @@ env: - SPEC_RUNNER='bash -lc' - SPEC_SUITES='travis_packer_templates' - SYSTEM_INFO_JSON="${TRAVIS_BUILD_DIR}/.example_system_info.json" + install: - if [[ -f .test-branch ]]; then export TRAVIS_COOKBOOKS_TEST_BRANCH="$(cat .test-branch 2>/dev/null)"; @@ -37,7 +42,6 @@ install: script: - make - bundle exec make test -- make update-gce-images - git diff --exit-code - git diff --cached --exit-code - sudo lsof | grep dpkg || true @@ -46,6 +50,7 @@ script: echo "checking $f"; jq . < $f &>/dev/null; done + after_success: - if [[ $TRAVIS_JOB_BOARD_REGISTER_YML =~ sardonyx ]]; then git fetch --unshallow; @@ -53,5 +58,6 @@ after_success: else echo 'no packer-build-trigger for you'; fi + notifications: email: false diff --git a/bin/gce-image-update b/bin/gce-image-update deleted file mode 100755 index a672005e5..000000000 --- a/bin/gce-image-update +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash -set -o errexit - -main() { - if [[ $# -lt 1 ]]; then - echo 'Missing editable files' >&2 - exit 1 - fi - - for rel in 1204 1404 1604; do - local curimg - curimg="$(__fetch_curimg "${rel}")" - local newimg - newimg="$(__fetch_newimg "${rel}")" - if [[ "${curimg}" && "${newimg}" ]]; then - __sed "s,${curimg},${newimg},g" "$@" - fi - done -} - -__fetch_curimg() { - local rel="${1}" - local f - f="$(git grep -lE "image: ubuntu-${rel}-.*" | head -1)" - if [[ ! "${f}" || ! -f "${f}" ]]; then - return - fi - - jq -r '.builders | .[] | .source_image' < <(bin/yml2json <"${f}") | head -1 -} - -__fetch_newimg() { - local rel="${1}" - - gcloud compute images list --format=json --filter="name~ubuntu-${rel}-.*" | - jq -r '.[] | .name' | head -1 -} - -__sed() { - local pattern="${1}" - local sed=sed - shift - - if command -v gsed &>/dev/null; then - sed=gsed - fi - - cmd=("${sed}" -i "${pattern}" "$@") - echo "---> ${cmd[*]}" - "${cmd[@]}" -} - -__authenticate() { - [[ -z "$CI" ]] && return - local jsonfile - jsonfile="$(mktemp)" - echo "$GCE_ACCOUNT_FILE_B64_BZ2" | base64 --decode | bunzip2 >"$jsonfile" - gcloud auth activate-service-account "$GCE_ACCOUNT_FILE_ID" --key-file "$jsonfile" -} - -main "$@" diff --git a/ci-opal.yml b/ci-opal.yml index af85480aa..eeb0883dd 100644 --- a/ci-opal.yml +++ b/ci-opal.yml @@ -25,7 +25,7 @@ builders: image_description: Travis CI opal account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: ubuntu-1604-xenial-v20181023 + source_image_family: ubuntu-1604-lts zone: us-central1-a image_name: "{{ user `image_name` }}" machine_type: n1-standard-4 diff --git a/ci-sardonyx.yml b/ci-sardonyx.yml index dbb5ca014..9d35b39b2 100644 --- a/ci-sardonyx.yml +++ b/ci-sardonyx.yml @@ -25,7 +25,7 @@ builders: image_description: Travis CI sardonyx account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: ubuntu-1604-xenial-v20181023 + source_image_family: ubuntu-1604-lts zone: us-central1-a image_name: "{{ user `image_name` }}" machine_type: n1-standard-4 diff --git a/ci-stevonnie.yml b/ci-stevonnie.yml index 766033a85..e4b796b73 100644 --- a/ci-stevonnie.yml +++ b/ci-stevonnie.yml @@ -25,7 +25,7 @@ builders: image_description: Travis CI stevonnie account_file: "{{ user `gce_account_file` }}" project_id: "{{ user `gce_project_id` }}" - source_image: ubuntu-1604-xenial-v20181023 + source_image_family: ubuntu-1604-lts zone: us-central1-a image_name: "{{ user `image_name` }}" machine_type: n1-standard-4 From f9c09a31e585e2d8b4dd63d8ee71c33cff34bb7c Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 29 May 2019 12:06:37 +0100 Subject: [PATCH 10/11] don't install 3.7.1 on 14.04 --- cookbooks/travis_ci_ubuntu_1404/attributes/default.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/cookbooks/travis_ci_ubuntu_1404/attributes/default.rb b/cookbooks/travis_ci_ubuntu_1404/attributes/default.rb index 8d384a678..9d083202c 100644 --- a/cookbooks/travis_ci_ubuntu_1404/attributes/default.rb +++ b/cookbooks/travis_ci_ubuntu_1404/attributes/default.rb @@ -97,7 +97,6 @@ pythons = %w[ 2.7.15 3.6.7 - 3.7.1 ] # Reorder pythons so that default python2 and python3 come first From 30b43216a2812470f2082c8e8ae1c64097cba41e Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 29 May 2019 12:07:08 +0100 Subject: [PATCH 11/11] use the trusty-stable branch for 14.04 --- ci-ubuntu-1404.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-ubuntu-1404.yml b/ci-ubuntu-1404.yml index e16dfc132..369f98e90 100644 --- a/ci-ubuntu-1404.yml +++ b/ci-ubuntu-1404.yml @@ -8,7 +8,7 @@ variables: image_name: travis-ci-ubuntu-1404-{{ timestamp }}-<%= git_desc %> image_family: travis-ci-ubuntu-1404-edge openstack_source_image_name: "{{ env `OS_SOURCE_IMAGE_XENIAL` }}" - travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}" + travis_cookbooks_branch: trusty-stable travis_cookbooks_edge_branch: master travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}" travis_uid: "{{ env `TRAVIS_UID` }}"