Skip to content

Commit 3ecb713

Browse files
authored
Update all image versions (#174)
## Description We've been running very old images. Some are multiple years old. This gets us newer versions. ## Why is this needed Fixes: # ## How Has This Been Tested? ## How are existing users impacted? What migration steps/scripts do we need? ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 13ab7d7 + cca7dee commit 3ecb713

File tree

10 files changed

+104
-145
lines changed

10 files changed

+104
-145
lines changed

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
For version v0.x.y:
66

77
1. Create the annotated tag
8-
> NOTE: To use your GPG signature when pushing the tag, use `SIGN_TAG=1 ./contrib/tag-release.sh v0.x.y` instead)
8+
> NOTE: To use your GPG signature when pushing the tag, use `SIGN_TAG=1 ./contrib/tag-release.sh v0.x.y` instead
99
- `./contrib/tag-release.sh v0.x.y`
1010
1. Push the tag to the GitHub repository. This will automatically trigger a [Github Action](https://github.com/tinkerbell/hook/actions) to create a release.
1111
> NOTE: `origin` should be the name of the remote pointing to `github.com/tinkerbell/boots`

contrib/tag-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ new_tag=${1-}
1313
exit 1
1414
)
1515

16-
if [[ $(git symbolic-ref HEAD) != refs/heads/main ]] && [[ -z ${ALLOW_NON_MAIN:-} ]]; then
16+
if [[ $(git symbolic-ref HEAD) != refs/heads/main ]] && [[ -z ${ALLOW_NON_MAIN-} ]]; then
1717
echo "Must be on main branch" >&2
1818
exit 1
1919
fi

hook-bootkit/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
# syntax=docker/dockerfile:experimental
2-
3-
FROM golang:1.17-alpine as dev
1+
FROM golang:1.20-alpine as dev
42
COPY . /src/
53
WORKDIR /src
6-
ENV GO111MODULE=on
7-
RUN --mount=type=cache,sharing=locked,id=gomod,target=/go/pkg/mod/cache \
8-
--mount=type=cache,sharing=locked,id=goroot,target=/root/.cache/go-build \
9-
CGO_ENABLED=0 go build -a -ldflags '-w -extldflags "-static"' -o /bootkit
4+
RUN go mod download
5+
RUN CGO_ENABLED=0 go build -a -ldflags '-w -extldflags "-static"' -o /bootkit
106

117
FROM scratch
128
COPY --from=dev /bootkit .

hook-bootkit/go.mod

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,32 @@ module github.com/tinkerbell/hook/hook-bootkit
22

33
go 1.17
44

5-
require github.com/docker/docker v20.10.2+incompatible
5+
require (
6+
github.com/cenkalti/backoff/v4 v4.2.1
7+
github.com/docker/docker v24.0.4+incompatible
8+
)
69

710
require (
8-
github.com/Microsoft/go-winio v0.4.16 // indirect
9-
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
10-
github.com/containerd/containerd v1.4.3 // indirect
11-
github.com/docker/distribution v2.7.1+incompatible // indirect
11+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
12+
github.com/Microsoft/go-winio v0.6.1 // indirect
13+
github.com/davecgh/go-spew v1.1.1 // indirect
14+
github.com/docker/distribution v2.8.2+incompatible // indirect
1215
github.com/docker/go-connections v0.4.0 // indirect
13-
github.com/docker/go-units v0.4.0 // indirect
16+
github.com/docker/go-units v0.5.0 // indirect
1417
github.com/gogo/protobuf v1.3.2 // indirect
15-
github.com/golang/protobuf v1.4.2 // indirect
16-
github.com/google/go-cmp v0.5.5 // indirect
17-
github.com/gorilla/mux v1.8.0 // indirect
18-
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
18+
github.com/moby/term v0.5.0 // indirect
1919
github.com/morikuni/aec v1.0.0 // indirect
2020
github.com/opencontainers/go-digest v1.0.0 // indirect
21-
github.com/opencontainers/image-spec v1.0.1 // indirect
21+
github.com/opencontainers/image-spec v1.0.2 // indirect
2222
github.com/pkg/errors v0.9.1 // indirect
23-
github.com/sirupsen/logrus v1.7.0 // indirect
24-
golang.org/x/net v0.0.0-20201021035429-f5854403a974 // indirect
25-
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
26-
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
27-
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
28-
google.golang.org/grpc v1.34.0 // indirect
29-
google.golang.org/protobuf v1.25.0 // indirect
30-
gotest.tools/v3 v3.2.0 // indirect
23+
github.com/pmezard/go-difflib v1.0.0 // indirect
24+
github.com/stretchr/objx v0.5.0 // indirect
25+
github.com/stretchr/testify v1.8.4 // indirect
26+
golang.org/x/mod v0.8.0 // indirect
27+
golang.org/x/net v0.12.0 // indirect
28+
golang.org/x/sys v0.10.0 // indirect
29+
golang.org/x/time v0.3.0 // indirect
30+
golang.org/x/tools v0.6.0 // indirect
31+
gopkg.in/yaml.v3 v3.0.1 // indirect
32+
gotest.tools/v3 v3.5.0 // indirect
3133
)

hook-bootkit/go.sum

Lines changed: 36 additions & 78 deletions
Large diffs are not rendered by default.

hook-bootkit/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/docker/docker/api/types"
1616
"github.com/docker/docker/api/types/container"
1717
"github.com/docker/docker/api/types/mount"
18+
"github.com/docker/docker/api/types/registry"
1819
"github.com/docker/docker/client"
1920
)
2021

@@ -111,7 +112,7 @@ func main() {
111112
Privileged: true,
112113
}
113114

114-
authConfig := types.AuthConfig{
115+
authConfig := registry.AuthConfig{
115116
Username: cfg.username,
116117
Password: strings.TrimSuffix(cfg.password, "\n"),
117118
}

hook-docker/Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
# syntax=docker/dockerfile:experimental
2-
3-
FROM golang:1.17-alpine as dev
1+
FROM golang:1.20-alpine as dev
42
COPY . /src/
53
WORKDIR /src
6-
ENV GO111MODULE=on
7-
RUN --mount=type=cache,sharing=locked,id=gomod,target=/go/pkg/mod/cache \
8-
--mount=type=cache,sharing=locked,id=goroot,target=/root/.cache/go-build \
9-
CGO_ENABLED=0 go build -a -ldflags '-w -extldflags "-static"' -o /hook-docker
4+
RUN CGO_ENABLED=0 go build -a -ldflags '-w -extldflags "-static"' -o /hook-docker
105

11-
FROM docker:20.10.15-dind
6+
FROM docker:24.0.4-dind
127
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
138
RUN apk update; apk add kexec-tools
149
COPY --from=dev /hook-docker .

hook.yaml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ kernel:
33
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
44

55
init:
6-
- linuxkit/init:v0.8
6+
- linuxkit/init:144c9cee8aed9e30a16940f2bf1d3813883aceda
7+
# can't use the latest version of runc because it has a bug that prevents docker from starting containers properly.
78
- linuxkit/runc:v0.8
8-
- linuxkit/containerd:v0.8
9-
- linuxkit/ca-certificates:v0.8
9+
- linuxkit/containerd:d445de33c7f08470187b068d247b1c0dea240f0a
10+
- linuxkit/ca-certificates:c1c73ef590dffb6a0138cf758fe4a4305c9864f4
1011

1112
onboot:
1213
- name: sysctl
13-
image: linuxkit/sysctl:v0.8
14+
image: linuxkit/sysctl:a88a50c104d538b58da5e1441f6f0b4b738f76a6
1415

1516
- name: sysfs
16-
image: linuxkit/sysfs:v0.8
17+
image: linuxkit/sysfs:5fd982d39ff7bec8e480c67a110acb2d3794c291
1718

1819
- name: vlan
1920
image: linuxkit/ip:6cc44dd4e18ddb02de01bc4b34b5799971b6a7bf
@@ -22,7 +23,7 @@ onboot:
2223
command: ["/etc/ip/vlan.sh"]
2324

2425
- name: dhcpcd
25-
image: linuxkit/dhcpcd:v0.8
26+
image: linuxkit/dhcpcd:52d2c4df0311b182e99241cdc382ff726755c450
2627
command: ["/etc/ip/dhcp.sh", "true"]
2728
binds.add:
2829
- /var/lib/dhcpcd:/var/lib/dhcpcd
@@ -35,17 +36,18 @@ onboot:
3536

3637
services:
3738
- name: getty
38-
image: linuxkit/getty:v0.8
39+
image: linuxkit/getty:76951a596aa5e0867a38e28f0b94d620e948e3e8
3940
binds.add:
4041
- /etc/profile.d/local.sh:/etc/profile.d/local.sh
42+
- /etc/motd:/etc/motd
4143
env:
4244
- INSECURE=true
4345

4446
- name: rngd
45-
image: linuxkit/rngd:v0.8
47+
image: linuxkit/rngd:310c16ec5315bd07d4b8f5332cfa7dc5cbc7d368
4648

4749
- name: dhcpcd
48-
image: linuxkit/dhcpcd:v0.8
50+
image: linuxkit/dhcpcd:52d2c4df0311b182e99241cdc382ff726755c450
4951
command: ["/etc/ip/dhcp.sh", "false"]
5052
binds.add:
5153
- /var/lib/dhcpcd:/var/lib/dhcpcd
@@ -57,7 +59,7 @@ services:
5759
- /var/lib/dhcpcd
5860

5961
- name: ntpd
60-
image: linuxkit/openntpd:v0.8
62+
image: linuxkit/openntpd:d6c36ac367ed26a6eeffd8db78334d9f8041b038
6163
binds:
6264
- /var/run:/var/run
6365

@@ -108,6 +110,21 @@ files:
108110
alias docker-shell='ctr -n services.linuxkit tasks exec --tty --exec-id shell hook-docker sh'
109111
mode: "0644"
110112

113+
- path: etc/motd
114+
mode: "0644"
115+
contents: |
116+
Welcome to HookOS! Your Tinkerbell operating system installation environment.
117+
118+
██ ██ ██████ ██████ ██ ██ ██████ ███████
119+
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
120+
███████ ██ ██ ██ ██ █████ ██ ██ ███████
121+
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
122+
██ ██ ██████ ██████ ██ ██ ██████ ███████
123+
124+
- Press `enter` to get a prompt.
125+
- Use `docker` commands to access the tink worker/agent container and workflow action containers.
126+
- Logs are located in the `/var/log/` directory.
127+
111128
- path: etc/ip/vlan.sh
112129
source: "files/vlan.sh"
113130
mode: "0777"

lint.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ endif
2020
LINTERS :=
2121
FIXERS :=
2222

23-
SHELLCHECK_VERSION ?= v0.8.0
23+
SHELLCHECK_VERSION ?= v0.9.0
2424
SHELLCHECK_BIN := $(LINT_ROOT)/out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)
2525
$(SHELLCHECK_BIN):
2626
mkdir -p $(LINT_ROOT)/out/linters
@@ -40,7 +40,7 @@ FIXERS += shellcheck-fix
4040
shellcheck-fix: $(SHELLCHECK_BIN)
4141
$(SHELLCHECK_BIN) $(shell find . -name "*.sh") -f diff | { read -t 1 line || exit 0; { echo "$$line" && cat; } | git apply -p2; }
4242

43-
HADOLINT_VERSION ?= v2.8.0
43+
HADOLINT_VERSION ?= v2.12.0
4444
HADOLINT_BIN := $(LINT_ROOT)/out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH)
4545
$(HADOLINT_BIN):
4646
mkdir -p $(LINT_ROOT)/out/linters
@@ -54,7 +54,7 @@ hadolint-lint: $(HADOLINT_BIN)
5454
$(HADOLINT_BIN) --no-fail $(shell find . -name "*Dockerfile")
5555

5656
GOLANGCI_LINT_CONFIG := $(LINT_ROOT)/.golangci.yml
57-
GOLANGCI_LINT_VERSION ?= v1.50.0
57+
GOLANGCI_LINT_VERSION ?= v1.53.3
5858
GOLANGCI_LINT_BIN := $(LINT_ROOT)/out/linters/golangci-lint-$(GOLANGCI_LINT_VERSION)-$(LINT_ARCH)
5959
$(GOLANGCI_LINT_BIN):
6060
mkdir -p $(LINT_ROOT)/out/linters
@@ -70,7 +70,7 @@ FIXERS += golangci-lint-fix
7070
golangci-lint-fix: $(GOLANGCI_LINT_BIN)
7171
find . -name go.mod -execdir "$(GOLANGCI_LINT_BIN)" run -c "$(GOLANGCI_LINT_CONFIG)" --fix \;
7272

73-
YAMLLINT_VERSION ?= 1.26.3
73+
YAMLLINT_VERSION ?= 1.32.0
7474
YAMLLINT_ROOT := $(LINT_ROOT)/out/linters/yamllint-$(YAMLLINT_VERSION)
7575
YAMLLINT_BIN := $(YAMLLINT_ROOT)/dist/bin/yamllint
7676
$(YAMLLINT_BIN):

shell.nix

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,22 @@ let _pkgs = import <nixpkgs> { };
22
in { pkgs ? import (_pkgs.fetchFromGitHub {
33
owner = "NixOS";
44
repo = "nixpkgs";
5-
#branch@date: nixpkgs-unstable@2022-05-09
6-
rev = "51d859cdab1ef58755bd342d45352fc607f5e59b";
7-
sha256 = "02wi4nll9ninm3szny31r5a40lpg8vgmqr2n87gxyysb50c17w4i";
5+
#branch@date: nixpkgs-unstable@2023-03-11T16:44:21-05:00
6+
rev = "8ad5e8132c5dcf977e308e7bf5517cc6cc0bf7d8";
7+
sha256 = "17v6wigks04x1d63a2wcd7cc4z9ca6qr0f4xvw1pdw83f8a3c0nj";
88
}) { } }:
99

1010
with pkgs;
1111
let
12-
docker-ov = docker.override { buildxSupport = true; };
13-
14-
linuxkit-ov = linuxkit.overrideAttrs (oldAttrs: rec {
15-
version = "unstable-g${builtins.substring 0 9 src.rev}";
16-
src = fetchFromGitHub {
17-
owner = "linuxkit";
18-
repo = "linuxkit";
19-
rev = "b710224cdf9a8425a7129cdcb84fc1af00f926d7";
20-
sha256 = "sha256-UqPX+r3by7v+PL+/xUiSZVsB7EO7VUr3aDfVIhQDEgY=";
21-
};
22-
});
2312

2413
in mkShell {
2514
buildInputs = [
26-
docker-ov
15+
docker
2716
git
2817
gnumake
2918
gnused
3019
go
31-
linuxkit-ov
20+
linuxkit
3221
ncurses
3322
nixfmt
3423
nodePackages.prettier
@@ -38,5 +27,6 @@ in mkShell {
3827
python3Packages.wheel
3928
shfmt
4029
util-linux
30+
curl
4131
];
4232
}

0 commit comments

Comments
 (0)