From c0d735ade211d38c9ca7961fd698e494940c3acb Mon Sep 17 00:00:00 2001 From: Julien Girardin Date: Mon, 13 Jan 2020 16:25:06 +0100 Subject: [PATCH] More on day 3 --- slides/3.yml | 11 ++-- slides/k8s/Exercise_gitlab_build.md | 5 ++ slides/k8s/ci-cd.md | 40 ++++++++++++++ slides/k8s/registries.md | 81 +++++++++++++++++++++++++++++ slides/k8s/sealed-secrets.md | 3 ++ slides/k8s/stop-manual.md | 17 ++++++ 6 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 slides/k8s/Exercise_gitlab_build.md create mode 100644 slides/k8s/ci-cd.md create mode 100644 slides/k8s/registries.md create mode 100644 slides/k8s/sealed-secrets.md create mode 100644 slides/k8s/stop-manual.md diff --git a/slides/3.yml b/slides/3.yml index 57124015..60b9976e 100644 --- a/slides/3.yml +++ b/slides/3.yml @@ -18,13 +18,13 @@ chapters: - # Bien démarrer en local (minikube, kind) # - k8s/kube-coin-intro.md - - k8s/softwar-dev-banalities.md + - k8s/software-dev-banalities.md - k8s/on-desktop.md - - k8s/testing.md + - k8s/namespaces.md - k8s/accessinternal.md #- k8s/localkubeconfig.md #- k8s/kubectlproxy.md - - k8s/namespaces.md + - k8s/testing.md - - k8s/configuration.md @@ -33,6 +33,11 @@ chapters: - k8s/helm.md - k8s/create-chart.md +- + # - k8s/shippingimages.md # some overlap + - k8s/registries.md + - k8s/stop-manual.md + - k8s/ci-cd.md # - #- k8s/volumes.md #- k8s/create-more-charts.md diff --git a/slides/k8s/Exercise_gitlab_build.md b/slides/k8s/Exercise_gitlab_build.md new file mode 100644 index 00000000..df9464e6 --- /dev/null +++ b/slides/k8s/Exercise_gitlab_build.md @@ -0,0 +1,5 @@ +# Exercise -- write a simple pipeline + +Let's create a simple pipeline with gitlab + +The code is at: https://github.com/enix/kubecoin-build diff --git a/slides/k8s/ci-cd.md b/slides/k8s/ci-cd.md new file mode 100644 index 00000000..b5ea21f3 --- /dev/null +++ b/slides/k8s/ci-cd.md @@ -0,0 +1,40 @@ +## Jenkins/Jenkins-X + +- Multi purpose CI + +- Self-hosted CI for kubernetes + +- testing in namespace, feature branch + +.small[ +```shell +$ curl -L "https://github.com/jenkins-x/jx/releases/download/v2.0.1103/jx-darwin-amd64.tar.gz" | tar xzv "jx" +$ ./jx boot +``` +] + +--- +## Gitlab + +- repository + registry + ci/cd integrated all-in-one + +```shell +helm repo add gitlab https://charts.gitlab.io/ +helm install gitlab gitlab/gitlab +``` + +--- +## Tekton/knative + +- knative is serverless project from google + +- Tekton leverage knative to run pipeline + +--- +## ArgoCD + +.small[ +```shell +kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml +``` +] diff --git a/slides/k8s/registries.md b/slides/k8s/registries.md new file mode 100644 index 00000000..58657747 --- /dev/null +++ b/slides/k8s/registries.md @@ -0,0 +1,81 @@ +# Registries + +There is lot of options to ship you container image to a registry + +Those can be group in different categories: + +- hosted / selfhosted + +- with / without build system + +--- +## Docker registry + +- [open-source](https://github.com/docker/distribution) and self-hosted + +- Simple docker-based registry + +- Support multiple storage backend + +- Only support basic-authentification + +- No build system + +```shell +docker run -d -p 5000:5000 --name registry registry:2 +``` +or the dedicated plugin in minikube, microk8s, ... + +--- +## Harbor + +- [open-source](https://github.com/goharbor/harbor) and self-hosted + +- full-featured registry docker/helm registry + +- advanced authentification mechanism + +- multi-site synchronisation + +- vulnerability scanning + +- No build-system + +```shell +helm repo add harbor https://helm.goharbor.io +helm install my-release harbor/harbor +``` + +--- +## Gitlab + +- Some part [open-source](https://gitlab.com/gitlab-org/gitlab-foss/) and self-hosted + +- Or hosted: gitlab.com (free for opensource project, payed subscription otherwise) + +- CI integrated (so in a way: build-system integrated) + +```shell +helm repo add gitlab https://charts.gitlab.io/ +helm install gitlab gitlab/gitlab +``` + +--- +## Docker HUB + +- hosted: [hub.docker.com](https://hub.docker.com) + +- free for public image, payed subscription for private ones. + +- build-system included + +--- +## Quay + +- hosted (quay.io)[https://quay.io] + +- free for public repository, payed subscription otherwise + +- acquired by Redhat from CoreOS, opensourced recently (so self-hosted to ?) + +- build-system included diff --git a/slides/k8s/sealed-secrets.md b/slides/k8s/sealed-secrets.md new file mode 100644 index 00000000..e9387be4 --- /dev/null +++ b/slides/k8s/sealed-secrets.md @@ -0,0 +1,3 @@ +# sealed-secrets + +TODO diff --git a/slides/k8s/stop-manual.md b/slides/k8s/stop-manual.md new file mode 100644 index 00000000..dec80426 --- /dev/null +++ b/slides/k8s/stop-manual.md @@ -0,0 +1,17 @@ +# Automation && CI/CD + +We already achieved: + +- Find a way to Develop our application + +- Test it manualy, and explore the way to write automated test for it + +- Package it the way we wanted it + +- Ship the image to a registry + +We now have to: + +- Deploy it + +And so each time is made a change on the repository. Can we automate this a little bit ?