Monday, 3 June 2019

Types of Cloud


Public : AWS, GCE, MS Azure, Alibaba cloud, IBM cloud, Flexible engine by Orange
Private : in-premises cloud using vmware, Openstack
Hybrid : Public + Private clouds
Multicloud : Combination of different cloud offers

Wednesday, 15 May 2019

What are 2 types of tokens ?


TOKENS are :

  • generated by Authorization (Auth) server
  • issued when client requests Auth server


2 types of Tokens
1. ACCESS TOKEN

  • sent by client as request param / header to Resource server
  • have Limited lifetime / Expiry time (defined by Auth server)


2. REFRESH TOKEN

  • issued with Access token but not sent in each request from client to Resource server
  • sent to Auth server to renew Access token when it expires





What are different components of OAuth2 ?


1. Resource server
which stores and provides sensitive data (personal info) - for ex. API

2. Client
Application requesting the access to Resource server

3. Authorization server
which issues token to client for requesting Resource server

Tuesday, 7 May 2019

How to create ASCII art in shell ?


Visit the site to provide the text and font : 
http://patorjk.com/software/taag/#p=display&h=1&v=1&f=ANSI%20Shadow&t=Jenkins%20%3A%20CI%2FCD

Copy the generated art and paste inside echo command :
echo "
 <Copied text here>
"

Tuesday, 1 January 2019

Mostly used Docker commands


CHECK VARIOUS DOCKER COMMANDS
$ docker
OR
$ docker help
 
HELP ON SPECIFIC DOCKER COMMAND
$ docker run --help

DOCKER VERSION
$ docker run --help
gives client version, server version, OS etc.

LIST IMAGES IN LOCAL REGISTRY

$ docker images





RUN DOCKER PROCESS IN INTERACTIVE MODE
$ docker run -t -i unbuntu:14.04 /bin/bash


LIST OF RUNNING CONTAINERS$ docker ps

SHOW INFO ABOUT CONTAINERS
$ docker info
provides number of containers, images, kernel version, OS+version, CPU, memory etc.

RUN DOCKER AS DEAMON (DEAMONIZE A DOCKER CONTAINER)
$ docker run -d unbuntu /bin/bash -c "while true; do echo Hello Docker; sleep 1; done"
  STOP DOCKER DEAMON
$ docker stop sharp_carson

REMOVE THE DOCKER DEAMON
$ docker rm sharp_carson

Monday, 31 December 2018

How to Deamonize and control a container in deamon mode ?


Deamonizing a container is spawning a docker container so that heavyweight processes are delegated to background.

RUNNING A DOCKER IN DEAMON MODE (BACKGROUND)
$ JOB=$(docker run -d unbuntu /bin/bash -c "while true; do echo Hello Docker; sleep 1; done")

$ docker ps
It will display list of all containers including latest launched container in background.

$ docker logs $JOB
It will show output of the running container.


CONTROLLING DOCKER DEAMON
$ docker stop | start | restart $JOB
It will stop container having name "JOB" and returns it's ID.

$ docker kill $JOB
It will kill the container having name "JOB" and returns it's ID.

$ docker stop $JOB
$ docker rm $JOB
It will stop and then remove the container from memory having name "JOB".


What is Dockerization and Docker images or template ?


DOCKERIZATION
Packaging (app + dependencies) and running an application within Docker container
It provides abstraction over the underlying OS services.
Dockerization is less resource-intensive than VM.





Applications shares the Linux Kernel with the OS running the host machine. 


DOCKER IMAGES
Docker containers are able to run applications inside containers and container works on templated images.

Docker images is a base of containers and based on UFS (Union File Sytem) of linux.

Images can be local or taken from central repository.

Templates are lightweight and its several versions can be managed.