changed 3 years ago
Published Linked with GitHub

2022-02-20 Netdb Workshop

可以自行標記自己想要深入研究的一些關鍵字,可以作為日後的學習與參考

Development Machine for this workshop

Host gale-dev
  HostName 140.116.247.125
  User ubuntu
  Port 13222

connect via ssh ubuntu@140.116.247.125 -p 13222

Traffic Proxy for Netdb

Host netdb-traefik
  HostName 140.116.247.125
  User root
  Port 12722

/root/traefik-proxy/dynamic_conf

connect via ssh root@140.116.247.125 -p 12722

Resources on Netdb

Networking

  • Understand computer networking (general)
  • TCP/IP Protocal
  • OSI Protocal

Networking in NetDB

Our Netdb Great Greate Great Traefik Proxy

https://gitlab.com/19gale.ai/netdb-playbook

  • need some one who knows how to maintain
  1. What is reverse proxy?
  2. Tools?
  3. Traefik

Docker Registry

  1. What is docker?
  2. What is docker image?
  3. What is docker registry
  4. Why use it?

We have our own docker private registry!
NETDB: http://registry.19gale.ai:8080/

account: 19gale
password: 你知道的
公有雲: https://hub.docker.com/

Ansible

Command line interface -> ssh -> do tasks

Use case

  • manage cronjob
  • manage docker-compose
  • manage files

Client (Control Host)

python -m pip install user ansible

Server (Managed Node)

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible

CICD

  1. What is CI?
  2. What is CD?
  3. Gitlab CI/CD?
  4. Gitlab Runner?
  5. Use cases?

How to integrate Gitlab CI/CD with Ansible

  1. Prepare files
  2. Prepare ssh key
  3. Writing Playbook

What is deployment?

Running your service in an always-on environment with either private or public access

  • frontend deployment
  • backend deployment
  • serverless deployment

Backend Deployment

Dockerize container

  • What is webserver
  • what is asgi / what is uwsgi
  • gunicorn
  1. Fastapi
  2. Flask

Practice!

Frontend Deployment

Hands On

  • create-react-app
  1. Github action
  2. Gitlab ci/cd
  3. AWS s3
  4. nginx
Select a repo