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 https://github.com/Microsoft/Virtualization-Documentation/blob/live/windows-server-container-tools/Debug-ContainerHost/Debug-ContainerHost.ps1#L175 | |
Write-Output "Warnings & errors from the last 24 hours" | |
$logStartTime = (Get-Date).AddHours(-24) | |
$logNames = "Microsoft-Windows-Containers-Wcifs/Operational", | |
"Microsoft-Windows-Containers-Wcnfs/Operational", | |
"Microsoft-Windows-Hyper-V-Compute-Admin", | |
"Microsoft-Windows-Hyper-V-Compute-Operational", | |
"Application" | |
$levels = 3,2,1,0 |
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 | |
# create directory for bundle in persistent storage | |
cd /var/lib/jenkins | |
mkdir ucp-bundle | |
cd ucp-bundle | |
set -e | |
# set variables for getting client bundle |
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 a list of all running containers by name | |
for CONTAINER_NAME in $(docker ps --filter status=running --format '{{ .Names }}') | |
do | |
# get a list of the processes running in the container where the process is running as root | |
ROOT_PROCESSES="$(docker top ${CONTAINER_NAME} -o user,pid,ppid,command -U root -u root)" | |
# check and see if there are processes running as root; if not, do not display anything | |
if [ "$(echo "${ROOT_PROCESSES}" | grep ^root &>/dev/null; echo $?)" -eq "0" ] |
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
for i in $(docker ps -aq) | |
do | |
echo -n "Volumes for ${i}: " | |
docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' ${i} | |
done |
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: "2" | |
services: | |
app1: | |
image: alpine:latest | |
command: ping app2 | |
networks: | |
- discovery-demo | |
app2: | |
image: alpine: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
### debian 8 (jessie) | |
mkdir /etc/systemd/system/[email protected] &&\ | |
echo '[Service] | |
Environment="TERM=xterm"' > /etc/systemd/system/[email protected]/xterm.conf | |
systemctl daemon-reload &&\ | |
systemctl enable [email protected] &&\ | |
systemctl start [email protected] &&\ | |
systemctl status [email protected] |
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 | |
# Dependencies: | |
# - awscli see https://docs.aws.amazon.com/cli/latest/userguide/installing.html for installation instructions | |
# - jq typically found as the package 'jq' on most distros | |
# AWS API keys | |
#AWS_ACCESS_KEY_ID="" | |
#AWS_SECRET_ACCESS_KEY="" |
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
[root@ip-10-94-116-145 ec2-user]# sudo bash -c "$(sudo docker run docker/trusted-registry install)" | |
Unable to find image 'docker/trusted-registry:latest' locally | |
latest: Pulling from docker/trusted-registry | |
c63fb41c2213: Pulling fs layer | |
99fcaefe76ef: Pulling fs layer | |
5a4526e952f0: Pulling fs layer | |
1d073211c498: Pulling fs layer | |
202ea39d40d6: Pulling fs layer | |
6082dfdb8050: Pulling fs layer | |
ccb2a8e69485: Pulling fs layer |
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
### tp4 | |
wget -uri https://aka.ms/tp4/Install-ContainerHost -OutFile C:\Install-ContainerHost.ps1 | |
.\Install-ContainerHost.ps1 | |
### tp5 | |
wget -uri https://aka.ms/tp5/Install-ContainerHost -OutFile C:\Install-ContainerHost.ps1 | |
Install-ContainerImage WindowsServerCore -ErrorAction Stop | |
.\Install-ContainerHost.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
# install the kernel from utopic (on both nodes) | |
apt-get install -y linux-image-generic-lts-utopic | |
reboot | |
# install experimental docker release (on both nodes) | |
wget -qO- https://experimental.docker.com/ | sh | |
# install consul (on both nodes) | |
curl -OL https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip | |
apt-get install -y unzip |