Skip to content

Commit

Permalink
Update e2e Docker tests from Ubuntu 22.04 to 24.04 (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson authored Aug 4, 2024
1 parent e7594ae commit 5f6764b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/deploying-rails-from-scratch.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Deploying Rails From Scratch

In this tutorial we will use tomo to deploy a [sample Rails project](https://github.com/mattbrictson/rails-new) to a virtual private server (VPS). These instructions use [DigitalOcean](https://www.digitalocean.com) as the hosting provider, but any provider that offers an Ubuntu 20.04 or 22.04 LTS VPS should work in a similar way. Here are the steps involved (step 1 is the only part that is DigitalOcean-specific):
In this tutorial we will use tomo to deploy a [sample Rails project](https://github.com/mattbrictson/rails-new) to a virtual private server (VPS). These instructions use [DigitalOcean](https://www.digitalocean.com) as the hosting provider, but any provider that offers an Ubuntu LTS VPS should work in a similar way. Here are the steps involved (step 1 is the only part that is DigitalOcean-specific):

1. [Create an Ubuntu VPS](#create-an-ubuntu-vps)
2. [Install necessary apt packages](#install-necessary-apt-packages)
Expand All @@ -15,7 +15,7 @@ This is a basic tutorial that skips over DNS, TLS, load balancing, PostgreSQL, e

Log into [DigitalOcean](https://www.digitalocean.com) and create a "Droplet" (aka a VPS). If this is your first time using DigitalOcean, check out their [Droplet QuickStart](https://www.digitalocean.com/docs/droplets/quickstart/) guide for an introduction to the service.

When creating the Droplet, make sure to choose **Ubuntu 20.04 or 22.04 (LTS) x64**:
When creating the Droplet, make sure to choose **Ubuntu 20.04, 22.04, or 24.04 (LTS) x64**:

![Ubuntu 20.04 LTS](./[email protected])

Expand Down
2 changes: 1 addition & 1 deletion lib/tomo/testing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04
WORKDIR /provision
COPY ./tomo_test_ed25519.pub /root/.ssh/authorized_keys
COPY ./ubuntu_setup.sh ./
Expand Down
4 changes: 2 additions & 2 deletions lib/tomo/testing/docker_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def ssh_settings
attr_reader :container_id, :image_id, :private_key_path

def pull_base_image_if_needed
images = Local.capture('docker images --format "{{.ID}}" ubuntu:22.04')
Local.capture("docker pull ubuntu:22.04") if images.strip.empty?
images = Local.capture('docker images --format "{{.ID}}" ubuntu:24.04')
Local.capture("docker pull ubuntu:24.04") if images.strip.empty?
end

def set_up_private_key
Expand Down
4 changes: 3 additions & 1 deletion lib/tomo/testing/ubuntu_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -e

export DEBIAN_FRONTEND=noninteractive

apt-get -y update
apt-get -y install adduser

# Create `deployer` user
adduser --disabled-password deployer < /dev/null
mkdir -p /home/deployer/.ssh
Expand All @@ -16,7 +19,6 @@ mkdir -p /var/lib/systemd/linger
touch /var/lib/systemd/linger/deployer

# Packages needed for ruby, etc.
apt-get -y update
apt-get -y install autoconf \
bison \
build-essential \
Expand Down

0 comments on commit 5f6764b

Please sign in to comment.