Skip to content

materials, links and sample code for cloud-native lecture

Notifications You must be signed in to change notification settings

maeddes/hft-2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Module: Cloud Introduction (theory-block I)

  • What is Cloud Computing? Encounters in everyday life and history

  • Characteristic, advantages & challenges

  • Terminology - public, private, hybrid, dedicated

  • Abstraction layers - IaaS, PaaS, FaaS, SaaS

  • Overview - Hypervisors, virtual machines, containers and orchestration

  • Overview - Global cloud service providers (CSPs), technologies and corresponding offerings

Objectives and exercises

The student is able to describe cloud computing in own words and list examples for offerings, topologies and technologies. Includes ability to differentiate between different abstraction layers and knowledge how those layers and according technologies interact with each other. No exercises in this module

Module: Spring Boot Introduction

  • Background: Spring Framework - History & components

  • Spring ← → Spring Boot

  • Spring Initializr (start.spring.io) & starter dependencies

  • Basic project structure (folders, configuration ..)

  • "Hello, World!" example explained

  • Basic logging and testing

  • Using Actuator

Objectives

The student is able to build and configure an own Spring Boot application from scratch with the IDE of choice. The exercise is to build an own "Hello, World!" application that exposes various REST endpoints and is able to execute CRUD operations on the state of the application. Optional: Add logging and testing, configure Actuator.

Exercises

  • Build a simple Spring Boot Microservice with the following starter dependencies: Web, Actuator

  • Run the microservice and test the endpoint /actuator/health and /actuator/info

  • Annotate the Microservice with @RestController and implement a "Hello, World!" method, which responds to an HTTP GET request.

  • Add some basic "functionality" to make the service react to HTTP GET, POST, PUT and DELETE calls (e.g. modify an internal list)

  • Change the configuration to make the server run on port 8081 instead of 8080

Module: Containers

  • What are containers and how do they work

  • Containers vs. VMs

  • History of containers and rise of Docker

  • Docker concepts: daemon, hub, dockerfile, CLI

  • Multi-container handling with docker-compose

  • Limitations and problems with containers

  • Multiple container build options (Dockerfile, Buildpacks/Paketo/Jib)

Objectives and exercises

The student understands the concepts and use cases of container technology and is able to describe them. The first exercise is to pull sample images from an image registry (e.g. Docker Hub) and interact with them (run, expose port, execute shell, cleanup etc). After that the student can show how to build a custom image via Dockerfile and push it to a registry for others to access. Take the sample application from module "Spring Boot Intro", put it into a container image and run it using a container build mechanism of your choice.

Module: Persistence

  • Spring Data

  • Concept of entities and repositories

  • JPA and JDBC basics

  • H2, PostgeSQL, MySQL - configuration via Spring Boot

  • Running databases as Docker images

Objectives and exercises

The student is able to build a Spring Boot application (or extend an existing one) with Spring Data configuration. The exercise is to create an application, which performs CRUD operations on a database backend. The database can either be in-memory (H2) or a (containerized) PostgreSQL. Optional: Provide a docker-compose file to stand up a multi-container environment with application and database.

Module: Configuration & Profiles

  • Various possibilities of external configuration in Spring (Boot)

  • Order of configuration options

  • Spring profiles

  • Consuming configuration properties with @Value and specifying defaults

  • Spring Cloud Config Server and Client as reference example for external configuration

Objectives and exercises

The student is able to build a Spring Boot application with various configuration profiles and knows how to set the desired one. It is also required to understand how Spring Boot will prioritize between them, e.g. ("Who wins if multiple are specified?") and what the advantages and drawbacks of them are. The exercise is to extend the existing persistence application and provide different persistence backend for different purposes, e.g. set an in-memory database for development and test purposes and a containerized one for production.

Module: Synchronous Communication, API & REST

  • Synchronous communication

  • REST

  • HTTP, Basics, Maturity Model

  • Synchronous communication with RestTemplate (and Feign)

Objectives and exercises

The student understands the concepts of an API and synchronous communication in distributed systems and can explain it in own words. The exercise is to implement a CRUD application client to work with a REST API using either RestTemplate (or Feign).

Module: Cloud-native software development & Microservices (theory-block II)

  • CAP Theorem

  • Conway’s Law

  • Fallacies of distributed computing

  • Domain-Driven Design basics

  • 12-factor application

  • Evolution of applications and deployments: Monolithic → Service-Oriented Architecture → Microservices

  • Introduction to serverless and FaaS terminology

Objectives and exercises

The student knows about the evolution of distributed systems and the drivers towards state-of-the-art implementation and deployment. She/he can explain the underlying concepts and theories and put it into practical context. No dedicated exercises for this module. Recap of basics: Spring Boot, Docker, configuration, persistence and messaging.

Module: 12-factor recap & Kubernetes introduction

  • Live coding walkthrough for 12-factor

  • Recap:

    • Spring Boot Intro (start.spring.io & dependencies)

    • Docker & Container

    • Persistence & JPA

    • Configuration & Profiles

    • API * REST

  • Introduction:

    • Kubernetes (Pods, Deployments, Services)

Objectives and exercises

The student can relate the 12 factors to real world technogogies and list patterns and anti-patterns for each. She/he can explain the underlying concepts and theories and put it into practical context. No dedicated exercises for this module. Recap of basics: Spring Boot, Docker, configuration, persistence and messaging.

Module: Kubernetes

  • Presentation: Cloud Platforms & Kubernetes

  • Recap:

    • Docker & Container

    • API * REST

  • Kubernetes

    • Platform History (Container basics → mature platforms)

    • Shared responsibility and roles

    • Steps from app to running containers

    • Basic Artefacts

      • Pod

      • Deployment

      • ReplicaSet

      • Service

Objectives and exercises

The student understands the requirements and expectations towards cloud platforms and is able to list them. She/he can explain the advantages over standard container operation with Docker. The exercise is to take a sample Spring Boot application and walk through the steps to containerize and deploy to Kubernetes. The concepts of probes are familiar.

Contact

About

materials, links and sample code for cloud-native lecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published