전체 글333 Image와 Container - 출처: https://docs.docker.com/get-started/overview/ Image Image는 Docker container를 생성하기 위한 일종의 읽기-전용의 지시 template 이라고 할 수 있다. image는 다른 image를 기반으로 하여 커스터마이징 되기도 한다. 예를 들어 ubuntu image를 기반으로 apache web server와 application 을 설치하고 application을 실행하기 위해 환경 설정을 하는식이다. Image를 만들기 위해서는 Dockerfile 을 만들고 image를 만들기 위한 절차를 기술해야 한다. Dockerfile 내의 각 절차는 image 내의 layer를 생성한다. Dockerfile을 변경하고 image를 다시 빌드하면 .. 2023. 5. 31. With grafana - 출처: https://prometheus.io/docs/tutorials/visualizing_metrics_using_grafana/ Goal - 수집한 metric을 Grafana로 시각화 Overview Prometheus server가 수집한 metric을 Grafana로 시각화 한다. 앞서 살펴보았듯 Prometheus도 web UI를 제공하긴 하지만 일반적으로는 Grafana dashboard를 가장 많이 사용한다. prometheus 홈페이지에서도 Prometheus graph 대신 Grafana를 권장하고 있다. Grafana 설치 및 설정 https://grafana.com/docs/grafana/latest/setup-grafana/installation/#supported-oper.. 2023. 4. 22. Node exporter - 출처: https://prometheus.io/docs/guides/node-exporter/ Goal - localhost 에서 Node exporter 시작 - Node exporter로 부터 metric을 수집하도록 Prometheus instance 를 설정하고 시작 Overview 아래 Architecture 에서 exporter로 부터 metric을 수집해보고 prometheus instance 에서 제대로 수집했는지 확인해본다. Node exporter 설치 Prometheus Node Exporter는 하나의 바이너리 파일이다. download page(https://prometheus.io/download/#node_exporter) 에서 받은 후 압축을 풀어준다. tar xvfz n.. 2023. 4. 22. Makefile 기초 - 출처: https://www.gnu.org/software/make/manual/html_node/Rule-Introduction.html - 출처: http://doc.kldp.org/KoreanDoc/html/GNU-Make/GNU-Make.html#toc2 - 출처: https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html Makefile의 구조 Makefile은 target, dependency, command 3개의 요소로 이루어져 있으며 아래와 같은 요소를 갖는다. GNU make 에서는 target, prerequisties, recipe 라는 용어를 사용하는데, 개발자가 이해하기에는 출처2에서 사용하는 dependenc.. 2023. 4. 22. Go - context (blog) - 출처: https://go.dev./blog/context - 소개 Go 서버에서 들어오는 요청은 goroutine 으로 다루어지며, 요청 핸들러는 DB나 RPC 서비스 접근을 위해 추가적인 goroutine을 생성하기도 한다. 때로는 이런 goroutine 들이 공유해야 하는 값들(ex - end user 식별값, authorization token, 요청 deadline 등)이 있을 수 있다. 만약 요청이 취소되거나 timeout이 발생하면 사용중이던 자원을 회수해야 한다. go 에서는 이런 상황들을 해결할 수 있도록 Context를 제공한다. - Context context package의 핵심인 Context 형을 살펴보자. // A Context carries a deadline, cance.. 2022. 11. 13. Kubernetes - Persistent storage - 출처: Kubernetes in action - 퍼시스턴트 스토리지 파드에서 실행중인 앱이 Disk에 데이터를 유지해야 하거나 파드가 다른 노드로 재 스케줄링 된 경우에도 동일한 데이터를 사용해야 한다면 NAS(network-attached-storage) 유형에 저장돼야 한다. MongoDB를 Persistent disk에 연동하는 예제를 살펴보자. minikube 환경이기 때문에 hostPath로 흉내내본다. apiVersion: v1 kind: Pod metadata: name: mongodb spec: containers: - image: mongo name: mongodb volumeMounts: - name: mongodb-data mountPath: /data/db ports: - con.. 2022. 11. 12. 이전 1 ··· 5 6 7 8 9 10 11 ··· 56 다음