Effective Container with VSCode Remote Container

Effective Container with VSCode Remote Container

Effective container for developers.

829e112d84c7c719c123d52b69fba5f0?s=128

Hiroki Matsumoto

May 12, 2020
Tweet

Transcript

  1. Effective Container

  2. Why we have been using container?

  3. ☑ Portablity ☑ Lightweight ☑ Fast startup ☑ Easy version

    control Container: Pros
  4. So... Have you been happy after introducing container ?

  5. About speaking + For Developers. + Using Visual Studio Code

    with Remote Container. + Scope of Containerization. + Don't lose the benefits of IDE. + Handle container more clearly.
  6. What is VSCode Remote Container? https://code.visualstudio.com/docs/remote/containers

  7. Scope of Containerization

  8. PROBLEM: What did I face ? Didn't work with the

    version of ansible written in the README. Didn't work without ruby in my local environment. + We need to keep the documentation consistent with the actual version. ( It is time consuming. To be honest,not fun.) + We need version control of the installation module in Indivisual Env. ( Who switches the version? It's me! )
  9. RESOLVED Provide the environment,not explain install procedures. example:https://github.com/h-r-k-matsumoto/iac-terminal.git Just open

    in Remote Container. + Everything you need is installed.No version switch operation required. + VS Code extension has also been installed. + You can use the features of VS Code. CI can be easily performed by the container.
  10. Don't lose the benefits of IDE.

  11. PROBLEM: What did I face ? I'm not vimmer!! I

    want to use IDE!! It's hard to debug by printing.but...installing XDEBUG is more difficult. refer to: https://stackoverflow.com/questions/58317736/installation-of-xdebug-on-macos- catalina-10-15 ※ We don't have permission to write /usr/local.
  12. RESOLVED Containerize entire development environment. example:https://github.com/h-r-k-matsumoto/quickstart-basic.git Just open in Remote

    Container. + Everything you need is installed.No version switch operation required. + VS Code extension has also been installed. + You can use the features of VS Code. + Debugging: Breakpoint,Step over,Step in… + Jump to Definition + Search method,class.
  13. TIPS How to more better containerize. Dockerfile FROM xxxx as

    base # using production base image. RUN add debug components.
  14. Handle container more clearly.

  15. PROBLEM: What did I face ? I want to limit

    the resources consumed. If use Kubernetes, we have to confirm specs of application.
  16. RESOLVED Use Resources definition,or create Kubernetes's manifests more details, please

    check following page. https://docs.docker.com/compose/compose-file/#resources docker-compose.yaml version: '3.7' services: web: image: stefanprodan/podinfo:3.2.3 ports: - "9898:9898" deploy: resources: limits: cpus: '0.1' memory: 100M reservations: cpus: '0.1' memory: 100M
  17. TIPS More details,please check following Web site. + Completely Fair

    Scheduler https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/6/html/resou rce_management_guide/sec-cpu + Kubernetes QoS/Eviction Policy https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/ https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/ + Blocking I/O -> Non-Blocking I/O ノンブロッキングI/Oと非同期I/Oの違いを理解する + Squid https://blog.cybozu.io/entry/2017/02/03/080000
  18. Thank you.