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
The developer (you) writes some new code
The developer commits the code to Git
The developer pushes a new branch to GitHub
The developer opens a pull request to the main branch
A teammate reviews the PR and approves it (if it looks good)
The developer merges the pull request
Upon merging, an automated script, perhaps a Github action, is started
The script builds the code (if it's a compiled language)
The script builds a new docker image with the latest program
The script pushes the new image to Docker Hub
The server that runs the containers, perhaps a Kubernetes cluster, is told there is a new version
The k8s cluster pulls down the latest image
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, usels -l
to see permisions and change it usingchmod -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!