diff --git a/README.md b/README.md index d3a0f36e4..0c554e9de 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,11 @@ Join us on the [#solr-operator](https://kubernetes.slack.com/messages/solr-opera Please visit the following pages for documentation on using and developing the Solr Operator: - [Local Tutorial](https://solr.apache.org/guide/operator/latest/getting-started/local-tutorial.html) -- [Helm Instructions via Artifact Hub](https://artifacthub.io/packages/helm/apache-solr/solr-operator) +- **Helm Chart Installation** + - The Helm charts are published as OCI artifacts (recommended): + - **Solr Operator**: `helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version ` + - **Solr Cloud**: `helm install solr oci://ghcr.io/apache/solr-operator/helm/solr --version ` + - Or via the [deprecated HTTPS repository](https://solr.apache.org/guide/operator/latest/upgrade-notes/upgrade-notes.html#where-the-helm-charts-are-published) - The released helm charts and their instructions should be used for all safe and stable deployments. The charts found in `helm/` are not guaranteed to be compatible with the last stable release, and should only be used for development purposes. - [Running the Solr Operator](https://solr.apache.org/guide/operator/latest/getting-started/running-the-operator.html) diff --git a/docs/modules/getting-started/pages/local-tutorial.adoc b/docs/modules/getting-started/pages/local-tutorial.adoc index c1da57b9d..42bdabe5a 100644 --- a/docs/modules/getting-started/pages/local-tutorial.adoc +++ b/docs/modules/getting-started/pages/local-tutorial.adoc @@ -79,15 +79,10 @@ You can follow along here, or follow the instructions in the https://artifacthub Now that we have the prerequisites setup, let us install Solr Operator which will let us easily manage a large Solr cluster: -Now add the Solr Operator Helm repository. (You should only need to do this once) +The Helm charts are published to the GitHub Container Registry as OCI artifacts, so there is +no Helm repository to add and no credentials to configure. -[source,bash] ----- -$ helm repo add apache-solr https://solr.apache.org/charts -$ helm repo update ----- - -Next, install the Solr Operator chart. Note this is using Helm v3, in order to use Helm v2 please consult the https://hub.helm.sh/charts/solr-operator/solr-operator[Helm Chart documentation]. +Install the Solr Operator chart with the commands below. This will install the https://github.com/pravega/zookeeper-operator[Zookeeper Operator] by default. [source,bash,subs="verbatim,attributes"] @@ -95,9 +90,15 @@ This will install the https://github.com/pravega/zookeeper-operator[Zookeeper Op # Install the Solr & Zookeeper CRDs $ kubectl create -f https://solr.apache.org/operator/downloads/crds/v{operator-version}/all-with-dependencies.yaml # Install the Solr operator and Zookeeper Operator -$ helm install solr-operator apache-solr/solr-operator --version {operator-version} +$ helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version {operator-version} ---- +[NOTE] +==== +The charts are also still served from the deprecated HTTPS Helm repository. +See xref:upgrade-notes:upgrade-notes.adoc#where-the-helm-charts-are-published[Where the Helm charts are published]. +==== + _Note that the Helm chart version does not contain a `v` prefix, which the downloads version does. The Helm chart version is the only part of the Solr Operator release that does not use the `v` prefix._ After installing, you can check to see what lives in the cluster to make sure that the Solr and ZooKeeper operators have started correctly. @@ -128,7 +129,7 @@ To start a Solr Cloud cluster, we will create a yaml that will tell the Solr Ope [source,bash,subs="verbatim,attributes"] ---- # Create a 3-node cluster v9.10.0 with 300m Heap each: -helm install example-solr apache-solr/solr --version {operator-version} \ +helm install example-solr oci://ghcr.io/apache/solr-operator/helm/solr --version {operator-version} \ --set image.tag=9.10.0 \ --set solrOptions.javaMemory="-Xms300m -Xmx300m" \ --set addressability.external.method=Ingress \ @@ -224,7 +225,7 @@ So we wish to upgrade to a newer Solr version: curl -s http://default-example-solrcloud.ing.local.domain/solr/admin/info/system | grep solr-i # Update the solrCloud configuration with the new version, keeping all previous settings and the number of nodes set by the autoscaler. -helm upgrade example-solr apache-solr/solr --version {operator-version} \ +helm upgrade example-solr oci://ghcr.io/apache/solr-operator/helm/solr --version {operator-version} \ --reuse-values \ --set image.tag=9.10.0 diff --git a/docs/modules/getting-started/pages/running-the-operator.adoc b/docs/modules/getting-started/pages/running-the-operator.adoc index 93fc388a4..920bade97 100644 --- a/docs/modules/getting-started/pages/running-the-operator.adoc +++ b/docs/modules/getting-started/pages/running-the-operator.adoc @@ -18,31 +18,47 @@ == Using the Solr Operator Helm Chart -The easiest way to run the Solr Operator is via the https://artifacthub.io/packages/helm/apache-solr/solr-operator[provided Helm Chart]. +The easiest way to run the Solr Operator is via the provided Helm Chart. The helm chart provides abstractions over the Input Arguments described below, and should work with any official images in docker hub. === How to install via Helm -The official documentation for installing the Solr Operator Helm chart can be found on https://artifacthub.io/packages/helm/apache-solr/solr-operator[Artifact Hub]. +The chart's values and changelog are listed on https://artifacthub.io/packages/helm/apache-solr/solr-operator[Artifact Hub]. -The first step is to add the Solr Operator helm repository. +The chart is published to the GitHub Container Registry as an OCI artifact. +Nothing needs to be added or configured first, and no credentials are required. -[source,bash] +First install the CRDs. This step is the same whichever chart source you use, and it is required: +the chart installs the https://github.com/pravega/zookeeper-operator[Zookeeper Operator] by default, +but does not create its `ZookeeperCluster` CRD. + +[source,bash,subs="verbatim,attributes"] ---- -$ helm repo add apache-solr https://solr.apache.org/charts -$ helm repo update +$ kubectl create -f https://solr.apache.org/operator/downloads/crds/v{operator-version}/all-with-dependencies.yaml ---- -Next, install the Solr Operator chart. Note this is using Helm v3, use the official Helm chart documentation linked to above. -This will install the https://github.com/pravega/zookeeper-operator[Zookeeper Operator] by default. +Then install the Solr Operator chart: [source,bash,subs="verbatim,attributes"] ---- -$ kubectl create -f https://solr.apache.org/operator/downloads/crds/v{operator-version}/all-with-dependencies.yaml +$ helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version {operator-version} +---- + +[NOTE] +==== +The chart is also still served from the deprecated HTTPS Helm repository +(see xref:upgrade-notes:upgrade-notes.adoc#where-the-helm-charts-are-published[Where the Helm charts are published]): + +[source,bash,subs="verbatim,attributes"] +---- +$ helm repo add apache-solr https://solr.apache.org/charts +$ helm repo update $ helm install solr-operator apache-solr/solr-operator --version {operator-version} ---- +==== + _Note that the Helm chart version does not contain a `v` prefix, which the downloads version does. The Helm chart version is the only part of the Solr Operator release that does not use the `v` prefix._ After installing, you can check to see what lives in the cluster to make sure that the Solr and ZooKeeper operators have started correctly. @@ -73,9 +89,9 @@ Helm 3 automatically installs the Solr CRDs in the /crds directory, so no furthe If you have solr operator installations in multiple namespaces that are managed separately, you will likely want to skip installing CRDs when installing the chart. This can be done with the `--skip-crds` helm option. -[source,bash] +[source,bash,subs="verbatim,attributes"] ---- -helm install solr-operator apache-solr/solr-operator --skip-crds --namespace solr +helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version {operator-version} --skip-crds --namespace solr ---- *Helm will not upgrade CRDs once they have been installed. diff --git a/docs/modules/upgrade-notes/pages/upgrade-notes.adoc b/docs/modules/upgrade-notes/pages/upgrade-notes.adoc index e0d5a26cf..3864ba986 100644 --- a/docs/modules/upgrade-notes/pages/upgrade-notes.adoc +++ b/docs/modules/upgrade-notes/pages/upgrade-notes.adoc @@ -97,6 +97,31 @@ It is always encouraged to upgrade to the latest patch version of the minor and There is no need to upgrade one patch version at a time (e.g. `v0.2.5` -> `v0.2.6` -> `v0.2.7` -> `v0.2.8`), instead you can leap to the latest patch version (e.g. `v0.2.5` -> `v0.2.8`). +[#where-the-helm-charts-are-published] +== Where the Helm charts are published + +The Solr Operator and Solr Helm charts are published as OCI artifacts to the GitHub Container Registry: + +[source,bash,subs="verbatim,attributes"] +---- +helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version {operator-version} +helm install example oci://ghcr.io/apache/solr-operator/helm/solr --version {operator-version} +---- + +Installing from an OCI registry requires no `helm repo add`, and no credentials. + +[WARNING] +==== +The HTTPS Helm repository at `https://solr.apache.org/charts` is *deprecated*. + +Charts are published to both the OCI registry and the HTTPS repository for now, so there is no rush +to migrate. The HTTPS repository will be retired in a future release, and that will be announced in +advance in these upgrade notes. + +If you install or upgrade the charts through automation, moving it to the `oci://` URLs above is +recommended. +==== + == Installing the Solr Operator vs Solr CRDs Installing the Solr Operator, especially via the https://artifacthub.io/packages/helm/apache-solr/solr-operator[Helm Chart], @@ -127,7 +152,7 @@ If you are using the Solr Helm chart to deploy the Zookeeper operator, then you ---- # Just replace the Solr CRDs and all CRDs it might depend on (e.g. ZookeeperCluster) kubectl replace -f "http://solr.apache.org/operator/downloads/crds/v{operator-version}/all-with-dependencies.yaml" -helm upgrade solr-operator apache-solr/solr-operator --version {operator-version} +helm upgrade solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version {operator-version} ---- _Note that the Helm chart version does not contain a `v` prefix, which the downloads version does. The Helm chart version is the only part of the Solr Operator release that does not use the `v` prefix._ @@ -136,6 +161,13 @@ _Note that the Helm chart version does not contain a `v` prefix, which the downl === v0.10.0 +* *Helm charts are now published to an OCI registry* ++ +The charts are published as OCI artifacts to `oci://ghcr.io/apache/solr-operator/helm`, alongside the +existing HTTPS Helm repository. The HTTPS repository at `https://solr.apache.org/charts` is deprecated +and will be retired in a future release. +See <>. + * *Logging now defaults to JSON format* + The new default for CLI flag `--zap-devel` is now `false`, causing log encoding to be `json` and log level to be `info`. diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml index 1088131b2..c6147ae07 100644 --- a/helm/solr-operator/Chart.yaml +++ b/helm/solr-operator/Chart.yaml @@ -138,6 +138,18 @@ annotations: url: https://github.com/apache/solr-operator/issues/535 - name: GitHub PR url: https://github.com/apache/solr-operator/pull/571 + - kind: added + description: The Helm charts are now also published as OCI artifacts to oci://ghcr.io/apache/solr-operator/helm, which needs no `helm repo add` and no credentials + links: + - name: Github Issue + url: https://github.com/apache/solr-operator/issues/813 + - name: Github PR + url: https://github.com/apache/solr-operator/pull/814 + - kind: deprecated + description: The HTTPS Helm repository at https://solr.apache.org/charts is deprecated. Charts are published to both it and the OCI registry for now, and the HTTPS repository will be retired in a future release + links: + - name: Github Issue + url: https://github.com/apache/solr-operator/issues/813 artifacthub.io/images: | - name: solr-operator image: apache/solr-operator:v0.10.0-prerelease diff --git a/helm/solr-operator/README.md b/helm/solr-operator/README.md index 79acc1a40..b0677199a 100644 --- a/helm/solr-operator/README.md +++ b/helm/solr-operator/README.md @@ -31,19 +31,35 @@ If you do not wish to use the Zookeeper Operator, set: - `zookeeper-operator.use: false` -### Adding the Solr Operator Helm Chart Repository -You should only need to add the solr operator helm chart repository once, by running the following command: +### Installing the Chart + +The Solr Operator Helm chart can be installed either from the OCI registry (recommended) or from the [deprecated HTTPS repository](https://solr.apache.org/guide/operator/latest/upgrade-notes/upgrade-notes.html#where-the-helm-charts-are-published). + +#### Installation via OCI Registry (Recommended) + +The Helm chart is published to the GitHub Container Registry as an OCI artifact. +No repository needs to be added, and no credentials are required. ```bash -helm repo add apache-solr https://solr.apache.org/charts +# Install CRDs first +kubectl create -f https://solr.apache.org/operator/downloads/crds/v0.10.0-prerelease/all-with-dependencies.yaml + +# Install the Solr Operator from OCI registry +helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version 0.10.0-prerelease ``` -### Installing the Chart +#### Installation via HTTPS Repository (Deprecated) -To install the Solr Operator for the first time in your cluster, you can use the latest version or a specific version, run with the following commands: +The chart is also still served from the deprecated HTTPS Helm repository. ```bash +# Add the repository (only needed once) +helm repo add apache-solr https://solr.apache.org/charts + +# Install CRDs first kubectl create -f https://solr.apache.org/operator/downloads/crds/v0.10.0-prerelease/all-with-dependencies.yaml + +# Install the Solr Operator from the HTTPS repository helm install solr-operator apache-solr/solr-operator --version 0.10.0-prerelease ``` @@ -54,10 +70,24 @@ _Note that the Helm chart version does not contain a `v` prefix, which the downl ### Upgrading the Solr Operator -If you are upgrading your Solr Operator deployment, you should always use a specific version of the chart and pre-install the Solr CRDS: +If you are upgrading your Solr Operator deployment, you should always use a specific version of the chart and pre-install the Solr CRDS. + +Upgrade the CRDs first. Helm does not update CRDs that are already installed, so this step is required whichever chart source you use: ```bash kubectl replace -f https://solr.apache.org/operator/downloads/crds/v0.10.0-prerelease/all-with-dependencies.yaml +``` + +Then upgrade the chart: + +```bash +helm upgrade solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version 0.10.0-prerelease +``` + +Or, from the deprecated HTTPS repository: + +```bash +helm repo add apache-solr https://solr.apache.org/charts helm upgrade solr-operator apache-solr/solr-operator --version 0.10.0-prerelease ``` @@ -67,18 +97,20 @@ If you want to specify the namespace for the installation, use the `--namespace` All resources will be deployed to the given namespace. ```bash -helm install solr-operator apache-solr/solr-operator --namespace solr +helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version 0.10.0-prerelease --namespace solr ``` If you want to only watch that namespace, or others, then you will have to provide the `watchNamespaces` option. ```bash # Watch the namespace where the operator is deployed to (just pass the boolean true) -helm install solr-operator apache-solr/solr-operator --namespace solr --set watchNamespaces=true +helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version 0.10.0-prerelease --namespace solr --set watchNamespaces=true + # Watch a single namespace different than the one being deployed to -helm install solr-operator apache-solr/solr-operator --namespace solr --set watchNamespaces=other -# Watch multiple namespaces (commmas must be escaped in the set string) -helm install solr-operator apache-solr/solr-operator --namespace solr --set watchNamespaces="team1\,team2\,team3" +helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version 0.10.0-prerelease --namespace solr --set watchNamespaces=other + +# Watch multiple namespaces (commas must be escaped in the set string) +helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version 0.10.0-prerelease --namespace solr --set watchNamespaces="team1\,team2\,team3" ``` Note: Passing `false` or `""` to the `watchNamespaces` variable will both result in the operator watchting all namespaces in the Kube cluster. @@ -91,7 +123,14 @@ If you have solr operator installations in multiple namespaces that are managed This can be done with the `--skip-crds` helm option. ```bash -helm install solr-operator apache-solr/solr-operator --skip-crds --namespace solr +helm install solr-operator oci://ghcr.io/apache/solr-operator/helm/solr-operator --version 0.10.0-prerelease --skip-crds --namespace solr +``` + +Or, from the deprecated HTTPS repository: + +```bash +helm repo add apache-solr https://solr.apache.org/charts +helm install solr-operator apache-solr/solr-operator --version 0.10.0-prerelease --skip-crds --namespace solr ``` **Helm will not upgrade CRDs once they have been installed. diff --git a/helm/solr/Chart.yaml b/helm/solr/Chart.yaml index 29a4bafbf..aa22bdc91 100644 --- a/helm/solr/Chart.yaml +++ b/helm/solr/Chart.yaml @@ -60,6 +60,18 @@ annotations: url: https://github.com/apache/solr-operator/issues/338 - name: Github PR url: https://github.com/apache/solr-operator/pull/832 + - kind: added + description: The Helm charts are now also published as OCI artifacts to oci://ghcr.io/apache/solr-operator/helm, which needs no `helm repo add` and no credentials + links: + - name: Github Issue + url: https://github.com/apache/solr-operator/issues/813 + - name: Github PR + url: https://github.com/apache/solr-operator/pull/814 + - kind: deprecated + description: The HTTPS Helm repository at https://solr.apache.org/charts is deprecated. Charts are published to both it and the OCI registry for now, and the HTTPS repository will be retired in a future release + links: + - name: Github Issue + url: https://github.com/apache/solr-operator/issues/813 artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/recommendations: | - url: https://artifacthub.io/packages/helm/apache-solr/solr-operator diff --git a/helm/solr/README.md b/helm/solr/README.md index 52eaa4cf3..d234131a6 100644 --- a/helm/solr/README.md +++ b/helm/solr/README.md @@ -33,9 +33,18 @@ There may be breaking changes between the version you are using and the version ### Installing the Chart -To install a SolrCloud for the first time in your cluster, you can use the latest version or a specific version, run with the following commands: +The Solr Helm chart can be installed either from the OCI registry (recommended) or from the [deprecated HTTPS helm repository](https://solr.apache.org/guide/operator/latest/upgrade-notes/upgrade-notes.html#where-the-helm-charts-are-published). + +To install a SolrCloud for the first time in your cluster, you can use the latest version or a specific version: + +```bash +helm install example oci://ghcr.io/apache/solr-operator/helm/solr --version 0.10.0-prerelease --set image.tag=9.10.0 +``` + +Or, from the deprecated HTTPS Helm repository: ```bash +helm repo add apache-solr https://solr.apache.org/charts helm install example apache-solr/solr --version 0.10.0-prerelease --set image.tag=9.10.0 ``` @@ -50,6 +59,13 @@ _Note that the Helm chart version does not contain a `v` prefix, which the Solr If you are upgrading your SolrCloud deployment, you should always use a specific version of the chart and upgrade **after [upgrading the Solr Operator](https://artifacthub.io/packages/helm/apache-solr/solr-operator#upgrading-the-solr-operator) to the same version**: ```bash +helm upgrade example oci://ghcr.io/apache/solr-operator/helm/solr --version 0.10.0-prerelease --reuse-values --set image.tag=9.10.0 +``` + +Or, from the deprecated HTTPS Helm repository: + +```bash +helm repo add apache-solr https://solr.apache.org/charts helm upgrade example apache-solr/solr --version 0.10.0-prerelease --reuse-values --set image.tag=9.10.0 ```