Skip to content

Commit

Permalink
Update fvt toolchain (#463) (#464)
Browse files Browse the repository at this point in the history
Updating the E2E and performance test toolchain running nightly on IKS

---------

Signed-off-by: Christian Kadner <ckadner@us.ibm.com>
  • Loading branch information
ckadner authored Jan 10, 2024
1 parent 739770c commit 01a8268
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 106 deletions.
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
.DS_Store
.dev
.dockerignore
.env
.github
.idea
.pre-commit.log
.tekton
.vscode
Dockerfile
devbuild
docs
fvt
temp
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ repos:
rev: v1.51.2
hooks:
- id: golangci-lint
entry: golangci-lint run
exclude: ^(generated/)
args:
- --skip-dirs='^(generated/)'
log_file: .pre-commit.log
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.4.1
hooks:
- id: prettier
exclude: ^(.github/|.tekton/)
args:
- --no-bracket-spacing
log_file: .pre-commit.log
11 changes: 1 addition & 10 deletions .tekton/listener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@ spec:
- name: region
description: the ibmcloud registry region
default: us-south
- name: org
description: organization
- name: space
description: space
default: dev
- name: resource-group
description: resource group
default: default
default: Default
- name: docker-username
description: ibm container registry username
default: iamapikey
Expand Down Expand Up @@ -112,10 +107,6 @@ spec:
value: $(params.dockersandbox-namespace)
- name: resource-group
value: $(params.resource-group)
- name: org
value: $(params.org)
- name: space
value: $(params.space)
- name: kubernetes-cluster
value: $(params.kubernetes-cluster)
- name: serving-ns
Expand Down
14 changes: 1 addition & 13 deletions .tekton/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ spec:
description: dockersandbox namespace
- name: resource-group
description: resource group
default: default
- name: org
description: organization
default: Default
- name: region
description: region
- name: space
description: space
- name: serving-ns
description: modelmesh serving namespace
default: modelmesh-serving
Expand Down Expand Up @@ -80,12 +76,8 @@ spec:
value: $(params.docker-password)
- name: resource-group
value: $(params.resource-group)
- name: org
value: $(params.org)
- name: region
value: $(params.region)
- name: space
value: $(params.space)
workspaces:
- name: task-pvc
workspace: pipeline-pvc
Expand Down Expand Up @@ -260,12 +252,8 @@ spec:
value: $(params.serving-ns)
- name: resource-group
value: $(params.resource-group)
- name: org
value: $(params.org)
- name: region
value: $(params.region)
- name: space
value: $(params.space)
- name: test-commands
value: |
kubectl get ns
Expand Down
39 changes: 12 additions & 27 deletions .tekton/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ spec:
description: iam api key
- name: resource-group
description: resource group
default: default
- name: org
description: organization
default: Default
- name: region
description: region
- name: space
description: space
default: us-south
- name: archive-dir
description: archive directory
default: "."
Expand All @@ -35,7 +32,7 @@ spec:
mountPath: /artifacts
steps:
- name: run-setup-script
image: docker.io/aipipeline/pipeline-base-image:1.2
image: docker.io/aipipeline/pipeline-base-image:1.5
env:
- name: DOCKER_USERNAME
value: $(params.docker-username)
Expand All @@ -47,10 +44,6 @@ spec:
value: $(params.repository)
- name: REGION
value: $(params.region)
- name: ORG
value: $(params.org)
- name: SPACE
value: $(params.space)
- name: RESOURCE_GROUP
value: $(params.resource-group)
- name: GIT_BRANCH
Expand Down Expand Up @@ -116,13 +109,12 @@ spec:
description: docker sandbox namespace
- name: publish-tag
description: image publish tag

workspaces:
- name: task-pvc
mountPath: /artifacts
steps:
- name: process-image
image: docker.io/aipipeline/pipeline-base-image:1.2
image: docker.io/aipipeline/pipeline-base-image:1.5
env:
- name: DOCKER_USERNAME
value: $(params.docker-username)
Expand Down Expand Up @@ -243,7 +235,7 @@ spec:
mountPath: /artifacts
steps:
- name: deploy-modelmesh-serving
image: docker.io/aipipeline/pipeline-base-image:1.2
image: docker.io/aipipeline/pipeline-base-image:1.5
env:
- name: DOCKER_USERNAME
value: $(params.docker-username)
Expand Down Expand Up @@ -295,7 +287,7 @@ spec:
mountPath: /artifacts
steps:
- name: run-test
image: docker.io/aipipeline/pipeline-base-image:1.2
image: docker.io/aipipeline/pipeline-base-image:1.5
env:
- name: IBM_CLOUD_API_KEY
value: $(params.apikey)
Expand Down Expand Up @@ -347,7 +339,7 @@ spec:
mountPath: /artifacts
steps:
- name: run-performance-test
image: docker.io/aipipeline/pipeline-base-image:1.2
image: docker.io/aipipeline/pipeline-base-image:1.5
env:
- name: SERVING_KUBERNETES_CLUSTER_NAME
value: $(params.kubernetes-cluster)
Expand Down Expand Up @@ -384,7 +376,7 @@ spec:
mountPath: /artifacts
steps:
- name: undeploy-modelmesh-serving
image: docker.io/aipipeline/pipeline-base-image:1.2
image: docker.io/aipipeline/pipeline-base-image:1.5
env:
- name: SERVING_KUBERNETES_CLUSTER_NAME
value: $(params.kubernetes-cluster)
Expand Down Expand Up @@ -415,13 +407,10 @@ spec:
default: kubeflow
- name: resource-group
description: resource group
default: default
- name: org
description: organization
default: Default
- name: region
description: region
- name: space
description: space
default: us-south
- name: archive-dir
description: archive directory
default: "."
Expand All @@ -433,7 +422,7 @@ spec:
mountPath: /artifacts
steps:
- name: run-cleanup-script
image: docker.io/aipipeline/pipeline-base-image:1.2
image: docker.io/aipipeline/pipeline-base-image:1.5
env:
- name: IBM_CLOUD_API_KEY
value: $(params.apikey)
Expand All @@ -445,10 +434,6 @@ spec:
value: $(params.serving-ns)
- name: REGION
value: $(params.region)
- name: ORG
value: $(params.org)
- name: SPACE
value: $(params.space)
- name: RESOURCE_GROUP
value: $(params.resource-group)
- name: PIPELINE_URL
Expand Down Expand Up @@ -481,7 +466,7 @@ spec:
# Set up kubernetes config
retry 3 3 ibmcloud login --apikey "${IBM_CLOUD_API_KEY}" --no-region
retry 3 3 ibmcloud target -r "$REGION" -o "$ORG" -s "$SPACE" -g "$RESOURCE_GROUP"
retry 3 3 ibmcloud target -r "$REGION" -g "$RESOURCE_GROUP"
retry 3 3 ibmcloud ks cluster config -c "$SERVING_KUBERNETES_CLUSTER_NAME"
$(params.test-commands)
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1.3

# Copyright 2021 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,6 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: for syntax, either use "experimental" or "1.3" (or later) to enable multi-arch build with mount option
# see https://hub.docker.com/r/docker/dockerfile (https://github.com/moby/buildkit/releases/tag/dockerfile%2F1.3.0)

###############################################################################
# Stage 1: Run the go build with go compiler native to the build platform
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile.develop
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1.3

# Copyright 2021 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -12,6 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: for syntax, either use "experimental" or "1.3" (or later) to enable multi-arch build with mount option
# see https://hub.docker.com/r/docker/dockerfile (https://github.com/moby/buildkit/releases/tag/dockerfile%2F1.3.0)

###############################################################################
# Create the develop, test, and build environment
###############################################################################
Expand Down
15 changes: 0 additions & 15 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers

Expand Down
28 changes: 13 additions & 15 deletions pkg/predictor_source/inferenceservice_registry.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
/*
Copyright 2021 IBM Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2021 IBM Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package predictor_source

Expand Down
16 changes: 10 additions & 6 deletions scripts/deploy/iks/build-image-dind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ set -xe
# The following envs could be loaded from `build.properties` that
# `run-setup.sh` generates.
# - REGION: cloud region (us-south as default)
# - ORG: target organization (dev-advo as default)
# - SPACE: target space (dev as default)
# - GIT_BRANCH: git branch
# - GIT_COMMIT: git commit hash
# - GIT_COMMIT_SHORT: git commit hash short

REGION=${REGION:-"us-south"}
ORG=${ORG:-"dev-advo"}
SPACE=${SPACE:-"dev"}
RUN_TASK=${RUN_TASK:-"build"}

export DOCKER_BUILDKIT=1

retry() {
local max=$1; shift
local interval=$1; shift
Expand All @@ -39,19 +37,25 @@ retry() {
}

retry 3 3 ibmcloud login --apikey "${IBM_CLOUD_API_KEY}" --no-region
retry 3 3 ibmcloud target -r "$REGION" -o "$ORG" -s "$SPACE" -g "$RESOURCE_GROUP"
retry 3 3 ibmcloud target -r "$REGION" -g "$RESOURCE_GROUP"


######################################################################################
# Build image #
######################################################################################
build_image() {
echo "=======================Build modelmesh controller image======================="
echo "=======================Build ModelMesh controller image======================="
# Will build develop and then runtime images.

docker version
# docker pull docker/dockerfile:experimental # syntax=docker/dockerfile:experimental
docker pull docker/dockerfile:1.3 # syntax=docker/dockerfile:1.3

echo "==============================Build dev image ================================"
make build.develop
docker images
docker inspect "kserve/modelmesh-controller-develop:latest"

echo "==========================Build runtime image ================================"
make build
docker images
Expand Down
4 changes: 1 addition & 3 deletions scripts/deploy/iks/deploy-mm-serving.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ echo "GIT_BRANCH=${GIT_BRANCH}"
echo "GIT_COMMIT=${GIT_COMMIT}"
echo "GIT_COMMIT_SHORT=${GIT_COMMIT_SHORT}"
echo "REGION=${REGION}"
echo "ORG=${ORG}"
echo "SPACE=${SPACE}"
echo "RESOURCE_GROUP=${RESOURCE_GROUP}"

# These env vars should come from the pipeline run environment properties
Expand All @@ -46,7 +44,7 @@ retry() {
}

retry 3 3 ibmcloud login --apikey "${IBM_CLOUD_API_KEY}" --no-region
retry 3 3 ibmcloud target -r "$REGION" -o "$ORG" -s "$SPACE" -g "$RESOURCE_GROUP"
retry 3 3 ibmcloud target -r "$REGION" -g "$RESOURCE_GROUP"
retry 3 3 ibmcloud ks cluster config -c "$SERVING_KUBERNETES_CLUSTER_NAME"

kubectl create ns "$SERVING_NS"
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/iks/run-perf-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ retry() {
}

retry 3 3 ibmcloud login --apikey "${IBM_CLOUD_API_KEY}" --no-region
retry 3 3 ibmcloud target -r "$REGION" -o "$ORG" -s "$SPACE" -g "$RESOURCE_GROUP"
retry 3 3 ibmcloud target -r "$REGION" -g "$RESOURCE_GROUP"
retry 3 3 ibmcloud ks cluster config -c "$SERVING_KUBERNETES_CLUSTER_NAME"

kubectl config set-context --current --namespace=${SERVING_NS}
Expand Down
Loading

0 comments on commit 01a8268

Please sign in to comment.