Skip to content

Commit 36510ea

Browse files
committed
chore: cleanup + start building nix artifacts on qemu branches
1 parent 841505a commit 36510ea

File tree

4 files changed

+6
-78
lines changed

4 files changed

+6
-78
lines changed

.github/workflows/nix-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- develop
77
- release/*
8+
- da/qemu*
89
pull_request:
910
workflow_dispatch:
1011

Dockerfile-kubevirt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
FROM scratch
2-
ADD --chown=107:107 disk/focal.img /disk/focal.qcow2
2+
ADD --chown=107:107 output-cloudimg/packer-cloudimg /disk/focal.qcow2

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# TODO (darora): we can get rid of this once we're actually building nix things on this
2-
UPSTREAM_NIX_GIT_SHA := $(shell git rev-parse origin/release/15.6)
1+
UPSTREAM_NIX_GIT_SHA := $(shell git rev-parse HEAD)
32
GIT_SHA := $(shell git describe --tags --always --dirty)
43

54
init: qemu-arm64-nix.pkr.hcl
@@ -12,10 +11,7 @@ disk/focal-raw.img: output-cloudimg/packer-cloudimg
1211
mkdir -p disk
1312
sudo qemu-img convert -O raw output-cloudimg/packer-cloudimg disk/focal-raw.img
1413

15-
disk/focal.img: output-cloudimg/packer-cloudimg
16-
sudo qemu-img convert -O qcow2 output-cloudimg/packer-cloudimg disk/focal.img
17-
18-
container-disk-image: disk/focal.img
14+
container-disk-image: output-cloudimg/packer-cloudimg
1915
docker build . -t supabase-postgres-test:$(GIT_SHA) -f ./Dockerfile-kubevirt
2016

2117
host-disk: disk/focal-raw.img

qemu-arm64-nix.pkr.hcl

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,8 @@
1-
variable "ami" {
2-
type = string
3-
default = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-arm64-server-*"
4-
}
5-
6-
variable "profile" {
7-
type = string
8-
default = "${env("AWS_PROFILE")}"
9-
}
10-
11-
variable "ami_name" {
12-
type = string
13-
default = "supabase-postgres"
14-
}
15-
16-
variable "ami_regions" {
17-
type = list(string)
18-
default = ["ap-southeast-2"]
19-
}
20-
211
variable "ansible_arguments" {
222
type = string
233
default = "--skip-tags install-postgrest,install-pgbouncer,install-supabase-internal"
244
}
255

26-
variable "aws_access_key" {
27-
type = string
28-
default = ""
29-
}
30-
31-
variable "aws_secret_key" {
32-
type = string
33-
default = ""
34-
}
35-
366
variable "environment" {
377
type = string
388
default = "prod"
@@ -42,36 +12,6 @@ variable "git_sha" {
4212
type = string
4313
}
4414

45-
# variable "region" {
46-
# type = string
47-
# }
48-
49-
variable "build-vol" {
50-
type = string
51-
default = "xvdc"
52-
}
53-
54-
# ccache docker image details
55-
variable "docker_user" {
56-
type = string
57-
default = ""
58-
}
59-
60-
variable "docker_passwd" {
61-
type = string
62-
default = ""
63-
}
64-
65-
variable "docker_image" {
66-
type = string
67-
default = ""
68-
}
69-
70-
variable "docker_image_tag" {
71-
type = string
72-
default = "latest"
73-
}
74-
7515
locals {
7616
creator = "packer"
7717
}
@@ -91,11 +31,6 @@ variable "packer-execution-id" {
9131
default = "unknown"
9232
}
9333

94-
variable "force-deregister" {
95-
type = bool
96-
default = false
97-
}
98-
9934
packer {
10035
required_plugins {
10136
amazon = {
@@ -132,16 +67,12 @@ source "qemu" "cloudimg" {
13267
disk_image = true
13368
disk_size = "15G"
13469
format = "qcow2"
135-
# TODO (darora): disable backing image for qcow2
13670
headless = true
13771
http_directory = "http"
13872
iso_checksum = "file:https://cloud-images.ubuntu.com/focal/current/SHA256SUMS"
13973
iso_url = "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-arm64.img"
14074
memory = 20000
14175
qemu_binary = "qemu-system-aarch64"
142-
qemu_img_args {
143-
create = ["-F", "qcow2"]
144-
}
14576
qemuargs = [
14677
["-machine", "virt"],
14778
["-cpu", "host"],
@@ -158,8 +89,8 @@ source "qemu" "cloudimg" {
15889
ssh_timeout = "1h"
15990
ssh_username = "ubuntu"
16091
ssh_wait_timeout = "1h"
161-
use_backing_file = true
162-
accelerator = "kvm"
92+
use_backing_file = false
93+
accelerator = "kvm"
16394
}
16495

16596
build {

0 commit comments

Comments
 (0)