For those that have dreamt to hunt crocs
Basic go webserver to demonstrate example CI/CD pipeline using Kubernetes
- See DEMO.md for steps
The infamous croc hunter game
License: MIT License
Thanks a lot for the content you create to help get up and running with helm, it is really helpful!
I have one little question.
What do you recommend to organize the git repo for CD with helm?
Does it make more sense to have one git repo with all the charts definition?
So it would mean having a git repo lachie83/charts
with croc-hunter
inside.
From this repo, in CD, we would just provide the image tag for instance.
And we would have separate release cycle, the Docker image and the helm chart for croc-hunter.
Or does it make more sense to keep things locally? (I think I prefer this option)
But in this case, how do you manage dependencies, and especially, public dependencies.
(For instance: helm/helm#2209)
(I guess, it would mean building dependencies, and then running upgrade
command)
Thanks for your help!
@lachie83 Haven't used Jenkins in a number of years and I'm just starting to work through the effort of deploying the stable/jenkins chart to a GKE-managed cluster.
I was using croc-hunter's Jenkinsfile as a baseline for my initial work and I'm experiencing some difficulties related to my Jenkins installation. Notably, things like kubectl, helm, golang, docker, etc. are not installed on my agent.
My question is rather basic....How are those external dependencies installed, configured for croc-hunter? For example, is the Jenkins executor by either convention or configuration running the croc-hunter pipeline inside a particular container?
Really great guide - thanks for sharing.
I seem to be stuck at the last step running kubectl get nodes
error: group map[extensions:0xc8204062a0 federation:0xc82034d7a0 batch:0xc8204060e0 certificates.k8s.io:0xc820406150 authorization.k8s.io:0xc82034dea0 autoscaling:0xc82034df10 componentconfig:0xc8204061c0 policy:0xc820406310 rbac.authorization.k8s.io:0xc820406380 :0xc82034dc70 apps:0xc82034dce0 authentication.k8s.io:0xc82034dd50 storage.k8s.io:0xc8204063f0] is already registered
I had this on both aws and gce.
Any suggestions appreciated.
Cheers!
script returned exit code 1
Versions used
- kubernetes:0.12
- workflow-aggregator:2.5
- credentials-binding:1.12
- git:3.5.1
- pipeline-github-lib:1.0
- ghprb:1.39.0
- blueocean:1.1.4
'jenkinsci/jnlp-slave:2.62
docker:1.12.6
golang:1.8.3
lachlanevenson/k8s-helm:v2.5.0', command
lachlanevenson/k8s-kubectl:v1.7.6
The Demo doc doesn't make it clear to the use that DNS needs to be stable before kube-lego can function correctly. Update docs to call that out.
When I try to start the install Jenkins with
'helm install stable/jenkins -f jenkins-values.yaml --namespace jenkins'
I get the error message:
Error: parse error in "jenkins/templates/rbac.yaml": template: jenkins/templates/rbac.yaml:3: function "required" not defined
It seems like the required
statement from the line apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
somehow breaks the deployment although it is flagged as stable.
Does somebody know if this is a problem with my k8s cluster or with the jenkins-values file?
System:
Helm 2.1.3
K8S Client 1.7.4
K8S Server 1.5.6
Thanks a lot for this excellent demo, it really helped me learn kubernetes.
This is not an issue with the demo, it works perfectly as it is with nginx, but I was attempting to adapt it to a production use case with a global static IP.
I attempted to run the demo without installing nginx-ingress and using a static IP on GKE and it didn't work. After 5 minutes, one of the three backend services created by Google remains 'UNHEALTHY' and jenkins does not load. Cross referencing this kube-lego issue where someone else has a similar problem:
jetstack/kube-lego#270
Has anyone else experienced this?
The only values I changed were the below in jenkins-values.yaml.
HostName: MY-HOST
ServiceType: NodePort
Ingress:
Annotations:
kubernetes.io/ingress.class: "gce"
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.global-static-ip-name: ingress-ip
TLS:
- secretName: MY-HOST
hosts:
- MY-HOST
We need to implement a way for the boat to explode in 100 fishes.
This no longer works since 2.32.x AFAICT
@Library('github.com/lachie83/jenkins-pipeline@master')
Hey, how were you able to get Jenkins to use your pipeline library at https://github.com/lachie83/jenkins-pipeline? In my Jenkins, it's added at the GitHub org level, but in the croc-hunter repo, there's no option to refer to it or set it:
helm install levo-charts/croc-hunter
WARNING: Deprecated index file format. Try 'helm repo update'
Error: release wrapping-dingo failed: error validating "": error validating data: expected type int, for field spec.replicas, got string
helm version
Client: &version.Version{SemVer:"v2.1.3", GitCommit:"5cbc48fb305ca4bf68c26eb8d2a7eb363227e973", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.1.3", GitCommit:"5cbc48fb305ca4bf68c26eb8d2a7eb363227e973", GitTreeState:"clean"}
Hi Lachie,
could you please help me to better understand, how can I get this variable?
env.BRANCH_NAME
I always get the "null" value
I checked the whole running file and cannot where it has been defined
Please excuse me if this is a dummy question.
Any reply would be much appreciated.
Thank you!
The ingress controller cannot create the secret nor retrieve it.
I have succesfully installed nginx-ingress-controller and kube-lego
then I try to install croc-hunter using the command
helm install . --namespace=croc-hunter
the ingress rule gets picked up by the ingress controller but 3 errors start to be logged in the ingress controller console:
same thing applies if I try to install the helm chart in the default backend.
Is there something I am missing here?
Running the pipeline throws the error Node is not a Kubernetes node:
for the step "Runing kubectl/helm tests"
After installing stable/jenkins, pod goes in pending state giving error
pod has unbound PersistentVolumeClaims
I'm stucked here, how to ressolve this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.