Skip to content

Instantly share code, notes, and snippets.

View torumakabe's full-sized avatar

Toru Makabe torumakabe

View GitHub Profile
@torumakabe
torumakabe / Dockerfile
Last active May 31, 2020 23:38
Observability Trial Kit for Azure Kubernetes Service
# build stage
ARG GO_VERSION=1.12.6
FROM golang:${GO_VERSION}-alpine AS build-stage
RUN apk add --no-cache ca-certificates git
WORKDIR /src
COPY ./go.mod ./go.sum ./
RUN go mod download
COPY . .
RUN go build -o /goapp main.go
@torumakabe
torumakabe / main.tf
Last active May 14, 2023 18:10
AKS additional provisioning with Terraform
provider "azurerm" {
version = "~>1.25"
}
/*
ToDo: Replace kubeconfig auth. with Terraform data source & add helm provider
When this helm issue has been resolved https://github.com/terraform-providers/terraform-provider-helm/issues/148
*/
provider "kubernetes" {
version = "~>1.6"
@torumakabe
torumakabe / settings.json
Last active April 1, 2019 01:07
VS Code Python Configuration (Windows)
{
"python.pythonPath": "C:\\tools\\Anaconda3\\envs\\env\\python.exe",
"terminal.integrated.shell.windows": "C:\\windows\\System32\\cmd.exe",
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.enabled": true
}
@torumakabe
torumakabe / settings.json
Last active April 1, 2019 05:01
VS Code Python Configuration (macOS)
{
"python.pythonPath": "/anaconda3/envs/jupyter-env/bin/python",
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.enabled": true
}
@torumakabe
torumakabe / tasks.json
Created March 12, 2019 12:55
VS Code C Debugger Configuration (macOS)
// task.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Debug Build",
"type": "shell",
"command": "clang",
"args": [
"-g",
@torumakabe
torumakabe / launch.json
Last active March 11, 2019 07:08
VS Code C Debugger Configuration (Windows)
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": false,
@torumakabe
torumakabe / main.go
Created June 27, 2018 07:24
Sample Azure SDK for Go & Autorest-Go (Get alert info in Log Analytics saved search)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"net/http"
"github.com/Azure/azure-sdk-for-go/services/operationalinsights/mgmt/2015-03-20/operationalinsights"
@torumakabe
torumakabe / azuredeploy.json
Last active June 19, 2018 15:12
Azure Resource Manager Template for AKS (All in: as of June 19, 2018)
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceName": {
"type": "string",
"metadata": {
"description": "The name of the Managed Cluster resource."
}
},
#!/bin/bash
apt update
apt install nginx -y
echo "[Instance Name]: `curl -H Metadata:true "http://169.254.169.254/metadata/instance/compute/name?api-version=2017-12-01&format=text"` [Date]: `date`" > /var/www/html/index.nginx-debian.html
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [],
"outputs": {}
}