Skip to content

Instantly share code, notes, and snippets.

View gbaeke's full-sized avatar

Geert Baeke gbaeke

View GitHub Profile
@gbaeke
gbaeke / azureDeploy.json
Last active March 4, 2019 15:09
Azure AKS Deployment (for Xylos Blog)
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"serverAppID": {
"type": "string",
"metadata": {
"description": "ID of the server app registration (RBAC)"
}
},
apiVersion: v1
kind: Service
metadata:
name: realtime-go
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 80
targetPort: 8080
@gbaeke
gbaeke / consul-main.go
Created May 5, 2020 14:26
service and key/value from Consul
package main
import (
"log"
"net/http"
"os"
"github.com/go-redis/redis"
socketio "github.com/googollee/go-socket.io"
consulapi "github.com/hashicorp/consul/api"
@gbaeke
gbaeke / realtime.yaml
Created October 24, 2020 19:30
YAML file with Application Gateway ingress
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redisapp
labels:
app: redis
spec:
selector:
matchLabels:
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: certsync-csi
name: redis
labels:
app: redis
spec:
selector:
resource vnet1 'Microsoft.Network/virtualNetworks@2020-11-01' = {
name: 'vnet1'
location: resourceGroup().location
properties: {
addressSpace: {
addressPrefixes: [
'10.0.10.0/24'
]
}
subnets:[
@gbaeke
gbaeke / aca.md
Last active May 26, 2022 11:21
Azure Container Apps

Azure Container Apps

⚠️ IMPORTANT: this is for an older version of Container Apps; although some commands might still work, expect issues

In the video, I did not show all steps:

  • configuring pre-requisites
  • provisioning a Container App Environment

I will use ACA for Azure Container Apps.

@gbaeke
gbaeke / aca_scaling.md
Last active August 22, 2022 11:57
Azure Container Apps - Bicep and scaling

Azure Container Apps: Bicep and scaling

Azure Service Bus

Create namespace and topic:

az group create --name rg-aca --location northeurope

namespaceName=MyNameSpace$RANDOM
@gbaeke
gbaeke / aca-revisions.md
Created January 9, 2022 13:32
Azure Container Apps - Revisions

Azure Container Apps: Revisions

Deploy with Bicep

param image string = 'ghcr.io/gbaeke/super:1.0.5'

resource la 'Microsoft.OperationalInsights/workspaces@2021-06-01' = {
  name: 'la-aca' 
  location: resourceGroup().location
@gbaeke
gbaeke / appsvcarc.md
Last active June 19, 2022 16:21
Run Azure App Services anywhere with Azure Arc

Run Azure App Services anywhere with Azure Arc

Prerequisites

All commands in the gist should be run from bash. You can use WSL (Windows Subsystem for Linux) to run the commands. You can also use the Azure Cloud Shell and select Bash instead of PowerShell.

Install Azure CLI (not needed in Azure Cloud Shell, CLI is pre-installed) and add the following Azure CLI extensions:

az extension add --name connectedk8s