Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker Ecosystem for Microservices (JAX 2016)

Docker Ecosystem for Microservices (JAX 2016)

**Docker Ecosystem for Microservices talk**

Here you can find my docker slide container decks from my docker and kubernetes microservice experiences :

- [JAX 2016 - Docker Ecosystem for Microservices][6].
- open slidefire presentation container with `docker run -d -p 8000:80 rossbachp/kubernetes-orchestration:Jax-2016-04`
- pdf [Docker Ecosystem for Microservices][7] is now avaiable!
- [Docker Meetup Munich 2016 - Docker Ecosystem for Microservices][4].
- open slidefire presentation container with `docker run -d -p 8000:80 rossbachp/kubernetes-orchestration:MeetupMunich-2016-02`
- pdf [Docker Ecosystem for Microservices][5] is now avaiable!
- [MicroXgn Berlin 2016 - Docker Ecosystem for Microservices][1].
- open slidefire presentation container with `docker run -d -p 8000:80 rossbachp/kubernetes-orchestration:MicroXgn-2016`
- pdf [Docker Ecosystem for Microservices][2] is now avaiable!

Open slidefire presentation container with your browser `http :8000/kubernetes-orchestration`

Feedback welcome

[Peter Rossbach][3]

[1]: http://microxchg.io/2016/index.html
[2]: https://speakerdeck.com/rossbachp/docker-ecosystem-for-microservices
[3]: http://twitter.com/PRossbach
[4]: http://www.meetup.com/de-DE/Docker-Munich/events/228226599/
[5]: https://speakerdeck.com/rossbachp/docker-ecosystem-for-microservices-munich
[6]: https://jax.de/session/infrastruktur-fuer-microservices-docker-orchestration/
[7]: https://speakerdeck.com/rossbachp/docker-ecosystem-for-microservices-jax-2016

Peter Rossbach

April 21, 2016
Tweet

More Decks by Peter Rossbach

Other Decks in Programming

Transcript

  1. 22 / 58 © 2016 <[email protected]>, @PRossbach, Docker JAX 2016-04

    $ mvn clean package $ cat >docker-compose.yml <<EOF version: "2" services: app: build: . tomcat: image: tomcat:8-jre8 ports: - "8080" volumes_from: - app links: - mysql mysql: image: mysql EOF $ docker-compose up -d --build $ docker-compose scale tomcat=2
  2. 23 / 58 © 2016 <[email protected]>, @PRossbach, Docker JAX 2016-04

    FROM java:8-jre MAINTAINER Peter Rossbach <[email protected]> ADD logback.xml /app/logback.xml ADD run.sh /app/run.sh ADD target/MyMircoService.jar /app/MyMircoService.jar RUN chmod +x /app/run.sh && mkdir -p /var/log/app WORKDIR /app VOLUME /var/log/logs CMD /app/run.sh EXPOSE 8080
  3. 24 / 58 © 2016 <[email protected]>, @PRossbach, Docker JAX 2016-04

    java -Xmx512m -Djava.security.egd=file:/dev/urandom \ -Dlogging.config=/app/logback.xml -jar /app/MyMircoService.jar
  4. 35 / 58 © 2016 <[email protected]>, @PRossbach, Docker JAX 2016-04

    apiVersion: v1 kind: ReplicationController metadata: labels: name: myservice name: myservice spec: replicas: 1 selector: name: myservice template: metadata: labels: name: myservice spec: ...
  5. 36 / 58 © 2016 <[email protected]>, @PRossbach, Docker JAX 2016-04

    ... containers: - name: myservice resources: limits: cpu: 0.5 env: - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace image: docker-registry:5000/infrabricks/myservice imagePullPolicy: Always ports: - containerPort: 8080 name: http volumeMounts: - mountPath: /var/log/app name: logs livenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 25 timeoutSeconds: 2 volumes: - name: logs emptyDir: {}
  6. 37 / 58 © 2016 <[email protected]>, @PRossbach, Docker JAX 2016-04

    apiVersion: v1 kind: Service metadata: labels: name: myservice group: frontend name: myservice-hello spec: ports: - port: 33110 targetPort: 8080 nodePort: 32110 selector: name: myservice type: NodePort
  7. 50 / 58 © 2016 <[email protected]>, @PRossbach, Docker JAX 2016-04

    $ docker run -d -p 8000:80 \ rossbachp/kubernetes-orchestration:Jax-2016-04 $ open http://<docker host>:8000/kubernetes-orchestration