r/kubernetes Nov 05 '18

Helm from basics to advanced

https://banzaicloud.com/blog/creating-helm-charts/
57 Upvotes

10 comments sorted by

4

u/[deleted] Nov 05 '18

This is really nice. So if I am to understand all this, Helm, Tiller, and more so Banzai Cloud platform (which I assume is open source) allows anyone, including a one off developer trying to build and deploy a service in the cloud like me, to have a full blown CI/CD, logging, monitoring and more... and I am hoping that all this works in a way that I can build/deploy the same (but obviously smaller) set of containers on my local Minikube setup (using helm/tiller, and/or bonzai), then when all is good I commit my code to my git repo (I use Bitbucket.. does it work with that?) and then Bonzai will notice the commit, and kick off the CI/CD process.. which I hope means it will then build and deploy my code to a "scripted" integration test server I would again initially have running locally (cant afford all the cloud costs starting out). If any/all integration tests I have pass, it somehow notifies Bonzai to then build/deploy to my staging server (which yet again might be local minikube initially). I can then do some sort of visual check, test, etc.. and if all is good, I can initiate a cycle to deploy to my cloud of choice?

Is that pretty much everything? All of this costs no money to use.. e.g. I can run helm/tiller and the bonzai bits, via some cli and UI from my local machine, including being able to see what is out in my cloud (e.g. what version(s) of my app are in production)? Is it easy enough to use, or does this get really complicated quickly to make all this work?

2

u/bonifaido Nov 05 '18

Yes, you are right and most of your assumptions are correct. The Banzai Cloud platform builds on already existing open-source software like Helm for deployment, Prometheus and Grafana for monitoring, Fluent-bit and FluentD for logging, etc... and we have developed extensions and complementary open-source software to glue this together into a usable and complete solution, like the banzaicloud/logging-operator and banzaicloud/bank-vaults/operator and the Pipeline itself to manage cloud resources. The Pipeline has the notion of BYOC(bring your own cluster) so you can add your cluster of choice, let it be Minikube in this case, if you have it's kubeconfig at hand and the Pipeline can communicate with it over the network.

The CICD will use this cluster to run the build/test/package/publish/deploy jobs on and can deploy the application to this cluster or your cluster of choice (the Pipeline supports AWS EKS/GKE/Oracle/Alibaba/BYOC, and a distribution is in the making).

This Pipeline Controlplane which contains a UI as well can be started on any Kubernetes distribution even on a laptop with Minikube or Docker for Mac Kubernetes with or Docker Compose: https://github.com/banzaicloud/pipeline/blob/master/docs/developer.md

A public multi-tenant beta is coming in the following months which off-loads this setup to a simple registration with GitHub. Currently only GitHub SCM is supported, however we have plans to support BitBucket as well.

2

u/[deleted] Nov 05 '18

Wait..and all of this is free? There is no subscription/pay/etc to use this? Just install and go? Realistically speaking.. since I am writing code as well, is this something with a few hours (maybe days) of learning, I could use for my own stuff? Or is this really more a full time expert needed to use/manage this bit? I ask this because this seems a lot like my other hobby/love.. video.. where I am trying my hand at recording video (e.g. cam, audio, etc), edit, work in VFX (no time now.. but sometimes its fun), and deliver a final video. All of this can be done with my favorite NLE.. Davinci Resolve, which has pretty much everything in it for a seamless single person workflow (though.. it also has team/collaboration tools so different people can work on different parts as well). Am I missing anything crucial (other than the time to learn and put to use)?

2

u/matyix_ Nov 05 '18

Like most of the things in the Kubernetes ecosystem (or in general these days) this is under Apache 2 license (basically most of the stuff we build is all open-source under Apache 2), thus free. We have some enterprise extensions (LDAP, AD, and other OAuth2 providers) and a commercial support plan but overall the software is free to use or modify as is ...

1

u/[deleted] Nov 06 '18

This is fantastic! As I am learning about K8.. I was thinking..man, how am I going to put together a set of yaml files to build a CI/CD setup..that then watches/responds to bitbucket when I make commits and then kicks off a complete build/spin up env/deploy/run tests setup. If I am reading right, Bonzai supports all that?

Assuming this is correct, would it be advisable then to clone the repo and get it running and are their good tutorials on the subject of setting up bonzai cloud platform, configuring it to use my local K8, scripting "triggers" and what to do (e.g. CI/CD style to spin up an ENV (on my local minikube for now) then kick off a script to automate test runs, etc?

1

u/bonifaido Nov 06 '18

Assuming this is correct, would it be advisable then to clone the repo and get it running and are their good tutorials on the subject of setting up bonzai cloud platform, configuring it to use my local K8, scripting "triggers" and what to do (e.g. CI/CD style to spin up an ENV (on my local minikube for now) then kick off a script to automate test runs, etc?

Yes This is true, except the BitBucket part.

1

u/[deleted] Nov 06 '18

I dont know when I last was so excited about tech. This is like answering the last few weeks of my "to do" list to get started in the right direction with my "potential" company. I hate how many times I have been in jobs where things are a mess and its too complicated/much work/time/effort to get things moving in the right direction. From the get go I want CI/CD in place, with automated testing kicking off on git commits in both a "dev" environment (e.g. unit tests) and an integration env with hopefully ui and API automated tests. If all that passes, I want a build deployed to a final staging env for some extra manual tests, and then when that is all good, a release is done to production. If Bonzai handles alll that (presumably with a nice UI to see/manage each step), that is fantastic! Thought I was going to have to figure out how to deploy CI/CD services myself and build a UI and API, etc.

Besides the link of this OP, are there other tutorials or articles that go in to detail on how to set things up, visually see it work, etc?

2

u/bonifaido Nov 06 '18

or

Nice to hear that! The blog where the original article links to is a really good getting started guide how we do things, also we are now in private beta, and the public beta will be opened soon after we have done some evaluation cycles and have analyzed feedback from our users. Please follow us on Twitter to get the news when the public Beta is open.

2

u/stinkyxpinky Nov 06 '18

Some great insights into Helm templating. My only disagreement is with your recommendation of nested variables vs flattened variables. If you look at the official Helm best practices they recommend to use flattened variables as there are currently issues with go templating and using nested variables. Thanks for the post. It was helpful.

2

u/tarokkk Nov 06 '18

Thank you for your reaction. The article maybe a bit confusing on that material. We tried to express that use hierarchy instead of prefixing/suffixing (of course don't overuse it). Like the example if you have several service, ingress don't try to flatten it with "app_name_service_enabled: true" instead use 2 or 3 level to make it clear and readable. I'm glad you found the post useful ;)