Masseffect repo EOL instructions

Overview

DreamCompute Ubuntu 14.04 Virtual Machines (VMs) launched prior to August 7, 2019, included an apt repository mirror. This mirror was hosted by DreamHost and set up to provide quick package downloads from VMs, and to reduce the load on Canonical’s apt repositories.

This mirrored apt repository has been decommissioned. After a few weeks of monitoring the mirror, DreamHost believes there are very few customers who will be affected by this work. However, if you are one of the few who may be affected, the following are some tips to help ensure your VM continues to work as expected.

Who is affected?

To determine if you are affected, run the following command:
[server]$ grep mirrors.dreamcompute.com /etc/apt/sources.list

If nothing returns from this command, you are NOT affected and can continue using your VM as is. However, if you are affected by this work, you will see a result that looks similar to the following:

[server]$ grep mirrors.dreamcompute.com /etc/apt/sources.list
deb http://mirrors.dreamcompute.com/ubuntu/ trusty main restricted
deb-src http://mirrors.dreamcompute.com/ubuntu/ trusty main restricted
deb http://mirrors.dreamcompute.com/ubuntu/ trusty-updates main restricted
deb-src http://mirrors.dreamcompute.com/ubuntu/ trusty-updates main restricted

What to do if you’re affected

If you are affected by this mirror work, you have a few options on how to continue.

Option one: Building a new VM

The most disruptive solution would be to build a new VM and migrate your workload to this VM. Specifics on how to do this depends entirely on what software is running and how sensitive it is to changes such as IPs, OS versions, and so on.

Option two: Mirroring your VM

Even though DreamHost won’t be hosting a mirror of Ubuntu-14.04, Canonical has committed to continuing to provide support for Ubuntu-14.04 until April of 2022. As such, you can change the mirror your VM uses to point at Canonical’s apt repository.

The following are three different methods to accomplish this:

Method #1

Edit the file by hand using the vim command:

[server]$ sudo vim /etc/apt/sources.list

Method #2

Edit the file using the sed command:

[server]$ sudo sed -i 's/mirrors.dreamcompute.com/iad-2.clouds.archive.ubuntu.com/g' /etc/apt/sources.list

Method #3

Modify the file using a simple Ansible playbook. The following example is a simple playbook you can run (ansible-playbook fixit.yml) to swap out the apt mirrors:

---
- name: Update apt mirrors
  hosts: localhost
  become: true
  connection: local
  gather_facts: no

  tasks:
    - name: Replace old mirror with new mirror
      replace:
        path: /etc/apt/sources.list
        regexp: mirrors.dreamcompute.com
        replace: iad-2.clouds.archive.ubuntu.com

Did this article answer your questions?

Article last updated PST.