-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
100 changed files
with
362 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker run hello-world |
26 changes: 26 additions & 0 deletions
26
CH01/Listing0102-Output of your first Docker Container.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Unable to find image 'hello-world:latest' locally | ||
latest: Pulling from library/hello-world | ||
1b930d010525: Pull complete | ||
Digest: sha256:9572f7cdcee8591948c2963463447a53466950b3fc15a247fcad1917ca215a2f | ||
Status: Downloaded newer image for hello-world:latest | ||
|
||
Hello from Docker! | ||
This message shows that your installation appears to be working correctly. | ||
|
||
To generate this message, Docker took the following steps: | ||
1. The Docker client contacted the Docker daemon. | ||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub. | ||
(amd64) | ||
3. The Docker daemon created a new container from that image which runs the | ||
executable that produces the output you are currently reading. | ||
4. The Docker daemon streamed that output to the Docker client, which sent it | ||
to your terminal. | ||
|
||
To try something more ambitious, you can run an Ubuntu container with: | ||
$ docker run -it ubuntu bash | ||
|
||
Share images, automate workflows, and more with a free Docker ID: | ||
https://hub.docker.com/ | ||
|
||
For more examples and ideas, visit: | ||
https://docs.docker.com/get-started/ |
1 change: 1 addition & 0 deletions
1
CH01/Listing0103-Login script to your Azure Account using the Azure CLI.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
az login |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
az account set -s <YourSubscription> |
55 changes: 55 additions & 0 deletions
55
CH01/Listing0105-PowerShell script to create Lab environment using Azure VMs.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Modify these variables as needed | ||
$Region="EastUS" | ||
$RG="KubernetesLabs" | ||
$Username="labuser" | ||
$PW="Str@ngPassw0rd" | ||
$dnsPrefix="k8slab" | ||
$VMSize="Standard_B2s" | ||
$Linux_Image="Canonical:UbuntuServer:18.04-LTS:latest" | ||
$Windows_Image="Win2016datacenter" | ||
|
||
#Define machines | ||
$machines = ConvertFrom-Csv @' | ||
Hostname,IP,OS | ||
storage,172.16.94.5,Linux | ||
control,172.16.94.10,Linux | ||
node1,172.16.94.11,Linux | ||
node2,172.16.94.12,Linux | ||
node3,172.16.94.13,Linux | ||
workstation,172.16.94.100,Windows | ||
'@ | ||
|
||
# Create RG | ||
az group create -l $Region -n $RG | ||
|
||
# Create VNET and NSG | ||
az network vnet create --name LABVnet --resource-group $RG --address-prefixes 172.16.94.0/24 | ||
|
||
az network vnet subnet create --name LabSubnet --address-prefixes 172.16.94.0/24 ` | ||
--resource-group $RG --vnet-name LABVnet | ||
|
||
az network nsg create --name LABNSG --resource-group $RG | ||
|
||
az network nsg rule create --name SSH --nsg-name LABNSG --priority 1000 ` | ||
--resource-group $RG --destination-port-ranges 22 --access "Allow" ` | ||
--protocol TCP --direction Inbound | ||
|
||
az network nsg rule create --name RDP --nsg-name LABNSG --priority 1001 ` | ||
--resource-group $RG --destination-port-ranges 3389 --access "Allow" ` | ||
--protocol TCP --direction Inbound | ||
|
||
#Create VMs | ||
foreach($vm in $machines) { | ||
$hostname=$vm.Hostname | ||
$DNSName="$dnsPrefix-$hostname" | ||
$image=$Windows_Image | ||
if ($vm.OS -eq "Linux") { $image=$Linux_Image } | ||
az network public-ip create --name PIP-$hostname --resource-group $RG --dns-name $DNSName | ||
|
||
az network nic create --name NIC-$hostname --resource-group $RG --subnet LabSubnet ` | ||
--vnet-name LABVnet --private-ip-address $vm.IP --public-ip-address PIP-$hostname | ||
|
||
az vm create --name $hostname --resource-group $RG --nics NIC-$hostname --os-disk-size-gb 150 ` | ||
--os-disk-name Disk-$hostname --image $image --authentication-type password ` | ||
--admin-username $Username --admin-password $PW --size $VMSize | ||
} |
5 changes: 5 additions & 0 deletions
5
CH01/Listing0106-Required additional Linux hosts file contents.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
172.16.94.5 storage | ||
172.16.94.10 control | ||
172.16.94.11 node1 | ||
172.16.94.12 node2 | ||
172.16.94.13 node3 |
6 changes: 6 additions & 0 deletions
6
CH01/Listing0107-Script to add entries to Linux hosts file.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
echo 172.16.94.5 storage > tmphosts | ||
echo 172.16.94.10 control >> tmphosts | ||
echo 172.16.94.11 node1 >> tmphosts | ||
echo 172.16.94.12 node2 >> tmphosts | ||
echo 172.16.94.13 node3 >> tmphosts | ||
sudo -- sh -c "cat tmphosts >> /etc/hosts" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
sudo apt-get update | ||
sudo apt-get install gnupg ca-certificates curl wget software-properties-common apt-transport-https lsb-release -y | ||
curl -sL https://packages.microsoft.com/keys/microsoft.asc | | ||
gpg --dearmor | | ||
sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null | ||
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | ||
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/prod.list)" | ||
sudo apt-get update |
4 changes: 4 additions & 0 deletions
4
CH01/Listing0109-apt script for azdata, azure-cli, sqlcmd and kubectl.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sudo apt-get install -y azdata-cli | ||
sudo apt-get install -y azure-cli | ||
sudo apt-get install -y kubectl | ||
sudo apt-get install -y mssql-tools |
2 changes: 2 additions & 0 deletions
2
CH01/Listing0110-Install Script for Chocolatey in PowerShell.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 | ||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
choco install curl -y | ||
choco install grep -y | ||
choco install putty -y | ||
choco install googlechrome -y |
3 changes: 3 additions & 0 deletions
3
CH01/Listing0112-Install script for kubectl, sqlcmd and Azure CLI.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
choco install kubernetes-cli -y | ||
choco install sqlserver-cmdlineutils -y | ||
choco install azure-cli -y |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
curl -o azdata.msi https://aka.ms/azdata-msi | ||
msiexec /i azdata.msi /passive |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
apt install -y nfs-kernel-server | ||
groupadd mssql -g 10001 | ||
useradd -u 10001 mssql -g mssql | ||
addgroup --gid 472 grafana | ||
useradd -g 472 -u 472 grafana | ||
|
||
mkdir -p /srv/exports/volumes/ | ||
chown -R mssql:mssql /srv/exports/volumes/ | ||
echo '/srv/exports 172.16.94.0/24(rw,sync,no_subtree_check,no_root_squash)' > exports | ||
chmod 644 exports | ||
mv exports /etc/exports | ||
exportfs -a | ||
systemctl restart nfs-kernel-server | ||
|
||
mkdir /srv/exports/volumes/sql-instance-1 | ||
chown -R mssql:mssql /srv/exports/volumes/ | ||
|
||
mkdir /srv/exports/volumes/influxdb | ||
mkdir /srv/exports/volumes/grafana | ||
chown 472:472 /srv/exports/volumes/grafana | ||
|
||
mkdir /srv/exports/volumes/webcontent | ||
echo "Hello World!!!" > /srv/exports/volumes/webcontent/index.html |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
chmod +x enable-nfs.sh | ||
sudo ./enable-nfs.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sudo apt install -y nfs-common |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sudo mount -t nfs storage:/srv/exports /mnt | ||
ls -al /mnt/volumes |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
swapoff -a |
1 change: 1 addition & 0 deletions
1
CH02/Listing0201-docker pull command for latest SQL Server 2019 image.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker pull mcr.microsoft.com/mssql/server:2019-latest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
curl -sL https://mcr.microsoft.com/v2/mssql/server/tags/list |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(Invoke-WebRequest https://mcr.microsoft.com/v2/mssql/server/tags/list).Content |
1 change: 1 addition & 0 deletions
1
.../Listing0204-docker pull command to pull container image associated with specific tag.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker pull mcr.microsoft.com/mssql/server:2019-CU9-ubuntu-18.04 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker image ls |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
docker run \ | ||
--env 'ACCEPT_EULA=Y' \ | ||
--env 'MSSQL_SA_PASSWORD=S0methingS@Str0ng!' \ | ||
--name 'sql1' \ | ||
--publish 1433:1433 \ | ||
--detach \ | ||
mcr.microsoft.com/mssql/server:2019-CU9-ubuntu-18.04 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker ps |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker logs sql1 | more |
1 change: 1 addition & 0 deletions
1
CH02/Listing0209-Command line utility sqlcmd to access SQL Server.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sqlcmd -S localhost,1433 -U sa -Q 'SELECT @@VERSION' -P 'S0methingS@Str0ng!' |
6 changes: 6 additions & 0 deletions
6
CH02/Listing0210-docker run command with unique container name.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
docker run \ | ||
--name 'sql2' \ | ||
-e 'ACCEPT_EULA=Y' \ | ||
-e 'MSSQL_SA_PASSWORD=S0methingS@Str0ng!' \ | ||
-p 1434:1433 \ | ||
-d mcr.microsoft.com/mssql/server:2019-CU9-ubuntu-18.04 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
USE [master] | ||
RESTORE DATABASE [TestDB1] | ||
FROM DISK = N'/var/opt/mssql/data/TestDB1.bak' | ||
WITH REPLACE |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker cp TestDB1.bak sql2:/var/opt/mssql/data |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker exec -u root sql2 chown mssql /var/opt/mssql/data/TestDB1.bak |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sqlcmd -S localhost,1434 -U sa -i restore_testdb1.sql -P 'S0methingS@Str0ng!' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker exec -it sql2 /bin/bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ps -aux |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ls -la /var/opt/mssql/data |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker stop sql2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker ps -a |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker start sql2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sqlcmd -S localhost,1434 -U sa -Q 'SELECT name from sys.databases' -P 'S0methingS@Str0ng!' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker stop sql1 | ||
docker stop sql2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker rm sql1 | ||
docker rm sql2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker image ls |
7 changes: 7 additions & 0 deletions
7
CH02/Listing0225-docker run command - data Volume specification.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
docker run \ | ||
--name 'sql1' \ | ||
-e 'ACCEPT_EULA=Y' \ | ||
-e 'MSSQL_SA_PASSWORD=S0methingS@Str0ng!' \ | ||
-p 1433:1433 \ | ||
-v sqldata1:/var/opt/mssql \ | ||
-d mcr.microsoft.com/mssql/server:2019-CU9-ubuntu-18.04 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
docker cp TestDB1.bak sql1:/var/opt/mssql/data | ||
docker exec -u root sql1 chown mssql /var/opt/mssql/data/ TestDB1.bak | ||
sqlcmd -S localhost,1433 -U sa -i restore_testdb1.sql -P 'S0methingS@Str0ng!' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sqlcmd -S localhost,1433 -U sa -Q 'SELECT name from sys.databases' -P 'S0methingS@Str0ng!' |
1 change: 1 addition & 0 deletions
1
CH02/Listing0228-List all files and their physical names through sqlcmd.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sqlcmd -S localhost,1433 -U sa -Q 'SELECT name, physical_name from sys.master_files' -P 'S0methingS@Str0ng!' -W |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker stop sql1 | ||
docker rm sql1 |
7 changes: 7 additions & 0 deletions
7
CH02/Listing0230-docker run command - creation of new container.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
docker run \ | ||
--name 'sql2' \ | ||
-e 'ACCEPT_EULA=Y' \ | ||
-e 'MSSQL_SA_PASSWORD=S0methingS@Str0ng!' \ | ||
-p 1433:1433 \ | ||
-v sqldata1:/var/opt/mssql \ | ||
-d mcr.microsoft.com/mssql/server:2019-CU9-ubuntu-18.04 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sqlcmd -S localhost,1433 -U sa -Q 'SELECT name from sys.databases' -P 'S0methingS@Str0ng!' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker volume ls |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker volume inspect sqldata1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker stop sql1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker rm sql1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker volume rm sqldata1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
wget -q -O deploy_kubeadm.sh https://bookmark.ws/ArcDemo_Linux | ||
chmod +x deploy_kubeadm.sh | ||
./deploy_kubeadm.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sudo modprobe overlay | ||
sudo modprobe br_netfilter |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf | ||
overlay | ||
br_netfilter | ||
EOF |
5 changes: 5 additions & 0 deletions
5
CH04/Listing0404-Persist system parameters for containerd.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf | ||
net.bridge.bridge-nf-call-iptables = 1 | ||
net.ipv4.ip_forward = 1 | ||
net.bridge.bridge-nf-call-ip6tables = 1 | ||
EOF |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sudo sysctl --system |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sudo apt-get update | ||
sudo apt-get install -y containerd |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sudo mkdir -p /etc/containerd | ||
sudo containerd config default | sudo tee /etc/containerd/config.toml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sudo vi /etc/containerd/config.toml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] | ||
SystemdCgroup = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sudo systemctl restart containerd |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sudo systemctl status containerd |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sudo bash -c 'cat <<EOF >/etc/apt/sources.list.d/kubernetes.list | ||
deb https://apt.kubernetes.io/ kubernetes-xenial main | ||
EOF' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sudo apt-get update | ||
apt-cache policy kubelet | head -n 20 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sudo apt-get install -y kubelet kubeadm kubectl |
2 changes: 2 additions & 0 deletions
2
CH04/Listing0417-Install specific version of Kubernetes packages.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VERSION=1.20.1-00 | ||
sudo apt-get install -y kubelet=$VERSION kubeadm=$VERSION kubectl=$VERSION |
1 change: 1 addition & 0 deletions
1
CH04/Listing0418-Mark Kubernetes packages and containerd as hold.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sudo apt-mark hold kubelet kubeadm kubectl containerd |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sudo systemctl status kubelet.service | ||
sudo systemctl status containerd.service |
2 changes: 2 additions & 0 deletions
2
CH04/Listing0420-Enable startup on reboot for kubelet and containerd.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sudo systemctl enable kubelet.service | ||
sudo systemctl enable containerd.service |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
kubeadm config print init-defaults | tee ClusterConfiguration.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
sed -i 's/ advertiseAddress: 1.2.3.4/ advertiseAddress: 172.16.94.10/' ClusterConfiguration.yaml | ||
|
||
sed -i 's/ criSocket: \/var\/run\/dockershim\.sock/ criSocket: \/run\/containerd\/containerd\.sock/' ClusterConfiguration.yaml | ||
|
||
cat <<EOF | cat >> ClusterConfiguration.yaml | ||
--- | ||
apiVersion: kubelet.config.k8s.io/v1beta1 | ||
kind: KubeletConfiguration | ||
cgroupDriver: systemd | ||
EOF |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
kubeadm version |
Oops, something went wrong.