Skip to content

Instantly share code, notes, and snippets.

View takekazuomi's full-sized avatar
:octocat:
on code

Takekazu Omi takekazuomi

:octocat:
on code
View GitHub Profile
@takekazuomi
takekazuomi / get-schema.json
Created January 8, 2023 07:27
az monitor log-analytics workspace get-schema
{
"value": [
{
"displayName": "Category",
"facet": false,
"indexed": false,
"name": "Category",
"ownerType": [
"AACAudit",
"AACHttpRequest",

ラズパイでも動くよと聞いて、もしかしたらARMエミュかと思って中を見たら。 Multi-arch images になっていた。どっちを覗いても、ほぼほぼ同じようなものが入っている。

https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

$ docker manifest inspect mcr.microsoft.com/azure-sql-edge:latest
{
   "schemaVersion": 2,
 "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",

mcrをすこし探索。azure-sql-edgeというイメージは3つある。

$ curl -s https://mcr.microsoft.com/v2/_catalog | grep azure-sql-edge
    "azure-sql-edge/developer",
    "azure-sql-edge/premium",
    "azure-sql-edge",

この辺見たら、mcr.microsoft.com/azure-sql-edge:latest がイメージ名らしい。 https://docs.microsoft.com/en-us/azure/azure-sql/database/local-dev-experience-sql-database-emulator?view=azuresql#what-is-the-azure-sql-database-emulator

持ってきて中をみたら。以前に比べて、paldumper ってのはあるけど、palrun がない。

mssql@d7caad55dc97:/opt/mssql/bin$ ls -Al
total 16172
-rwxrwxr-x 1 root root     434 Jan 14 22:02 compress-dump.sh
-rw-rw-r-- 1 root root   21890 Jan 14 22:02 crash-support-functions.sh
-rwxrwxr-x 1 root root    1749 Jan 14 22:02 generate-sql-dump.sh
@takekazuomi
takekazuomi / main.go
Created May 5, 2022 08:22
constraint struct fields
package main
import (
"fmt"
"time"
)
type common struct {
ID string
Created time.Time
@takekazuomi
takekazuomi / aca-2022-03-01 update.md
Last active April 27, 2022 06:53
API Version 2022-03-01 appears in ACA, so check the difference.
package main
import (
"context"
"fmt"
"log"
"net/url"
"time"
"github.com/Azure/azure-pipeline-go/pipeline"
@takekazuomi
takekazuomi / go.mod
Last active April 14, 2022 12:40
storage access with azidentity(0.13)
module webwas
go 1.18
require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0
github.com/gorilla/handlers v1.5.1
)
@takekazuomi
takekazuomi / container.bicep
Created April 14, 2022 12:31
deploy ACA with MSI
param containerAppName string
param location string = resourceGroup().location
param environmentId string
param containerImage string
param containerPort int
param isExternalIngress bool
param secrets array = []
param env array = []
param minReplicas int = 0

memo

az network bastion ssh --name bastionhost --resource-group omivm04-rg \
  --target-resource-id /subscriptions/*****************/resourceGroups/omivm04-rg/providers/Microsoft.Compute/virtualMachines/flatcar \
  --auth-type ssh-key --username core --ssh-key ./.secure/vm-keys
-zsh