--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+
+#-------------------------------------------------------------------------
+# Global common setting
+#-------------------------------------------------------------------------
+
+traininghost:
+ ip_address: <Fill IP of host>
+tm:
+ image:
+ repository: tm
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: "latest"
+
+leofs:
+ image:
+ repository: leofs
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: "latest"
+
+dataextraction:
+ image:
+ repository: data-extraction
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: "latest"
+
+datalake:
+ influxdb:
+ host: <Fill IP of datalake>
+ port: <Fill port of datalake>
+ orgname: <Fill org name configured in datalake>
+ bucket: <Fill bucket info of data in datalake>
+ token: <Fill token info to access data>
+
+kfadapter:
+ image:
+ repository: kfadapter
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: "latest"
+
+aimldashboard:
+ image:
+ repository: aiml-dashboard
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: "latest"
+ host:
+ tm_host: "localhost"
+ notebook_host: "localhost"
+ debug: "\"false\""
+
+aimlnotebook:
+ image:
+ repository: aiml-notebook
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: "latest"
+
+kserveadapter:
+ image:
+ repository: kserve-adapter
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: "1.0.0"
+ ric_dms:
+ ip: <Fill IP of ric dms>
+ port: 8000
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "kserve-adapter.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "kserve-adapter.fullname" -}}
+{{- if .Values.fullnameOverride }}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- $name := default .Chart.Name .Values.nameOverride }}
+{{- if contains $name .Release.Name }}
+{{- .Release.Name | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "kserve-adapter.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "kserve-adapter.labels" -}}
+helm.sh/chart: {{ include "kserve-adapter.chart" . }}
+{{ include "kserve-adapter.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "kserve-adapter.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "kserve-adapter.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "kserve-adapter.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "kserve-adapter.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
+
+{{- define "common.serviceport.kserve-adapter.http" -}}10000{{- end -}}
+{{- define "common.serviceport.kserve-adapter.targetport" -}}10000{{- end -}}
+{{- define "common.serviceport.kserve-adapter.external" -}}31000{{- end -}}
{{- define "common.namespace.platform" -}}traininghost{{- end -}}
{{- define "common.namespace.kubeflow" -}}kubeflow{{- end -}}
+{{- define "common.namespace.kserve" -}}ricips{{- end -}}
git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/data-extraction"
git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/athp/tps/kubeflow-adapter"
git clone "https://gerrit.o-ran-sc.org/r/portal/aiml-dashboard"
+git clone "https://gerrit.o-ran-sc.org/r/aiml-fw/aihp/ips/kserve-adapter"
docker build -f tm/Dockerfile -t tm tm/.
docker build -f data-extraction/Dockerfile -t data-extraction data-extraction/.
docker build -f kubeflow-adapter/Dockerfile -t kfadapter kubeflow-adapter/.
docker build -f aiml-dashboard/Dockerfile -t aiml-dashboard aiml-dashboard/.
docker build -f aiml-dashboard/kf-pipelines/Dockerfile -t aiml-notebook aiml-dashboard/kf-pipelines/.
+docker build -f kserve-adapter/Dockerfile -t kserve-adapter:1.0.0 kserve-adapter/.
cd -
rm -Rf /tmp/gerrit_code
docker rmi kfadapter
docker rmi aiml-dashboard
docker rmi aiml-notebook
+docker rmi kserve-adapter:1.0.0
COMPONENTS="tm data-extraction kfadapter aiml-dashboard aiml-notebook"
-
-
for component in $COMPONENTS; do
helm dep up helm/$component
echo "Installing $component"
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+#!/bin/bash
+
+IS_HELM3=$(helm version --short|grep -e "^v3")
+
+while [ -n "$1" ]; do # while loop starts
+
+ case "$1" in
+
+ -f) OVERRIDEYAML=$2
+ shift
+ ;;
+ -c) LIST_OF_COMPONENTS=$2
+ shift
+ ;;
+ -o) KERNEL_OPTIMIZATION=true
+ ;;
+ *) echo "Option $1 not recognized" ;; # In case you typed a different option other than a,b,c
+
+ esac
+
+ shift
+
+done
+
+if [ -z "$OVERRIDEYAML" ];then
+ echo "****************************************************************************************************************"
+ echo " ERROR "
+ echo "****************************************************************************************************************"
+ echo "Kserve deployment without deployment recipe is currently disabled. Please specify an recipe with the -f option."
+ echo "****************************************************************************************************************"
+ exit 1
+fi
+
+if [ -z $IS_HELM3 ]
+then
+ echo "****************************************************************************************************************"
+ echo " ERROR "
+ echo "****************************************************************************************************************"
+ echo "Kserve deployment expects helm 3 installed"
+ echo "****************************************************************************************************************"
+ exit 1
+else
+ HAS_COMMON_PACKAGE=$(helm search repo local/aimlfw-common | grep aimlfw-common)
+fi
+
+if [ -z "$HAS_COMMON_PACKAGE" ];then
+ bin/install_common_templates_to_helm.sh
+ if [ -z $(helm search repo local/aimlfw-common | grep aimlfw-common) ];then
+ echo "****************************************************************************************************************"
+ echo " ERROR "
+ echo "****************************************************************************************************************"
+ echo "Can't locate the aimlfw-common helm package in the local repo. Please make sure that it is properly installed."
+ echo "****************************************************************************************************************"
+ exit 1
+ fi
+fi
+
+kubectl create namespace ricips
+bin/install_kserve.sh
+
+helm dep up helm/kserve-adapter
+echo "Installing kserve-adapter"
+helm install kserve-adapter helm/kserve-adapter -f $OVERRIDEYAML
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+echo "Uninstalling kserve-adapter"
+helm uninstall kserve-adapter
+bin/uninstall_kserve.sh
+kubectl delete namespace ricips
kubectl delete namespace traininghost
tools/nfs/delete_nfs_subdir_external_provisioner.sh
-tools/kubernetes/uninstall_k8s.sh
\ No newline at end of file
+tools/kubernetes/uninstall_k8s.sh
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+apiVersion: v1
+name: kserve-adapter
+description: Helm chart for Kserve Adapter
+type: application
+version: 1.0.0
+appVersion: "1.0.0"
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+dependencies:
+ - name: aimlfw-common
+ version: 1.0.0
+ repository: "@local"
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: kserver-adapter-role
+rules:
+- apiGroups:
+ - "serving.kserve.io"
+ resources:
+ - inferenceservices
+ verbs:
+ - create
+ - delete
+ - get
+ - list
+ - patch
+ - update
+ - watch
+
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: kserver-adapter-rolebinding
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: kserver-adapter-role
+subjects:
+ - kind: ServiceAccount
+ name: default
+ namespace: {{ include "common.namespace.kserve" . }}
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: kserve-adapter-configmap
+ namespace: {{ include "common.namespace.kserve" . }}
+data:
+ # Configuration values can be set as key-value properties
+ RIC_DMS_IP: "{{ .Values.kserveadapter.ric_dms.ip }}"
+ RIC_DMS_PORT: "{{ .Values.kserveadapter.ric_dms.port }}"
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "kserve-adapter.fullname" . }}
+ namespace: {{ include "common.namespace.kserve" . }}
+ labels:
+ {{- include "kserve-adapter.labels" . | nindent 4 }}
+spec:
+ selector:
+ matchLabels:
+ {{- include "kserve-adapter.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ {{- include "kserve-adapter.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Chart.Name }}
+ image: "{{ .Values.kserveadapter.image.repository }}:{{ .Values.kserveadapter.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.kserveadapter.image.pullPolicy }}
+ ports:
+ - name: serviceport
+ containerPort: {{ include "common.serviceport.kserve-adapter.http" . }}
+ protocol: TCP
+ command: ["/root/kserve-adapter"]
+ envFrom:
+ - configMapRef:
+ name: kserve-adapter-configmap
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "kserve-adapter.fullname" . }}
+ namespace: {{ include "common.namespace.kserve" . }}
+ labels:
+ {{- include "kserve-adapter.labels" . | nindent 4 }}
+spec:
+ type: NodePort
+ ports:
+ - port: {{ include "common.serviceport.kserve-adapter.http" . }}
+ targetPort: {{ include "common.serviceport.kserve-adapter.targetport" . }}
+ nodePort: {{ include "common.serviceport.kserve-adapter.external" . }}
+ protocol: TCP
+ name: serviceport
+ selector:
+ {{- include "kserve-adapter.selectorLabels" . | nindent 4 }}
--- /dev/null
+# ==================================================================================
+#
+# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+# 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.
+#
+# ==================================================================================
+# Default values for kserve-adapter component.
+
+image:
+ repository: kserve-adapter
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: "1.0.0"