Skip to content

Instantly share code, notes, and snippets.

View mdrakiburrahman's full-sized avatar
💤
living the data dream

Raki mdrakiburrahman

💤
living the data dream
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdrakiburrahman
mdrakiburrahman / OTEL-agent-and-fluentforward.yaml
Last active June 15, 2022 21:21
OTEL daemonset and fluentforward not working
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-conf
namespace: azure-arc-data
labels:
app: opentelemetry
component: otel-collector-conf
data:
otel-collector-config: |
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-conf
namespace: azure-arc-data
labels:
app: opentelemetry
component: otel-collector-conf
data:
otel-collector-config: |
@mdrakiburrahman
mdrakiburrahman / azure-arc-least-priveleges_DRAFT.sh
Last active June 13, 2022 21:22
[DRAFT] E2E Deployment of Arc Operators without requiring a cluster-admin kubeconfig
# = = = = = = = = = = = = = = = = = = = =
# Verbosity wrapper
# = = = = = = = = = = = = = = = = = = = =
# On
export VERBOSE=1
# Off
unset VERBOSE
# = = = = = = = = = = = = = = = = = = = =
# #
apiVersion: v1
data:
password: YWNudG9yUFJFU1RPIQ==
username: Ym9vcg==
kind: Secret
metadata:
name: sql-bc-1-login-secret
namespace: arc-primary
type: Opaque
---
@mdrakiburrahman
mdrakiburrahman / onboarder-kubeconfig-gen.sh
Created May 17, 2022 17:42
Generating a User kubeconfig and using that kubeconfig instead of Cluster Admin for onboarding Arc
# Here is a sample set of roles we'd want our SA/User account to have, this can be anything and the kubeconfig will inherit it
kubectl apply -f https://gist.githubusercontent.com/mdrakiburrahman/d94613872601c397f3a052492f168827/raw/a7909c131beb02f45970f2b605178859c6882555/tina-onboarder-rbac.yaml
# = = = = = = = = =
# Create a kubeconfig from this that overwrites our Cluster Admin that we get when we install a new K8s cluster
# = = = = = = = = =
# Service Account is in default but because of ClusterRoleBinding it has Cluster scope
namespace=default
serviceAccount=arc-data-deployer
@mdrakiburrahman
mdrakiburrahman / fluentbit_otlp_json_kafka_export.json
Created May 10, 2022 22:57
A sample JSON export from the Open Telemetry Kafka Exporter as OTLP_JSON
{
"resourceLogs": [
{
"resource": {},
"scopeLogs": [
{
"scope": {},
"logRecords": [
{
"timeUnixNano": "1652102891470000028",
@mdrakiburrahman
mdrakiburrahman / Synapse-Logical-DWH.sql
Last active May 5, 2022 19:39
Creating a simple External on top of Parquet file that exposes a subset of the columns to end user
CREATE DATABASE Ldw
COLLATE Latin1_General_100_BIN2_UTF8;
USE Ldw;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'MyRand0mPa33W0rd1!';
CREATE DATABASE SCOPED CREDENTIAL WorkspaceIdentity
WITH IDENTITY = 'Managed Identity';
GO
@mdrakiburrahman
mdrakiburrahman / Arc-onboarding-ansible-mimic.sh
Last active April 21, 2022 18:17
Arc Onboarding Script - working version 1.2.3
# Login Into Azure Using Service Principal
az_cli_cmd login --service-principal -u az_client_id -p az_client_secret --tenant az_tenant_id
# Set Azure Subscription
az_cli_cmd account set --subscription az_subscription_id
# Create AZ Resource Group: Arc K8s
az_cli_cmd group create -l az_location -n az_resource_group
# OCP Login