Understanding the tools sets in kubernetes ecosystem

Kubernetes at Public Cloud

  1. Google Container Engine – Google Kubernetes Engine is a powerful cluster manager and orchestration system for running your Docker containers.
  2. ECS – Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast, container management service that makes it easy to run, stop, and manage Docker containers on a cluster.
  3. EKS – Amazon Elastic Container Service for Kubernetes (Amazon EKS) makes it easy to deploy, manage, and scale containerized applications using Kubernetes on AWS.

Kubernetes cli tools

  1. kubectl – Main CLI tool for running commands and managing Kubernetes clusters.
  2. JSONPath – Syntax guide for using JSONPath expressions with kubectl.
  3. kubeadm – CLI tool to easily provision a secure Kubernetes cluster.
  4. kubefed – CLI tool to help you administrate your federated clusters.
  5. Minikube – This is the simplest way to get a Kubernetes cluster on your Mac or Windows machine.
  6. Kops – kops helps you create, destroy, upgrade and maintain production-grade, highly available, Kubernetes clusters from the command line. AWS (Amazon Web Services) is currently officially supported, with GCE in beta support , and VMware vSphere in alpha, and other platforms planned.

kubernetes config reference

  1. kubelet – The primary node agent that runs on each node. The kubelet takes a set of PodSpecs and ensures that the described containers are running and healthy.
  2. Container runtime – Container runtime is Docker engine which resides in each node
  3. kube-proxy – Can do simple TCP/UDP stream forwarding or round-robin TCP/UDP forwarding across a set of back-ends.

Cluster control plane (AKA master)

  1. kube-apiserver – REST API that validates and configures data for API objects such as pods, services, replication controllers.
  2. Cluster state store – All persistent cluster state is stored in an instance of etcd. This provides a way to store configuration data reliably.
  3. kube-controller-manager – Daemon that embeds the core control loops shipped with Kubernetes.
  4. kube-scheduler – Scheduler that manages availability, performance, and capacity.
  5. Federation – A single Kubernetes cluster may span multiple availability zones.
  6. federation-apiserver – API server for federated clusters.
  7. federation-controller-manager – Daemon that embeds the core control loops shipped with Kubernetes federation

Kubernetes Add ons

  1. DNS
  2. Ingress controller
  3. Heapster (resource monitoring)
  4. Dashboard (GUI)
Tagged : / / / / / / / / / / / / / / /

Introduction of containers services at Amazon AWS

Here are the following Services which is offered by AWS at present which will help you to onboarding Containers on AWS platforms.

Amazon Elasitc Container Services (ECS)

Amazon Elasitc Container Services (ECS) was introduced in 2014. Amazon EC2 Container Service (ECS) is a cloud computing service in Amazon Web Services (AWS) that manages containers. It enables developers to deploy and manage scalable applications that run on groups of servers called clusters through application programming interface (API) calls and task definitions.

Amazon ECS is a scalable service that is accessible through the AWS Management Console and software developer’s kits (SDKs). It is comparable to Kubernetes, Docker Swarm, and Azure Container Service.

ECS runs your containers on a cluster of Amazon EC2 (Elastic Compute Cloud) virtual machine instances pre-installed with Docker. It handles installing containers, scaling, monitoring, and managing these instances through both an API and the AWS Management Console.

EC2 Container Service includes two schedulers, which enable users to deploy containers based on computing needs or availability requirements. Amazon ECS runs containers on top of EC2 instances, which provides isolation to help businesses achieve compliance

Amazon ECS competes with Kubernetes, Google’s open source container orchestration system. While the container management tools and use cases differ, Kubernetes has the following features that ECS does not:

  • It is deployable to non-AWS clouds and on-premises resources;
  • It has storage options outside AWS; and
  • It receives contributions from the developer community, while not all ECS code is publicly available.

Amazon Elastic Container Repository (ECR)

Amazon Elastic Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images. Amazon ECR is integrated with Amazon Elastic Container Service (ECS), simplifying your development to production workflow. Amazon ECR eliminates the need to operate your own container repositories or worry about scaling the underlying infrastructure.

Amazon Elastic Kubernetes Services (EKS)

Amazon Elastic Kubernetes Services (EKS) was introduced by AWS in November 2017 at its re:Invent conference. Amazon Elastic Container Service for Kubernetes (Amazon EKS) makes it easy to deploy, manage, and scale containerized applications using Kubernetes on AWS. Kubernetes control plane that is high availability, with three masters across three availability zones. This is something that used to be challenging to setup yourself. EKS is just running upstream Kubernetes so you can connect to it with kubectl just like a self managed Kubernetes.

Amazon Fargate

Amazon Fargate was introduced by AWS in November 2017 at its re:Invent conference.
AWS Fargate is a new service for running containers without needing to manage the underlying infrastructure.
AWS Fargate is a technology for Amazon ECS and EKS that allows you to run containers without having to manage servers or clusters. With AWS Fargate, you no longer have to provision, configure, and scale clusters of virtual machines to run containers.

Your control plane can just ask Fargate to run a container and Fargate takes care of all the details. Pricing is based on how much CPU and memory you reserve for the container to use, on a per second basis.

 

 

Tagged : / / / / / / / /

Chef Node Objects Defined!

Chef Node Objects Defined!

For the chef-client, two important aspects of nodes are groups of attributes and run-lists.

  1. An attribute is a specific piece of data about the node, such as a network interface, a file system, the number of clients a service running on a node is capable of accepting, and so on.
  2. A run-list is an ordered list of recipes and/or roles that are run in an exact order.

The node object consists of the run-list and node attributes, which is a JSON file that is stored on the Chef server. The chef-client gets a copy of the node object from the Chef server during each chef-client run and places an updated copy on the Chef server at the end of each chef-client run.

An attribute is a specific detail about a node. Attributes are used by the chef-client to understand:

  • The current state of the node
  • What the state of the node was at the end of the previous chef-client run
  • What the state of the node should be at the end of the current chef-client run

Attributes are defined by:

  • The state of the node itself
  • Cookbooks (in attribute files and/or recipes)
  • Roles
  • Environments

During every chef-client run, the chef-client builds the attribute list using:

  • Data about the node collected by Ohai
  • The node object that was saved to the Chef server at the end of the previous chef-client run
  • The rebuilt node object from the current chef-client run, after it is updated for changes to cookbooks (attribute files and/or recipes), roles, and/or environments, and updated for any changes to the state of the node itself

After the node object is rebuilt, all of the attributes are compared, and then the node is updated based on attribute precedence. At the end of every chef-client run, the node object that defines the current state of the node is uploaded to the Chef server so that it can be indexed for search.

Tagged : /

Understand the chefignore file

The chefignore file is used to tell knife which cookbook files in the chef-repo should be ignored when uploading data to the Chef server. The type of data that should be ignored includes swap files, version control data, build output data, and so on. .

The chefignore file can be located in any subdirectory of a chef-repo: /, /cookbooks, /cookbooks/COOKBOOK_NAME/, roles, etc. It should contain sections similar to the following:

Example of chefignore


# Ignore editor swap files
*~
*.sw[a-z]

# Ignore top-level Subversion data
*/.svn/*

# Ignore all files in a directory
files/default/subdirectory/*
files/default/subdirectory/**

# OS generated files #
######################
.DS_Store
Icon?
nohup.out
ehthumbs.db
Thumbs.db

# SASS #
########
.sass-cache

# EDITORS #
###########
\#*
.#*
*~
*.sw[a-z]
*.bak
REVISION
TAGS*
tmtags
*_flymake.*
*_flymake
*.tmproj
.project
.settings
mkmf.log

## COMPILED ##
##############
a.out
*.o
*.pyc
*.so
*.com
*.class
*.dll
*.exe
*/rdoc/

# Testing #
###########
.watchr
.rspec
spec/*
spec/fixtures/*
test/*
features/*
examples/*
Guardfile
Procfile
.kitchen*
.rubocop.yml

# SCM #
#######
.git
*/.git
.gitignore
.gitmodules
.gitconfig
.gitattributes
.svn
*/.bzr/*
*/.hg/*
*/.svn/*

# Berkshelf #
#############
Berksfile
Berksfile.lock
cookbooks/*
tmp

# Cookbooks #
#############
CONTRIBUTING*
CHANGELOG*
TESTING*

# Strainer #
############
Colanderfile
Strainerfile
.colander
.strainer

# Vagrant #
###########
.vagrant
Vagrantfile

# Travis #
##########
.travis.yml

Reference 

https://docs.chef.io/chef_repo.html#chefignore-files

Tagged : /

Lets Understand the Ruby programming world in 5 mins!!!

Lets Understand the Ruby programming world in 5 mins?

Ruby
Ruby is a dynamic, interpreted, reflective, object-oriented, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro “Matz” Matsumoto in Japan. The Currnet most latest stable release is Ruby 2.5.

Gem – A Ruby Package
A Gem is a Ruby application package which can contain anything from a collection of code to libraries, and/or list of dependencies that the packaged code actually needs to run.

Gems are formed of a structure similar to the following:

/[package_name] # The main root directory of the Gem package.
|__ /bin # Location of the executable binaries if the package has any.
|__ /lib # Directory containing the main Ruby application code (inc. modules).
|__ /test # Location of test files.
|__ README #
|__ Rakefile # The Rake-file for libraries which use Rake for builds.
|__ [name].gemspec # *.gemspec file, which has the name of the main directory, contains all package meta-data, e.g. name, version, directories etc.

One of the tools we will be using for creating Gems is Bundler.

Bundler
Bundler a gem to bundle gems. Bundler makes sure Ruby applications run the same code on every machine.

It does this by managing the gems that the application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Bundler can help you update some or all of them when new versions become available. Finally, it records the exact versions that have been installed, so that others can install the exact same gems.

RubyGems – A Package Manager
RubyGems is the default package manager for Ruby. It helps with all application package lifecycle from downloading to distributing Ruby applications and relevant binaries or libraries. RubyGems is a powerful package management tool which provides the developers a standardised structure for packing application in archives called Ruby Gem. The webiste is https://rubygems.org/

Rake
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax. you must write a “Rakefile” file which contains the build rules.

Rails
Rails is a web application development framework written in the Ruby programming language. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other languages and frameworks. Experienced Rails developers also report that it makes web application development more fun.

bower
Web sites are made of lots of things — frameworks, libraries, assets, and utilities. Bower manages all these things for you. Bower can manage components that contain HTML, CSS, JavaScript, fonts or even image files. Bower doesn’t concatenate or minify code or do anything else – it just installs the right versions of the packages you need and their dependencies.

yarn
Yarn caches every package it has downloaded, so it never needs to download the same package again. It also does almost everything concurrently to maximize resource utilization. This means even faster installs.

If i have missed any tools which is important of Rudy ecospace, please mentioned in the comments sections.

Tagged : / / / / / / /