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

Effective Container with VSCode Remote Container

Effective Container with VSCode Remote Container

Effective container for developers.

Hiroki Matsumoto

May 12, 2020
Tweet

More Decks by Hiroki Matsumoto

Other Decks in Technology

Transcript

  1. 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.
  2. 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! )
  3. 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.
  4. 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.
  5. 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.
  6. TIPS How to more better containerize. Dockerfile FROM xxxx as

    base # using production base image. RUN add debug components.
  7. PROBLEM: What did I face ? I want to limit

    the resources consumed. If use Kubernetes, we have to confirm specs of application.
  8. 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
  9. 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