Skip to content

Instantly share code, notes, and snippets.

View thomd's full-sized avatar

Thomas Dürr thomd

  • Hamburg, Germany
View GitHub Profile
@thomd
thomd / Course-Kubernetes-Commands-and-YAML.txt
Created August 1, 2021 21:33 — forked from bugcy013/Course-Kubernetes-Commands-and-YAML.txt
Course-Kubernetes-Commands-and-YAML.txt
1.a- kubectl run
kubectl get pods
kubectl run first-deployment --image=nginx
kubectl get pods
(maybe one more time to show the state changed from container creation to Running)
(copy the pod name from get pods)
kubectl exec -it pod-name -- /bin/bash
echo Hello nginx! > /usr/share/nginx/html/index.html
apt-get update
@thomd
thomd / Vagrantfile
Created July 27, 2021 16:03
Create openSUSE Leap 15.2 using Vagrant #vagrant
# set up the default terminal
ENV["TERM"]="linux"
Vagrant.configure("2") do |config|
# set the image for the vagrant box
config.vm.box = "opensuse/Leap-15.2.x86_64"
## Set the image version
# config.vm.box_version = "15.2.31.212"
@thomd
thomd / cloud-init.txt
Created July 25, 2021 14:54
Install Nginx and NodeJS on Azure VM #azure
#cloud-config
package_upgrade: true
packages:
- nginx
- nodejs
- npm
write_files:
- owner: www-data:www-data
path: /etc/nginx/sites-available/default
content: |
@thomd
thomd / azure-vmss-setup.sh
Last active August 2, 2021 12:59
Create a VMSS and other resource in your Azure account (from Udacity nd081) #azure
#!/bin/bash
read -r -p "Enter the Resource Group name: " resourceGroup
[ -z "$resourceGroup" ] && echo "enter a resource group" && exit 1
# Variables
location="eastus"
osType="UbuntuLTS"
vmssName="${resourceGroup}-vmss"
adminName="${resourceGroup}admin"
{
"info": {
"_postman_id": "a3392caa-14c3-4415-a1cd-42cf3492c313",
"name": "httpbin",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "ip",
"event": [
@thomd
thomd / cloud-init.txt
Last active July 25, 2021 14:53
Install Nginx on Azure VM #azure
#cloud-config
package_upgrade: true
packages:
- nginx
write_files:
- owner: www-data:www-data
path: /etc/nginx/sites-available/default
content: |
server {
listen 80;
@thomd
thomd / virtual-machine-scale-set.txt
Created June 7, 2021 10:26
Example of a Azure Virtual Machine Scale Set #azure #example
# cloud-config
package_upgrade: true
packages:
- nginx
- nodejs
- npm
write_files:
- owner: www-data:www-data
path: /etc/nginx/sites-available/default
content: |
@thomd
thomd / main.tf
Created May 13, 2021 20:37
Azure CosmosDB with Terraform #az #terraform
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 2.26"
}
}
}
provider "azurerm" {
@thomd
thomd / main.tf
Last active May 13, 2021 13:21
Azure Functions with Terraform #az #terraform
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 2.26"
}
}
}
provider "azurerm" {