Skip to content

Commit

Permalink
Merge pull request #6 from latchbio/aidan/kube-v1.23-upgrade
Browse files Browse the repository at this point in the history
fix: rm unecessary, upgrade sysbox
  • Loading branch information
AidanAbd authored Jun 23, 2023
2 parents b95b66a + e909d81 commit a39752b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 24 deletions.
16 changes: 8 additions & 8 deletions bootstrap.sh.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
--- bootstrap.sh 2023-06-14 19:28:47.000000000 -0700
+++ bootstrap.patched.sh 2023-06-17 13:22:55.000000000 -0700
@@ -140,7 +140,7 @@
--- new_bootstrap.sh 2023-06-20 10:39:32.000000000 -0700
+++ new_bootstrap.patched.sh 2023-06-20 10:42:53.000000000 -0700
@@ -146,7 +146,7 @@
API_RETRY_ATTEMPTS="${API_RETRY_ATTEMPTS:-3}"
DOCKER_CONFIG_JSON="${DOCKER_CONFIG_JSON:-}"
PAUSE_CONTAINER_VERSION="${PAUSE_CONTAINER_VERSION:-3.1-eksbuild.1}"
-CONTAINER_RUNTIME="containerd"
+CONTAINER_RUNTIME="cri-o"
PAUSE_CONTAINER_VERSION="${PAUSE_CONTAINER_VERSION:-3.5}"
-DEFAULT_CONTAINER_RUNTIME="containerd"
+DEFAULT_CONTAINER_RUNTIME="cri-o"
CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-$DEFAULT_CONTAINER_RUNTIME}"
IP_FAMILY="${IP_FAMILY:-}"
SERVICE_IPV6_CIDR="${SERVICE_IPV6_CIDR:-}"

@@ -508,9 +508,21 @@
@@ -420,9 +420,21 @@
systemctl restart docker
snap set kubelet-eks \
container-runtime=docker
Expand Down
23 changes: 7 additions & 16 deletions sysbox-eks.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ variable "ubuntu_version" {

variable "sysbox_version" {
type = string
default = "0.5.2"
default = "0.6.2"

validation {
condition = can(regex("^\\d+\\.\\d+\\.\\d+$", var.sysbox_version))
Expand All @@ -20,7 +20,7 @@ variable "sysbox_version" {

variable "k8s_version" {
type = string
default = "1.22"
default = "1.23"

validation {
condition = can(regex("^\\d+\\.\\d+$", var.k8s_version))
Expand All @@ -38,7 +38,7 @@ packer {
}

source "amazon-ebs" "ubuntu-eks" {
ami_name = "latch-bio/sysbox-eks_${var.sysbox_version}_patch-1/k8s_${var.k8s_version}/images/hvm-ssd/ubuntu-${var.ubuntu_version}-amd64-server-rev-0"
ami_name = "latch-bio/sysbox-eks_${var.sysbox_version}/k8s_${var.k8s_version}/images/hvm-ssd/ubuntu-${var.ubuntu_version}-amd64-server"
ami_description = "Latch Bio, Sysbox EKS Node (k8s_${var.k8s_version}), on Ubuntu ${var.ubuntu_version}, amd64 image"

tags = {
Expand All @@ -58,7 +58,7 @@ source "amazon-ebs" "ubuntu-eks" {

source_ami_filter {
filters = {
name = "ubuntu-eks/k8s_${var.k8s_version}/images/hvm-ssd/ubuntu-${var.ubuntu_version}-amd64-server-20220623"
name = "ubuntu-eks/k8s_${var.k8s_version}/images/hvm-ssd/ubuntu-${var.ubuntu_version}-amd64-server-20230616"
}
owners = ["099720109477"]
}
Expand Down Expand Up @@ -98,6 +98,8 @@ build {

"echo Installing Sysbox package dependencies",

"sudo apt-get install rsync -y",

"echo Installing the Sysbox package",
"sudo dpkg --install ./sysbox-ce_*.linux_amd64.deb || true", # will fail due to missing dependencies, fixed in the next step

Expand Down Expand Up @@ -212,7 +214,7 @@ build {
"sudo apt-get install --yes --no-install-recommends golang-go libgpgme-dev",

"echo Cloning the patched CRI-O repository",
"git clone --branch v1.22-sysbox --depth 1 --shallow-submodules https://github.com/nestybox/cri-o.git cri-o",
"git clone --branch v${var.k8s_version}-sysbox --depth 1 --shallow-submodules https://github.com/nestybox/cri-o.git cri-o",

"echo Building",
"cd cri-o",
Expand Down Expand Up @@ -302,15 +304,4 @@ build {
"sudo rm -r /etc/cni/net.d/",
]
}

# https://github.com/containers/podman/issues/11745
provisioner "shell" {
inline_shebang = "/usr/bin/env bash"
inline = [
"set -o pipefail -o errexit",

"echo '>>> Disabling `[machine]` key in /usr/share/containers/containers.conf'",
"sudo perl -i -pe 's/^\\[machine\\]/#$&/' /usr/share/containers/containers.conf",
]
}
}

0 comments on commit a39752b

Please sign in to comment.