There is no shortage now of development and CI/CD tools for cloud-native application development. But how do we put the cloud-native concept and think as the cloud-native way on the leftmost side of CI/CD pipeline.
During developing phrase, the tools provided with cloud code can help you expedite iteration of source codes, run and debug cloud native applications in an easy and fast way, making cloud-native development turn into real-time process, reduce the gap between deployment and development.
現在不乏用於雲原生應用程序開發的開發和 CI/CD工具。 但是,我們如何將雲原生概念放在的 CI/CD 流水線的最左側呢?
在開發階段,如何用 Cloud code 協助您加快原始碼的迭代速度,以簡便快捷的方式運行和調用雲原生應用程序,使雲原生開發變為即使過程,縮小開發與部署之間的差
3. About
Nelson Lin
Cloud Technical Account Manager
in Red Hat. Help accounts adopt Red
Hat cloud technologies well and help
them succeed.
Software engineer, building a cloud
management system, experienced of
frontend and backend programming
having experience in CI/CD pipeline,
interested in big data, distributed
computing, and cloud-native
technologies.
5. Cloud-native definition
● An approach exploits the advantages of the cloud
computing delivery model to building and running
applications
● How applications are created and deployed,
● Cloud native is all about changing the way you think
about constructing critical business systems.
● Cloud-native systems are designed to embrace rapid
change, large scale, and resilience.
https://tanzu.vmware.com/cloud-native
https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/definition
https://zh.data-driven.blog/2019/11/01/%E4%BB%80%E9%BA%BC%E6%98%AF-cloud-native%EF%BC%9F-%E7%82%BA%E4%BB%80%E9%BA%BC-cloud-native-
%E9%80%99%E9%BA%BC%E7%86%B1%E9%96%80%EF%BC%9F/
6. Cloud-native foundational pillars
While several container orchestrators
exist, Kubernetes has become the
de facto standard for the cloud-native
world. It's a portable, extensible, open-
source platform for managing
containerized workloads.
13. Developing k8s/cloud-native app. is frustrating
Too much
configuration
Debugging is a
pain
Applications have
so many moving
parts
Spend too much
time outside of the
codes
14. Infinite loop of pain &
suffering
Even “Hello, World” is complicated!
Error prone
People solve that with bash scripts,
makefiles and ansible
1
4
2
53
6
Change
code
Run docker
build
Run docker
push
Patch yaml
Run kubectl
apply
Verify
7
debugging
18. Cloud Code
IDE Skaffold JIB
Cloud Code
● support for the full
development cycle of
Kubernetes applications
● create a cluster for
development
● test running your finished
application
● Build & deploy
● Tag & Test & cleanup
● File sync
● Log tailing
● Port forwarding
https://cloud.google.com/code/docs/vscode/quickstart
https://cloud.google.com/code/docs/intellij/quickstart-IDEA
Out-of-the-box configuration snippets, tailored debugging experience
Making developing with Kubernetes a whole lot easier
19. Jib is a set of plugins for maven and gradle for
building optimized OCI-compliant container
images for Java applications without a
Docker daemon.
JIB
● Fast
○ separates applications into multiple
layers
○ splitting dependencies from classes
● Daemon-less
○ No need of docker CLI or
counterparts
○ No dockerfile
● Reproducible
https://github.com/GoogleContainerTools/jib/issues/101
https://github.com/GoogleContainerTools/jib
21. JIB makes build images and transfer them efficiently
200MB 2MB
Enhanced by 10,000%
22. Skaffold
Skaffold as a Kubernetes-native framework for developer workflows, portable to
any IDE or CI system. It provides a very easy way to test local changes to your
app on a Kubernetes cluster. And it supports multiple image builders (local
Docker, GCB & Kaniko).
23. Build
● Dockerfile
● Bazel
● Jib
● buildpack
That’s Skaffold
Adapts to your tooling local +
remote clusters
Test
● container-
structure-
test
Tag
● Git
● Sha256
● Env Template
● DateTime
Deploy
● Kubectl
● Helm
● kustomize
25. Skaffold debugger
● Built artifacts determine the underlying runtime technologies
● Artifacts transformed on-the-fly runtime’s debugger functionality
● Supported Language
○ Go
○ NodeJS
○ Java & JVM Language
○ Python
● Runtime specific images
○ .net Core
https://skaffold.dev/docs/workflows/debug/
26. Skaffold pipeline stages
Skaffold Pipeline stages Description
Init generate a starting point for Skaffold configuration
Build build images with different builders
Tag tag images based on different policies
Test test images with structure tests
Deploy deploy with kubectl, kustomize or helm
File Sync sync changed files directly to containers
Log Tailing tail logs from workloads
Port Forwarding forward ports from services and arbitrary resources to
localhost
Cleanup cleanup manifests and images
https://skaffold.dev/docs/references/yaml/
34. Problem
No enough resources
No managed services
Changing IDE is arduous
Have to learn new skills
Support few tools
How integrate with you existing
circumstances/pipelines.
35. Take away
Let your code deployed on
kubernetes as early as possible if
you want to run on K8S
Cloud code is just a tool, but follow
the concept and try to develop as
cloud-native way ( odo, crc, ocp
and acm)
Try to reduce the gap between
deployment engineer and software
engineer
With advent of k8s, go learn a new
skill - k8s