diff --git a/.env b/.env index c539d65a..05d9bb71 100644 --- a/.env +++ b/.env @@ -37,12 +37,14 @@ COMPOSE_DOCKER_CLI_BUILD=1 MAX_DATA_SIZE=12 # version -ALPINE_VERSION=3.16 +ALPINE_VERSION=3.18 +UBUNTU_VERSION=20.04 # for model-backend GOLANG_VERSION=1.22.5 KRAKEND_CE_VERSION=2.6.2 ARTIVC_VERSION=0.10.0 K6_VERSION=0.44.0 +XK6_VERSION=0.11.0 # api-gateway API_GATEWAY_IMAGE=instill/api-gateway diff --git a/Dockerfile b/Dockerfile index 58a2036b..db882b39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,22 @@ ARG ALPINE_VERSION -FROM alpine:${ALPINE_VERSION} AS base +FROM golang:alpine${ALPINE_VERSION} AS base RUN apk add --update docker docker-compose docker-cli-compose docker-cli-buildx openrc containerd git bash make wget vim curl openssl util-linux -# Install k6 -ARG TARGETARCH K6_VERSION -ADD https://github.com/grafana/k6/releases/download/v${K6_VERSION}/k6-v${K6_VERSION}-linux-$TARGETARCH.tar.gz k6-v${K6_VERSION}-linux-$TARGETARCH.tar.gz -RUN tar -xf k6-v${K6_VERSION}-linux-$TARGETARCH.tar.gz --strip-components 1 -C /usr/bin +ARG XK6_VERSION K6_VERSION +RUN go install go.k6.io/xk6/cmd/xk6@v${XK6_VERSION} +RUN xk6 build v${K6_VERSION} --with github.com/grafana/xk6-sql --output /usr/bin/k6 # Install Helm RUN curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash # Install Kubectl +ARG TARGETARCH RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${TARGETARCH}/kubectl RUN chmod +x ./kubectl RUN mv ./kubectl /usr/local/bin +ARG ALPINE_VERSION FROM alpine:${ALPINE_VERSION} AS latest COPY --from=base /etc /etc diff --git a/Makefile b/Makefile index 9c36fc19..fe294df7 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,7 @@ build-latest: ## Build latest images for all Instill Core components --build-arg ALPINE_VERSION=${ALPINE_VERSION} \ --build-arg GOLANG_VERSION=${GOLANG_VERSION} \ --build-arg K6_VERSION=${K6_VERSION} \ + --build-arg XK6_VERSION=${XK6_VERSION} \ --build-arg CACHE_DATE="$(shell date)" \ --target latest \ -t ${INSTILL_CORE_IMAGE_NAME}:latest .; \ @@ -108,6 +109,7 @@ build-release: ## Build release images for all Instill Core components --build-arg ALPINE_VERSION=${ALPINE_VERSION} \ --build-arg GOLANG_VERSION=${GOLANG_VERSION} \ --build-arg K6_VERSION=${K6_VERSION} \ + --build-arg XK6_VERSION=${XK6_VERSION} \ --build-arg CACHE_DATE="$(shell date)" \ --build-arg API_GATEWAY_VERSION=${API_GATEWAY_VERSION} \ --build-arg MGMT_BACKEND_VERSION=${MGMT_BACKEND_VERSION} \ diff --git a/docker-compose-build.yml b/docker-compose-build.yml index 801d48de..4c696915 100644 --- a/docker-compose-build.yml +++ b/docker-compose-build.yml @@ -30,7 +30,6 @@ services: args: SERVICE_NAME: ${MGMT_BACKEND_HOST} GOLANG_VERSION: ${GOLANG_VERSION} - K6_VERSION: ${K6_VERSION} pipeline_backend: profiles: @@ -46,7 +45,6 @@ services: args: SERVICE_NAME: ${PIPELINE_BACKEND_HOST} GOLANG_VERSION: ${GOLANG_VERSION} - K6_VERSION: ${K6_VERSION} model_backend: profiles: @@ -62,7 +60,6 @@ services: args: SERVICE_NAME: ${MODEL_BACKEND_HOST} GOLANG_VERSION: ${GOLANG_VERSION} - K6_VERSION: ${K6_VERSION} UBUNTU_VERSION: ${UBUNTU_VERSION} ARTIVC_VERSION: ${ARTIVC_VERSION} @@ -92,6 +89,7 @@ services: dockerfile: Dockerfile.playwright args: TEST_USER: "root" + artifact_backend: profiles: - all @@ -106,4 +104,3 @@ services: args: SERVICE_NAME: ${ARTIFACT_BACKEND_HOST} GOLANG_VERSION: ${GOLANG_VERSION} - K6_VERSION: ${K6_VERSION}