More Related Content Similar to Building Data Environments for Production Microservices with Geode (20) More from VMware Tanzu (20) Building Data Environments for Production Microservices with Geode2. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 2
#6on Diversity MBA’s
50 Out Front for Diversity Leadership Best Places
to Work for Women & Diverse Managers
Operating Blue Cross and
Blue Shield plans in FIVE
states: IL, MT,
NM, OK, TX
Health Care Service Corporation
OUR PURPOSE
To do everything in our power to stand with our
members in sickness and in health®
1936
year founded
+$1billion
in IT spend
Over
21,000
employees
15million
members
2,100
IT employees
208.3million
claims processed
annually
LARGESTcustomer-owned
health insurer in the U.S. and
4th largest overall
3. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 3
The Digital Portfolio
Products
• RESTful APIs
• Web Applications
• Native Mobile
• Data Services
Methodology
• Engineering + Product + Design
• Extreme Programming
• Test Driven Development
• Pair Programming
3
Creating new digital products and rebuilding legacy ones across the enterprise
4. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 4
The Digital APIs
API Consumers
MOBILE APIWEB
MS MS
MS
MS
API API
SERVICES
API GATEWAY
Information APIs
• data + business rules
• source of truth
• read only
• microservices
• high performance
5. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 5
Microservice Architecture
SOURCE DATA
API Consumers
MOBILE APIWEB
MS MS
MS
MS
API API
?
SERVICES
API GATEWAY
6. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 6
Microservice Architecture
SOURCE DATA
SERVICES
API GATEWAY
API Consumers
MOBILE APIWEB
MS MS
MS
MS
API API
7. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ 7
Microservice Architecture
SOURCE DATA
SERVICES
API GATEWAY
MS MS
MS
MS
API Consumers
MOBILE APIWEB
API API
TRANSFORM
READ-ONLY
DATASTORES
8. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
More databases, more ...
8
Operational Challenges
• Distributed infrastructure gets complicated.
• Data stores are a mix of configuration and code.
• Distributed monitoring and analytics.
• Developers own it all.
Approaches
• Automate things aggressively.
• Use pipelines for all changes.
• Treat configuration like code.
• Do versioning.
9. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Tools
9
Concourse Ansible Jinja2
10. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Ansible
10
prepare_filesystem.yml
- name: create geode base
file:
state: directory
path: /opt/geode
owner: geode-service
mode: 0644
An automation tool for IT infrastructure with a host of built-in commands.
Also YAML.
start_services.yml
- name: enable locator service
systemd:
name: geode-locator
state: started
11. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Concourse the “continuous thing-doer”
11
jobs:
- name: job-hello-world
public: true
plan:
- task: hello-world
config:
platform: linux
image_resource:
type: docker-image
source: {repository: busybox}
run:
path: echo
args:
- hello world
Simple YAML configuration And a web UI
12. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Jinja2
12
A configuration is passed through template code to generate content. Available as a
python library and cli.
config.yml
greeting: hello
people:
- name: alice
- name: bob
template.yml
messages:
{% for p in people %}
- {{ greeting }} {{p.name }}
{% endfor %}
output.yml
messages:
- hello alice
- hello bob
$ jinja2 config.yml template.yml > output.yml
13. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Concourse + Jinja2
13
name: build things
plan:
{% for thing in things %}
-get: {{thing.name}}
resource: {{thing.name}}-s3
{% endfor %}
Iterators can cut down on code and keep things consistent.
name: build things
plan:
-get: thing1-s3
resource: thing1-s3
-get: thing2-s3
resource: thing2-s3
-get: thing3-s3
resource: thing3-s3
14. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Flow control
14
- get: geode-build-version
trigger: true
{% if serial == true %}
passed:
- test-cluster-{{environments[loop.index0-1].name }}
{% endif %}
Basic logic adds some flexibility
15. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
Variables all the way down
15
params:
ENVIRONMENT: {{env.name}}
LIB_RESOURCES:
{% for resource in lib_resources -%}
- {{ resource.name }}
{% endfor %}
Pass dynamic data down into tasks and shell scripts
16. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
A Demonstration
16
17. Unless otherwise indicated, these slides are © 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons
Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/
In Conclusion
• Give your microservices their own data
• Automate everything about the data stores
• Treat configuration and provisioning like code
• Use pipelines for operational tasks
• Create templates and generate pipelines for reuse
17
18. > Stay Connected.
Reach me at ryan_hunt@hcsc.net
Related Talks
9/24 @ 1:45p – Cloud Native Architecture – Anupama Pradhan and Jeff Cherng
9/26 @ 2:30p - Teaching TDD to Different Learning Styles – Tiffany Larson
#springon
e
@s1
p
Editor's Notes continuation of cloud native architecture talk Founded in 1936 ... seen some transformation through technology
Answering queries with "information" from data and business rules
no writing
About the data ...
Everybody needs lots of it
Everybody's answering different questions
About the data ...
Works but does not scale
Just try changing something
Will not perform
Everybody needs lots of data
Everybody's answering different questions Single responsibility
Modelled based on service access patterns
Internals can change independently
Microservices are stateless
But ... now you have more databases
And an ETL process Comes with baggage
provisioning
day 2 ops
2 members 600k records kill and fill nightly
24 members 70M records streaming near real time
125 members 4B records streaming near real time (future)
changes need to be done consistently
computers are good at that, let them do it briefly introduce and explain why they get along so well enabler
How these tools and ideas come together to let you create reusable pipelines for building complex things