Skip to content

Instantly share code, notes, and snippets.

View ahmedig's full-sized avatar
🎯
Focusing

Ahmed Elsayed ahmedig

🎯
Focusing
View GitHub Profile
@ahmedig
ahmedig / AKS commands
Created June 26, 2018 01:28
AKS commands.
az group create --name "rg-minecraft-ig" -l australiaeast
az aks create --resource-group "rg-minecraft-ig" -n kubahmed -c 1 --generate-ssh-keys -l australiaeast
aks get-credentials --name kubahmed -g rg-minecraft-ig
D:\Work\Trainings\OpenHack\yaml
λ kubectl apply -f .
# Run the services, and ping every 2 seconds
############################################################ Trial 1 - local exec ############################################
resource "azurerm_kubernetes_cluster" "aks-cluster" {
..............
..............
..............
..............
provisioner "local-exec" {
command = "../../scripts/MyScript.ps1"
interpreter = ["PowerShell.exe"]
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/ahmedelsayed/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@ahmedig
ahmedig / dockerfile
Last active October 22, 2020 11:38
Docker file for a dotnet new react project
# Pull down an image from Docker Hub that includes the .NET core SDK:
# https://hub.docker.com/_/microsoft-dotnet-core-sdk
# This is so we have all the tools necessary to compile the app.
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
# Fetch and install Node 10. Make sure to include the --yes parameter
# to automatically accept prompts during install, or it'll fail.
RUN curl --silent --location https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install --yes nodejs
@ahmedig
ahmedig / DockerPush.yml
Last active October 28, 2020 23:27
Github workflow - Build, push to ACR and deploy to App Service
name: Push Docker Image to ACR
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
# paths:
# - "src/**"
pull_request:
pool:
vmImage: 'ubuntu-latest'
steps:
- task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0
displayName: 'Install Terraform'
inputs:
terraformVersion: '0.14.6'
@ahmedig
ahmedig / terraform-full-azure-pipeline.yml
Last active June 2, 2021 05:51
Terraform-full-Azure-pipeline
trigger:
branches:
include:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
terraform_directory: src
terraformVersion: '0.14.6'
@ahmedig
ahmedig / gist:9b3ccd92f0ccecdecd904d126fbfd060
Created October 5, 2021 23:40
Load test a service in K8S
while true; do wget -q -O - https://blabla/service/swagger/index.html; done
kubectl get hpa -w
@ahmedig
ahmedig / Purview-AddGroupsToPolicies.ps1
Created May 18, 2023 07:28
A script to add groups into policies in Purview
param(
[string] $PurviewAccountName,
[string] $SubscriptionId,
[string] $ResourceGroupName,
[string] $ManagedIdentityUserID = $null,
[string] $PurviewDataCollectionAdminGroupObjectId,
[string] $PurviewDataSourceAdGroupObjectId,
[string] $PurviewDataCuratorAdGroupObjectId,
[string] $PurviewReaderAdGroupObjectId,
[string] $PurviewShareContributorAdGroupObjectId,