Skip to content

Instantly share code, notes, and snippets.

@yanmendes
Last active June 21, 2019 22:07
Show Gist options
  • Save yanmendes/599473f167f79b93a8a7f7b09792f12f to your computer and use it in GitHub Desktop.
Save yanmendes/599473f167f79b93a8a7f7b09792f12f to your computer and use it in GitHub Desktop.
Escale TechPedia

Acronyms and abbreviations

Continuous Integration (CI)

What?

Neutral environment where your codebase is tested, built and shipped for deployment.

How?

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.

Why?

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, …)

Search Engine Optimization (SEO)

Search Engine Marketing (SEM)

Content Management System (CMS)

Customer Relationship Management (CRM)

Stack components

RabbitMQ

What?

RabbitMQ is a message broker that allows distributed services to communicate with each other.

How?

Message passing is the most scalable approach in distributed/parallel systems.

Why?

Ensures a loosely coupled architecture with independent micro services.

When?

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)

Cons

Network and broker overhead. Not good for core functionalities and where speed is crucial.

101

  • 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

Where should I start?

Repositories that use it

https://github.com/escaletech/health-quotes-gql

https://github.com/escaletech/health-looker

https://github.com/escaletech/pdc-scraper

Kubernetes (K8s)

What?

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.

How?

Containerization (e.g. Docker) is a technique that allows you to ship your code with all OS-level-dependencies (e.g. compilers).

Why?

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)

When?

Cons

Steep learning curve at the very beginning.

101

  • 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>

Where should I start?

Repositories that use it

https://github.com/escaletech/health-quotes-gql

https://github.com/escaletech/pdc-scraper

https://github.com/escaletech/health-portal

Written with StackEdit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment