Slide 1

Slide 1 text

Effective Container

Slide 2

Slide 2 text

Why we have been using container?

Slide 3

Slide 3 text

☑ Portablity ☑ Lightweight ☑ Fast startup ☑ Easy version control Container: Pros

Slide 4

Slide 4 text

So... Have you been happy after introducing container ?

Slide 5

Slide 5 text

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.

Slide 6

Slide 6 text

What is VSCode Remote Container? https://code.visualstudio.com/docs/remote/containers

Slide 7

Slide 7 text

Scope of Containerization

Slide 8

Slide 8 text

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! )

Slide 9

Slide 9 text

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.

Slide 10

Slide 10 text

Don't lose the benefits of IDE.

Slide 11

Slide 11 text

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.

Slide 12

Slide 12 text

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.

Slide 13

Slide 13 text

TIPS How to more better containerize. Dockerfile FROM xxxx as base # using production base image. RUN add debug components.

Slide 14

Slide 14 text

Handle container more clearly.

Slide 15

Slide 15 text

PROBLEM: What did I face ? I want to limit the resources consumed. If use Kubernetes, we have to confirm specs of application.

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

Thank you.