anupama pradhan, ryan hunt - goto conference · provision: prepare the environment like install...

14
Health Care Service Corporation, a Mutual Legal Reserve Company Devops for Micro-services Anupama Pradhan, Ryan Hunt

Upload: others

Post on 26-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Health Care Service Corporation, a Mutual Legal Reserve Company

Devops for Micro-services

Anupama Pradhan,Ryan Hunt

Page 2: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

80+ Years of Success and Tradition

#6 on Diversity MBA’s 50 Out Front for Diversity Leadership Best Placesto Work for Women & Diverse Managers

Operating Blue Cross and Blue Shield plans in FIVE states: IL, MT,NM, OK, TX

OUR PURPOSE To do everything in our power to stand with our members in sickness and in health®

1936year founded

+$1 billionin IT spend

Over 21,000employees

15 millionmembers

2,100IT employees

208.3 millionclaims processed annually

LARGEST customer-ownedhealth insurer in the U.S. and 4th largest overall

Page 3: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

What is CI/CD

3

Ø Continuous Integration is the practice of testing each change done to your codebase automatically and as early as possible.

Ø Continuous Deployment follows the testing that happens during Continuous Integration and pushes changes to a staging or production system. This makes sure a version of your code is accessible at all times.

Git

Build Test packageJar

binary candidate PCF

Page 4: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Automation Tools

Concourse is a continuous integration/continuous delivery tool created by Pivotal. It uses pipelines to define a series of jobs that can execute the Terraform and Ansible scripts, perform Maven builds, among other things.

Ansible is an open source automation tool from RedHat, that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, etc

Docker is a customized container for developers and sysadmins to build, ship, and run distributed applications, whether on laptops, data center VMs, or the cloud.

4

Page 5: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Concourse Basics

Task: A task is a basic unit of work. It is execution of a command or script.

Resources: A resource is an entity that forms the input or output of a task

Jobs: A job is the configuration of tasks, input/output resources and execution criteria

Pipeline: Orchestration of multiple jobs form a pipeline.

5

Git

Build Jar

Page 6: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Ansible Basics

Tasks: Tasks are basic ansible components that can manage system resources, like services, packages, files, execution of system commands, and etc..Roles: reusable modules based on the well defined structure.Inventory: Collection of servers and variablesPlaybook: playbooks orchestrate the set of steps required to automate processes

Server/desktop

Server

Server

Hosts Inventory10.0.15.2110.0.15.22

Playbookos-upgrade

10.0.15.21

10.0.15.22

Page 7: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Versioning Strategy

ApplicationName-<major>.<minor>.<patch>.<type>

major: Indicates significant change in the application • Major change that is not compatible with prior versions• Large set of new features

minor: Indicates new release with minor enhancements, bug fixes that do not impact the backward compatibility

patch: bug fixes, no new functionalitytype: keyword that represents the stability of the release

For Example: snapshot, RC (release candidates), Final

7

Page 8: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Jar movement along the environments

8

Semantic VersionNexus

Archive DEVS3 Archive

(DEV) TESTS3 Archive

(TEST) PROD Nexus Archive

1.0.0-SNAPSHOT.1 x FAIL

1.0.0-SNAPSHOT.2 x PASS x FAIL

1.0.0-SNAPSHOT.3 x PASS x PASS x PASS x

Version Bump -> 1.1.0

1.0.1-SNAPSHOT.1 x PASS x PASS x PASS x

Version Bump -> 1.2.0

Page 9: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Sample Application : Customer Order Service

9

PCF

App Instance 1

App Instance 2Server 1 Server 2

Locator 1 Locator 2

Geode

Page 10: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

CI/CD Pipeline

Pipeline Jobs:provision: Prepare the environment like install jdk and geode binaries.

This task is reused for upgrade too.

configure: setup pdx packages, create regions, setup base configuration for locators and servers

deploy: Build application code to Gemfire server– Model, functions etc.

deploy-client: Deploy Client code to PCF (API interface)

10

Page 11: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Demo Pipeline Jobs

11

Build and deploy the microservice

Provision Geode

Configure Geode cluster for the microservice

Page 12: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Walk Through Code….

• Example for Geode Upgrade

12

Page 13: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

References

https://pivotal.io/concourse

https://www.ansible.com/it-automation

http://geode.apache.org/docs/guide/13/about_geode.html

https://geode.apache.org/docs/guide/11/configuring/cluster_config/gfsh_persist.html

https://www.youtube.com/watch?v=bAfEJtUVors&index=3&list=PL62pIycqXx-

QfmNrUmfKoTZXKU5K90JpK

13

Page 14: Anupama Pradhan, Ryan Hunt - GOTO Conference · provision: Prepare the environment like install jdkand geode binaries. This task is reused for upgrade too. configure: setup pdxpackages,

Source Code

• https://github.com/ap1256/gemfire-demoapp