-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Houssem Dellai
committed
Jan 31, 2025
1 parent
eba1aac
commit dcccac4
Showing
16 changed files
with
101 additions
and
35 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,14 @@ | ||
To deploy these resources via Terraform, you will need to have the following installed on your machine: | ||
|
||
```sh | ||
$env:ARM_SUBSCRIPTION_ID=(az account show --query id -o tsv) | ||
|
||
# Set the following environment variable if you are using Linux | ||
# export ARM_CLIENT_ID=(az account show --query id -o tsv) | ||
|
||
terraform init | ||
|
||
terraform plan -out tfplan | ||
|
||
terraform apply tfplan | ||
``` |
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 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 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 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 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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
resource "azurerm_load_test" "load_test" { | ||
name = "load-test" | ||
resource_group_name = azurerm_resource_group.rg.name | ||
location = azurerm_resource_group.rg.location | ||
} | ||
# resource "azurerm_load_test" "load_test" { | ||
# name = "load-test" | ||
# resource_group_name = azurerm_resource_group.rg.name | ||
# location = azurerm_resource_group.rg.location | ||
# } | ||
|
||
resource "terraform_data" "create-load-test" { | ||
provisioner "local-exec" { | ||
command = <<-EOF | ||
az load test create --load-test-resource ${azurerm_load_test.load_test.name} -g ${azurerm_load_test.load_test.resource_group_name} --test-id testwebapp --test-plan testplan.jmx --engine-instances 1 | ||
EOF | ||
} | ||
# resource "terraform_data" "create-load-test" { | ||
# provisioner "local-exec" { | ||
# command = <<-EOF | ||
# az load test create --load-test-resource ${azurerm_load_test.load_test.name} -g ${azurerm_load_test.load_test.resource_group_name} --test-id testwebapp --test-plan testplan.jmx --engine-instances 1 | ||
# EOF | ||
# } | ||
|
||
triggers_replace = [azurerm_load_test.load_test.id] | ||
} | ||
# triggers_replace = [azurerm_load_test.load_test.id] | ||
# } | ||
|
||
resource "terraform_data" "run-load-test" { | ||
provisioner "local-exec" { | ||
command = <<-EOF | ||
az load test-run create --load-test-resource ${azurerm_load_test.load_test.name} -g ${azurerm_load_test.load_test.resource_group_name} --test-id testwebapp --test-run-id testwebapprun1 | ||
EOF | ||
} | ||
# resource "terraform_data" "run-load-test" { | ||
# provisioner "local-exec" { | ||
# command = <<-EOF | ||
# az load test-run create --load-test-resource ${azurerm_load_test.load_test.name} -g ${azurerm_load_test.load_test.resource_group_name} --test-id testwebapp --test-run-id testwebapprun1 | ||
# EOF | ||
# } | ||
|
||
triggers_replace = [azurerm_load_test.load_test.id] | ||
# triggers_replace = [azurerm_load_test.load_test.id] | ||
|
||
depends_on = [terraform_data.create-load-test] | ||
} | ||
# depends_on = [terraform_data.create-load-test] | ||
# } |
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 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,2 @@ | ||
https://github.com/keycloak/keycloak-quickstarts/tree/main/kubernetes | ||
https://www.keycloak.org/getting-started/getting-started-kube |
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,33 @@ | ||
# Tips and tricks for Kubernetes and AKS | ||
|
||
## Creaate an AKS cluster quickly | ||
|
||
```sh | ||
az group create -n rg-aks-cluster -l swedencentral | ||
|
||
az aks create -n aks-cluster -g rg-aks-cluster --network-plugin azure --network-plugin-mode overlay -k 1.31.2 --node-vm-size standard_d2pds_v6 | ||
|
||
az aks get-credentials -n aks-cluster -g rg-aks-cluster --overwrite-existing | ||
``` | ||
|
||
## Monitor Your cgroup Metrics | ||
|
||
Linux cgroups provide detailed metrics about CPU usage and throttling. Look for the cpu.stat file within the container’s cgroup directory (usually under /sys/fs/cgroup): | ||
Within the cpu.stat file there are three key metrics: | ||
|
||
`nr_throttled`: Number of times the container was throttled. | ||
`throttled_time`: Total time spent throttled – which I believe is in nanoseconds | ||
`nr_periods`: Total CPU allocation periods. | ||
Example: | ||
|
||
```sh | ||
cat /sys/fs/cgroup/cpu.stat | ||
# Output: | ||
# nr_periods 12345 | ||
# nr_throttled 543 | ||
# throttled_time 987654321 | ||
``` | ||
|
||
If `nr_throttled` or `throttled_time` is high relative to `nr_periods`, then you have CPU throttling on your container. | ||
|
||
Src: https://dev.to/causely/tackling-cpu-throttling-in-kubernetes-for-better-application-performance-1dko |
Empty file.
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 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: kaito.sh/v1alpha1 | ||
kind: Workspace | ||
metadata: | ||
name: workspace-deepseek-r1-distill-llama-8b | ||
resource: | ||
instanceType: "Standard_NC24s_v3" # "Standard_NC24ads_A100_v4" | ||
labelSelector: | ||
matchLabels: | ||
apps: deepseek-r1-distill-llama-8b | ||
inference: | ||
preset: | ||
name: "deepseek-r1-distill-llama-8b" | ||
|