Travis

Upgrading Travis CI Enterprise 2.x

Backups #

Before upgrading, we strongly recommend taking a snapshot of /etc/travis and /var/travis.

One good way to do this is to run.

  sudo tar -cvzf travis-backup-$(date +%s).tar.gz /var/travis /etc/travis/

See restoring from backups if you have any questions about the steps or want to do a restore.

Encryption Key #

You cannot access the information in your production database without the encryption key. To ensure you can always recover your database, make a backup of this key.

Without the encryption key, the information in the database is not recoverable.

To make a backup of encryption keys in TCIE 2.x, please follow these steps:

  1. Open an SSH connection to the platform machine.
  2. Open a bash session with root privileges on the Travis CI container by running travis bash.
  3. Run the following command to obtain the key: grep -A1 encryption: /usr/local/travis/etc/travis/config/travis.yml.
  4. Create a backup of the value returned by the previous command by either writing it down on a piece of paper or storing it on a different computer.

Update the Travis CI Enterprise Platform #

You can check for new releases by going to the management interface dashboard https://<your-travis-ci-enterprise-domain>:8800 and click the ‘Check Now’ button. If an update is available, you will be able to read the release notes and install the update.

There will be a small amount of downtime while an update is installed. For this reason, we recommend that you perform each update during a maintenance window.

Update Replicated on the Platform #

To update Replicated on the Platform installation you’ll want to run the install script which will download the latest version. Depending on whether you are behind a web proxy you’ll want to run one of these:

  curl -sSL -o /tmp/installer.sh https://enterprise.travis-ci.com/install
  sudo bash /tmp/installer.sh
  curl -sSL -x http://: -o /tmp/installer.sh https://enterprise.travis-ci.com/install
  sudo bash /tmp/installer.sh http-proxy=http://:

To apply an update patch for a specific release, e.g., you currently have version 2.9.1 and want to update to a more secure patch at 2.9.7 patch, you would execute:

  curl -sSL "https://get.replicated.com/docker?replicated_tag=2.9.7" | sudo bash

Please note that for Ubuntu Bionic, you must add the following flag to installer.sh: installer.sh --travis_build_images=bionic

Update the Travis CI Enterprise Worker #

On Ubuntu 16.04 and higher #

On Ubuntu 16.04 and later, travis-worker ships inside a Docker container. To update travis-worker, please follow the steps below.

  1. Configure the new image by editing the Docker tag in /etc/systemd/system/travis-worker.service.d/env.conf:
      [Service]
      Environment="TRAVIS_WORKER_SELF_IMAGE=travisci/worker:v4.6.1"
    
  2. Reload the configuration and restart the service:
      $ sudo systemctl daemon-reload
      $ sudo systemctl restart travis-worker
    

On Ubuntu 14.04 #

In order to update the Worker, you can run the following on each worker host:

$ sudo apt-get update
$ sudo apt-get install travis-worker

Restore from Backups #

In the rare event something goes wrong and/or you’d like to restore from a backup, please use the following steps:

  1. Boot up a replacement machine with a fresh install of Ubuntu 14.04.
  2. Follow the directions in the Installation Guide. If you cannot find this, let us know at enterprise@travis-ci.com.
  3. Set up your Travis CI instance, filling out the settings as needed. Fill in the RabbitMQ password and Travis Encryption Key that you saved. Save the settings and start up the Travis container.
  4. Stop the Travis CI container in the Replicated dashboard.
  5. As a superuser (to preserve user permissions), unzip the Travis backup you made and copy the directories to the appropriate places (/var/travis and /etc/travis).
  6. Start Travis CI via the Replicated dashboard.

Note, that this does still put you on the latest version of Travis CI Enterprise. Rolling back strategies will need to be coordinated with the Travis CI team as it requires changing licenses back to the legacy release channel.

Contact Enterprise Support #

To get in touch with us, please write a message to enterprise@travis-ci.com. If possible, please include as much of the following as you can:

  • Description of the problem - what are you observing?
  • Which steps did you try already?
  • A support bundle (see table below on how to obtain it)
  • Log files from all workers (They can be found at /var/log/upstart/travis-worker.log - please include as many as you can retrieve).
  • If a build failed or errored, a text file of the build log
TCI Enterprise version Support bundle
3.x Run kubectl kots admin-console -n [namespace] to access admin console on http://localhost:8800
Support bundle generation instruction is available in ‘troubleshoot’ menu or directly at: http://localhost:8800/app/tci-enterprise-kots/troubleshoot

A command for generating support bundle will appear after selecting:
If you'd prefer, [click here]() to get a command to manually generate a support bundle.
2.x+ You can get it from https://<your-travis-ci-enterprise-domain>:8800/support

Since the announcement in Q3 2020, the most up to date version of Travis CI Enterprise is 3.x line. There are not any new releases for version 2.2 and the support patches has been limited since March 2021 as well. For existing users of Travis CI 2.x we strongly recommend upgrading to the latest Travis CI Enterprise 3.x.

Have you made any customizations to your setup? While we may be able to see some information (such as hostname, IaaS provider, and license expiration), there are many other things we cannot see which could lead to something not working. Therefore, we would like to ask you to also answer the questions below in your support request (if applicable):

  • How many machines are you using / what is your Kubernetes cluster setup?
  • Do you use configuration management tools (Chef, Puppet)?
  • Which other services do interface with Travis CI Enterprise?
  • Which Version Control system (VCS) do you use together with Travis CI Enterprise (e.g. github.com, GitHub Enterprise, or BitBucket Cloud)?
  • If you are using GitHub Enterprise, which version of it?

We are looking forward to helping!