diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index 3cc5c88fa..c2e0c1100 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -46,15 +46,11 @@ on: autoscaler-agent: description: 'autoscaler-agent image' value: ${{ jobs.tags.outputs.autoscaler-agent }} - daemon: - description: 'neonvm-daemon image' - value: ${{ jobs.tags.outputs.daemon }} env: IMG_CONTROLLER: "neondatabase/neonvm-controller" IMG_VXLAN_CONTROLLER: "neondatabase/neonvm-vxlan-controller" IMG_RUNNER: "neondatabase/neonvm-runner" - IMG_DAEMON: "neondatabase/neonvm-daemon" IMG_KERNEL: "neondatabase/vm-kernel" IMG_SCHEDULER: "neondatabase/autoscale-scheduler" IMG_AUTOSCALER_AGENT: "neondatabase/autoscaler-agent" @@ -82,7 +78,6 @@ jobs: scheduler: ${{ steps.show-tags.outputs.scheduler }} autoscaler-agent: ${{ steps.show-tags.outputs.autoscaler-agent }} cluster-autoscaler: ${{ steps.show-tags.outputs.cluster-autoscaler }} - daemon: ${{ steps.show-tags.outputs.daemon}} runs-on: ubuntu-latest steps: - id: show-tags @@ -90,7 +85,6 @@ jobs: echo "controller=${{ env.IMG_CONTROLLER }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT echo "vxlan-controller=${{ env.IMG_VXLAN_CONTROLLER }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT echo "runner=${{ env.IMG_RUNNER }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT - echo "daemon=${{ env.IMG_DAEMON }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT echo "scheduler=${{ env.IMG_SCHEDULER }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT echo "autoscaler-agent=${{ env.IMG_AUTOSCALER_AGENT }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT echo "cluster-autoscaler=${{ env.IMG_CLUSTER_AUTOSCALER }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT @@ -236,17 +230,6 @@ jobs: build-args: | GO_BASE_IMG=${{ env.GO_BASE_IMG }} - # - name: Build and push neonvm-daemon image - # uses: docker/build-push-action@v3 - # with: - # context: . - # platforms: linux/amd64 - # push: true - # file: neonvm/daemon/Dockerfile - # tags: ${{ needs.tags.outputs.daemon }} - # build-args: | - # GO_BASE_IMG=${{ env.GO_BASE_IMG }} - - name: Generate neonvm-controller build tags id: controller-build-tags env: @@ -334,7 +317,6 @@ jobs: neonvm-controller \ neonvm-vxlan-controller \ neonvm-runner \ - neonvm-daemon \ vm-kernel \ autoscale-scheduler \ autoscaler-agent \ diff --git a/.github/workflows/build-test-vm.yaml b/.github/workflows/build-test-vm.yaml index 7c32f9537..c3679e75d 100644 --- a/.github/workflows/build-test-vm.yaml +++ b/.github/workflows/build-test-vm.yaml @@ -30,7 +30,7 @@ on: env: IMG_POSTGRES_16_BULLSEYE: "neondatabase/vm-postgres-16-bullseye" # using locally build base image - IMG_DAEMON: "autoscaling-go-base:dev" + IMG_DAEMON: "daemon:dev" defaults: run: @@ -62,7 +62,7 @@ jobs: cache: false # Sometimes setup-go gets stuck. Without this, it'll keep going until the job gets killed timeout-minutes: 10 - + - run: make bin/vm-builder - name: upload vm-builder diff --git a/.github/workflows/e2e-test.yaml b/.github/workflows/e2e-test.yaml index 995dfc1d3..b040bdd50 100644 --- a/.github/workflows/e2e-test.yaml +++ b/.github/workflows/e2e-test.yaml @@ -112,7 +112,6 @@ jobs: IMG_CONTROLLER: ${{ needs.build-images.outputs.controller }} IMG_VXLAN_CONTROLLER: ${{ needs.build-images.outputs.vxlan-controller }} IMG_RUNNER: ${{ needs.build-images.outputs.runner }} - IMG_DAEMON: ${{ needs.build-images.outputs.daemon }} IMG_SCHEDULER: ${{ needs.build-images.outputs.scheduler }} IMG_AUTOSCALER_AGENT: ${{ needs.build-images.outputs.autoscaler-agent }} diff --git a/Makefile b/Makefile index 8fa54bba0..f0e75a5f8 100644 --- a/Makefile +++ b/Makefile @@ -138,8 +138,8 @@ build: fmt vet bin/vm-builder ## Build all neonvm binaries. GOOS=linux go build -o bin/runner neonvm/runner/*.go .PHONY: bin/vm-builder -bin/vm-builder: ## Build vm-builder binary. - GOOS=linux CGO_ENABLED=0 go build -o bin/vm-builder -ldflags "-X main.Version=${GIT_INFO}" -X main.NeonvmDaemonImage=${IMG_DAEMON}" neonvm/tools/vm-builder/main.go +bin/vm-builder: docker-build-daemon ## Build vm-builder binary. + GOOS=linux CGO_ENABLED=0 go build -o bin/vm-builder -ldflags "-X main.Version=${GIT_INFO} -X main.NeonvmDaemonImage=${IMG_DAEMON}" vm-builder/main.go .PHONY: run run: fmt vet ## Run a controller from your host. go run ./neonvm/main.go @@ -188,10 +188,9 @@ docker-build-runner: docker-build-go-base ## Build docker image for NeonVM runne . .PHONY: docker-build-daemon -docker-build-daemon: docker-build-go-base ## Build docker image for NeonVM daemon. +docker-build-daemon: ## Build docker image for NeonVM daemon. docker build \ --tag $(IMG_DAEMON) \ - --build-arg GO_BASE_IMG=$(GO_BASE_IMG) \ --file neonvm/daemon/Dockerfile \ . diff --git a/neonvm/daemon/Dockerfile b/neonvm/daemon/Dockerfile index 527bdd04e..46352291b 100644 --- a/neonvm/daemon/Dockerfile +++ b/neonvm/daemon/Dockerfile @@ -1,5 +1,4 @@ -ARG GO_BASE_IMG=autoscaling-go-base:dev -FROM $GO_BASE_IMG AS builder +FROM golang:1.23-alpine AS builder # Build the Go binary COPY . .