利用 MicroK8s 和 Kubeflow 达成的 Kubernetes CICD (持续集成 / 持续交付) 小技巧

Kubernetes 是运行和管理复杂分布式系统的绝佳平台。利用持续集成 (CI),并轻松实现您的社区消费的持续集成,可以提高您完美解决方案的质量并减少开发人员和用户的摩擦。 本次演讲将展示如何极大地简化将持续集成作为原生方案而非事后解决方案添加到项目中的过程。您还可以利用以下技术轻松、反复地安装基于 kubernetes 的解决方案的本地持续集成设备,该方案还可扩展成为公司范围的解决方案: - microk8s (microk8s.io)——纯上游 kubernetes 的一个简单的、一线式的安装 - 多通道 - 一种启动虚拟设备的开源和简便的方法 - 持续集成和持续交付工具——例如 jenkins 和 spinnaker
展开查看详情

1.CICD Hacks Cloud Native - Ubuntu, Multipass, Microk8s

2.Agenda 1. Canonical Introduction 2. The Canonical Distribution of Kubernetes 3. CICD in Cloud Native 4. Questions and Answer

3.Introduction - Ubuntu

4.Canonical is a company behind Ubuntu

5.Canonical introduction

6.2004 FOUNDED 600+ EMPLOYEES 34+ COUNTRIES London Tokyo Boston Beijing Shanghai Taipei

7.Canonical’s distribution of Kubernetes

8.Why Canonical Kubernetes? Pure upstream, latest & greatest versions Operates on AWS, Azure, GCE, OpenStack, VMWare, bare metal Bare metal operations with MAAS 100% compatible with Google’s Kubernetes Secured. TLS, Kernel Live patching, confinement Upgradable between each Kubernetes Release Cost effective at scale

9.extensible by design NFS

10.any CPU architecture x86 s390x

11.

12.CICD in Cloud Native What are the basics? What are the problem areas?

13.CICD : A Basic Setup - Logical 1. Source Code (Repo) 2. Continuous Integration (CI) 3. Continuous Delivery (Cd) 4. Continuous Deployment (CD) 5. Runtime Environment Developer Continuous Continuous Continuous Laptop Code Repo Runtime Integration Delivery Deployment

14.CICD : A Basic Setup - Example Resources OCI GitLab GitHub Werker Harbor JenkinsX registry Spinnaker Argo LXD K8s UBUNTU git Jenkins CircleCI DockerHub GCR Juju Snap Open MAAS Stack Developer Continuous Continuous Continuous Laptop Code Repo Runtime Integration Delivery Deployment

15.CICD : A Basic Setup - Specific Thread OCI GitLab JenkinsX registry Spinnaker K8s UBUNTU git Jenkins Developer Continuous Continuous Continuous Laptop Code Repo Runtime Integration Delivery Deployment

16. CICD : A Basic Setup - Problem? OCI GitLab JenkinsX registry Spinnaker K8s UBUNTU git Jenkins The Problem? The Benefit? - Eliminate Internet Access - Fast Builds - Large Images Slows - Fast Deploys build-deploy-test loop - Fast build-deploy-test loop - Empower “Airplane Mode”

17.CICD : A Basic Setup - All-in-One Goals: 1. Build Self Sufficient VM 2. Allow VM to be Ephemeral CICD 3. Restart VM and keep State All-in-One Key Tools: VM: Guest OS - Ubuntu 1. Multipass - launch vms 2. Microk8s - launch kubernetes multipass Native Hypervisor Host Operating System Laptop / Desktop / Workstation / Server

18.CICD : A Basic Setup - All-in-One CICD All-in-One Optional GitLab Jenkins git OCI Spinnaker registry Cloud JenkinsX Native jx Microk8s (kubernetes)

19.CICD : A Basic Setup - Storage .. CICD All-in-One Optional GitLab Jenkins 1. MOUNT git OCI Spinnaker registry Cloud JenkinsX Volume on Native Host jx Microk8s (kubernetes) 2. PV / PVC VM: Guest OS - Ubuntu

20.CICD : A Basic Setup - Demo ➔ https://github.com/canonical-labs/cicd-microk8s-basic CICD All-in-One Optional GitLab Jenkins OCI Spinnaker registry Cloud JenkinsX Native Microk8s (kubernetes)

21.CICD : A Basic Setup - Distributed “CI” DEV STAGING GitLab JenkinsX Jenkins Microk8s Microk8s Microk8s PRODUCTION CD registry Spinnaker git jx Microk8s Microk8s

22. More info: Thank you! https://microk8s.io https://www.ubuntu.com/ai https://discourse.ubuntu.com/c/multipass https://www.ubuntu.com/kubernetes https://github.com/canonical-labs/cicd-microk8s-basic