Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_bootToshiaki Maki
Spring Bootのハンズオン資料です。
----
Grailsの次期バージョン3.0でベースになることが予定されている、Spring界隈の新しいトレンド"Spring Boot"のハンズオンを通じて、Spring Bootのイメージを掴んでもらいたいと思います。内容は以下の通りです。
Spring Boot概要説明
Spring Bootを用いて簡単なアプリケーションを実際に作ってみる
(合計で約二時間弱)
Cloud Foundy Java Client V 2.0 #cf_tokyoToshiaki Maki
The document summarizes the changes made to the Cloud Foundry Java client between version 1 and version 2. Version 1 had problems with being monolithic, blocking, and dependent on Spring Framework. Version 2 addresses these by separating the client into modules, supporting non-blocking reactive streams, and not requiring Spring. It also improves the API design by removing overloading and simplifying usage.
This document demonstrates a continuous integration and delivery workflow using Concourse CI to deploy code changes through development, staging, and production environments on Cloud Foundry. It shows how features are developed on branches off of develop, merged to develop after testing, and later merged into release branches and deployed through the environments after additional testing before being promoted to production.
Cloud Foundy Java Client V 2.0 #cf_tokyoToshiaki Maki
The document summarizes the changes made to the Cloud Foundry Java client between version 1 and version 2. Version 1 had problems with being monolithic, blocking, and dependent on Spring Framework. Version 2 addresses these by separating the client into modules, supporting non-blocking reactive streams, and not requiring Spring. It also improves the API design by removing overloading and simplifying usage.
This document demonstrates a continuous integration and delivery workflow using Concourse CI to deploy code changes through development, staging, and production environments on Cloud Foundry. It shows how features are developed on branches off of develop, merged to develop after testing, and later merged into release branches and deployed through the environments after additional testing before being promoted to production.
The document summarizes the key features and highlights of Spring Boot 1.3, which is scheduled for release in September 2015. Some of the main things covered include Spring 4.2 support, new auto-configurations for caching, OAuth2, and other components, improvements to non-functional aspects like metrics export, and enhancements to DevOps tools including a systemd service generator and improved development tools. Upcoming user group events related to Spring are also announced.
This document introduces Concourse CI, an open source continuous integration and delivery tool. It provides an overview of Concourse and compares it to Jenkins. It describes Concourse's architecture including tasks, resources, jobs and pipelines. It then explains how to install Concourse using Vagrant, executable binaries or BOSH. Finally it provides examples of simple "hello world" and more advanced Java project and Cloud Foundry deployment pipelines.
This document discusses how to install Concourse CI using BOSH on AWS and Azure. It provides steps to set up the necessary infrastructure like VPC, security groups, install BOSH Director. It then covers uploading stemcells and releases, creating the BOSH manifest file, and deploying Concourse. The document emphasizes that BOSH allows provisioning Concourse in a production-ready, scalable way and provides samples for AWS and Azure deployments.
This document provides an overview of Cloud Foundry, including:
- Cloud Foundry is an open source cloud application platform that allows developers to build, deploy, and run applications.
- It describes the architecture of Cloud Foundry including the cloud controller, cells, buildpacks, and how applications are deployed and scaled.
- It also discusses services on Cloud Foundry, including the marketplace, creating and binding services, and accessing service credentials.
Short Lived Tasks in Cloud Foundry #cfdtokyoToshiaki Maki
The document discusses different types of tasks in Cloud Foundry including long-running process (LRP) tasks, app process staging tasks, and app tasks. It provides examples of using the cf v3-run-task command to run tasks such as database migrations, flyway migrations, and a custom task to output a greeting.
Implement Service Broker with Spring Boot #cf_tokyoToshiaki Maki
This document discusses implementing a service broker with Spring Boot to provide services to applications running on Cloud Foundry. It provides an overview of service brokers and their APIs in Cloud Foundry. It then demonstrates how to build a sample fake service broker using Spring Boot and the Spring Cloud CloudFoundry Service Broker library by implementing the broker APIs and services. The broker is deployed locally to PCF Dev and services are created and bound to applications.
From Zero to Hero with REST and OAuth2 #jjugToshiaki Maki
The document discusses authorization using OAuth2 and securing REST APIs. It begins with an introduction to OAuth2 terminology and flow, including the authorization code grant and resource owner password credentials grant types. It then covers using JSON Web Tokens (JWTs) as access tokens, explaining that JWTs can be verified at startup without calling the authorization server for each request, unlike plain access tokens. The document concludes with links to code samples for implementing OAuth2 in Spring.
Team Support in Concourse CI 2.0 #concourse_tokyoToshiaki Maki
The document discusses new team support features in Concourse CI 2.0. It introduces the ability to have multiple teams with separate pipelines and builds. Authentication and authorization can now be configured separately for each team using various providers like Basic auth, GitHub teams, Cloud Foundry UAA, and generic OAuth 2. Commands to configure the authentication for each team using the different providers are also shown.
The document discusses Spring Cloud services. It describes how to implement a configuration server, service registry, and circuit breaker dashboard locally using Spring Cloud. It then explains how these same patterns and services can be provided on Pivotal Cloud Foundry as managed services, including how to create and bind the services in Cloud Foundry.
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...Toshiaki Maki
This document summarizes new features in Spring Framework 4.3 and Spring Boot 1.4, including improvements to banners, testing, and support for Spring Framework 4.3. Key updates include support for image banners in Spring Boot, simplifications to testing configuration and capabilities, and composed annotation mappings and scopes in Spring Framework.
The document discusses Kotlin support in Spring Framework 5. It covers how Kotlin can be used with Spring Boot and Spring's programming model through features like extension functions and reified type parameters. It provides code examples of using Kotlin idioms with Spring components like the application context, JdbcTemplate, and RestTemplate to make the code more concise and readable. It also briefly mentions new features in Spring Framework 5 like reactive support using Spring WebFlux and using router functions with Kotlin.
This document discusses using Spring Cloud Netflix to connect microservices. It covers:
- An overview of Netflix and Spring Cloud
- How to use Spring Cloud Netflix libraries like Eureka, Ribbon and Hystrix to implement service discovery, load balancing and fault tolerance between microservices
- Demos of creating Eureka service registry and registering producer/consumer services
This document provides an introduction to Cloud Foundry. It discusses why PaaS is useful, describes the key components of Cloud Foundry including the Cloud Controller, Cells, Buildpacks, and Services. It then provides instructions on how to deploy applications to Cloud Foundry including Java applications using Spring Boot or Java EE, as well as applications in other languages. It also covers scaling applications, the use of Organizations and Spaces, logging, and blue/green deployments.
Managing your Docker image continuously with Concourse CIToshiaki Maki
This document discusses managing Docker images continuously using Concourse CI. It describes using a Docker image resource in a Concourse pipeline configuration file to build a custom Docker image. The pipeline pulls from a Git repository, builds the image using a Dockerfile, and pushes the new image to a registry on each run, ensuring the image is always up to date.
From Spring Boot 2.2 to Spring Boot 2.3 #jsugToshiaki Maki
Spring Boot 2.3 will include improvements to support for containers and Kubernetes, as well as updates for Spring Framework 5.3 including support for JDK 17 LTS and GraalVM native images. Other new features in Spring Boot 2.3 include enhancements to Spring Data and a target release date of April 2020. Spring Framework 5.3 will build upon features introduced in 5.x such as RSocket and coroutines.
The document discusses a meetup about integrating Concourse and Spinnaker. It covers why Spinnaker is useful for continuous delivery, specifically blue/green deployments, rollbacks, and automated canary analysis. It then discusses how Concourse and Spinnaker can be integrated using the Concourse Spinnaker resource to trigger Spinnaker pipelines from Concourse and vice versa. A demo is shown of building a Docker image, deploying it to Spinnaker, running tests with JMeter, and rolling back if tests fail.
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1tToshiaki Maki
This document summarizes a presentation about serverless computing using Spring Cloud Function, Knative, and riff. It discusses what serverless computing is, an overview of Spring Cloud Function for developing serverless applications, and how Knative and riff can be used as platforms to deploy serverless workloads on Kubernetes. Code examples are provided to demonstrate invoking functions via HTTP and messaging with Spring Cloud Function and deploying functions to Knative and riff.
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1Toshiaki Maki
Spring Boot Actuator 2.0 provides additional monitoring endpoints for Spring Boot applications running in production. Micrometer allows instrumenting Spring Boot applications without vendor lock-in by providing common metrics that can be exported to systems like Prometheus, Datadog, and Cloud Foundry Metrics. Key features include multi-dimensional metrics with tags instead of hierarchies, histograms for response time distributions, and client-side percentiles. Monitoring of Spring Boot applications can be done on Cloud Foundry by scraping the /actuator/prometheus endpoint across application instances behind a load balancer.
Spring Boot Actuator 2.0 has been refactored and now supports Micrometer for instrumentation and metrics collection. Micrometer allows instrumentation without vendor lock-in and supports many monitoring systems including Prometheus, Datadog, and Cloud Foundry Metrics. New features in Spring Boot Actuator 2.0 include support for Spring WebFlux, more secure configuration of endpoints, and histograms and percentiles for more detailed metrics. Micrometer provides a common API for instruments like timers, counters, and gauges and supports adding custom meters.
Open Service Broker APIとKubernetes Service Catalog #k8sjpToshiaki Maki
The document discusses the Open Service Broker API and Kubernetes Service Catalog. It describes how the Service Broker API allows developers to provision and bind to services outside of Kubernetes. It then explains how the Kubernetes Service Catalog implements the Service Broker API to provide services within Kubernetes using new resource types like ServiceInstance and ServiceBinding. The document provides examples of installing brokers, listing available services, and creating instances and bindings.
Spring Cloud Function & Project riff #jsugToshiaki Maki
This document discusses Spring Cloud Function and Project Riff. It provides an overview of serverless computing and functions-as-a-service (FaaS). It introduces Spring Cloud Function as a way to write functions in Spring Boot and deploy them to various FaaS providers. It also describes Project Riff, an open source FaaS platform that runs on Kubernetes and provides event-driven functions through containers and sidecars that connect functions to event brokers. It demonstrates packaging functions as containers and connecting them to brokers through sidecars to handle event streaming and scaling of functions.
Introduction to Spring WebFlux #jsug #sf_a1Toshiaki Maki
The document provides an introduction and overview of Spring WebFlux, a non-blocking web framework for Spring. It discusses the differences between blocking and non-blocking web stacks, and how Spring WebFlux uses reactive streams and programming. Code examples are provided showing how to build reactive controllers and streams in Spring WebFlux that support backpressure.
BOSH / CF Deployment in modern ways #cf_tokyoToshiaki Maki
1. The document discusses deploying BOSH and Cloud Foundry using the BOSH CLI v2. It covers the general BOSH deployment workflow, differences between BOSH CLI v1 and v2, maintaining manifest files using operation files, downloading BOSH releases, variable interpolation, and provisioning the BOSH director.
2. It also provides examples of deploying Concourse on a single VM without a BOSH director using the BOSH CLI create-env command and different infrastructure configurations.
Why PCF is the best platform for Spring BootToshiaki Maki
Pivotal Cloud Foundry (PCF) provides many out-of-the-box features for managing and operating Spring Boot apps, including a cloud profile, Spring Cloud Connectors, Spring Cloud Services, a Trace Exporter, Spring Actuator support in Apps Manager, and a Metrics Forwarder Service. These features simplify development and operations of microservices built with Spring technologies when deployed to PCF.
This document provides instructions for installing and configuring Zipkin, an open source distributed tracing system. It describes how to download Zipkin, configure it to store traces in MySQL or Elasticsearch, and receive traces from Kafka. It also covers enabling OAuth2 authentication and securing the Zipkin UI and API endpoints.
The document discusses various boilerplate patterns related to building microservices using the Spring Framework and Spring Cloud. It outlines patterns for application coordination, configuration, operations for the JVM, runtime platform provisioning, and microservice operations. It also introduces Spring Cloud projects like Config Server, Eureka, Ribbon, Hystrix, Stream, and Sleuth that can help implement these patterns to build cloud-native microservice architectures.
Spring Framework 5.0による Reactive Web Application #JavaDayTokyoToshiaki Maki
The document discusses reactive programming and the Spring Framework 5.0 release. It provides an overview of reactive programming concepts like asynchronous non-blocking applications. It also discusses Reactive Streams and libraries like Reactor. Finally, it covers new features in Spring Framework 5.0 like performance improvements, support for JDK 9, and the introduction of reactive APIs in Spring.
The document discusses various topics related to Spring Boot including Spring Data REST, CSRF protection, and Cloud Foundry integration. It provides code examples for exposing repositories as REST APIs with Spring Data REST, handling errors and exceptions, and securing applications with CSRF tokens. It also briefly mentions Spring Boot features like configuration properties and the Actuator.
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3Toshiaki Maki
The document describes Spring Cloud Stream, an event-driven microservice framework built on Spring Boot and Spring Integration. It provides primitives for building message-driven microservices including persistent publish-subscribe messaging, consumer groups, and support for multiple message brokers like RabbitMQ and Kafka. Applications are developed as message sources, sinks and processors. Spring Cloud Stream handles mapping of applications to messaging infrastructure.
Data Microservices with Spring Cloud Stream, Task, and Data Flow #jsug #spri...Toshiaki Maki
The document discusses Spring Cloud Data Flow, which provides a framework for building data pipelines using microservices. It describes how Spring Cloud Data Flow orchestrates long-lived streaming applications using Spring Cloud Stream and short-lived batch processing applications using Spring Cloud Task. It also discusses how these applications can be deployed on modern platforms using deployment-specific Spring Cloud Deployers.
7. Spring Ecosystem
Web
Base
DataAccess Batch Enterprise
Integration
Security
IDE
RAD Starter
Social
Spring MVC
Spring WebFlow
Spring Mobile
Spring Roo
Spring Data
JPA
Spring Data
MongoDB
Spring Boot
SpringSource Tool Suite (STS)
Spring Social
Twitter
Spring Social
Facebook
Spring Social
Github
Big Data
Spring Data
Rest
Spring Batch
Spring
Integration
Spring DI Spring AOP
Spring Security
Spring Security
OAuth
Spring XD
8. Spring Ecosystem
Web
Base
DataAccess Batch Enterprise
Integration
Security
IDE
RAD Starter
Social
Spring MVC
Spring WebFlow
Spring Mobile
Spring Roo
Spring Data
JPA
Spring Data
MongoDB
Spring Boot
SpringSource Tool Suite (STS)
Spring Social
Twitter
Spring Social
Facebook
Spring Social
Github
Big Data
Spring Data
Rest
Spring Batch
Spring
Integration
Spring DI Spring AOP
Spring Security
Spring Security
OAuth
Spring XD
今日のスコープ
9. Spring DI x AOP
• 成熟度:★★★ version: 3.2.4.RELEASE
• SpringEcosystemのコア
• JavaConfigサポート(@Configuration,
@Bean)
• No XML hell!
• JSR-330サポート(@Inject, @Named)
18. Spring Data
• 成熟度:★★☆
• データアクセスの抽象化ライブラリ
• オブジェクトマッピング、Repository、Templateを提供
• いろいろなデータストアをサポートするサブプロジェクトからなる
• Spring Data Commons
• Spring Data JPA
• Spring Data MongoDB, Redis, Neo4j, REST, Hadoop, HBase, Solr, ...
• 各データストアにRepositoryやTemplateを提供してBoilerplateをなく
す