mastodon / chart

Helm chart for Mastodon deployment in Kubernetes
GNU Affero General Public License v3.0
154 stars 89 forks source link

Publish helm chart to github pages #27

Open mtparet opened 3 years ago

mtparet commented 3 years ago

Pitch

The helm chart should be published so we can install it with classic helm command without having to clone the whole Maston repository. Also this will enable to list it at https://artifacthub.io/.

We could use the official tool https://github.com/helm/chart-releaser in the CI to publish it.

christianhuth commented 2 years ago

@mtparet: Do you know if anybody is working on this already?

mtparet commented 2 years ago

@christianknell I don't think so

christianhuth commented 2 years ago

@mtparet: I could set this up analog to my own chart repository here. We need to enable GitHub Pages for this. Can you do this or give me privileges to set this in the settings?

deepy commented 1 year ago

I gave this a try with a fork and https://github.com/helm/chart-releaser-action which seemed promising, but I couldn't get it to publish the releases on a separate repository.

It almost feels like most tooling expects your charts to be in a repository that only contains charts and nothing else.

christianhuth commented 1 year ago

@deepy: Chart-Releaser is already the right way to go. :)

That's not exactly true. But you're right that the most tooling expects another repository layout. They expect a folder charts on the root level and for each chart a single folder under this charts folder. So for mastodon it could be charts/mastodon. It doesn't matter that there are other folders/files inside the repository.

Have a look at https://github.com/christianknell/helm-charts/blob/main/.github/workflows/chart-testing.yml and https://github.com/christianknell/helm-charts/blob/main/.github/workflows/release.yaml - you only need release2github. Should be quite straightforward to copy/modify after changing the repository structure.

Make sure to setup GitHub Pages correctly beforehand. The chart-releaser will automatically publish the packaged chart to the GitHub Registry afterwards and update your GitHub Pages branch as well. Checkout my branch for details https://github.com/christianknell/helm-charts/tree/gh-pages. The index.yaml will be updated by the chart-releaser.

After having a look at your fork i don't quite understand your remaining problems. The chart-releaser has successfully packages the charts and released them to your github repository: https://github.com/deepy/mastodon/releases. And also the index.yaml was created successfully: https://github.com/deepy/mastodon/blob/gh-pages/index.yaml

I think we're good to go with your setup. 👍

deepy commented 1 year ago

The problem I'm having is that I don't want the releases in the mastodon repository (as they'd conflict with the current releases), I want the pages and the release pushed to a second repository: https://github.com/deepy/mastodon-charts/tree/gh-pages and while the configuration seems to suggest I can do this, I didn't get that to work :-(

christianhuth commented 1 year ago

@deepy what do you mean with conflict? As far as I know you can have mutliple different releases in one repository.

deepy commented 1 year ago

Mostly from a user perspective, given that helm seems to be the minority it'd probably be confusing to have two different kind of releases in the same repository, especially since the versions mean different things.

But I suspect that some tinkering with cr could get it to easily publish the releases to another repository

norman-zon commented 1 year ago

Is there still work going on regarding the helm release?

deepy commented 1 year ago

There's nobody working on this specific issue, but there's a bunch of open PRs related to helm and some like https://github.com/mastodon/mastodon/pull/19706 are basically needed for a successful deploy.

But if you're just looking for a maintained helm repository I'm about to create one tonight so I can continue to maintain my setup

deepy commented 1 year ago

I've setup a repository containing builds of the chart from this repository https://charts.xd.cm/mastodon/ It's not automatically built as a lot is happening in the chart lately and I don't want broken setups, but I'll work to keep both in sync.

Sierra1011 commented 1 year ago

Just to expand a list of options for others, Bitnami also publishes a Mastodon HelmChart at https://github.com/bitnami/charts/tree/main/bitnami/mastodon/#installing-the-chart

renchap commented 1 year ago

Just to update you, this is on my list of things to do.

It will probably come with some reorganisation of this chart (moving the current chart to charts/ as per convention, and probably splitting the chart with 1 Mastodon "base" chart, and a meta-chart which will include more dependencies to get a full install in one go.

deepy commented 1 year ago

When this is done, would you be open to writing instructions on migrating to it from older charts? My helm repository is currently getting about a hundred unique pulls per month so I assume there's at least some instances using it

jeremiahlee commented 1 year ago

I support merging #54 to resolve this feature request. It would make using the chart much easier with Terraform and the Helm provider.