Giter Club home page Giter Club logo

nick-name-generator's Introduction

Hi there ๐Ÿ‘‹ I'm a ...

image

๐Ÿ‘จโ€๐Ÿ’ป I'm currently working on

  • Cloud-native development on Azure
  • Architecting event-driven solution for a real-time monitoring system
  • ...and many other smaller tasks which is just part of the fun!

๐Ÿ”ญ Domains I'm most interested in

  • Cloud (Plaform) Engineering
  • DevOps
  • In general, I ๐Ÿ–ค architecting and implementing solutions

๐Ÿš€ Related accounts

Nothing fancy, just a solid contributor to several repos at work

nick-name-generator's People

Watchers

 avatar  avatar

nick-name-generator's Issues

Build the app on local kube cluster

Todo

  • Create a random name generator - 2/3 microservices
    Format: {adjective}-{color}-{animal}
    eg: annoying-blue-panda

  • Create one endpoint Get that returns static data { name, server }

  • Set folder structure according to best standards - monolithic repo

  • Set k8 services and deployments for web service to make calls to microservices

  • Test on local k8s

  • Build animal MS to complete the development

Articles

  1. https://expressjs.com/en/guide/routing.html#route-parameters
  2. https://nodejs.org/api/http2.html
  3. https://learn.hashicorp.com/tutorials/consul/service-mesh

Deploy nick-name-generator to GKE

Todo

  • Quickly go through GKE concepts
  • Deploy nick-name-gen as it is on GKE (using current API gateway) using the Console
  • Test and ensure it works properly
  • Write tf for creating GKE cluster and deploying

Figure out a way to share common files across applications - NPM Package

Todo

Commands

npm init --scope=@my-username - for initializig the directory to be packaged
npm publish --access public - for publishing the package

Articles

Follow npm package tutoial here: https://docs.npmjs.com/creating-and-publishing-scoped-public-packages

Further improvements

  • Move api gateway itself into an NPM package, once built properly
  • Entry point of nng-common is app.js. It contains nothing. Read about common practices for packages with multiple files / utilities

Explore use of Rancher (RKE2) in deployment and auto-scaling pods

RKE

RKE2

RKE2 is the standard now, uses containerd runtime instead of Docker

Steps

  • Modify terraform script to handle changes for AWS academy

  • Run terraform to provision RKE cluster

Incase of issue with deleting internet gateway, delete the ALB
https://stackoverflow.com/questions/37232965/issue-when-trying-to-delete-vpc-and-network-interface

  • Create alias to read the kubeconfig
    image

  • Deploy nick name app

Todo - Create new stories

  • Figure out how to get public IP for all Loadbalancer services. Currently external ip remains in <PENDING> state
  • This worked, but after very long time. Also, service discovery doesn't seem to be working on path /nick-name
    Image
  • Specify SSH key for the cluster vockey
  • Deploy dashboard
  • Check auto scaling parameters. Tune if needed
  • Understand nodepool vs server. Adjust count for HA
  • Check the availability zones deployment logic. Fix, if needed.

Explore RKE/Rancher on OpenStack

Articles

Rancher on Openstack

  • Deploy rancher (class) code on Openstack using Terraform.
  • BLOCKER ๐Ÿšซ Openstack instances not getting provisioned properly. Have to check from Germany
  • Play around with this code and understand all the providers and modules used.

  • - [ ] Understand what rancher is capable of

  • Try adding more worker and control plane nodes on OpenStack

  • Deploy an application on cluster

Rancher on AWS

Issues

  • "ssh" module doesn't work for win386 machines ๐Ÿคทโ€โ™‚๏ธ, fixed by changing local tf installation to amd64 โœ…
  • issue with cert-manager helm chart.
  • Try with WSL ububtu

Still not working

Image

Build API gateway

Explore how to build an API gateway in node JS

  • API Gateway is a Facade Pattern
  • Acts like a reverse proxy, but has additional features such as aggregation, handling partial failure, authentication, etc..

Why API gateway?

  1. Aggregate multiple calls to avoid roundtrips (series vs parallel calls)
  2. The services might be using protocols that aren't web friendly, eg: thrift RPC. Calling from client won't be possible
  3. Refactoring of microservices (breaking down, or combining) would need changes on every client.

Features of API Gateway?

  1. High performance and scalability

  2. Service Discovery

  3. Service Invocation (either async - queues, or sync - http/grpc)

  4. Handling partial failures

  5. Data aggregation (from multiple services)

  6. Protocol transformation
    Image

  7. Authentication (cookie / token based )

Articles

Check the resources mentioned here : https://github.com/Sanjay-George/Learning-Materials/blob/master/README.md#api-gateway

Simplify running and testing services on local

Since etcd works inside K8 cluster to discover services and most of the services are not exposed externally, there should be a better way to run and test the application on local.

Check image in comments describing the issue with current architecture.

Possible solutions

  • keep seaprate config for local and update ports for each service

  • Keep separate YAML files for local k8 cluster and make all services LoadBalancer (better solution)
    Use HELM Custom values for managing local vs prod.

HELM

Subcharts and globals

Values

Use custom value files to separate out local and prod config
On local : helm install -f values.yaml -f local-values.yaml bitnami/wordpress --generate-name
On prod: helm install -f values.yaml bitnami/wordpress --generate-name

YouTube - intro to helm

Blogs

https://medium.com/@prbldeb/dealing-with-helm-charts-of-micro-services-with-interdependent-api-end-points-2fe9b508e484

https://dev.to/pavanbelagatti/how-to-create-a-simple-helm-chart-12fe

Improve RKE2 cluster deployment on AWS โญ

Todo - Create separate stories if needed

  • Figure out how to get public IP for all Loadbalancer services. Currently external ip remains in <PENDING> state
  • This worked, but after very long time. Also, service discovery doesn't seem to be working on path /nick-name
    Image
  • Specify SSH key for the cluster vockey

  • Deploy dashboard

  • Check auto scaling parameters. Tune if needed

  • Understand nodepool vs server. Adjust count for HA

  • Check the availability zones deployment logic. Fix, if needed.

Try using Kubespray for AWS (python ansible + terraform)

kubespray: ansible playbooks, need python to execute ansible. Terraform module only for AWS ๐Ÿ˜‘. But GCP is supported with python ๐Ÿ™‚

Blocker

kubespray ansible book failing randomly.
Issue raised here: #4)

Articles

  1. Installing kubernetes with kubespray

  2. Quickstart setup using kubespray on GCP

Steps followed

1. Install ansible ๐Ÿ

  • Install ansible on WSL instead.
  • Install terraform on WSL
  • Set up virtual env guide and install all deps inside
  • Install specific version of ansible as mentioned in requirements.txt

2. Setup dev environment on ubuntu WSL

  • Git - ssh, push / pull, etc..
  • AWS credentials - stored here: $HOME/.aws/credentials
  • nano editor
  • kubectl CLI

3. Run Terraform to provision the cluster

  • make necessary changes to access_key, region, secret_key, ssh_key etc..
  • Remove creation of IAM role. Just use the existing LabRole and LabInstanceProfile
  • Note: Once tf runs, it creates the inventory file for ansible playbook. Check here

4. Run ansible playbooks to set up k8 on the already-provisioned cluster

4a. Figure out way to pass in the key through CLI instead of inventory

  • Try command ansible-playbook -b -v -i inventory/hosts cluster.yml -u admin --private-key=~/.ssh/vockey
  • Or add this in ansible.cfg
private_key_file=~/.ssh/id_rsa_sbexx
remote_user=core

5. Check kube cluster status

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.