Benefits:
- no need to install ubuntu from the store
- choose the version you want
- choose the name you want
- choose the location you want
- install multiple versions of ubuntu
trigger: | |
- main | |
parameters: | |
- name: chartName | |
displayName: 'Select Helm Chart' | |
type: string | |
default: 'chart1' | |
values: | |
- chart1 |
provider "azurerm" { | |
features {} | |
} | |
data "azurerm_container_registry" "acr" { | |
name = var.registry_name | |
resource_group_name = var.resource_group_name | |
} | |
resource "azurerm_container_registry_task" "daily_purge_prod_images" { |
# terraformer import azure -R edgeprime-oss -r subnet | |
# terraform plan -out=tfplan | |
# terraform show -json tfplan > plan.json | |
# bash script to automatically import state to terraform | |
#!/bin/bash | |
# get all the ressources id and name from the state file | |
file="imported.tfstate" | |
# jq '.modules[].resources | .[] | {type: .type, id: .primary.id, name: .primary.attributes.name}' "$file" | |
# put the ressources id and name, and type with jq into the variable ressources | |
existing_ressources=$(jq '[.modules[].resources | .[] | { type: .type, name: .primary.attributes.name, id: .primary.id}]' imported.tfstate) |
output_address_cidr = "${join(".", [split(".", local.base_address)[0], split(".", local.base_address)[1], split(".", local.base_address)[2], split(".", split("/", local.other_address_cidr)[0])[3]])}/${split("/", local.other_address_cidr)[1]}" |
docker run -it \ | |
--name pytorch \ | |
--network=host \ | |
--cap-add=SYS_PTRACE \ | |
--security-opt seccomp=unconfined \ | |
--device=/dev/kfd \ | |
--device=/dev/dri \ | |
--group-add video \ | |
--ipc=host \ | |
--shm-size 8G \ |
# Powershell script to download and install grafana alloy in silent mode | |
# https://github.com/grafana/alloy/releases/download/v1.1.1/alloy-installer-windows-amd64.exe.zip | |
# Define the URL of the alloy installer | |
$url = "https://github.com/grafana/alloy/releases/download/v1.1.1/alloy-installer-windows-amd64.exe.zip" | |
# Define the path where the installer will be saved | |
$installerPath = "$env:TEMP\alloy-installer-windows-amd64.exe.zip" | |
# Download the installer | |
Invoke-WebRequest -Uri $url -OutFile $installerPath |
cluster: | |
name: my-cluster | |
externalServices: | |
prometheus: | |
host: http://mimir-nginx.observability.svc:80 | |
# queryEndpoint: /api/v1/push | |
writeEndpoint: /api/v1/push | |
authMode: none | |
tenantId: "1" |
https://583c-77-201-81-191.ngrok-free.app/dashboards |
# read a json local file from local disk and extract the build information | |
import json | |
import requests | |
json_url = 'http://localhost:8080/v1/rules' | |
# load json form url and extract the build information | |
json_file = requests.get(json_url).json() | |
# json_file = 'test.json' | |
# get base adress from json_url |