Hanabi Factory

Navi's Personal Blog


diary

This is just a personal and unstructured page that hold notes and ideas about things I am learning, 100% related to Technology, Math, CS, IE, etc. Appropiate precautions should be taken

2024-08

  • A load balancer behaves as advertised: it balances a load of network traffic.

  • The Deployment Process

    1. The developer (you) writes some new code
    2. The developer commits the code to Git
    3. The developer pushes a new branch to GitHub
    4. The developer opens a pull request to the main branch
    5. A teammate reviews the PR and approves it (if it looks good)
    6. The developer merges the pull request
    7. Upon merging, an automated script, perhaps a Github action, is started
    8. The script builds the code (if it’s a compiled language)
    9. The script builds a new docker image with the latest program
    10. The script pushes the new image to Docker Hub
    11. The server that runs the containers, perhaps a Kubernetes cluster, is told there is a new version
    12. The k8s cluster pulls down the latest image
    13. The k8s cluster shuts down old containers as it spins up new containers of the latest image
  • Docker volume helps to store data and persist across the time, saving the information in JSON file, some basic comands

docker ps #to list all containers, to show them all use -a

docker stop CONTAINER_ID # you can use kill for more aggresive approach

docker images #display all the different images (images are not containers)

docker run -d -p 80:80 docker/getting-started If you want to run container

docker exec CONTAINER_ID #allow you to execute commands in a running container
docker exec -it CONTAINER_ID /bin/sh #run a shell in interactive mode

docker volume create my-volume #To create a volume 

docker volume ls #list volumes in docker

docker volume inspect ghost-vol #See the volume

docker network ls #list networks
  • -rwxrwxrwx -> read, write and execute, use ls -l to see permisions and change it using chmod -R u=rwx,g=,o= DIRECTORY
  • To send files to other server use rsync -rtvzP /path/to/file root@example.org:/path/on/the/server
  • Catch my attention the things about decorators in Python, and Julia macros are not the same looks like metaprogramming is a more general concept here is a discussion
  • the dot is a minimacro in vim and the ; repeat the last search, I did not know it!