Learning to Use the Camel Rest DSL with 3Scale and Openshift
Total Page:16
File Type:pdf, Size:1020Kb
Wednesday May 8th, 2019 Learning to use the Camel Rest DSL with 3scale and OpenShift Workshop for getting started with Apache Camel Mary Cochran Application Development Solution Architect Dusty Humphries Senior Cloud Solutions Architect Claus Ibsen Senior Principal Software Engineer Session Overview ● What is Camel? ● What is the Camel Rest DSL? ● What is OpenShift? ● What is 3Scale? ● Hands on Lab What is Camel? System Integration Apache Camel is an Integration Framework based on Enterprise Integration Patterns Integration Framework Enterprise Integration Patterns Enterprise Integration Patterns Camel Routes from("file:data/inbox") .to("jms:queue:order"); Java DSL <route> <from uri="file:data/inbox"/> XML DSL <to uri="jms:queue:order"/> </route> Camel Routes with Splitter Camel Routes with Splitter from("file:inbox") Camel Routes with Splitter from("file:inbox") .split(body().tokenize("\n")) Camel Routes with Splitter from("file:inbox") .split(body().tokenize("\n")) .marshal(customToXml) Custom data transformation Camel Routes with Splitter from("file:inbox") .split(body().tokenize("\n")) .marshal(customToXml) .to("activemq:line"); Custom data transformation Camel Architecture Camel runs everywhere Application Linux Servers Containers Runs on popular Java Runtimes Camel connects everything ● AWS ● File ○ S3 ● FTP ○ SQS ● JMS ○ Kinesis ● AMQP ○ ... ● JDBC Public Cloud ● Google ● SQL ○ BigQuery ● TCP/UDP ○ PubSub ● Mail ● Azure ● HDFS ○ Blob ● JPA ○ Queue Enterprise ● MongoDB Systems ● Kafka ● ... ● Box ● Dropbox ● Facebook ● CoAP SaaS ● Linkedin ● MQTT ● Salesforce ● PubNub ● SAP IoT ● ServiceNow 300+ Components ahc 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 + + + + + + + + = + PATTERN BASED INTEGRATION Apache Camel, a powerful pattern-based integration engine with a comprehensive set of connectors and data formats to tackle any integration problem. ENTERPRISE 200+ BUILT-IN DATA INTUITIVE NATIVE REST INTEGRATION COMPONENTS TRANSFORMATION ROUTING SUPPORT PATTERNS Build integrations Batch, messaging, JSON, XML, HL7, Develop Create, connect, using enterprise best web services, cloud, YAML, SOAP, Java, integrations quickly and compose APIs practices. APIs, and more ... CSV, and more ... in Java or XML. with ease. 25 What is Camel Rest DSL? NATIVE REST SUPPORT Create, connect, and compose APIs with ease. Rest DSL Server Client ● Hosting RESTful APIs ● Invoke remote APIs ● Declared using Rest DSL ● API Swagger Docs Tooling ● Swagger Doc → Rest DSL generator Rest DSL Server ● Uses REST verbs ● Configuration ○ GET ○ Camel Component ○ POST ○ Context-Path ○ PUT ○ Port ○ CORS ● URI templating ○ ... ○ GET /order/{id} ○ PUT /order ● Swagger API Docs ○ Description ○ Data Types ○ ... Rest DSL Hello World Example Rest DSL Hello World Example What is OpenShift? OpenShift - ENTERPRISE KUBERNETES Application Cluster Developer Services Services Services Middleware, Service Mesh, Functions, ISV Metrics, Chargeback, Registry, Logging Dev Tools, Automated Builds, CI/CD, IDE Automated Operations Kubernetes Red Hat Enterprise Linux or Red Hat Enterprise Linux CoreOS Best IT Ops Experience CaaS PaaS Best Developer Experience General Distribution OpenShift - Features API Tracing Discovery Monitoring Invocation MyService Logging Elasticity Authentication Resilience Pipeline What is 3Scale? RED HAT 3SCALE API MANAGEMENT Control Visibility Flexibility ● Security ● Analytics ● Distributed ● Key management ● App tracking ● Multi-department ● Rate limiting ● User tracking ● Multi-environment ● Policy enforcement ● Traffic alerts ● Highly scalable ● App and user ● Developer ● Powerful APIs management support ● Webhooks ● Provisioning 36 RED HAT 3SCALE API MANAGEMENT API Manager Developer Portal Admin Portal ● API Provider Branded ● Dashboard API Consumers ● API Description ● Developer / API Provider ● Signup Application / Key (App Developers) ● ActiveDocs (OAS) Management (Line Of Business / Authorize & ● CMS Product Manager, Report Traffic ● Analytics Developers, Writers, ● Billing Ops) API Request Authorized API Request Developer Apps API Gateway API Backend 37 3SCALE API MANAGEMENT RBDMS FUSE on Openshift API MANAGEMENT SAP Developers Service API Access control and security Partners NoSQL Red Hat Fuse API contracts and rate limits Mobile App WS Service API Analytics and Affiliates Red Hat Fuse reporting REST Internal Projects Developer portal and Service API docs + more JMS Red Hat Fuse Billing and payments + more 38 Help us build better experiences. Visit the User Experience Design team in the Feedback Zone. Red Hat Managed Integration (Solution Explorer) Ecosystem Expo Dashboard usability study and navigation Exhibit Hall A card sort. Contact Name Tiffany Nolan The Lab 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 The Lab https://tinyurl.com/y6hertd7 HELPFUL LINKS https://docs.openshift.com/online/getting_started/beyond_the_basics.h tml#getting-started-beyond-the-basics https://access.redhat.com/documentation/en-us/red_hat_3scale/2.1/ht ml/quickstart/quickstart Book Signing Tomorrow ● Book Signing Thursday May 9th 1:30pm - 2:30pm Red Hat Dev Zone https://www.manning.com/books/camel-in-action-second-edition 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 OpenShift Mary Cochran Application Development Solution Architect Dusty Humphries Senior Cloud Solutions Architect Claus Ibsen Senior Principal Software Engineer THANK YOU plus.google.com/+RedHat facebook.com/redhatinc linkedin.com/company/red-hat twitter.com/RedHat youtube.com/user/RedHatVideos.