Compare commits

..

64 Commits

Author SHA1 Message Date
Jérôme Petazzoni
a4e62e0880 Last updates for dod msp 2017-07-25 11:55:22 -05:00
Jérôme Petazzoni
b2941ce447 Add details about least privilege model 2017-07-24 23:48:29 -05:00
Jérôme Petazzoni
84c88ed4c2 short version for DoD MSP 2017-07-24 15:34:06 -05:00
Jérôme Petazzoni
0d7ee1dda0 Merge branch 'alexellis-alexellis-patch-sol' 2017-07-12 13:41:45 +02:00
Jérôme Petazzoni
243d585432 Add a few details about what happens when losing the sole manager 2017-07-12 13:41:37 +02:00
Alex Ellis
f5fe7152f3 Internationalisation
I had no idea what SOL was - had to google this on Urban Dictionary :-/ have put an internationalisation in and retained the colliqualism in brackets.
2017-07-11 19:00:23 +01:00
Jérôme Petazzoni
94d9ad22d0 Add ngrep details when using PWD or Vagrant re/ interface selection (closes #84) 2017-07-11 19:51:00 +02:00
Jérôme Petazzoni
0af160e0a8 Merge pull request #82 from adulescentulus/fix_visualizer_exercise
(some) wrong instructions
2017-06-17 09:31:31 -07:00
Andreas Groll
1fdb7b8077 added missing stackname 2017-06-12 15:25:35 +02:00
Andreas Groll
d2b67c426e you only can connect to the ip where you started your visualizer 2017-06-12 12:07:59 +02:00
Jérôme Petazzoni
a84cc36cd8 Update installation method 2017-06-09 18:16:29 +02:00
Jerome Petazzoni
c8ecf5a647 PYCON final check! 2017-05-17 18:14:33 -07:00
Jerome Petazzoni
e9ee050386 Explain extra details 2017-05-17 15:56:28 -07:00
Jerome Petazzoni
6e59e2092c Merge branch 'master' of github.com:jpetazzo/orchestration-workshop 2017-05-17 15:00:42 -07:00
Jerome Petazzoni
c7b0fd32bd Add detail about ASGs 2017-05-17 15:00:31 -07:00
Jérôme Petazzoni
ead4e33604 Merge pull request #79 from jliu70/oscon2017
fix typo
2017-05-17 14:31:26 -07:00
Jérôme Petazzoni
96b4f76c67 Backport all changes from OSCON 2017-05-17 00:17:24 -05:00
Jeff Liu
6337d49123 fix typo 2017-05-08 10:21:51 -05:00
Jerome Petazzoni
aec2de848b Rename docker-compose files to keep .yml extension (fixes #69) 2017-05-03 12:44:17 -07:00
Jérôme Petazzoni
91942f22a0 Merge pull request #73 from everett-toews/cd-to-snap
Change to the snap dir first
2017-05-03 14:36:52 -05:00
Jérôme Petazzoni
93cdc9d987 Merge pull request #72 from everett-toews/fix-worker-service-name
Fix the dockercoins_worker service name
2017-05-03 14:36:27 -05:00
Jérôme Petazzoni
13e6283221 Merge pull request #71 from everett-toews/netshoot
Consistent use of the netshoot image
2017-05-03 14:35:54 -05:00
Jerome Petazzoni
e56bea5c16 Update Swarm visualizer information 2017-05-03 12:36:09 -07:00
Jerome Petazzoni
eda499f084 Fix link to Raft (thanks @kchien) - fixes #74 2017-05-03 12:20:45 -07:00
Jerome Petazzoni
ae638b8e89 Minor updates before GOTO 2017-05-03 11:46:35 -07:00
Jerome Petazzoni
5296be32ed Handle untagged resources 2017-05-03 11:26:47 -07:00
Jerome Petazzoni
f1cd3ba7d0 Remove rc.yaml 2017-05-03 10:02:36 -07:00
Jérôme Petazzoni
b307adee91 Last updates
Conflicts:
	docs/index.html
2017-05-03 09:34:42 -07:00
Jérôme Petazzoni
f4540fad78 Update describe-instances for awscli 1.11 (thanks @mikegcoleman for finding that bug!) 2017-05-03 09:15:45 -07:00
Jérôme Petazzoni
70db794111 Simplify stackfiles 2017-04-16 23:56:30 -05:00
Jérôme Petazzoni
abafc0c8ec Add swarm-rafttool 2017-04-16 23:47:56 -05:00
Everett Toews
a7dba759a8 Change to the snap dir first 2017-04-16 14:34:49 -05:00
Everett Toews
b14662490a Fix the dockercoins_worker service name 2017-04-16 13:23:54 -05:00
Everett Toews
9d45168752 Consistent use of the netshoot image 2017-04-16 13:16:02 -05:00
Jérôme Petazzoni
7b3c9cd2c3 Add @alexmavr/swarm-nbt (FTW!) 2017-04-15 18:29:32 -05:00
Jérôme Petazzoni
84d4a367ec Mention --filter for docker service ps 2017-04-15 17:45:24 -05:00
Jérôme Petazzoni
bd6b37b573 Add @manomarks' Swarm viz tool 2017-04-15 17:21:38 -05:00
Jérôme Petazzoni
e1b2a4440d Update docker service logs; --detach=false 2017-04-14 15:39:52 -05:00
Jérôme Petazzoni
1b5365d905 Update settings; add security workshop 2017-04-14 15:39:24 -05:00
Jérôme Petazzoni
27ea268026 Automatically resolve AMI ID to use 2017-04-14 15:32:03 -05:00
Jérôme Petazzoni
b0f566538d Re-add useful self-paced slides 2017-03-31 21:49:57 -05:00
Jerome Petazzoni
e637354d3e Fix TOC and minor tweaks 2017-03-31 21:41:24 -05:00
Jerome Petazzoni
1f8c27b1aa Update deployed versions 2017-03-31 21:40:05 -05:00
Jerome Petazzoni
f7d317d960 Backporting Devoxx updates 2017-03-31 21:39:48 -05:00
Jérôme Petazzoni
a8c54a8afd Update chat links 2017-03-31 21:36:08 -05:00
Jerome Petazzoni
73b3752c7e Change chat links 2017-03-31 21:33:12 -05:00
Jérôme Petazzoni
d60ba2e91e Merge pull request #68 from hknust/master
Service name should be dockercoins_worker not worker
2017-03-30 17:11:37 -05:00
Jérôme Petazzoni
d480f5c26a Clarify node switching commands 2017-03-20 19:30:38 -07:00
Jérôme Petazzoni
540aa91f48 Hotfix JS file 2017-03-10 16:46:51 -06:00
Jérôme Petazzoni
8f3c0da385 Use our custom fork of remark; updates for Docker Birthday 2017-03-10 16:40:48 -06:00
Holger Knust
6610ff178d Fixed typo on slide. Attempts instead of attemps 2017-03-04 23:13:35 -08:00
Holger Knust
9a9e725d5b Service name should be dockercoins_worker not worker 2017-03-04 11:29:01 -08:00
Jérôme Petazzoni
09cabc556e Update for SCALE 15x 2017-03-02 16:38:59 -08:00
Jérôme Petazzoni
44f4017992 Switch from localhost to 127.0.0.1 (to work around some weird DNS issues) 2017-03-02 14:06:59 -08:00
Jérôme Petazzoni
6f85ff7824 Reorganize advanced content for Docker Birthday 2017-02-16 15:16:06 -06:00
Jérôme Petazzoni
514ac69a8f Ship part 1 for Docker Birthday 2017-02-15 00:03:01 -06:00
Jérôme Petazzoni
7418691249 Rework intro for self-guided workshop 2017-02-14 10:15:27 -06:00
Jérôme Petazzoni
4d2289b2d2 Add details about authorization plugins 2017-02-09 12:33:55 -06:00
Jerome Petazzoni
e0956be92c Add link target for logging 2017-01-20 16:24:15 -08:00
Jérôme Petazzoni
d623f76a02 add note on API scope 2017-01-13 19:29:22 -06:00
Jérôme Petazzoni
dd555af795 update section about restart condition 2017-01-13 17:59:57 -06:00
Jérôme Petazzoni
a2da3f417b update secret section 2017-01-13 17:35:45 -06:00
Jérôme Petazzoni
d129b37781 minor updates, including services ps -a flag 2017-01-13 16:22:58 -06:00
Jérôme Petazzoni
849ea6e576 improve LB demo a bit 2017-01-13 16:04:53 -06:00
24 changed files with 5497 additions and 3623 deletions

9
docs/chat/index.html Normal file
View File

@@ -0,0 +1,9 @@
<html>
<!-- Generated with index.html.sh -->
<head>
<meta http-equiv="refresh" content="0; URL='https://dockercommunity.slack.com/messages/docker-mentor'" />
</head>
<body>
<a href="https://dockercommunity.slack.com/messages/docker-mentor">https://dockercommunity.slack.com/messages/docker-mentor</a>
</body>
</html>

16
docs/chat/index.html.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
#LINK=https://gitter.im/jpetazzo/workshop-20170322-sanjose
LINK=https://dockercommunity.slack.com/messages/docker-mentor
#LINK=https://usenix-lisa.slack.com/messages/docker
sed "s,@@LINK@@,$LINK,g" >index.html <<EOF
<html>
<!-- Generated with index.html.sh -->
<head>
<meta http-equiv="refresh" content="0; URL='$LINK'" />
</head>
<body>
<a href="$LINK">$LINK</a>
</body>
</html>
EOF

BIN
docs/extra-details.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because it is too large Load Diff

BIN
docs/lifecycle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
docs/mario-red-shell.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
docs/pwd-icons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

21
docs/remark.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 266 KiB

After

Width:  |  Height:  |  Size: 266 KiB

View File

@@ -4,22 +4,12 @@ source scripts/cli.sh
aws_display_tags(){
# Print all "Name" tags in our region with their instance count
echo "[#] [Status] [Tag]" | awk '{ printf " %7s %8s %10s \n", $1, $2, $3}'
aws ec2 describe-instances --filter "Name=tag:Name,Values=[*]" \
--query "Reservations[*].Instances[*].[{Tags:Tags[0].Value,State:State.Name}]" \
| awk '{ printf " %-13s %-10s %-1s\n", $1, $2, $3}' \
| uniq -c \
| sort -k 3
}
aws_display_tokens(){
# Print all tokens in our region with their instance count
echo "[#] [Token] [Tag]" | awk '{ printf " %7s %12s %30s\n", $1, $2, $3}'
# --query 'Volumes[*].{ID:VolumeId,AZ:AvailabilityZone,Size:Size}'
aws ec2 describe-instances --output text \
--query 'Reservations[*].Instances[*].{ClientToken:ClientToken,Tags:Tags[0].Value}' \
| awk '{ printf " %7s %12s %50s\n", $1, $2, $3}' \
| sort \
echo "[#] [Status] [Token] [Tag]" \
| awk '{ printf " %7s %-12s %-25s %-25s\n", $1, $2, $3, $4}'
aws ec2 describe-instances \
--query "Reservations[*].Instances[*].[State.Name,ClientToken,Tags[0].Value]" \
| tr -d "\r" \
| awk '{ printf " %-12s %-25s %-25s\n", $1, $2, $3}' \
| uniq -c \
| sort -k 3
}
@@ -66,20 +56,24 @@ aws_display_instances_by_tag() {
fi
}
aws_get_instance_ids_by_filter() {
FILTER=$1
aws ec2 describe-instances --filters $FILTER \
--query Reservations[*].Instances[*].InstanceId \
--output text | tr "\t" "\n" | tr -d "\r"
}
aws_get_instance_ids_by_client_token() {
TOKEN=$1
need_tag $TOKEN
aws ec2 describe-instances --filters "Name=client-token,Values=$TOKEN" \
| grep ^INSTANCE \
| awk '{print $8}'
aws_get_instance_ids_by_filter Name=client-token,Values=$TOKEN
}
aws_get_instance_ids_by_tag() {
TAG=$1
need_tag $TAG
aws ec2 describe-instances --filters "Name=tag:Name,Values=$TAG" \
| grep ^INSTANCE \
| awk '{print $8}'
aws_get_instance_ids_by_filter Name=tag:Name,Values=$TAG
}
aws_get_instance_ips_by_tag() {

View File

@@ -10,21 +10,12 @@ die () {
need_tag(){
TAG=$1
if [ -z "$TAG" ]; then
echo "Please specify a tag. Here's the list: "
echo "Please specify a tag or token. Here's the list: "
aws_display_tags
die
fi
}
need_token(){
TOKEN=$1
if [ -z "$TOKEN" ]; then
echo "Please specify a token. Here's the list: "
aws_display_tokens
die
fi
}
need_ips_file() {
IPS_FILE=$1
if [ -z "$IPS_FILE" ]; then

View File

@@ -3,7 +3,7 @@
usage() {
cat >&2 <<__
usage: find-ubuntu-ami.sh [ <filter>... ] [ <sorting> ]
usage: find-ubuntu-ami.sh [ <filter>... ] [ <sorting> ] [ <options> ]
where:
<filter> is pair of key and substring to search
-r <region>
@@ -14,7 +14,7 @@ where:
-d <date>
-i <image>
-k <kernel>
<sorting> is on of:
<sorting> is one of:
-R by region
-N by name
-V by version
@@ -23,6 +23,8 @@ where:
-D by date
-I by image
-K by kernel
<options> can be:
-q just show AMI
protip for Docker orchestration workshop admin:
./find-ubuntu-ami.sh -t hvm:ebs -r \$AWS_REGION -v 15.10 -N
@@ -30,7 +32,7 @@ __
exit 1
}
args=`getopt hr:n:v:a:t:d:i:k:RNVATDIK $*`
args=`getopt hr:n:v:a:t:d:i:k:RNVATDIKq $*`
if [ $? != 0 ] ; then
echo >&2
usage
@@ -47,6 +49,8 @@ kernel=
sort=date
quiet=
set -- $args
for a ; do
case "$a" in
@@ -69,6 +73,8 @@ for a ; do
-D) sort=date ;;
-I) sort=image ;;
-K) sort=kernel ;;
-q) quiet=y ;;
--) shift ; break ;;
*) continue ;;
@@ -119,13 +125,17 @@ escape_spaces() {
url=http://cloud-images.ubuntu.com/locator/ec2/releasesTable
{
echo REGION NAME VERSION ARCH TYPE DATE IMAGE KERNEL
[ "$quiet" ] || echo REGION NAME VERSION ARCH TYPE DATE IMAGE KERNEL
curl -s $url | fix_json | jq "`jq_query`" | trim_quotes | escape_spaces | tr \| ' '
} |
while read region name version arch type date image kernel ; do
image=${image%<*}
image=${image#*>}
echo "$region|$name|$version|$arch|$type|$date|$image|$kernel"
if [ "$quiet" ]; then
echo $image
else
echo "$region|$name|$version|$arch|$type|$date|$image|$kernel"
fi
done | column -t -s \|

View File

@@ -123,7 +123,12 @@ system("echo 1000000 | sudo tee /proc/sys/net/nf_conntrack_max")
#######################
# This will install the latest Docker.
system("curl --silent https://{}/ | grep -v '( set -x; sleep 20 )' | sudo sh".format(ENGINE_VERSION))
#system("curl --silent https://{}/ | grep -v '( set -x; sleep 20 )' | sudo sh".format(ENGINE_VERSION))
system("sudo apt-get -qy install apt-transport-https ca-certificates curl software-properties-common")
system("curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -")
system("sudo add-apt-repository 'deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial {}'".format(ENGINE_VERSION))
system("sudo apt-get -q update")
system("sudo apt-get -qy install docker-ce")
### Install docker-compose
#system("sudo pip install -U docker-compose=={}".format(COMPOSE_VERSION))
@@ -142,8 +147,8 @@ system("sudo apt-get -qy install python-setuptools pssh apache2-utils httping ht
system("while ! sudo -u docker docker version ; do sleep 2; done")
### Install Swarm
system("docker pull swarm:{}".format(SWARM_VERSION))
system("docker tag -f swarm:{} swarm".format(SWARM_VERSION))
#system("docker pull swarm:{}".format(SWARM_VERSION))
#system("docker tag -f swarm:{} swarm".format(SWARM_VERSION))
### BEGIN CLUSTERING ###
@@ -197,5 +202,5 @@ pssh "grep docker@ /home/docker/.ssh/authorized_keys \
| sudo -u docker tee -a /home/docker/.ssh/authorized_keys"
# On node1, create and deploy TLS certs using Docker Machine
pssh "if grep -q node1 /tmp/node; then grep ' node' /etc/hosts | xargs -n2 sudo -H -u docker docker-machine create -d generic --generic-ssh-user docker --generic-ip-address; fi"
#pssh "if grep -q node1 /tmp/node; then grep ' node' /etc/hosts | xargs -n2 sudo -H -u docker docker-machine create -d generic --generic-ssh-user docker --generic-ip-address; fi"

View File

@@ -192,7 +192,7 @@ sync_keys() {
}
suggest_amis() {
scripts/find-ubuntu-ami.sh -r $AWS_DEFAULT_REGION -a amd64 -v 16.04 -t hvm:ebs -N
scripts/find-ubuntu-ami.sh -r $AWS_DEFAULT_REGION -a amd64 -v 16.04 -t hvm:ebs -N -q
}
get_token() {
@@ -203,30 +203,7 @@ get_token() {
}
get_ami() {
# using find-ubuntu-ami script in `trainer-tools/scripts`:
#AMI=$(./scripts/find-ubuntu-ami.sh -r $AWS_DEFAULT_REGION -a amd64 -v 15.10 -t hvm:ebs -N | grep -v ^REGION | head -1 | awk '{print $7}')
#AMI=$(suggest_amis | grep -v ^REGION | head -1 | awk '{print $7}')
case $AWS_DEFAULT_REGION in
eu-central-1)
AMI=ami-82cf0aed
;;
eu-west-1)
AMI=ami-07174474
;;
us-east-1)
AMI=ami-2808313f
;;
us-east-2)
AMI=ami-1b772d7e
;;
us-west-1)
AMI=ami-dab5e0ba
;;
us-west-2)
AMI=ami-9ee24ffe
;;
esac
echo $AMI
suggest_amis | head -1
}

View File

@@ -10,8 +10,7 @@ instance_password: training
clustersize: 5 # Number of VMs per cluster
pagesize: 12 # Number of cards to print per page
background_image: https://www.docker.com/sites/default/files/Engine.png
#background_image: ../media/swarm.png
background_image: https://cdn.wp.nginx.com/wp-content/uploads/2016/07/docker-swarm-hero2.png
# To be printed on the cards:
blurb: >
@@ -28,7 +27,7 @@ footer: >
url: http://container.training/
engine_version: get.docker.com
compose_version: 1.8.1
machine_version: 0.8.2
engine_version: stable
compose_version: 1.12.0
machine_version: 0.12.2
swarm_version: latest

View File

@@ -1,35 +0,0 @@
# This file is passed by trainer-cli to scripts/ips-txt-to-html.py
workshop_name: Advanced Docker Orchestration
workshop_short_name: orchestration
repo: https://github.com/jpetazzo/orchestration-workshop
instance_login: docker
instance_password: training
clustersize: 5 # Number of VMs per cluster
pagesize: 12 # Number of cards to print per page
#background_image: https://myapps.developer.ubuntu.com/site_media/appmedia/2014/12/swarm.png
background_image: http://www.yellosoft.us/public/images/docker.png
#background_image: ../media/swarm.png
# To be printed on the cards:
blurb: >
Here is the connection information to your very own
{cluster_or_machine} for this {workshop_name} workshop. You can connect
to {this_or_each} VM with any SSH client.
Your {machine_is_or_machines_are}:
# {url} will be replaced by the script
footer: >
<p>For slides, chat and other useful links, see: </p>
<center>{url}</center>
url: http://container.training/
engine_version: test.docker.com
compose_version: 1.9.0
machine_version: 0.9.0-rc1
swarm_version: latest

View File

@@ -0,0 +1,32 @@
# This file is passed by trainer-cli to scripts/ips-txt-to-html.py
workshop_name: Advanced Docker Orchestration
workshop_short_name: orchestration
repo: https://github.com/jpetazzo/orchestration-workshop
instance_login: docker
instance_password: training
clustersize: 3 # Number of VMs per cluster
pagesize: 12 # Number of cards to print per page
background_image: https://blog.docker.com/media/2015/08/notary.png
# To be printed on the cards:
blurb: >
Here is the connection information to your
three Docker nodes for the Security
Workshop. You can connect to each VM with
any SSH client.
Your {machine_is_or_machines_are}:
# {url} will be replaced by the script
footer: ""
url: http://container.training/
engine_version: get.docker.com
compose_version: 1.12.0
machine_version: 0.10.0
swarm_version: latest

View File

@@ -1,5 +1,5 @@
global:
scrape_interval: 1s
scrape_interval: 10s
scrape_configs:
- job_name: 'prometheus'
static_configs:

View File

@@ -2,7 +2,7 @@
"version": 1,
"schedule": {
"type": "simple",
"interval": "1s"
"interval": "10s"
},
"max-failures": 10,
"workflow": {

View File

@@ -0,0 +1,48 @@
version: "3"
services:
rng:
build: dockercoins/rng
image: ${REGISTRY-127.0.0.1:5000}/rng:${TAG-latest}
logging:
driver: gelf
options:
gelf-address: udp://127.0.0.1:12201
deploy:
mode: global
hasher:
build: dockercoins/hasher
image: ${REGISTRY-127.0.0.1:5000}/hasher:${TAG-latest}
logging:
driver: gelf
options:
gelf-address: udp://127.0.0.1:12201
webui:
build: dockercoins/webui
image: ${REGISTRY-127.0.0.1:5000}/webui:${TAG-latest}
logging:
driver: gelf
options:
gelf-address: udp://127.0.0.1:12201
ports:
- "8000:80"
redis:
image: redis
logging:
driver: gelf
options:
gelf-address: udp://127.0.0.1:12201
worker:
build: dockercoins/worker
image: ${REGISTRY-127.0.0.1:5000}/worker:${TAG-latest}
logging:
driver: gelf
options:
gelf-address: udp://127.0.0.1:12201
deploy:
replicas: 10

View File

@@ -3,46 +3,26 @@ version: "3"
services:
rng:
build: dockercoins/rng
image: ${REGISTRY_SLASH-localhost:5000/}rng${COLON_TAG-:latest}
logging:
driver: gelf
options:
gelf-address: udp://localhost:12201
image: ${REGISTRY-127.0.0.1:5000}/rng:${TAG-latest}
deploy:
mode: global
hasher:
build: dockercoins/hasher
image: ${REGISTRY_SLASH-localhost:5000/}hasher${COLON_TAG-:latest}
logging:
driver: gelf
options:
gelf-address: udp://localhost:12201
image: ${REGISTRY-127.0.0.1:5000}/hasher:${TAG-latest}
webui:
build: dockercoins/webui
image: ${REGISTRY_SLASH-localhost:5000/}webui${COLON_TAG-:latest}
logging:
driver: gelf
options:
gelf-address: udp://localhost:12201
image: ${REGISTRY-127.0.0.1:5000}/webui:${TAG-latest}
ports:
- "8000:80"
redis:
image: redis
logging:
driver: gelf
options:
gelf-address: udp://localhost:12201
worker:
build: dockercoins/worker
image: ${REGISTRY_SLASH-localhost:5000/}worker${COLON_TAG-:latest}
logging:
driver: gelf
options:
gelf-address: udp://localhost:12201
image: ${REGISTRY-127.0.0.1:5000}/worker:${TAG-latest}
deploy:
replicas: 10

View File

@@ -4,7 +4,7 @@ services:
prometheus:
build: ../prom
image: localhost:5000/prom
image: 127.0.0.1:5000/prom
ports:
- "9090:9090"