Code Monkey home page Code Monkey logo

docker-swarm-tutorial's Introduction

Hey there, I'm twtrubiks 👋

I'm a Developer !!

  • 🔭 I'm a backend developer
  • 🌱 I like to learn new knowledge, especially python and linux
  • 👯 Coding is my live
  • 🥅 Hope to contribute to society through coding
  • ⚡ What I write is not a code, but a dream
  • 📺 I make development and tech tutorials on YouTube
  • 🔭 My CV - https://www.cakeresume.com/blue555236sa56

🙋‍♂️ Connect with me:

twtrubiks | YouTube twtrubiks | Facebook twtrubiks | LinkedIn twtrubiks | Gmail


👨‍💻 Languages and Tools:

python odoo visualstudio linux docker nginx django flask git jenkins kubernetes postgresql postman



📺 Latest YouTube Videos

odoo 16 手把手教學 - json fields - 改善效能
Sep 24, 2023
postgresql 教學 - json jonsb
Sep 10, 2023
Odoo16 mobile scan 手機掃描電子發票自動建立憑證
Aug 27, 2023
odoo 16 手把手教學 - fake Binary fields(改善效能)
Aug 13, 2023
海象運算符 PEP 572 – Assignment Expressions - python3
Aug 6, 2023

➡️ more videos...


📈 Github Stats

twtrubiks's GitHub Stats

docker-swarm-tutorial's People

Contributors

twtrubiks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-swarm-tutorial's Issues

error creating external connectivity network: cannot restrict inter-container communication: please ensure that br_netfilter kernel module is loaded

docker info :
Server:
Containers: 11
Running: 0
Paused: 0
Stopped: 11
Images: 177
Server Version: v19.03.13-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
NodeID: n4u95097aotp2sqs3svzbkilz
Is Manager: true
ClusterID: unv3pcfn08urwffa1r4efh8v2
Managers: 1
Nodes: 2
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 192.168.1.163
Manager Addresses:
192.168.1.163:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 409c87ba59dd96965239573aa9458a3585c05468.m
runc version: 49a73463331bd8ff44bb8349e33f4b2e1ae34b4f-dirty
init version: fec3683-dirty (expected: fec3683b971d9)
Kernel Version: 5.10.9-1.0.0+g3b269ae1f823
Operating System: NXP i.MX Release Distro 5.10-gatesgarth (gatesgarth)
OSType: linux
Architecture: aarch64
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled


當我進行到 'docker service update --publish-add 80 my_nginx'
會有以下錯誤
"error creating external connectivity network: cannot restrict inter-container communication: please ensure that br_netfilter kernel module is loaded"
可否請教您,是否有遇過該狀況?

make web service to wait db service alive

這邊有可能有時候會遇到,你打開網頁,發現顯示找不到網頁的狀況,會發生這個原因是因為啟動順序
的問題,因為有可能 web service 比 db service 早啟動完成,所以導致 web 無法連上 db 😭
這時候該怎麼解決呢❓
這裡先提供一個方法,想法很簡單,就是將 web service 重新啟動,這樣就可以連到 db 了 ☺️
如果有更好的方法歡迎提供,謝謝。

U can use the "wait-for-it" script to control these.

為什麼web這樣的config 能知道要連到哪一個db

swarm 時 為什麼web這樣的config 能知道要連到哪一個db (ip:port) ,
web 連線db 的設定值並沒有看見?

web:
image: twtrubiks/my_swarm_secrets_demo
ports:
- "8000:8000"
networks:
- backend
deploy:
replicas: 4
update_config:
parallelism: 2
restart_policy:
condition: on-failure
secrets:
- my_password
depends_on:
- db

加入haproxy之后,如何让 visualizer也能用haproxy进行路由呢?

# Configure HAProxy to route requests to swarm nodes on port 8000
backend http_back
    log global
    balance roundrobin
    http-request replace-value Host .* info.cern.ch
    server node4 192.168.99.105:8080 check
    server node1 192.168.99.105:8000 check
    server node2 192.168.99.106:8000 check
    server node3 192.168.99.107:8000 check

我在haproxy的路由规则中加入了node4的路由规则,visualizer的url是http://ip:port这样的形式, 这样和django的url可能存在矛盾,这样,路由的时候,加载的页面将按照路由的顺序交替变化,有啥方法可以解决这样的问题?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.