Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build process and CI improvements #409

Merged
merged 42 commits into from
May 29, 2018
Merged

Build process and CI improvements #409

merged 42 commits into from
May 29, 2018

Conversation

GUI
Copy link
Member

@GUI GUI commented May 29, 2018

We've had a few different branches that have been in development for a while. In an attempt to clean things up and start to merge some of the changes in more piece-meal, this pull request integrates some of those changes from the in-progress branches.

There's not much functionally different in this pull request, this primarily focuses on improving the build process:

  • Rework the cmake build process to better leverage caching and breaking things into more discrete steps. This allows for better caching and re-building when working in the docker development environment or building docker containers (so not everything has to be rebuilt).
  • Begin Ubuntu 18.04 and Debian 9 builds, with a couple OpenSSL 1.1.0+ and package compatibility fixes. Remove Ubuntu 12.04 and Debian 7 builds.
  • Upgrade test CI environment to Circle CI 2.0's setup.
  • Remove some of the experimental analytics work (we may still revisit this, but removing the code to clean things up for now).
  • Miscellaneous fixes and improvements for the docker development environment.
  • A few misc code improvements pulled from other branches:
    • Better abstract the elasticsearch connections in the Lua code.
    • Replace luatz with lua-icu-date for more accurate timezone/daylight savings handling.
    • Some improvements to the code related to reading config files and activating services.

GUI added 30 commits May 12, 2018 12:29
openssl 1.1.0+ can't have some empty fields specified, so instead don't
specify them at all. See #408
- Add Ubuntu 18.04 (Bionic) and Debian 9 (Stretch) to our package
  building process.
- Remove Ubuntu 12.04 (Precise) and Debian 7 (Wheezy) from our package
  builds. Ubuntu 12.04 has reached its end of support and Debian 7 will
  at the end of this month.
- Upgrade from Traffic Server v5 to v7. This stemmed from needing to
  build under Ubuntu 18.04 where OpenSSL v1.1 is the default, and we
  need at least Traffic Server v6 to build against OpenSSL 1.1.0. There
  might still be some keepalive issues to sort out (which is why we were
  holding back), but since Traffic Server v5 isn't supported any longer,
  this update is due.
- Rework the build process. While this is a bit messy to get wrapped in
  with these other updates, this pulls over various improvements to the
  cmake build process that were in the lapis-postgres branch. I keep
  hitting issues that would benefit from these build improvements, and
  maintaining things on both branches is becoming more of a hassle, so
  we'll manually pull over the bulk of these build process improvements.
  The improvements mainly revolve around better splitting up the build
  process into discrete targets. This better organizes the build files,
  but also provides easier ways to perform the build in specific steps,
  which helps with the Docker build process and better caching.
- Make various improvement to the Docker development environment so
  performing builds and re-builds are easier/more reliable. Now the
  symlinking happens in an entrypoint script, so that it still takes
  place on "run" commands. Also improve the build "configure" script so
  it always performs builds in the /build directory. All of these
  changes better ensure builds happens as they did on initial build even
  if you're manually running these commands on an existing docker dev
  container.
- Some other misc improvements pulled over from the lapis-postgres
  branch. Again not quite ideal to be manually pulling these over, but
  this should help get some of these more general improvements live
  before lapis-postgres is merged in.
    - Switch from luatz to icu-date for more proper timezone handling.
    - Bring over some improvements to startup logic and default yaml
      config logic.
The IDs should be functionally equivalent, this is just a pure-Lua
implementation to reduce our need for custom nginx modules.
- Ensure test dependencies are installed in CI environment.
- Use system libxml and libxslt libraries for nokogiri (to make security
  updates easier and speed up installs).
- Optimize bundle installations so that a common bundle directory is
  used across bundles for better caching.
- Fix unnecessary make re-builds caused by using the dynamic PATH
  environment variable. Instead use a hard-coded base PATH.
We may revisit this, but since it's probably not on the immediate
horizon, go ahead and remove this code, so we're not trying to maintain
it or its dependencies.
This mostly ports over the setup used on the lapis-postgres branch where
we had started this migration.
globstar isn't apparently set by defualt in CircleCI, so `**` wasn't
picking up files in nested directories.
We don't actually have any archives in this directory anymore, so this
clean task doesn't actually do anything.
We'll do the upgrades to v7 in a separate branch.
There are no longer any urandom descriptors opened with lua-resty-txid,
so we no longer need to check to ensure it's greater than 0. But still
keep the basic test intact to ensure we don't accidentally leak things
in the future.
This fixes the elasticsearch index names missing the "v" part of the
"v1" version number in the name after the various version config changes
in this branch.

This also pulls in some of the elasticsearch refactoring to add the
helper library for handling connections and queries (originally on the
lapis-postgres branch).
The machine executor doesn't have caching, which means testing would be
very slow given our current reliance on the cache for caching our build
files.

So instead, go back to the docker test environment, which lacks IPv6
support, so disable our one IPv6 test in the CI environment (not ideal,
but for now seems like the simplest option).
GUI added 12 commits May 22, 2018 08:21
Also disable and remove liblogging dependency for rsyslog, since it
looks like it's becoming deprecated in a future version, and since we
don't actually use it, we might as well get rid of an extra dependency.
Since CircleCI's matching is based on prefixes, with the previous
approach it mean the cache for the `updates-trafficserver` branch could
inadvertently get used when building the `updates` branch. So reorder
the naming convention around so conflicts like this aren't as likely
(unless a branch name happened to contain the system arch name).
@GUI GUI merged commit 9d45ad1 into master May 29, 2018
@GUI GUI deleted the updates branch May 29, 2018 04:34
@GUI GUI added this to the v0.15.0 milestone May 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant