You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Helm: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>JMeybohm
imported>JMeybohm
Line 1: Line 1:
Helm is the package manager for [[Kubernetes]].  
Helm<ref>https://github.com/helm/helm</ref> is the package manager for [[Kubernetes]].  


It is used to build [[Helm chart|Helm charts]], which are packages of Kubernetes resources that are used to deploy apps to a cluster.
It is used to build [[Helm chart|Helm charts]], which are packages of Kubernetes resources that are used to deploy apps to a cluster.


== Packaging ==
For deployment it is called via helmfile<ref>https://github.com/roboll/helmfile</ref> in combination with helm-diff<ref>https://github.com/databus23/helm-diff</ref> to present the to be applied changes to the user.
We're providing separate packages for [https://gerrit.wikimedia.org/r/admin/projects/operations/debs/helm helm 2] and [https://gerrit.wikimedia.org/r/admin/projects/operations/debs/helm3 helm 3], both may be installed at the same time.
 
==Packaging==
We're providing separate packages for {{Gitweb|project=operations/debs/helm}} (helm 2.x) and {{Gitweb|project=operations/debs/helm3}}, both may be installed at the same time.
 
The packages {{Gitweb|project=operations/debs/helmfile}} and {{Gitweb|project=operations/debs/helm-diff}} follow the same packaging workflow, so we document that here together.


=== Importing a new version ===
=== Importing a new version ===
Both packages are build using [[Git-buildpackage]]. The imported upstream tarballs should include the complete vendor directory.
The packages are build using [[Git-buildpackage]]. The imported upstream tarballs should include the complete vendor directory.
 
*Check out the version (git tag) to import <syntaxhighlight lang="bash">./debian/repack "vX.Y.Z"</syntaxhighlight>
 
*This drops you into a shell with the git tag checked out. Do necessary changes here and commit<syntaxhighlight lang="bash">
glide install --strip-vendor
# or
go mod vendor
git add -f vendor
# git diff --name-status --cached | grep -v 'vendor/' # to make sure you only changed vendor
git commit -m "added vendor"
</syntaxhighlight>
 
*Exiting the shell will build a tarball to import<syntaxhighlight lang="bash">
gbp import-orig /path/to/tarball.tar.xz
</syntaxhighlight>


* Check out the version (git tag) to import
* Push changes (including the tag crated by gpb) to gerrit<syntaxhighlight lang="bash">
$ ./debian/repack ''vX.Y.Z''
git push gerrit --all
* This drops you into a shell with the git tag checked out. Do necessary changes here and commit
git push gerrit --tags
$ glide install --strip-vendor
</syntaxhighlight>
# or
$ go mod vendor
$ git add -f vendor
# git diff --name-status --cached | grep -v 'vendor/'  # to make sure you only changed vendor
$ git commit -m "added vendor"
* Exiting the shell will build a tarball to import
$ gbp import-orig ''/path/to/tarball.tar.xz''
* Push changes (including the tag crated by gpb) to gerrit
$ git push gerrit --all
$ git push gerrit --tags
* Add a debian/changelog entry (as CR)
$ gbp dch
# Edit debian/changelog
$ git commit
$ git review


=== Building a new version ===
*Add a debian/changelog entry (as CR)<syntaxhighlight lang="bash">
* Check out the git repo on the build host
gbp dch # Edit debian/changelog
* Build the package
git commit
$ gbp buildpackage --git-pbuilder --git-no-pbuilder-autoconf --git-dist=buster -sa -uc -us
git review
</syntaxhighlight>
===Building a new version===
*Check out the git repo on the build host
*Build the package<syntaxhighlight lang="bash">
BACKPORTS=yes gbp buildpackage --git-pbuilder --git-no-pbuilder-autoconf --git-dist=buster -sa -uc -us
</syntaxhighlight>
===Publish a new version===
<syntaxhighlight lang="bash">
# on apt1001
rsync -vaz deneb.codfw.wmnet::pbuilder-result/buster-amd64/*<PACKAGE VERSION>* .
sudo -i reprepro -C main include buster-wikimedia /path/to/<PACKAGE>.changes


For ''helm3'' you need to build with debian backports enabled (''BACKPORTS=yes gbp ...'').
# Copy the package over to other distros (this is possible because they only contain static binaries)
sudo -i reprepro copy stretch-wikimedia buster-wikimedia <PACKAGE>
sudo -i reprepro copy jessie-wikimedia buster-wikimedia <PACKAGE>
</syntaxhighlight>


== Resources ==
==Resources==
* [https://github.com/helm/helm Helm on Github]
<references />
* [https://helm.sh/ Official Helm documentation page]


[[Category:Kubernetes]]
[[Category:Kubernetes]]

Revision as of 14:22, 4 August 2020

Helm[1] is the package manager for Kubernetes.

It is used to build Helm charts, which are packages of Kubernetes resources that are used to deploy apps to a cluster.

For deployment it is called via helmfile[2] in combination with helm-diff[3] to present the to be applied changes to the user.

Packaging

We're providing separate packages for operations/debs/helm (helm 2.x) and operations/debs/helm3, both may be installed at the same time.

The packages operations/debs/helmfile and operations/debs/helm-diff follow the same packaging workflow, so we document that here together.

Importing a new version

The packages are build using Git-buildpackage. The imported upstream tarballs should include the complete vendor directory.

  • Check out the version (git tag) to import
    ./debian/repack "vX.Y.Z"
    
  • This drops you into a shell with the git tag checked out. Do necessary changes here and commit
    glide install --strip-vendor
    # or
    go mod vendor
    git add -f vendor
    # git diff --name-status --cached | grep -v 'vendor/' # to make sure you only changed vendor
    git commit -m "added vendor"
    
  • Exiting the shell will build a tarball to import
    gbp import-orig /path/to/tarball.tar.xz
    
  • Push changes (including the tag crated by gpb) to gerrit
    git push gerrit --all
    git push gerrit --tags
    
  • Add a debian/changelog entry (as CR)
    gbp dch # Edit debian/changelog
    git commit
    git review
    

Building a new version

  • Check out the git repo on the build host
  • Build the package
    BACKPORTS=yes gbp buildpackage --git-pbuilder --git-no-pbuilder-autoconf --git-dist=buster -sa -uc -us
    

Publish a new version

# on apt1001
rsync -vaz deneb.codfw.wmnet::pbuilder-result/buster-amd64/*<PACKAGE VERSION>* .
sudo -i reprepro -C main include buster-wikimedia /path/to/<PACKAGE>.changes

# Copy the package over to other distros (this is possible because they only contain static binaries)
sudo -i reprepro copy stretch-wikimedia buster-wikimedia <PACKAGE>
sudo -i reprepro copy jessie-wikimedia buster-wikimedia <PACKAGE>

Resources