with 3scale and openshift wednesday may 8th, 2019 learning ... · built-in data transformation...

46
Learning to use the Camel Rest DSL with 3scale and OpenShift Workshop for getting started with Apache Camel Wednesday May 8th, 2019 Mary Cochran Application Development Solution Architect Dusty Humphries Senior Cloud Solutions Architect Claus Ibsen Senior Principal Software Engineer

Upload: others

Post on 24-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Learning to use the Camel Rest DSL with 3scale and OpenShiftWorkshop for getting started with Apache Camel

Wednesday May 8th, 2019

Mary CochranApplication Development Solution Architect

Dusty HumphriesSenior Cloud Solutions Architect

Claus IbsenSenior Principal Software Engineer

Page 2: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Session Overview● What is Camel?● What is the Camel Rest DSL?● What is OpenShift?● What is 3Scale?● Hands on Lab

Page 3: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

What is Camel?

Page 4: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

System Integration

Page 5: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Apache Camel

is an

Integration Framework

based on

Enterprise Integration Patterns

Page 6: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Integration Framework

Page 7: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Enterprise Integration Patterns

Page 8: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Enterprise Integration Patterns

Page 9: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Camel Routes

from("file:data/inbox") .to("jms:queue:order");

<route> <from uri="file:data/inbox"/> <to uri="jms:queue:order"/></route>

Java DSL

XML DSL

Page 10: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Camel Routes with Splitter

Page 11: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Camel Routes with Splitter

from("file:inbox")

Page 12: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Camel Routes with Splitter

from("file:inbox") .split(body().tokenize("\n"))

Page 13: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Camel Routes with Splitter

from("file:inbox") .split(body().tokenize("\n")) .marshal(customToXml) Custom data

transformation

Page 14: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Camel Routes with Splitter

from("file:inbox") .split(body().tokenize("\n")) .marshal(customToXml) .to("activemq:line"); Custom data

transformation

Page 15: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Camel Architecture

Page 16: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Camel runs everywhere

Application Servers

Linux Containers

Page 17: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Runs on popular Java Runtimes

Page 18: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Camel connects everything

Enterprise Systems

● File● FTP● JMS● AMQP● JDBC● SQL● TCP/UDP● Mail● HDFS● JPA● MongoDB● Kafka● ...

Public Cloud

● AWS○ S3○ SQS○ Kinesis○ ...

● Google○ BigQuery○ PubSub

● Azure○ Blob○ Queue

● Box● Dropbox● Facebook● Linkedin● Salesforce● SAP● ServiceNowIoT

● CoAP● MQTT● PubNub

SaaS

Page 19: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

300+ Componentsahc ahc-ws amqp apns as2 asn1 asterisk atmos atmosphere-websocket atom atomix avro aws aws-xray azure bam barcode base64

beanio beanstalk bean-validator bindy blueprint bonita boon box braintree cache caffeine cassandraql castor cdi chronicle chunk cmis cm-sms coap cometd consul context corda core-osgi core-xml couchbase couchdb crypto crypto-cms csv cxf cxf-transport

digitalocean disruptor dns docker dozer drill dropbox eclipse ehcache ejb elasticsearch elasticsearch5 elasticsearch-rest elsql etcd eventadmin exec facebook fastjson fhir flatpack flink fop freemarker ftp ganglia geocoder git github google-bigquery google-calendar

google-drive google-mail google-pubsub google-sheets gora grape groovy groovy-dsl grpc gson guava-eventbus guice hawtdb hazelcast hbase hdfs hdfs2 headersmap hessian hipchat hl7 http http4 http-common hystrix ibatis ical iec60870 ignite infinispan

influxdb ipfs irc ironmq jackson jacksonxml jasypt javaspace jaxb jbpm jcache jclouds jcr jdbc jetty jetty9 jetty-common jgroups jibx jing jira jms jmx johnzon jolt josql jpa jsch jsonpath json-validator jt400 juel jxpath kafka kestrel krati kubernetes kura ldap ldif leveldb linkedin lra lucene lumberjack lzf mail master metrics micrometer milo mina mina2 mllp mongodb mongodb3 mongodb-gridfs mqtt

msv mustache mvel mybatis nagios nats netty netty4 netty4-http netty-http nsq ognl olingo2 olingo4 openshift openstack opentracing optaplanner paho paxlogging pdf pgevent printer protobuf pubnub quartz quartz2 quickfix rabbitmq reactive-streams reactor restlet

rest-swagger ribbon rmi routebox rss ruby rx rxjava2 salesforce sap-netweaver saxon scala schematron scr script service servicenow servlet servletlistener shiro sip sjms sjms2 slack smpp snakeyaml snmp soap solr spark spark-rest splunk spring spring-batch spring-boot spring-cloud spring-cloud-consul spring-cloud-netflix spring-cloud-zookeeper spring-integration spring-javaconfig

spring-ldap spring-redis spring-security spring-ws sql ssh stax stomp stream stringtemplate swagger swagger-java syslog tagsoup tarfile telegram test test-blueprint test-cdi testcontainers testcontainers-spring test-karaf testng test-spring thrift tika twilio twitter

undertow univocity-parsers urlrewrite velocity vertx weather web3j websocket wordpress xchange xmlbeans xmljson xmlrpc xmlsecurity xmpp xstream yammer yql zendesk zipfile zipkin zookeeper zookeeper-master

Page 20: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations
Page 21: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

+

Page 22: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

++

Page 23: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

++

+

Page 24: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

++

+=

Page 25: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

25

PATTERN BASED INTEGRATION

200+ COMPONENTS

Batch, messaging, web services, cloud,

APIs, and more ...

BUILT-IN DATATRANSFORMATION

JSON, XML, HL7, YAML, SOAP, Java,

CSV, and more ...

INTUITIVEROUTING

Develop integrations quickly

in Java or XML.

ENTERPRISE INTEGRATION

PATTERNS

Build integrations using enterprise best

practices.

Create, connect,and compose APIs

with ease.

NATIVE REST SUPPORT

Apache Camel, a powerful pattern-based integration engine with a comprehensiveset of connectors and data formats to tackle any integration problem.

Page 26: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

What is Camel Rest DSL?

Page 27: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Create, connect,and compose APIs

with ease.

NATIVE REST SUPPORT

Page 28: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Rest DSLServer

● Hosting RESTful APIs● Declared using Rest DSL● API Swagger Docs

Tooling

● Swagger Doc →Rest DSL generator

Client

● Invoke remote APIs

Page 29: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Rest DSL Server● Uses REST verbs

○ GET○ POST○ PUT

● URI templating○ GET /order/{id}○ PUT /order

● Swagger API Docs○ Description○ Data Types○ ...

● Configuration○ Camel Component○ Context-Path○ Port○ CORS○ ...

Page 30: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Rest DSL Hello World Example

Page 31: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Rest DSL Hello World Example

Page 32: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

What is OpenShift?

Page 33: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

General Distribution

OpenShift - ENTERPRISE KUBERNETES

Automated Operations

Kubernetes

Red Hat Enterprise Linux or Red Hat Enterprise Linux CoreOS

Application Services

CaaS PaaSBest IT Ops Experience Best Developer Experience

Cluster Services

Developer Services

Middleware, Service Mesh, Functions, ISV Metrics, Chargeback, Registry, Logging Dev Tools, Automated Builds, CI/CD, IDE

Page 34: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

OpenShift - Features

MyService

Monitoring

Tracing

API

Discovery

Invocation

Resilience

Pipeline

Authentication

Logging Elasticity

Page 35: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

What is 3Scale?

Page 36: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

36

Control

● Security● Key management● Rate limiting● Policy enforcement● App and user

management● Provisioning

Flexibility

● Distributed● Multi-department● Multi-environment● Highly scalable● Powerful APIs● Webhooks

Visibility

● Analytics● App tracking● User tracking ● Traffic alerts● Developer

support

RED HAT 3SCALE API MANAGEMENT

Page 37: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

37

RED HAT 3SCALE API MANAGEMENT

Admin Portal

● Dashboard● Developer /

Application / Key Management

● CMS● Analytics● Billing

API Consumers

(App Developers)Authorize & Report Traffic

Developer Apps

Developer Portal

● API Provider Branded ● API Description● Signup● ActiveDocs (OAS)

API BackendAPI Gateway

API Manager

API Provider

(Line Of Business / Product Manager,

Developers, Writers, Ops)

API Request Authorized API Request

Page 38: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

38

3SCALE API MANAGEMENT

RBDMS

SAP

NoSQL

WS

REST

JMS

+ more

FUSE on Openshift

Red Hat Fuse

Service API

Red Hat Fuse

Service API

Red Hat Fuse

Service API

Developers

Partners

Mobile App

Affiliates

Internal Projects

+ more

API MANAGEMENT

Access control and security

API contracts and rate limits

Analytics and reporting

Developer portal and docs

Billing and payments

Page 39: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Help us build better experiences.Visit the User Experience Design team in the Feedback Zone.

Ecosystem ExpoExhibit Hall A

Red Hat Managed Integration (Solution Explorer)Dashboard usability study and navigation card sort.

Contact NameTiffany Nolan

Page 40: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

The Lab

Page 41: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

High Level Lab Steps● Login to Your Env● Create a Camel Route and Deploy to OpenShift● Add Swagger Docs● Manage With 3Scale● Extra Credit: Add Docs to 3Scale

Page 42: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

The Labhttps://tinyurl.com/y6hertd7

Page 44: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

Book Signing Tomorrow● Book Signing

Thursday May 9th1:30pm - 2:30pm

Red Hat Dev Zone

https://www.manning.com/books/camel-in-action-second-edition

Page 45: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

FINAL TASK:FILL IN EVALUATION FORM IN RED HAT SUMMIT APP, DO IT NOW!Fill in: Learning to use the Camel Rest DSL with 3scale and OpenShiftMary CochranApplication Development Solution Architect

Dusty HumphriesSenior Cloud Solutions Architect

Claus IbsenSenior Principal Software Engineer

Page 46: with 3scale and OpenShift Wednesday May 8th, 2019 Learning ... · BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations

THANK YOUplus.google.com/+RedHat

linkedin.com/company/red-hat

youtube.com/user/RedHatVideos

facebook.com/redhatinc

twitter.com/RedHat