Skip to content

Commit

Permalink
Merging changes from Silicon Valley Code Camp (docker#66)
Browse files Browse the repository at this point in the history
* updating slides after JavaOne and SVCC 2016

* fixing docker#60

* docker#63

* fixing docker#62

* fixing docker#64
  • Loading branch information
arun-gupta authored and Mano Marks committed Oct 2, 2016
1 parent 5f927b9 commit 168bb2c
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 73 deletions.
4 changes: 2 additions & 2 deletions java/chapters/ch01-setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ ubuntu:
image: ubuntu
busybox:
image: busybox
java:
image: java
openjdk:
image: openjdk
wildfly:
image: jboss/wildfly
mysql:
Expand Down
12 changes: 6 additions & 6 deletions java/chapters/ch03-build-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,24 @@ Pull the latest Docker image for Java:

[source, text]
----
docker pull java
docker pull openjdk
----

Run the container in an interactive manner:

[source, text]
----
docker run -it java
docker run -it openjdk
----

Check the version of Java:

[source, text]
----
root@44b355b45ab1:/# java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-1~bpo8+1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
root@e6eb7c32b32d:/# java -version
openjdk version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-8u102-b14.1-1~bpo8+1-b14)
OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
----

A different version may be seen in your case. Exit out of the container by typing `exit` in the shell.
Expand Down
4 changes: 2 additions & 2 deletions java/chapters/ch05-compose.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Complete set of REST APIs for this application are explained at https://github.c

== Stop Application

The application can be stopped using `docker-compose stop` command. This will remove the containers for each service defined in the Compose file, networks defined in the `networks` section of the Compose file, and the default network, if one is used.
The application can be stopped using `docker-compose down` command. This will remove the containers for each service defined in the Compose file. It will also remove the networks defined in the `networks` section of the Compose file.

Remove the application as:

Expand All @@ -218,7 +218,7 @@ Removing javaee_db_1 ... done
Removing network javaee_default
----

Alternatively, services can be stopped using `docker-compose stop` command:
Alternatively, only services can be stopped using `docker-compose stop` command:

[source, text]
----
Expand Down
88 changes: 25 additions & 63 deletions java/chapters/ch06-swarm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,97 +17,60 @@ Initialize Swarm mode using the following command:

This starts a Swarm Manager. By default, manager node are also worker but can be configured to be manager-only.

Find some information about this one-node cluster as `docker swarm inspect`

[source, json]
----
[
{
"ID": "1j4c4vjtg3av5cd1g9cy74x09",
"Version": {
"Index": 11
},
"CreatedAt": "2016-07-15T20:51:55.579236936Z",
"UpdatedAt": "2016-07-15T20:51:55.814661065Z",
"Spec": {
"Name": "default",
"AcceptancePolicy": {
"Policies": [
{
"Role": "worker",
"Autoaccept": true,
"Secret": "$2a$10$hWcg9QOi9Bsf2tWHf1bs5eK5URRqbiTSaqXCXm7sJBnGurHkLLnm6"
},
{
"Role": "manager",
"Autoaccept": false,
"Secret": "$2a$10$hWcg9QOi9Bsf2tWHf1bs5eK5URRqbiTSaqXCXm7sJBnGurHkLLnm6"
}
]
},
"Orchestration": {
"TaskHistoryRetentionLimit": 10
},
"Raft": {
"SnapshotInterval": 10000,
"LogEntriesForSlowFollowers": 500,
"HeartbeatTick": 1,
"ElectionTick": 3
},
"Dispatcher": {
"HeartbeatPeriod": 5000000000
},
"CAConfig": {
"NodeCertExpiry": 7776000000000000
}
}
}
]
----

Get information about the cluster using the `docker info` command:
Find some information about this one-node cluster using the command `docker info`

[source, text]
----
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 11
Server Version: 1.12.0-rc4
Images: 38
Server Version: 1.12.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 227
Dirs: 321
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge overlay null host
Network: host bridge overlay null
Swarm: active
NodeID: cr3bg6fkm6konsecfs4vchun6
IsManager: Yes
NodeID: 3sfo3bo6n8vhqzh0r18c2m6f4
Is Manager: true
ClusterID: 9nt6u2xaqsq2j5sb4jzmk4rea
Managers: 1
Nodes: 1
CACertHash: sha256:4b43440f4138461747970ac7cd5234d1b7f9c29a01fdc2eaf04356572828974f
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Node Address: 192.168.65.2
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.15-moby
Kernel Version: 4.4.20-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.954 GiB
Total Memory: 1.952 GiB
Name: moby
ID: OV7G:VQ4V:XVE6:VRRZ:OYIK:2ATM:R7E7:2MKC:43ZV:NUA2:TVVL:7W26
ID: EZSJ:SFEA:65NS:CWJI:NHP4:TFHE:HF43:X6KR:FD2T:GHUQ:QN6T:N72P
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 37
Goroutines: 136
System Time: 2016-07-15T21:25:31.648058268Z
File Descriptors: 35
Goroutines: 121
System Time: 2016-09-30T20:54:22.545443508Z
EventsListeners: 1
No Proxy: *.local, 169.254/16
Username: arungupta
Expand Down Expand Up @@ -215,7 +178,6 @@ composeswarm_db_1 /entrypoint.sh couchbase-s ...
composeswarm_web_1 /opt/jboss/wildfly/bin/sta ... Up 0.0.0.0:8080->8080/tcp,
0.0.0.0:9990->9990/tcp
----
====
== Configure Couchbase server
Expand Down
Binary file modified slides/docker-introduction.key
Binary file not shown.
Binary file modified slides/docker-introduction.pdf
Binary file not shown.

0 comments on commit 168bb2c

Please sign in to comment.