-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gpu-provisioner to the e2e pipeline
Signed-off-by: Heba Elayoty <[email protected]>
- Loading branch information
Showing
33 changed files
with
1,240 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ jobs: | |
fi | ||
echo "VERSION=${rand}" >> $GITHUB_ENV | ||
echo "CLUSTER_NAME=gpuprov${rand}" >> $GITHUB_ENV | ||
echo "CLUSTER_NAME=kaito${rand}" >> $GITHUB_ENV | ||
- uses: azure/[email protected] | ||
with: | ||
|
@@ -74,6 +74,11 @@ jobs: | |
AZURE_RESOURCE_GROUP: ${{ env.CLUSTER_NAME }} | ||
AZURE_ACR_NAME: ${{ env.CLUSTER_NAME }} | ||
|
||
- name: Create Azure Identity | ||
shell: bash | ||
run: | | ||
az identity create --name gpuIdentity --resource-group ${{ env.CLUSTER_NAME }} | ||
- name: build KAITO image | ||
shell: bash | ||
run: | | ||
|
@@ -91,6 +96,34 @@ jobs: | |
AZURE_RESOURCE_GROUP: ${{ env.CLUSTER_NAME }} | ||
AZURE_CLUSTER_NAME: ${{ env.CLUSTER_NAME }} | ||
|
||
- name: Install gpu-provisioner helm chart | ||
shell: bash | ||
run: | | ||
make gpu-provisioner-helm | ||
kubectl wait --for=condition=available deploy "kaito-gpu-provisioner" -n gpu-provisioner --timeout=300s | ||
env: | ||
AZURE_RESOURCE_GROUP: ${{ env.CLUSTER_NAME }} | ||
AZURE_CLUSTER_NAME: ${{ env.CLUSTER_NAME }} | ||
|
||
- uses: azure/[email protected] | ||
with: | ||
client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
|
||
- name: Create Role Assignment | ||
shell: bash | ||
run: | | ||
IDENTITY_PRINCIPAL_ID="$(az identity show --name gpuIdentity --resource-group ${{ env.CLUSTER_NAME }} --query 'principalId' -otsv)" | ||
az role assignment create --assignee ${IDENTITY_PRINCIPAL_ID} --scope "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.CLUSTER_NAME }}" --role "Contributor" | ||
- name: Create Azure Federated Identity | ||
shell: bash | ||
run: | | ||
AKS_OIDC_ISSUER="$(az aks show -n "${{ env.CLUSTER_NAME }}" -g "${{ env.CLUSTER_NAME }}" --query 'oidcIssuerProfile.issuerUrl' -otsv)" | ||
az identity federated-credential create --name gpu-fed-credential --identity-name gpuIdentity --resource-group "${{ env.CLUSTER_NAME }}" \ | ||
--issuer "${AKS_OIDC_ISSUER}" --subject system:serviceaccount:"gpu-provisioner:gpu-provisioner" --audience api://AzureADTokenExchange | ||
- name: Install KAITO Workspace helm chart | ||
shell: bash | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v2 | ||
name: gpu-provisioner | ||
description: A Helm chart for gpu-provisioner | ||
type: application | ||
version: 0.0.1 | ||
appVersion: 0.1.0 | ||
sources: | ||
- https://github.com/Azure/gpu-provisioner | ||
maintainers: | ||
- name: Fei-Guo | ||
email: [email protected] | ||
- name: helayoty | ||
email: [email protected] |
Oops, something went wrong.