Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Ahmed Elsayed ahmedig

🎯
Focusing
View GitHub Profile
View gist:9b3ccd92f0ccecdecd904d126fbfd060
while true; do wget -q -O - https://blabla/service/swagger/index.html; done
kubectl get hpa -w
@ahmedig
ahmedig / terraform-full-azure-pipeline.yml
Last active Jun 2, 2021
Terraform-full-Azure-pipeline
View terraform-full-azure-pipeline.yml
trigger:
branches:
include:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
terraform_directory: src
terraformVersion: '0.14.6'
View terraform-CI-azure-pipelines.yml
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 / DockerPush.yml
Last active Oct 28, 2020
Github workflow - Build, push to ACR and deploy to App Service
View DockerPush.yml
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:
@ahmedig
ahmedig / dockerfile
Last active Oct 22, 2020
Docker file for a dotnet new react project
View dockerfile
# 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
View My Zshrc config
# 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
View Terraform-Runscript-trials
############################################################ Trial 1 - local exec ############################################
resource "azurerm_kubernetes_cluster" "aks-cluster" {
..............
..............
..............
..............
provisioner "local-exec" {
command = "../../scripts/MyScript.ps1"
interpreter = ["PowerShell.exe"]
View 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