Neutral environment where your codebase is tested, built and shipped for deployment.
When pushing to github and when a config file is present (e.g. travis.yml
, .circleci/config.yml
), it triggers the CI tool that runs the workflows defined in these files.
Increases code confidence by making sure all tests in codebase are passing; builds and ships to production in a “clean” environment (no global packages that are installed in your machine, no unintended environment variables, …)
RabbitMQ is a message broker that allows distributed services to communicate with each other.
Message passing is the most scalable approach in distributed/parallel systems.
Ensures a loosely coupled architecture with independent micro services.
Mature monolithic code that needs to be broken down in smaller components. Additional features that don’t need to be tightly coupled to existing components (e.g. ETL to a data lake, crawlers)
Network and broker overhead. Not good for core functionalities and where speed is crucial.
- Basic terminology:
- Queues
- Exchanges
- Messages
- Access:
-- Default broker port 5672
-- Web app with all your messages, exchanges, queues and useful metrics and stats. http://localhost:15672
-- Staging/production access with GCP VM: the command below creates a “forwarding” between your local RBMQ interface and a VM in GCP, granting access to the production’s web app.
gcloud compute ssh rabbitmq-1-stats-vm-0 --ssh-flag="-L" --ssh-flag="15672:localhost:15672" --project=escale-os --zone=southamerica-east1-a
- Basic tutorials that cover fundamentals - https://www.rabbitmq.com/tutorials/
https://github.com/escaletech/health-quotes-gql
https://github.com/escaletech/health-looker
https://github.com/escaletech/pdc-scraper
Kubernetes is a container orchestration tool. Infrastructure as Code: simply write a yaml file and voilá, your app is ready to be deployed in a production environment.
Containerization (e.g. Docker) is a technique that allows you to ship your code with all OS-level-dependencies (e.g. compilers).
It’s really good to create light-weight independent applications. It mitigates undesired side-effects that a mainframe-style architecture causes (e.g. different versions of a compiler running for different apps)
Steep learning curve at the very beginning.
-
Basic terminology:
- Pods
- Services
- Ingress
-
Setting up:
- You just need to log in GCP
-
Useful CLI/hacks:
- Entering a pod
kubectl exec -it $(kube get pods -l run=<service> -o name) /bin/sh
- Restarting a pod
kubectl scale --replicas=2 deploy/<service>
# wait for new pod to deploy
kubectl delete pod <oldest-pod>
kubectl scale --replicas=1 deploy/<service>
- Contexts are a useful way to avoid writing the namespace everytime you issue a command
kube config set-context my-dope-context --namespace=<namespace> --cluster=gke_escale-os_southamerica-<k8s-cluster> --user=gke_escale-os_southamerica-<k8s-user>
- Entering a pod
- Dumont’s presentation -
- Overview and APIs - https://devopscube.com/kubernetes-deployment-tutorial/
https://github.com/escaletech/health-quotes-gql
https://github.com/escaletech/pdc-scraper
https://github.com/escaletech/health-portal
Written with StackEdit.