java development in the age of the whale · raspi cluster 4 raspberry pi 3 wifi router 6 port usb...
TRANSCRIPT
"m " fo r menu , "? " fo r o ther shor tcu ts
JAVADEVELOPMENTINTHEAGEOFTHEWHALE
JavaLand2018,München
Dr. RolandHuß,RedHat, @ro14nd
KUBERNETES
OpenSourceorchestrationsystem
forcontainers
Scheduling
Horizontalscaling
Self-healing
Servicediscovery
Automatedrolloutandrollbacks
ARCHITECTURE
KUBERNETESINTHECLOUD
GoogleContainerEngine(GKE)
AzureContainerService(AKE)
OpenShiftOnline
AWSEC2,DigitalOcean,...
Stackpoint.io
CoreOSTectonic
KubernetesOperations(kops)
RASPICLUSTER
4RaspberryPi3
WifiRouter
6PortUSBcharger
32GBSD-Cards
Costs:~300€
InstallviaAnsible
kubeadm
FullStory:https://ro14nd.de/kubernetes-on-raspberry-pi3
MINIKUBE
Single-nodeKubernetesclusterinsidea
VM
NoDockerdaemonrequired
Idealforlocaldevelopment
SupportsDNS,NodePorts,Volumes,...
https://github.com/kubernetes/minikube
FABRIC8
MicroservicesPlatformfor
Kubernetes&OpenShift
Upstreamprojectsforopenshift.io
Themes:
ContinousDelivery
ManagementUI
Funktion
Quickstarts
Tooling
FABRIC8-MAVEN-PLUGIN
CreatesDockerimagesand
resourcedescriptors
Zero-configurationwith
opinionateddefaults
Full-configurationwithenrichable
fragments
https://maven.fabric8.io
GOALS
fabric8:build Buildapplicationimages(Docker,
S2Ibinary,S2Isource)
fabric8:resource CreateKubernetesandOpenShift
resourcedescriptors
fabric8:apply Applyresourcedescriptorstoa
runningcluster
CONFIGURATION
ZeroConfig
OpinionatedDefaults
Limitedconfigurationoptions
XMLConfiguration
Restrictedconfigurationsyntax
ResourceFragments
Mostpowerful
Verbose
ZEROCONFIG
GeneratorsforImagegeneration <build>
<plugins>
<plugin>
<groupid>io.fabric8</groupid>
<artifactid>fabric8-maven-plugin</artifactid>
<version>3.5.31</version>
</plugin>
<plugin>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-maven-plugin</artifactid>
</plugin>
</plugins>
</build>
RESOURCEFRAGMENTS
Resourcefragment
src/main/fabric8/pong-rc.yml
Enrichersaddmissingpieces
spec:
replicas: 1
template:
spec:
containers:
- name: pong
ports:
- containerPort: 8080
GENERATORS
ExtractDockerimage
configurationfrompom.xml
Supportedtechnologies:
SpringBoot
WildflySwarm
FatJars
EclipseVert.x
Webapps
Karaf
ENRICHERS
AdddefaultKubernetesresources
Updateexistingresources
E.g.
DefaultDeploymentandService
Gitinformationaslabels
Addhealthchecks
AddOpenShiftroutes
....
PROFILES
Namedcollectionofenrichersand
generators
-Dfabric8.profiletoselect
raw Noenrichment
explicit Onlydefaultobjects
minimal Smallenrichments
aggregate Combineresourcesfromdependencies
K8S&OPENSHIFT
Kubernetes:
Dockerbuilds
Deployments
Ingress
OpenShift
S2I&DockerBinaryBuilds
DeploymentConfig
ImageStream
Template
MISC
fabric8:install Installlocaldevelopment
environment
fabric8:cluster-
start
Startminikubeorminishift
fabric8:watch Watchforchangesand
redeployments
fabric8:debug Debugintopods
OPENSHIFT
AddstheBUILDtoKubernetes
InfrastructureServices
Registry
Router
OAuth2SSO
Multitenancy
ManagementUI
...
OPENSHIFTEXTRAS
MINISHIFT
Single-nodeOpenShiftOrigincluster
insideaVM
Basedonoc cluster up
Supportsroutes,registry,s2ibuilds,....
https://github.com/minishift/minishift
WRAPUP
StartingwithKubernetescanbe
almostaseasyaswithDocker
KubernetesandOpenShiftare
powerfulorchestrationplatforms
withenterprisegradefeatures.
Usefabric8-maven-pluginforJava
apps
https://leanpub.com/k8spatterns
QUESTIONS?
Twitter @ro14nd
Slides https://github.com/ro14nd-talks/kubernetes-for-java-developers