Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ name: CI

on:
push:
branches: [tuf-rebuild, master, go-1.22-upgrade]
branches: [tuf-rebuild, master, go-1.22-upgrade, debian13-cgroups-v2-bootstrap]
pull_request:
branches: [tuf-rebuild, master]
branches: [tuf-rebuild, master, debian13-cgroups-v2-bootstrap]
workflow_dispatch:

jobs:
build:
name: Build all components
runs-on: ubuntu-latest
container:
image: debian:bookworm-slim
image: ubuntu:24.04

steps:
- name: Install system dependencies
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
name: Unit tests
runs-on: ubuntu-latest
container:
image: debian:bookworm-slim
image: ubuntu:24.04

steps:
- name: Install system dependencies
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# For unit tests:
# docker run --rm -v $(pwd):/go/src/github.com/flynn/flynn -w /go/src/github.com/flynn/flynn flynn-ci make test-unit-standalone

FROM debian:bookworm-slim
FROM ubuntu:24.04

# Avoid interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
16 changes: 8 additions & 8 deletions appliance/mariadb/img/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
export DEBIAN_FRONTEND=noninteractive

apt-get update
apt-get install -y software-properties-common apt-transport-https
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 \
4D1BB29D63D98E422B2113B19334A25F8507EFA5 \
177F4010FE56CA3336300305F1656F24C74CD1D8 \
apt-get install -y curl ca-certificates gnupg software-properties-common apt-transport-https

# Add MariaDB 10.11 LTS repository for Noble
curl -fsSL https://mariadb.org/mariadb_release_signing_key.pgp \
-o /etc/apt/keyrings/mariadb-keyring.pgp
echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/ubuntu noble main" \
> /etc/apt/sources.list.d/mariadb.list

add-apt-repository 'deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu bionic main'
add-apt-repository 'deb http://repo.percona.com/apt bionic main'
apt-get update
apt-get install -y sudo
apt-get install -y mariadb-server percona-xtrabackup
apt-get install -y sudo mariadb-server mariadb-backup
apt-get clean
apt-get autoremove -y
28 changes: 14 additions & 14 deletions appliance/mariadb/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,20 +284,20 @@ func (p *Process) assumePrimary(downstream *discoverd.Instance) (err error) {
return nil
}

// Backup returns a reader for streaming a backup in xbstream format.
// Backup returns a reader for streaming a backup in mbstream format.
func (p *Process) Backup() (io.ReadCloser, error) {
r := &backupReadCloser{}

cmd := exec.Command(
filepath.Join(p.BinDir, "innobackupex"),
filepath.Join(p.BinDir, "mariabackup"),
"--defaults-file="+p.ConfigPath(),
"--backup",
"--host=127.0.0.1",
"--port="+p.Port,
"--user=flynn",
"--password="+p.Password,
"--socket=",
"--stream=xbstream",
".",
"--stream=mbstream",
)
cmd.Dir = p.DataDir
cmd.Stderr = &r.stderr
Expand Down Expand Up @@ -336,7 +336,7 @@ func (p *Process) extractBackupInfo() (*BackupInfo, error) {
return &BackupInfo{LogFile: fields[0], LogPos: fields[1], GTID: fields[2]}, nil
}

// Restore restores the database from an xbstream backup.
// Restore restores the database from an mbstream backup.
func (p *Process) Restore(r io.Reader) (*BackupInfo, error) {
if err := p.writeConfig(configData{}); err != nil {
return nil, err
Expand All @@ -355,11 +355,11 @@ func (p *Process) Restore(r io.Reader) (*BackupInfo, error) {
}

func (p *Process) unpackXbstream(r io.Reader) error {
cmd := exec.Command(filepath.Join(p.BinDir, "xbstream"), "-x", "--directory="+p.DataDir)
cmd := exec.Command(filepath.Join(p.BinDir, "mbstream"), "-x", "--directory="+p.DataDir)
cmd.Stdin = io.NopCloser(r)

if buf, err := cmd.CombinedOutput(); err != nil {
p.Logger.Error("xbstream failed", "err", err, "output", string(buf))
p.Logger.Error("mbstream failed", "err", err, "output", string(buf))
return err
}

Expand All @@ -368,13 +368,13 @@ func (p *Process) unpackXbstream(r io.Reader) error {

func (p *Process) restoreApplyLog() error {
cmd := exec.Command(
filepath.Join(p.BinDir, "innobackupex"),
filepath.Join(p.BinDir, "mariabackup"),
"--defaults-file="+p.ConfigPath(),
"--apply-log",
p.DataDir,
"--prepare",
"--target-dir="+p.DataDir,
)
if buf, err := cmd.CombinedOutput(); err != nil {
p.Logger.Error("innobackupex apply-log failed", "err", err, "output", string(buf))
p.Logger.Error("mariabackup prepare failed", "err", err, "output", string(buf))
return err
}
return nil
Expand Down Expand Up @@ -990,7 +990,7 @@ func MySQLErrorNumber(err error) uint16 {
return 0
}

// backupReadCloser wraps the Cmd of the innobackupex to perform error handling.
// backupReadCloser wraps the Cmd of mariabackup to perform error handling.
type backupReadCloser struct {
cmd *exec.Cmd
stdout io.ReadCloser
Expand All @@ -1005,10 +1005,10 @@ func (r *backupReadCloser) Close() error {
return err
}

// Verify that innobackupex prints "completed OK!" at the end of STDERR.
// Verify that mariabackup prints "completed OK!" at the end of STDERR.
if !strings.HasSuffix(strings.TrimSpace(r.stderr.String()), "completed OK!") {
r.stderr.WriteTo(os.Stderr)
return errors.New("innobackupex did not complete ok")
return errors.New("mariabackup did not complete ok")
}

return nil
Expand Down
11 changes: 9 additions & 2 deletions appliance/mongodb/img/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

export DEBIAN_FRONTEND=noninteractive

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 42F3E95A2C4F08279C4960ADD68FA50FEA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" > /etc/apt/sources.list.d/mongodb-org-3.2.list
apt-get update
apt-get install -y curl ca-certificates gnupg

# Add MongoDB 7.0 repository for Noble
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc \
-o /etc/apt/keyrings/mongodb-server-7.0.gpg
echo "deb [signed-by=/etc/apt/keyrings/mongodb-server-7.0.gpg] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/7.0 multiverse" \
> /etc/apt/sources.list.d/mongodb-org-7.0.list

apt-get update
apt-get install -y sudo mongodb-org
apt-get clean
Expand Down
2 changes: 1 addition & 1 deletion appliance/postgresql/cmd/flynn-postgres/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func main() {
ID: id,
Singleton: singleton,
DataDir: filepath.Join(dataDir, "db"),
BinDir: "/usr/lib/postgresql/11/bin/",
BinDir: "/usr/lib/postgresql/16/bin/",
Password: password,
Logger: log.New("component", "postgres"),
TimescaleDB: false,
Expand Down
34 changes: 20 additions & 14 deletions appliance/postgresql/img/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,31 @@

export DEBIAN_FRONTEND=noninteractive

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" >> /etc/apt/sources.list.d/postgresql.list
# Install prerequisites
apt-get update
apt-get dist-upgrade -y
apt-get -qy --fix-missing --force-yes install language-pack-en software-properties-common
update-locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8
dpkg-reconfigure locales
apt-get -y install curl sudo
add-apt-repository ppa:timescale/timescaledb-ppa
apt-get install -y curl ca-certificates gnupg lsb-release

# Add PostgreSQL APT repository (PGDG) for Noble
install -d /usr/share/postgresql-common/pgdg
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
-o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] http://apt.postgresql.org/pub/repos/apt/ noble-pgdg main" \
> /etc/apt/sources.list.d/pgdg.list

apt-get update
apt-get dist-upgrade -y
apt-get install -y -q \
language-pack-en \
less \
postgresql-11 \
postgresql-contrib-11 \
postgresql-11-pgextwlist \
postgresql-11-postgis-2.5 \
postgresql-11-pgrouting \
timescaledb-postgresql-11
sudo \
postgresql-16 \
postgresql-contrib \
postgresql-16-postgis-3 \
postgresql-16-pgrouting
apt-get clean
apt-get autoremove -y

update-locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8
dpkg-reconfigure locales

echo "\set HISTFILE /dev/null" > /root/.psqlrc
2 changes: 1 addition & 1 deletion appliance/postgresql/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func NewProcess(c Config) *Process {
p.port = "5432"
}
if p.binDir == "" {
p.binDir = "/usr/lib/postgresql/11/bin/"
p.binDir = "/usr/lib/postgresql/16/bin/"
}
if p.dataDir == "" {
p.dataDir = "/data"
Expand Down
5 changes: 1 addition & 4 deletions appliance/redis/img/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ export DEBIAN_FRONTEND=noninteractive

apt-get update
apt-get dist-upgrade -y
apt-get install -y curl software-properties-common
add-apt-repository ppa:chris-lea/redis-server
apt-get update
apt-get install -y redis-server
apt-get clean
apt-get autoremove -y
mkdir /data
mkdir -p /data
16 changes: 8 additions & 8 deletions bootstrap/manifest_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,19 @@
}
},
{
"id": "slugbuilder-18-image",
"id": "slugbuilder-24-image",
"action": "create-artifact",
"artifact": $image_artifact[slugbuilder-18]
"artifact": $image_artifact[slugbuilder-24]
},
{
"id": "slugbuilder-14-image",
"action": "create-artifact",
"artifact": $image_artifact[slugbuilder-14]
},
{
"id": "slugrunner-18-image",
"id": "slugrunner-24-image",
"action": "create-artifact",
"artifact": $image_artifact[slugrunner-18]
"artifact": $image_artifact[slugrunner-24]
},
{
"id": "slugrunner-14-image",
Expand Down Expand Up @@ -490,9 +490,9 @@
"release": {
"env": {
"CONTROLLER_KEY": "{{ (index .StepData \"controller-key\").Data }}",
"SLUGBUILDER_18_IMAGE_ID": "{{ (index .StepData \"slugbuilder-18-image\").ID }}",
"SLUGBUILDER_24_IMAGE_ID": "{{ (index .StepData \"slugbuilder-24-image\").ID }}",
"SLUGBUILDER_14_IMAGE_ID": "{{ (index .StepData \"slugbuilder-14-image\").ID }}",
"SLUGRUNNER_18_IMAGE_ID": "{{ (index .StepData \"slugrunner-18-image\").ID }}",
"SLUGRUNNER_24_IMAGE_ID": "{{ (index .StepData \"slugrunner-24-image\").ID }}",
"SLUGRUNNER_14_IMAGE_ID": "{{ (index .StepData \"slugrunner-14-image\").ID }}"
},
"processes": {
Expand Down Expand Up @@ -643,9 +643,9 @@
"release": {
"env": {
"CONTROLLER_KEY": "{{ (index .StepData \"controller-key\").Data }}",
"SLUGBUILDER_18_IMAGE_ID": "{{ (index .StepData \"slugbuilder-18-image\").ID }}",
"SLUGBUILDER_24_IMAGE_ID": "{{ (index .StepData \"slugbuilder-24-image\").ID }}",
"SLUGBUILDER_14_IMAGE_ID": "{{ (index .StepData \"slugbuilder-14-image\").ID }}",
"SLUGRUNNER_18_IMAGE_ID": "{{ (index .StepData \"slugrunner-18-image\").ID }}",
"SLUGRUNNER_24_IMAGE_ID": "{{ (index .StepData \"slugrunner-24-image\").ID }}",
"SLUGRUNNER_14_IMAGE_ID": "{{ (index .StepData \"slugrunner-14-image\").ID }}"
}
}
Expand Down
2 changes: 1 addition & 1 deletion builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Build Flynn images using builder/manifest.json.

type Builder struct {
// baseLayer is used when building an image which has no
// dependencies (e.g. the ubuntu-bionic image)
// dependencies (e.g. the ubuntu-noble image)
baseLayer *host.Mountspec

// artifacts is a map of built artifacts and is written to
Expand Down
8 changes: 4 additions & 4 deletions builder/img/go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

set -eo pipefail

go_version="1.13.1"
go_shasum="94f874037b82ea5353f4061e543681a0e79657f787437974214629af8407d124"
go_version="1.22.12"
go_shasum="4fa4f869b0f7fc6bb1eb2660e74657fbf04cdd290b5aef905585c86051b34d43"
gobin_commit="ef6664e41f0bfe3007869844d318bb2bfa2627f9"
dir="/usr/local"

apt-get update
apt-get install --yes git build-essential
apt-get clean

curl -fsSLo /tmp/go.tar.gz "https://storage.googleapis.com/golang/go${go_version}.linux-amd64.tar.gz"
echo "${go_shasum} /tmp/go.tar.gz" | shasum -c -
curl -fsSLo /tmp/go.tar.gz "https://go.dev/dl/go${go_version}.linux-amd64.tar.gz"
echo "${go_shasum} /tmp/go.tar.gz" | sha256sum -c -
rm -rf "${dir}/go"
tar xzf /tmp/go.tar.gz -C "${dir}"
rm /tmp/go.tar.gz
Expand Down
Loading
Loading