diff --git a/.gitignore b/.gitignore index 40f0df8e..1c8036c2 100644 --- a/.gitignore +++ b/.gitignore @@ -162,6 +162,6 @@ cython_debug/ *-secret.yaml *-secret.yml aws-storage-config -pipelines/tekton/azureml-container-pipeline/azureml-container-aws-creds-real.yaml -pipelines/tekton/azureml-container-pipeline/aws-env-real.yaml +pipelines/tekton/build-container-image-pipeline/build-container-image-aws-creds-real.yaml +pipelines/tekton/build-container-image-pipeline/aws-env-real.yaml oc-debug-pod.yaml diff --git a/acm/odh-edge/base/namespace.yaml b/acm/odh-edge/base/namespace.yaml index b4ce241f..8b5bdc53 100644 --- a/acm/odh-edge/base/namespace.yaml +++ b/acm/odh-edge/base/namespace.yaml @@ -2,4 +2,4 @@ apiVersion: v1 kind: Namespace metadata: # edit this to the namespace where the model is deployed - name: azureml-model-to-edge + name: model-to-edge diff --git a/pipelines/README.md b/pipelines/README.md index ac18320c..8ca2c87b 100644 --- a/pipelines/README.md +++ b/pipelines/README.md @@ -28,7 +28,7 @@ They are also referenced by these names in the example pipeline YAML files. ## Prerequisites - OpenShift cluster with [OpenShift Pipelines Operator](https://docs.openshift.com/container-platform/4.13/cicd/pipelines/installing-pipelines.html) installed -- OpenShift project / namespace. E.g. `oc new-project azureml-model-to-edge` +- OpenShift project / namespace. E.g. `oc new-project model-to-edge` - A repository on [Quay.io](https://quay.io/) - S3 bucket for storing the models - A clone of this repository @@ -41,32 +41,32 @@ Create an S3 bucket and upload the directories with the models: ![S3 models example](../.github/images/S3-models.png) -Fill information about access to your S3 bucket in a copy of [`aws-env.yaml`](tekton/azureml-container-pipeline/aws-env.yaml). +Fill information about access to your S3 bucket in a copy of [`aws-env.yaml`](tekton/build-container-image-pipeline/aws-env.yaml). If you don't have or know your access key, generate one in AWS account's Security credentials > Access keys. Then store the credentials in an OpenShift secret: ```bash -cp tekton/azureml-container-pipeline/aws-env.yaml tekton/azureml-container-pipeline/aws-env-real.yaml -vi tekton/azureml-container-pipeline/aws-env-real.yaml -oc create -f tekton/azureml-container-pipeline/aws-env-real.yaml +cp tekton/build-container-image-pipeline/aws-env.yaml tekton/build-container-image-pipeline/aws-env-real.yaml +vi tekton/build-container-image-pipeline/aws-env-real.yaml +oc create -f tekton/build-container-image-pipeline/aws-env-real.yaml ``` ### Deploy and run the build pipeline Update the `aws-bucket-name` parameter value from its default `rhoai-edge-models` in -[`azureml-container-pipelinerun-bike-rentals.yaml`](tekton/azureml-container-pipeline/azureml-container-pipelinerun-bike-rentals.yaml) +[`build-container-image-pipelinerun-bike-rentals.yaml`](tekton/build-container-image-pipeline/build-container-image-pipelinerun-bike-rentals.yaml) and/or -[`azureml-container-pipelinerun-tensorflow-housing.yaml`](tekton/azureml-container-pipeline/azureml-container-pipelinerun-tensorflow-housing.yaml) +[`build-container-image-pipelinerun-tensorflow-housing.yaml`](tekton/build-container-image-pipeline/build-container-image-pipelinerun-tensorflow-housing.yaml) to match your S3 bucket name. Then create the pipeline(s) to build the container image with AI runtime: ```bash -oc apply -k tekton/azureml-container-pipeline/ -oc create -f tekton/azureml-container-pipeline/azureml-container-pipelinerun-bike-rentals.yaml +oc apply -k tekton/build-container-image-pipeline/ +oc create -f tekton/build-container-image-pipeline/build-container-image-pipelinerun-bike-rentals.yaml # and / or -oc create -f tekton/azureml-container-pipeline/azureml-container-pipelinerun-tensorflow-housing.yaml +oc create -f tekton/build-container-image-pipeline/build-container-image-pipelinerun-tensorflow-housing.yaml ``` Check what objects were created and what pipelines executed either in OpenShift Console @@ -82,7 +82,7 @@ oc get imagestream ``` and then run `oc describe` on them, for example ``` -oc describe pipelinerun.tekton.dev/azureml-container-bike-rentals-66q8n +oc describe pipelinerun.tekton.dev/build-container-image-bike-rentals-66q8n # or oc describe imagestream/tensorflow-housing ``` diff --git a/pipelines/tekton/azureml-container-pipeline/aws-env.yaml b/pipelines/tekton/build-container-image-pipeline/aws-env.yaml similarity index 100% rename from pipelines/tekton/azureml-container-pipeline/aws-env.yaml rename to pipelines/tekton/build-container-image-pipeline/aws-env.yaml diff --git a/pipelines/tekton/azureml-container-pipeline/azureml-container-buildah-cache-pvc.yaml b/pipelines/tekton/build-container-image-pipeline/build-container-image-buildah-cache-pvc.yaml similarity index 100% rename from pipelines/tekton/azureml-container-pipeline/azureml-container-buildah-cache-pvc.yaml rename to pipelines/tekton/build-container-image-pipeline/build-container-image-buildah-cache-pvc.yaml diff --git a/pipelines/tekton/azureml-container-pipeline/azureml-container-pipeline.yaml b/pipelines/tekton/build-container-image-pipeline/build-container-image-pipeline.yaml similarity index 99% rename from pipelines/tekton/azureml-container-pipeline/azureml-container-pipeline.yaml rename to pipelines/tekton/build-container-image-pipeline/build-container-image-pipeline.yaml index fd0f0151..908ad625 100644 --- a/pipelines/tekton/azureml-container-pipeline/azureml-container-pipeline.yaml +++ b/pipelines/tekton/build-container-image-pipeline/build-container-image-pipeline.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: - name: azureml-container + name: build-container-image spec: params: - name: model-name diff --git a/pipelines/tekton/azureml-container-pipeline/azureml-container-pipelinerun-bike-rentals.yaml b/pipelines/tekton/build-container-image-pipeline/build-container-image-pipelinerun-bike-rentals.yaml similarity index 84% rename from pipelines/tekton/azureml-container-pipeline/azureml-container-pipelinerun-bike-rentals.yaml rename to pipelines/tekton/build-container-image-pipeline/build-container-image-pipelinerun-bike-rentals.yaml index 01eabba7..abe3425e 100644 --- a/pipelines/tekton/azureml-container-pipeline/azureml-container-pipelinerun-bike-rentals.yaml +++ b/pipelines/tekton/build-container-image-pipeline/build-container-image-pipelinerun-bike-rentals.yaml @@ -2,8 +2,8 @@ apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: labels: - tekton.dev/pipeline: azureml-container - generateName: azureml-container-bike-rentals- + tekton.dev/pipeline: build-container-image + generateName: build-container-image-bike-rentals- spec: params: - name: model-name @@ -21,7 +21,7 @@ spec: - name: containerfileRelativePath value: pipelines/containerfiles/Containerfile.seldonio.mlserver.mlflow pipelineRef: - name: azureml-container + name: build-container-image serviceAccountName: pipeline timeout: 1h0m0s workspaces: diff --git a/pipelines/tekton/azureml-container-pipeline/azureml-container-pipelinerun-tensorflow-housing.yaml b/pipelines/tekton/build-container-image-pipeline/build-container-image-pipelinerun-tensorflow-housing.yaml similarity index 83% rename from pipelines/tekton/azureml-container-pipeline/azureml-container-pipelinerun-tensorflow-housing.yaml rename to pipelines/tekton/build-container-image-pipeline/build-container-image-pipelinerun-tensorflow-housing.yaml index 71bb5cb6..a32e6a07 100644 --- a/pipelines/tekton/azureml-container-pipeline/azureml-container-pipelinerun-tensorflow-housing.yaml +++ b/pipelines/tekton/build-container-image-pipeline/build-container-image-pipelinerun-tensorflow-housing.yaml @@ -2,8 +2,8 @@ apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: labels: - tekton.dev/pipeline: azureml-container - generateName: azureml-container-tensorflow-housing- + tekton.dev/pipeline: build-container-image + generateName: build-container-image-tensorflow-housing- spec: params: - name: model-name @@ -21,7 +21,7 @@ spec: - name: containerfileRelativePath value: pipelines/containerfiles/Containerfile.openvino.mlserver.mlflow pipelineRef: - name: azureml-container + name: build-container-image serviceAccountName: pipeline timeout: 1h0m0s workspaces: diff --git a/pipelines/tekton/azureml-container-pipeline/check-model-and-containerfile-exists.yaml b/pipelines/tekton/build-container-image-pipeline/check-model-and-containerfile-exists.yaml similarity index 100% rename from pipelines/tekton/azureml-container-pipeline/check-model-and-containerfile-exists.yaml rename to pipelines/tekton/build-container-image-pipeline/check-model-and-containerfile-exists.yaml diff --git a/pipelines/tekton/azureml-container-pipeline/kserve-download-model.yaml b/pipelines/tekton/build-container-image-pipeline/kserve-download-model.yaml similarity index 100% rename from pipelines/tekton/azureml-container-pipeline/kserve-download-model.yaml rename to pipelines/tekton/build-container-image-pipeline/kserve-download-model.yaml diff --git a/pipelines/tekton/azureml-container-pipeline/kustomization.yaml b/pipelines/tekton/build-container-image-pipeline/kustomization.yaml similarity index 63% rename from pipelines/tekton/azureml-container-pipeline/kustomization.yaml rename to pipelines/tekton/build-container-image-pipeline/kustomization.yaml index beac1dd5..dd5dca25 100644 --- a/pipelines/tekton/azureml-container-pipeline/kustomization.yaml +++ b/pipelines/tekton/build-container-image-pipeline/kustomization.yaml @@ -1,7 +1,7 @@ kind: Kustomization apiVersion: kustomize.config.k8s.io/v1beta1 resources: -- azureml-container-buildah-cache-pvc.yaml +- build-container-image-buildah-cache-pvc.yaml - kserve-download-model.yaml - check-model-and-containerfile-exists.yaml -- azureml-container-pipeline.yaml +- build-container-image-pipeline.yaml