This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: ingress-testwebsite | |
annotations: | |
kubernetes.io/ingress.class: "nginx" | |
spec: | |
rules: | |
- host: www.testwebaddress.com | |
http: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get helm secrets from Kubernetes cluster | |
SECRET=$(kubectl get secret $1 -o jsonpath='{ .data.release }' ) | |
# decode the secrets | |
DECODED_SECRET=$(echo $SECRET | base64 -d | base64 -d | gunzip -c ) | |
# parse the decoded secrets, pulling out the templates and removing whitespace | |
DATA=$(echo $DECODED_SECRET | jq '.chart.templates[]' | tr -d '[:space:]' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: sqlserver2019-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
name: sqlserver2019-pod | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker container run ` | |
-d ` # detach the container (run it in the background) | |
--name arkkkd ` # give the container a name (arkkkd) | |
-p 3306:3306 ` # set port mapping from your computer to the container (3306 to 3306) | |
# setting environment variables for mysql | |
--env MYSQL_ALLOW_EMPTY_PASSWORD=True ` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
sqlserver1: | |
build: | |
context: . | |
dockerfile: dockerfile | |
ports: | |
- "15789:1433" | |
env_file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hack to use PsDatabaseClone to mount a cloned database into a container | |
# this only works with a local SQL instance to initially host the cloned database | |
# which is then detached and mounted to a container | |
# import required powershell modules | |
import-module dbatools | |
import-module psframework | |
import-module psdatabaseclone | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/teamserverless/k8s-on-raspbian/blob/master/script/prep.sh | |
# https://www.hanselman.com/blog/HowToBuildAKubernetesClusterWithARMRaspberryPiThenRunNETCoreOnOpenFaas.aspx | |
# config of the raspberry pi on the network | |
change hostname | |
change ip | |
disable swap | |
# raspbian claiming it's debian v10 when it's actually v9 - curl -sL get.docker.com | grep '9)' -b10 -a10 - no version for buster | |
sudo curl -sL get.docker.com | sed 's/9)/10)/' | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos | |
RUN yum update -y && yum install -y curl sudo | |
RUN sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo | |
RUN yum install -y mssql-server | |
CMD /opt/mssql/bin/sqlservr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create directory for helm | |
cd C:\git\dbafromthecold\PrivateCodeRepo\Azure\Helm | |
# create new chart | |
helm create testsqlchart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet | |
# log into Azure | |
az login | |
# Set variables for resource group, virtual network, and subnet | |
RES_GROUP=containers1 | |
VNET=vnet1 |