mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-02-26 15:33:52 +00:00
Compare commits
38 Commits
2017-03-22
...
2017-05-18
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8ecf5a647 | ||
|
|
e9ee050386 | ||
|
|
6e59e2092c | ||
|
|
c7b0fd32bd | ||
|
|
ead4e33604 | ||
|
|
96b4f76c67 | ||
|
|
6337d49123 | ||
|
|
aec2de848b | ||
|
|
91942f22a0 | ||
|
|
93cdc9d987 | ||
|
|
13e6283221 | ||
|
|
e56bea5c16 | ||
|
|
eda499f084 | ||
|
|
ae638b8e89 | ||
|
|
5296be32ed | ||
|
|
f1cd3ba7d0 | ||
|
|
b307adee91 | ||
|
|
f4540fad78 | ||
|
|
70db794111 | ||
|
|
abafc0c8ec | ||
|
|
a7dba759a8 | ||
|
|
b14662490a | ||
|
|
9d45168752 | ||
|
|
7b3c9cd2c3 | ||
|
|
84d4a367ec | ||
|
|
bd6b37b573 | ||
|
|
e1b2a4440d | ||
|
|
1b5365d905 | ||
|
|
27ea268026 | ||
|
|
b0f566538d | ||
|
|
e637354d3e | ||
|
|
1f8c27b1aa | ||
|
|
f7d317d960 | ||
|
|
a8c54a8afd | ||
|
|
73b3752c7e | ||
|
|
d60ba2e91e | ||
|
|
6610ff178d | ||
|
|
9a9e725d5b |
@@ -1,9 +1,9 @@
|
||||
<html>
|
||||
<!-- Generated with index.html.sh -->
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; URL='https://gitter.im/jpetazzo/workshop-20170322-sanjose'" />
|
||||
<meta http-equiv="refresh" content="0; URL='https://dockercommunity.slack.com/messages/docker-mentor'" />
|
||||
</head>
|
||||
<body>
|
||||
<a href="https://gitter.im/jpetazzo/workshop-20170322-sanjose">https://gitter.im/jpetazzo/workshop-20170322-sanjose</a>
|
||||
<a href="https://dockercommunity.slack.com/messages/docker-mentor">https://dockercommunity.slack.com/messages/docker-mentor</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
LINK=https://gitter.im/jpetazzo/workshop-20170322-sanjose
|
||||
#LINK=https://dockercommunity.slack.com/messages/captains
|
||||
#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>
|
||||
|
||||
BIN
docs/extra-details.png
Normal file
BIN
docs/extra-details.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB |
1849
docs/index.html
1849
docs/index.html
File diff suppressed because it is too large
Load Diff
BIN
docs/mario-red-shell.png
Normal file
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
BIN
docs/pwd-icons.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 252 KiB |
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 \|
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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: >
|
||||
@@ -29,6 +28,6 @@ footer: >
|
||||
url: http://container.training/
|
||||
|
||||
engine_version: get.docker.com
|
||||
compose_version: 1.8.1
|
||||
machine_version: 0.8.2
|
||||
compose_version: 1.12.0
|
||||
machine_version: 0.11.0
|
||||
swarm_version: latest
|
||||
|
||||
@@ -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
|
||||
32
prepare-vms/settings/sec.yml
Normal file
32
prepare-vms/settings/sec.yml
Normal 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
|
||||
@@ -3,7 +3,7 @@ version: "3"
|
||||
services:
|
||||
rng:
|
||||
build: dockercoins/rng
|
||||
image: ${REGISTRY_SLASH-127.0.0.1:5000/}rng${COLON_TAG-:latest}
|
||||
image: ${REGISTRY-127.0.0.1:5000}/rng:${TAG-latest}
|
||||
logging:
|
||||
driver: gelf
|
||||
options:
|
||||
@@ -13,7 +13,7 @@ services:
|
||||
|
||||
hasher:
|
||||
build: dockercoins/hasher
|
||||
image: ${REGISTRY_SLASH-127.0.0.1:5000/}hasher${COLON_TAG-:latest}
|
||||
image: ${REGISTRY-127.0.0.1:5000}/hasher:${TAG-latest}
|
||||
logging:
|
||||
driver: gelf
|
||||
options:
|
||||
@@ -21,7 +21,7 @@ services:
|
||||
|
||||
webui:
|
||||
build: dockercoins/webui
|
||||
image: ${REGISTRY_SLASH-127.0.0.1:5000/}webui${COLON_TAG-:latest}
|
||||
image: ${REGISTRY-127.0.0.1:5000}/webui:${TAG-latest}
|
||||
logging:
|
||||
driver: gelf
|
||||
options:
|
||||
@@ -38,7 +38,7 @@ services:
|
||||
|
||||
worker:
|
||||
build: dockercoins/worker
|
||||
image: ${REGISTRY_SLASH-127.0.0.1:5000/}worker${COLON_TAG-:latest}
|
||||
image: ${REGISTRY-127.0.0.1:5000}/worker:${TAG-latest}
|
||||
logging:
|
||||
driver: gelf
|
||||
options:
|
||||
|
||||
@@ -3,17 +3,17 @@ version: "3"
|
||||
services:
|
||||
rng:
|
||||
build: dockercoins/rng
|
||||
image: ${REGISTRY_SLASH-127.0.0.1:5000/}rng${COLON_TAG-:latest}
|
||||
image: ${REGISTRY-127.0.0.1:5000}/rng:${TAG-latest}
|
||||
deploy:
|
||||
mode: global
|
||||
|
||||
hasher:
|
||||
build: dockercoins/hasher
|
||||
image: ${REGISTRY_SLASH-127.0.0.1:5000/}hasher${COLON_TAG-:latest}
|
||||
image: ${REGISTRY-127.0.0.1:5000}/hasher:${TAG-latest}
|
||||
|
||||
webui:
|
||||
build: dockercoins/webui
|
||||
image: ${REGISTRY_SLASH-127.0.0.1:5000/}webui${COLON_TAG-:latest}
|
||||
image: ${REGISTRY-127.0.0.1:5000}/webui:${TAG-latest}
|
||||
ports:
|
||||
- "8000:80"
|
||||
|
||||
@@ -22,7 +22,7 @@ services:
|
||||
|
||||
worker:
|
||||
build: dockercoins/worker
|
||||
image: ${REGISTRY_SLASH-127.0.0.1:5000/}worker${COLON_TAG-:latest}
|
||||
image: ${REGISTRY-127.0.0.1:5000}/worker:${TAG-latest}
|
||||
deploy:
|
||||
replicas: 10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user