블로그 이미지
Flying Mr.Cheon youGom

Recent Comment»

Recent Post»

Recent Trackback»

« 2024/5 »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

 

'서버/Infra'에 해당되는 글 2

  1. 2023.05.11 Docker Configuration
  2. 2018.03.20 [Infra] LoadBalancer Haproxy Install
 

Docker Configuration

서버/Infra | 2023. 5. 11. 17:04 | Posted by youGom

It is not typing any korean might be in ubuntu of the language problem on utf8.
This is contents only my log how to get checking docker default.
It's terrible to set the python version virutal environment up. this docker system would rather that?

This is default configuration method and summary; Docker Configurations

* Below links are almost entry point: https://docs.docker.com/language/python/build-images/

Contents.
1. Install Docker
    - The docker document site shows to install the docker-gui at first, but it should install the docker-cli in middle contents;
    ( docker-install[gui] - link , docker-cert[ca] - link , docker-install[cli] - link )
2. Docker run: image 'hello world'
    - It is very simple command like 'docker run docker-hello' for getting check or verify the docker-package.
3. Docker Image Pull: Python3.6 slim buster - (list)link
    - The docker document shows python 3.8, but trying to version of 3.6; python 3.6 image link
4. Docker Image Control: Flask 'hello world'
    - Build, Tag - link
    - Run, Stop, Remove, View List - link
    - Finally command: docker run -d -p 8000:5000 --name rest-server python_image
5. Docker Image Control: Mysql 'hello world', link
    - To meet some error; mysql-connector (had been installed by pip3 (python3.6))
    - To reset python version to 3.8 from 3.6, and to restart generating from 'python3 -m venv .venv' for the first time.
    - Getting Experience; docker network, volume and compose by yaml file; docker-compose.dev.yml
6. CI/CD: GitHub actions - link
    - Create workflow yaml file
7. Deploy: Azure, ECS, EKS - link
    - It would refer any page to be meet a environment of the infras, or the IaaS provider would provide us more information.

 

Notes.
1. Hope to use the docker command line without 'sudo ...' like 'sudo docker ...'
   $ sudo usermod -aG docker $USER
   - To run docker command without 'sudo' after logout, or 'sudo su -l $USER'

'서버 > Infra' 카테고리의 다른 글

[Infra] LoadBalancer Haproxy Install  (0) 2018.03.20
:

[Infra] LoadBalancer Haproxy Install

서버/Infra | 2018. 3. 20. 16:25 | Posted by youGom

* 출처 : https://www.upcloud.com/support/haproxy-load-balancer-ubuntu/

* 간단하게 명령어만~


* haproxy 메뉴얼 주소 : https://cbonte.github.io/haproxy-dconv/1.7/configuration.html


sudo apt show haproxy
sudo add-apt-repository ppa:vbernat/haproxy-1.7
sudo apt update
sudo apt install -y haproxy
haproxy -v
HA-Proxy version 1.7.8-1ppa1~xenial 2017/07/09
Copyright 2000-2017 Willy Tarreau <willy@haproxy.org>

위에껀 명령어 아니고, 버젼 확인용~


sudo nano /etc/haproxy/haproxy.cfg
frontend http_front
   bind *:80
   stats uri /haproxy?stats
   default_backend http_back

backend http_back
   balance roundrobin
   server <server1 name> <private IP 1>:80 check
   server <server2 name> <private IP 2>:80 check
sudo nano /etc/haproxy/haproxy.cfg
frontend http_front
   bind *:80
   stats uri /haproxy?stats
   acl url_blog path_beg /blog
   use_backend blog_back if url_blog
   default_backend http_back

backend http_back
   balance roundrobin
   server <server name> <private IP>:80 check
   server <server name> <private IP>:80 check

backend blog_back
   server <server name> <private IP>:80 check
sudo systemctl restart haproxy
http://<load balancer public IP>/haproxy?stats
sudo systemctl status haproxy
listen stats
   bind *:8181
   stats enable
   stats uri /
   stats realm Haproxy\ Statistics
   stats auth username:password
sudo systemctl restart haproxy
http://<load balancer public IP>:8181
http://<load balancer public IP>/

* 아래 내용은 상세한 내용, 판도라상자? ㅋㅋ



'서버 > Infra' 카테고리의 다른 글

Docker Configuration  (0) 2023.05.11
: