Skip to content
codeengineered

codeengineered

Discussing web, Internet, and cloud based software engineering.

codeengineered.com
codeengineeredcodeengineered
DATABASES AND DATA ENGINEERING

Go: Package Management Survey Results 2016

A couple months ago we held a survey of Go package management needs, likes, dislikes, and so forth. From this survey we collected lots of great information with some confirmations and some surprises. Since the survey closed data and roll-ups from the survey have been sent to the package management committee which has now released a draft spec for a new tool. The results of the survey were promised to be publicly shared. You can read the results in Google Docs. Some things that caught my attention (warning, this is my opinion and observation): - There was a fairly even split between those who work at an enterprise and those who work at a startup. I like seeing a dataset that鈥檚 not one sided. - More than 90% of those who took the survey want easy updating, package versioning (releases), and a tool to do the updating for them. A majority (besting the 80/20 rule) support Semantic Versions. - Users need to deal with private packages and forks (without import statement rewriting). - Many users want a tool to work out an ideal version of all their dependencies for them. - Locating and using CVEs (or like information) and being able to easily contact owners (both needed for security) were considered important. Put simply, it appears folks want many of the package management features available in other languages. Of course, they want them to be in a Go style rather then a direct copy of any one of them. Please take a look at the data for yourself. Especially the requirements which have simple graphs to see the results.
codeengineeredcodeengineered
SOFTWARE DEVELOPMENT AND APPLICATIONS

From Standards To Proprietary

Photo by LindaInpijn Several years ago I worked on a WebDAV project. At the time we complained about the format (did you there are multiple date formats in use) and thought we could have done better. But, WebDAV works on Windows, Mac, Linux, iOS, and Android, just to name a few. It鈥檚 widely supported and works across different ecosystems. Standards like WebDAV seem like a thing of the past and that may not be a good thing. Consider that Google and Apple are both walled gardens that keep you inside their respective ecosystems while doing many of the same things. Or, if you鈥檙e working cloud computing consider object storage. With object storage you鈥檝e got AWS, Google Cloud, Azure, and OpenStack all providing roughly the same features while having entirely different APIs. More than ever we are in a world of platforms. But, instead of it being applications on a computer where all the computers can talk with each other it鈥檚 entire interconnected distributed ecosystems. This is a problem for consumers. Imagine for a moment if building a house or office building worked this way? That when you picked a design you picked doorways, pipes, a furnace, and other components from a single company or it鈥檚 approved ecosystem of partners. That elements were designed to work only with other approved components and designed to keep out competitor parts. This would be a huge pain for consumers. Imagine what Home Depot or other hardware stores would look like. Instead we have standard sizes, standard connectors, and components that can interoperate with each other. For example, I don鈥檛 need to purchase my thermostat and furnace from the same manufacturer. And, the gas company and electric company don鈥檛 matter. All the interfaces are standardized so I can connect them together. Imagine an Internet that worked that way? Imagine that iTunes on iOS could play music out a Chromecast. Imagine treating cloud computing the way we treat the power grid? We just plug things in and they work (at least in the same regions or with simple adapters). Imagine buying smart lightbulbs from GE and using them with a Phillips Hue system. Technology companies have shifted from standards to proprietary walled gardens and it鈥檚 not good for consumers whether they are large companies or individuals. I say this because we can make a change to open standards. It starts with talking about it in the open. Consider, how can we make this change and what you can personally do.
HOME DEPOTGOOGLE
codeengineeredcodeengineered
CLIMATE CHANGE

Helm: Understanding Charts API vs App Registry

There have been a number of recent discussion and some innovation around charts for Helm, the popular package manager for Kubernetes. Given the number of discussions going on along with planning for Helm v3 that will be happening soon, I wanted to take a moment to talk about how we got here and what the options are for chart hosting exist today. ## How Helm Natively Works Out of the box, Helm comes with the ability to create a chart repository that can be accessed by one or more clients. This repository can be hosted by a static web server, an object storage service, or something similar. While not a direct clone, the out of the box experience was designed based on Debian. If you鈥檝e used apt-get to install packages on Ubuntu the underlying mechanisms are similar. You can add repos, you can update the knowledge of the repos packages, and you can install them. Just like with Debian (and Ubuntu), when you add or update a repo a file is downloaded with all the details about the packages. On a Helm repo site there are one or more chart versions packaged as .tgz files along with an index.yaml file containing metadata about all the charts and their versions. While this setup may seem simple, it has proven to work with Debian and Ubuntu with a known scalability model. If you鈥檙e interested in using the build in Helm repository tools there is a guide in the Helm documentation. ## App Registry Kubernetes is a container manager. Container images are distributed in a model that is fairly different from the way Debian and Ubuntu packages are. The model is the way Docker Hub, Quay, and private registries all work. A model founded by Docker. App Registry comes from the team at Quay as a way to share charts (and applications in a broader context) the same way container images are shared. App Registry is made up of a server, specification, and client to talk with a server. The client is even available as a Helm plugin. The folks at Quay have implemented the spec on Quay itself (you can read about it here, here, and here). The way charts are moved around and stored is different than how Helm 2.x works. Charts are pushed and pulled from an app registry. There is no index with all the charts and no way to search for them from the client. But, it is very similar to the way we handle container images and Quay has implemented authentication so that private apps can have the same level of access control as private images (this would be nice in the open source version). This model is gaining a lot of traction and popularity. ## Chartmuseum A recent addition to the chart server discussion is ChartMuseum. ChartMuseum provides the same API to Helm clients that a native chart repo provides. That is an index.yaml file and packages stored as .tgz files. But, it goes beyond what core Helm provides. It implements API CRUD operations to upload, delete, and otherwise manage chart versions. Instead of being static, this chart repository is dynamic. To store files, this project has support for multiple cloud storage back-ends such as Google Cloud Storage and Amazon S3. ## Which Should You Pick? From a long term perspective, the jury is still out. I would hope that any change to charts for Helm 3 would have a certain amount of backward compatibility for Helm 2. There may be a future where both systems live side by side in core Helm. My suggestion is to take a look at the options and make a decision for yourself. If you have feedback for an individual project please take the time to share it with them.
gajusJacob Tomlinsonwiz.io
codeengineeredcodeengineered
CLIMATE CHANGE

Charts: Instant Feedback For Kubernetes Chart Developers via CI

Reviewing charts, the packages for Kuberentes Helm, is an often manual process. This has been especially true for the community managed charts that operate in a similar model to Debian and Ubuntu packages. When automation was used it was behind gates that required human interaction. This produced a slow feedback process for chart developers. Until now. In the past couple weeks continuous automation has been introduced utilizing CircleCI. Let鈥檚 take a look at what鈥檚 happening. ## Leveraging A SaaS The gated testing of charts in the community managed repository required a gate. To trigger it a member of the Kubernetes organization commented with /ok-to-test. This caused the chart to be started in a running Kubernetes cluster. To make sure something nefarious wasn鈥檛 run in the cluster a human in the loop was implemented. But, a lot of testing or linting could happen without running the chart. helm lint, YAML linting, and other static checks can be easily run in a continuous manner. Enter CirceCI. If you鈥檙e a fan of other services, like Travis CI, know that we are, too. In fact, the Kubernetes project uses varying services. To spread the load we chose CircleCI in this case. ## Helm Lint When a pull request is submitted the very first check is to run helm lint on each Chart. The testing is smart enough to compare the pull request to the master branch and detect the changes introduced by this pull request. It then looks at each chart individually. ## YAML Lint There鈥檚 a difference between a valid YAML file and one that follows best practices. For example, there shouldn鈥檛 be extra spaces at the end of a line and indentation should be consistent throughout the file (e.g., no mixing of 2 space indentation with 4 space indentation). To automate these checks a YAML linter is being used on the Chart.yaml and values.yaml files. The template files are not being checked, just yet, but I am looking at adding them. The template files themselves are not valid YAML files while being valid templates. They may not pass linting themselves. But, the YAML files generated from the templates can be linted. Since they are different from the templates it鈥檚 important to find a way to provide useful feedback to chart authors in an automated way prior to implementing this form of checking. ## Version Increments Any charts updated in the community repositories need to have their semantic version incremented. The CI system now checks that the version is valid and incremented. No more relying on a person to notice. ## NOTES.txt The NOTES.txt file is an optional template for charts. When Helm installs a chart it will render the template to the output. For charts in the community repositories they are required. CI now checks for them and provides direction if they are missing. ## More to come These CI checks are just the beginning. Automating reviews will speed up the time for pull requests being merged, increase the quality of contributions, and hopefully help keep reviewers engaged. But, they are just the beginning. There is more feedback that can be automated and presented to chart authors. Look for more to come.
codeengineeredcodeengineered
SOFTWARE DEVELOPMENT AND APPLICATIONS

More Easily Defining Apps In Kubernetes

Kubernetes configuration files are long and verbose. When defining an application you may regularly define a deployment, service, ingress controller, DNS, and configuration. Within those configuration files there will be a fair amount of boilerplate and numerous repeated values. It may come as no surprise that numerous projects are popping up to simplify the configuration for an application. Kedge, PsyKube, and Helm are just a few of the options being used. At the crux of this is application developer and application operator user experience. To understand why these projects are popping up let鈥檚 take a look at the people, expectations, and what they are doing. ## Simple Expectations Application developers have been spoiled with simple experiences. Heroku, Cloud Foundry, and others have set an example of how you one can describe their application in a simple form and deploy it to a platform. To understand this it鈥檚 worth looking at the Cloud Foundry manifest.yaml file. Here鈥檚 a simple example for a Wordpress site: yaml --- applications: - name: mywordpress memory: 128M path: . buildpack: https://github.com/cloudfoundry/php-buildpack host: wordpress-on services: - mysql-db env: SSH_HOST: user@your-ssh-server SSH_PATH: /full/or/relative/path/on/ssh/server SSH_KEY_NAME: sshfs_rsa SSH_OPTS: '["cache=yes", "kernel_cache", "compression=no", "large_read"]' To create this same thing for Kubernetes you would typically have hundreds of lines of YAML. ### The Difference Between PaaS and IaaS It鈥檚 worth noting that Kubernetes is different from a Platform as a Service (PaaS). Kubernetes is closer to an Infrastructure as a Service (IaaS). A PaaS does a fair amount of work for developers to transform their applications into something that can run and then operates them. What we鈥檙e talking about here is not what they do but rather how people interact with the systems. ### It鈥檚 About User Experience Jakob Nielsen noted that, > Useful = usability + utility Both a PaaS and an IaaS have utility. To be useful, especially to the masses, usability needs to be part of the equation. Nielson also noted, > Usability is defined by 5 quality components: > > - Learnability: How easy is it for users to accomplish basic tasks the first time they encounter the design? > - Efficiency: Once users have learned the design, how quickly can they perform tasks? > - Memorability: When users return to the design after a period of not using it, how easily can they reestablish proficiency? > - Errors: How many errors do users make, how severe are these errors, and how easily can they recover from the errors? > - Satisfaction: How pleasant is it to use the design? Kedge, PsyKube, and Helm are examples of projects working to improve the usability of Kubernetes for the masses. ## A Helm Example Recently a number of people ran into some trouble installing the Wordpress community stable chart for Helm with working TLS. Michael Venezia, my cohort on the Samsung CNCT, recently came up with a solution that easily works for TLS, non-TLS, and is simple. In the values.yaml file you can put the following in: yaml ingress: enabled: true hosts: - name: wordpress.local tls: true tlsSecret: wordpress.local-tls This configuration can handle multiple host names and the case of no TLS (just remove the tls and tlsSecret lines). The secret can be set outside of the Chart and application. But, you can optionally set the secret with the following in the values.yaml file: yaml secrets: - name: wordpress.local-tls key: -----BEGIN RSA PRIVATE KEY----- ... certificate: -----BEGIN CERTIFICATE----- ... This simple configuration is turned into the appropriate Kubernertes configuration. Kubernetes complexity is turned into simplicity. Helm and Charts aren鈥檛 the only projects working on simplicity. It鈥檚 currently a common theme in the community.
JAKOB NIELSENCLOUD FOUNDRY