Thursday, December 23, 2021

Scrum and Scrum master



Scrum 

Scrum is a framework which helps a team to work together. 

It is like a rugby team (the scrum name comes from rugby game).

Scrum encourages teams to learn  and get through the experiences, 

It help team to self-organize while working on a problem, and reflect on their wins and losses to continuously improve.

Scrum describes a set of meetings, some tools, and the roles that work in such a way that it helps teams to structure and manage their work.

Scrum master

The scrum master helps to facilitate scrum to the larger team by ensuring the scrum framework is followed. 

scrum master is committed to follow the scrum practices and values, also remain adaptive and open to the new opportunities for the team to pmprovise their work pattern and workflow.

Scrum master works/communicate with each member of the scrum team to help and guide the team using the scrum framework.

Scrum Master has following responsibilities:

Standups - Arrange daily standups meetings.

Sprint planning meetings – Arrange spring planning meetings.

Protect the team from over-committing and scope creep. Aid in estimation and sub task creation.

Sprint Reviews – Gathered the review/feedback by Participating in the sprng review meeting.

Retrospectives – They take opinion from the team and note down the areas for improvement and take the appropriate action for upcoming sprints.

Board administration – They administer the scrum board. Ensure that the tasks/cards are accurate and timely updated using the scrum tool(Jira etc )

1 on 1s – Coordinate with team and meet team mates and stakeholders based on the need. Find out the point from team about the disagreements in process and working methodology/styles.

Internal Consulting – Scrum masters consult and coordinate with member of team and internal stakeholders to know improve about how best to work with scrum team.

Reporting – Scrum master regularly verify the charts and other work/task planning tools to understand and learn what gets built and at what cadence.

Blockers – The scrum master also aids the team member by working and removing the blockers and managing internal roadblocks through proper process or better workflow improvisation.


Sunday, June 16, 2019

Kubernetes APIs to get Details about PODS, Nodes, eviction of POD, deletion of POD

Get the list of  Kubernetes APIs
http://127.0.0.1:8080

http://127.0.0.1:8080/api/v1/

Kubernetes API to get List of Nodes:
http://127.0.0.1:8080/api/v1/nodes

Kubernetes API to get details of the Node:
http://127.0.0.1:8080/api/v1/nodes/minikube

Kubernetes API to get the List of PODs:
http://127.0.0.1:8080/api/v1/pods

Kubernetes API to get particular POD detail:
"myapp1-59677d87cb-k22bx" is name of POD
http://127.0.0.1:8080/api/v1/namespaces/default/pods/myapp1-59677d87cb-k22bx

Kubernetes API for Eviction of POD:
"myapp1-59677d87cb-k22bx" is name of POD
POST: http://127.0.0.1:8080/api/v1/namespaces/default/pods/myapp1-59677d87cb-k22bx/eviction
JSON TO SEND:
{
  "apiVersion": "policy/v1beta1",
  "kind": "Eviction",
  "metadata": {
    "name": "myapp1-59677d87cb-k22bx",
    "namespace": "default"
  }
}

Kubernetes API for deletion of POD:
"myapp1-59677d87cb-6bcxv" is name of pod
DELETE: http://127.0.0.1:8080/api/v1/namespaces/default/pods/myapp1-59677d87cb-6bcxv

Kubernetes API to get list of Services:
http://127.0.0.1:8080/api/v1/services

Kubernetes API to get the detail about particular Service:
"myapp1" is the service name
http://127.0.0.1:8080/api/v1/namespaces/default/services/myapp1

Kubernetes API to get list of Deployments:
http://127.0.0.1:8080/apis/apps/v1/namespaces/default/deployments

Kubernetes API to Get Patricular Deployment:
http://127.0.0.1:8080/apis/extensions/v1beta1/namespaces/default/deployments/myapp1/scale
Note: Copy the received JSON and use in in the put call to scale the deployment

Kubernetes API for Scaling of Deployments:
"myapp1" is the name of deployment.
PUT: http://127.0.0.1:8080/apis/extensions/v1beta1/namespaces/default/deployments/myapp1/scale

JSON TO PASS:
{
    "kind": "Scale",
    "apiVersion": "extensions/v1beta1",
    "metadata": {
        "name": "myapp1",
        "namespace": "default",
        "selfLink": "/apis/extensions/v1beta1/namespaces/default/deployments/myapp1/scale",
        "uid": "f3e43146-88ec-11e9-b34a-080027912a01",
        "resourceVersion": "16289",
        "creationTimestamp": "2019-06-07T06:24:49Z"
    },
    "spec": {
        "replicas": 4
    },
    "status": {
        "replicas": 4,
        "selector": {
            "run": "myapp1"
        },
        "targetSelector": "run=myapp1"
    }
}

Monday, June 10, 2019

Kubernetes Introduction



Kubernetes is an open source platform for automating the deployment, scaling, and management of containerized applications and services. It was developed in response to the challenges of deploying and managing large fleets of containers at Google, which open sourced the project and donated it to the Cloud Native Computing Foundation (CNCF). That foundation fosters the cloud native computing ecosystem. Kubernetes was the first graduated project for CNCF, and it became one of the fastest growing open source projects in history. Kubernetes now has more than 2,300 contributors and has been widely adopted by companies large and small, including half of the Fortune 100.

1) Kubernetes is a production-ready, open source platform designed with Google's accumulated experience in container orchestration,

With modern web services, users expect applications to be available 24/7, and developers expect to deploy new versions of those applications several times a day.
Containerization helps package software to serve these goals, enabling applications to be released and updated in an easy and fast way without downtime.
Kubernetes helps you make sure those containerized applications run where and when you want,
and helps them find the resources and tools they need to work.

2) One can say Kubernetes is a Multi Container management solution
3) Kubernetes gives containers their own IP addresses and a single DNS name for a set of containers, and can load-balance across them.
4) Automatically mount the storage system of your choice, whether from local storage, a public cloud provider such as GCP or AWS or a network storage system
5) Kubernetes progressively rolls out changes to your application or its configuration,
   while monitoring application health to ensure it doesn’t kill all your instances at the same time
6) If something goes wrong, Kubernetes will rollback the change for you
7) In addition to services, Kubernetes can manage your batch and CI workloads, replacing containers that fail, if desired.
8) It Automatically places containers based on their resource requirements and other constraints,
9) It Restarts containers that fail, replaces and reschedules containers when nodes die, kills containers that don’t respond to your user-defined health check,
10) Deploy and update secrets and application configuration without rebuilding your image and without exposing secrets in your stack configuration.

Kubernetes is cluster orchestration system.
Kubernetes coordinates a highly available cluster of computers that are connected to work as a single unit.
Kubernetes allow you to deploy containerized applications to a cluster without tying them specifically to individual machines.
Kubernetes automates the distribution and scheduling of application containers across a cluster in a more efficient way.
Kubernetes is an open-source platform and is production-ready.

-> A Kubernetes cluster consists of two types of resources:
Master: The Master coordinates or manage the cluster
Node: Nodes are the workers that run applications.

-> The master coordinates all activities in your cluster:
- Scheduling applications
- Maintaining applications' desired state,
- Scaling applications
- Rolling out new updates.

-> A Pod represents a unit of deployment: a single instance of an application in Kubernetes, which might consist
of either a single container or a small number of containers that are tightly coupled and that share resources.

STEPS TO CREATE AND DEPLOY IMAGE INTO DOCKER CONTAINER:



Steps are for deploying a SpringWebApp  in docker container

Prepare a file named "Dockerfile" with following green content
FROM tomcat:8.0.20-jre8
COPY /target/myApplication.war /usr/local/tomcat/webapps/

 

To create a Docker Image open Terminal/command Prompt and then navigate to the project root directory and build the docker image
( You need to have docker installed on your system)
$ docker build -t myapp .

(don’t miss “.” , as it tells docker file is in current directory)

If the above command is successful then use
$ docker images
see if the image has been created.There should be a docker image called myapp

Run Docker Image
$ docker run -d  -p 8080:8080  --name mydockerapp myapp

If above command was successful use:
$ docker ps -a
it should show the running images

logs of a particular container
$ docker logs ContainerName/ContainerID

last 2500 lines of logs will be displayed
$ docker logs --tail 2500 ContainerName/ContainerID

First get the Timestamp format in logs using
$ docker logs --timestamps ContainerName/ContainerID

If only a day’s log needs to be viewed
$ docker logs --since 2017-05-03 ContainerName/ContainerID

if only a day’s log needs to be viewed since 10 am
$ docker logs --since 2017-05-03T10:00 ContainerName/ContainerID

Stop the container
$ docker stop contaner_name/container_id

IP to access your deployed App
http://192.168.99.100:8080

Docker and Its components



Docker:
Docker is a tool/system/framework designed to make it easier to create, deploy, and run applications by using containers.
Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.


Docker Components:
Images - The blueprints of our application which form the basis of containers. 


Containers - Created from Docker images and run the actual application. We can create a container using docker run.

Docker Daemon - The background service running on the host that manages building, running and distributing Docker containers. 
The daemon is the process that runs in the operating system to which clients talk to.

Docker Client - The command line tool that allows the user to interact with the daemon. More generally, there can be other forms of clients too - such as Kitematic which provide a GUI to the users.


Docker Hub - A registry of Docker images. You can think of the registry as a directory of all available Docker images. If required, one can host their own Docker registries and can use them for pulling images.

Friday, May 25, 2018

start Camunda Process using Native API

import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ProcessHandler {

    private static final String HTTP_LOCALHOST_8080_APP_REST = "http://localhost:8080/mycamunda/rest";
    private static final Logger logger = LoggerFactory.getLogger(ProcessHandler.class);

    @Autowired
    private RuntimeService runtimeService;
    private ProcessInstance processInstance;

    public boolean startProcess(String processInstanceKey) {
        logger.debug("Called method startProcess() ");
        try {
            logger.debug("Starting process for  Key: " + processInstanceKey);
            processInstance = runtimeService.startProcessInstanceByKey(processInstanceKey);
            logger.debug("Process Started Successfully");
        } catch (Exception ex) {
            logger.debug("Error while starting the process. Reason: " + ex.getMessage());
            return false;
        }
        return true;
    }


}

Scrum and Scrum master

Scrum  Scrum is a framework which helps a team to work together.  It is like a rugby team (the scrum name comes from rugby game). Scrum enco...