curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
docker-machine create --driver virtualbox mydocker
docker run -it -p 8080:8080 jboss/wildfly
Access at http://<IP_ADDRESS>:8080/.
-
Create multiple machine
-
One application server on each machine
This section will explain how an Application Server and a Database server can be used to deploy an application.
docker run -it -p 8080:8080 arungupta/javaee7-hol
Access at http://<IP_ADDRESS>:8080/movieplex7.
docker run --name mysqldb -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_DATABASE=sample -e MYSQL_ROOT_PASSWORD=supersecret -d mysql
docker run --name mywildfly --link mysqldb:db -p 8080:8080 -d arungupta/wildfly-mysql-javaee7
docker-machine ip
curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose up -d
docker-compose ps
docker-compose logs
docker-machine ip
curl http://<IP_ADDRESS>:8080/employees/resources/employees/
docker create --name mysql_data -v /var/lib/mysql mysql
docker run --name mysqldb --volumes-from mysql_data -v /var/lib/mysql:/var/lib/mysql -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -e MYSQL_DATABASE=sample -e MYSQL_ROOT_PASSWORD=supersecret -it -p 3306:3306 mysql
What are the different clustering frameworks? Where do they excel? Can they work with each other? Do they need to work with each other? Pros/cons of each framework?
Framework | Pros | Cons |
---|---|---|
Swarm |
||
Kubernetes |
||
Mesos |
||
Juju |
docker run swarm create
docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://$TOKEN swarm-master
eval $(docker-machine env swarm-master)
docker info
docker-machine create -d virtualbox --swarm --swarm-discovery token://$TOKEN swarm-node-01
docker-machine create -d virtualbox --swarm --swarm-discovery token://$TOKEN swarm-node-02
docker-machine ls
docker info
docker ps
eval $(docker-machine env --swarm swarm-master)
docker run -it -p 8080:8080 arungupta/javaee7-hol
docker ps
IDE | Pros | Cons |
---|---|---|
Eclipse |
||
NetBeans |
||
IntelliJ |
What support is offered by the three major IDEs to enable application development on Docker?
How do you test applications running using Docker?
What does it take to run Docker images on PaaS?
PaaS | Pros | Cons |
---|---|---|
OpenShift |
||
Amazon |
||
This section will explain how different components of a typical Java EE application can be setup using Docker.