Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Adf with docker

426 views

Published on

Presentation from OOW2018

Published in: Software
  • Be the first to comment

  • Be the first to like this

Adf with docker

  1. 1. Develop, Deliver, Run Oracle ADF applications with Docker Eugene Fedorenko
  2. 2. About me Eugene Fedorenko Senior Architect Flexagon adfpractice-fedor.blogspot.com @fisbudo
  3. 3. Agenda •Sample application •Containers •Docker •Build containers •Kubernetes •Deploy to the cloud •OKE •CD Pipeline
  4. 4. Sample Application
  5. 5. Simple Development Lifecycle
  6. 6. Environments challenge DEV TEST PROD
  7. 7. The Idea. Virtual Machine
  8. 8. Container •A lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. •Containers share the host operating system rather than the hardware directly •Way more lightweight than a VM •Docker is the most popular implementation
  9. 9. Docker Container Manager
  10. 10. Docker vs VM
  11. 11. FlexDeploy Container
  12. 12. • Production • PoC • New features in a beta version • Trainings, HoLs, Tutorials • Automated Testing • Easy to pull, start, throw away • Preinstalled data Application in a Container
  13. 13. FlexDeploy + DB Container
  14. 14. FlexDeploy Base Image
  15. 15. FlexDeploy Base Image • jdk1.8.0_171 • tcat85 • … • lib • conf/context.xml • … • Dockerfile … <Resource name="jdbc/flexdbDS" auth="Container" type="oracle.jdbc.pool.OracleDataSource" factory="oracle.jdbc.pool.OracleDataSourceFactory" url="${FLEX_DB_URL}" ... adf-essentials.zip adf-essentials-client-ear.zip
  16. 16. FlexDeploy Base Dockerfile FROM ubuntu:16.04 COPY jdk1.8.0_171 /opt/jdk1.8.0_171 COPY tcat85 /usr/local/tomcat ENV JAVA_HOME=/opt/jdk1.8.0_171 ENV PATH=/usr/local/tomcat/bin:$PATH ENTRYPOINT [“catalina.sh”, “run”]
  17. 17. Build an image
  18. 18. •Cloud based registry – Public (free) – Private •Centralized resource for container images •Docker CLI provides access to Docker Hub – docker search, pull, login, push Docker Hub
  19. 19. Build and Push FlexDeploy Base Image docker build . -t eugeneflexagon/flexdeploy_base docker login docker push eugeneflexagon/flexdeploy_base
  20. 20. FlexDeploy Docker image FROM eugeneflexagon/flexdeploy_base COPY flexdeploy.war /usr/local/tomcat/webapps/ docker build . -t eugeneflexagon/flexdeploy docker push eugeneflexagon/flexdeploy
  21. 21. FlexDeploy Docker Container docker run —name flexdeploy -p 8080:8080 -e FLEX_DB_URL=“jdbc:oracle:thin:@myhost:1521:xe” eugeneflexagon/flexdeploy
  22. 22. Simple Development Lifecycle
  23. 23. •Open Source platform (Google born) •Orchestration engine for Ops •A level of abstraction hiding the complexity of a hybrid environment (prem/cloud) •Configuration properties •Load balancing •Scalability •Security •Visibility Kubernetes
  24. 24. • Cluster. Set of physical or VMs. Masters and workers. • Node. Worker. Minion. A physical or virtual machine. Docker is installed on it. • Kubelet. Internal service running on each worker node and managed by a master node. Makes sure that everything works according to configuration files. Kubernetes Architecture
  25. 25. • Kubectl. Kubernetes CLI. • REST API. • Dashboard. Kubernetes Architecture
  26. 26. • Pod. Logical set of containers. A smallest deployable and scalable unit • Replica set. Defines how many instances of a pod should be alive • Deployment. Creates a Replica Set to bring up a desired number of Pods Kubernetes Architecture
  27. 27. • Service. Logical set of pods with a stable ip/access rules and name. Has a lightweight internal load balancer. • Internal, External Kubernetes Architecture
  28. 28. FlexDeploy as a K8s application
  29. 29. FlexDeploy.yaml apiVersion: v1 kind: Service metadata: name: flexdeploy-svc spec: selector: run: flexdeploy ports: - port: 8080 targetPort: 8080 type: LoadBalancer apiVersion: extensions/v1beta1 kind: Deployment metadata: name: flexdeploy spec: replicas: 1 template: metadata: labels: run: flexdeploy spec: containers: - image: eugeneflexagon/flexdeploy:latest env: - name: FLEX_DB_URL valueFrom: configMapKeyRef: name: flex-config key: flex.db.url name: flexdeploy ports: - containerPort: 8080
  30. 30. Datasource Configuration <Resource name="jdbc/flexdbDS" auth="Container" type="oracle.jdbc.pool.OracleDataSource" factory="oracle.jdbc.pool.OracleDataSourceFactory" url="${FLEX_DB_URL}" ... spec: containers: - image: eugeneflexagon/flexdeploy env: - name: FLEX_DB_URL valueFrom: configMapKeyRef: name: flex-config key: flex.db.url
  31. 31. Configuration Map
  32. 32. Secret <Resource name="jdbc/flexdbDS" auth="Container" type="oracle.jdbc.pool.OracleDataSource" factory="oracle.jdbc.pool.OracleDataSourceFactory" url="${FLEX_DB_URL}" user="${FLEX_DB_USERNAME}" password="${FLEX_DB_PWD}" ... spec: containers: - image: eugeneflexagon/flexdeploy env: - name: FLEX_DB_USERNAME valueFrom: seceretKeyRef: name: flex-secret key: flex.db.username - name: FLEX_DB_PWD valueFrom: seceretKeyRef: name: flex-secret key: flex.db.pwd
  33. 33. K8S clusters in the cloud
  34. 34. Build & Deploy automation
  35. 35. Build & Deploy automation
  36. 36. Build Workflows
  37. 37. Deploy Workflow
  38. 38. Deployment Pipeline
  39. 39. Automated Testing with Containers
  40. 40. Deployment Strategies •Recreate •Rolling Update •Blue/Green •Canary •A/B testing apiVersion: extensions/v1beta1 kind: Deployment metadata: name: flexdeploy spec: replicas: 3 strategy: type: Recreate apiVersion: extensions/v1beta1 kind: Deployment metadata: name: flexdeploy spec: replicas: 3 strategy: type: RollingUpdate rollingUpdate: maxSurge: 2 maxUnavailable: 0
  41. 41. Blue/Green Deployment apiVersion: extensions/v1beta1 kind: Deployment … spec: replicas: 1 template: metadata: labels: run: flexdeploy version: green apiVersion: v1 kind: Service metadata: name: flexdeploy-svc spec: selector: run: flexdeploy version: green …
  42. 42. Q&A

×