You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/03/23 20:21:24 UTC

[GitHub] [solr-operator] HoustonPutman opened a new pull request #241: Help for upgrading from v0.2.x to v0.3.0

HoustonPutman opened a new pull request #241:
URL: https://github.com/apache/solr-operator/pull/241


   Resolves #222 
   
   This includes a test that installs v0.2.6, upgrades to v0.2.8 and then upgrades to v0.3.0.
   
   The documentation gives two options, upgrading in an environment managed manually, and an environment managed via a system like Ansible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [solr-operator] HoustonPutman commented on a change in pull request #241: Help for upgrading from v0.2.x to v0.3.0

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on a change in pull request #241:
URL: https://github.com/apache/solr-operator/pull/241#discussion_r600660727



##########
File path: hack/test-upgrade.sh
##########
@@ -0,0 +1,172 @@
+#!/usr/bin/env bash
+
+# Clear your kube environment
+kubectl delete crds --all; kubectl delete pvc --all; helm delete solr-operator apache
+helm ls -a --all-namespaces | awk 'NR > 1 { print  "-n "$2, $1}' | xargs -L1 helm delete
+
+helm repo add apache-solr https://solr.apache.org/charts && helm repo update
+
+####
+##  Setup an environment using the v0.2.6 Solr Operator
+####
+
+# Install the Zookeeper Operator
+kubectl apply -f https://apache.github.io/solr-operator/example/dependencies/zk_operator.yaml
+
+# Install a past version of the Solr Operator
+helm install solr-operator apache-solr/solr-operator --version 0.2.6 --set ingressBaseDomain=localhost.com
+kubectl rollout status deployment/solr-operator
+
+# Install an out-of-date Solr Cloud
+cat <<EOF | kubectl apply -f -
+apiVersion: solr.bloomberg.com/v1beta1
+kind: SolrCloud
+metadata:
+  name: example
+spec:
+  dataPvcSpec:
+    resources:
+      requests:
+        storage: "5Gi"
+  replicas: 3
+  solrImage:
+    tag: 8.5.0
+  solrJavaMem: "-Xms1g -Xmx3g"
+  customSolrKubeOptions:
+    podOptions:
+      resources:
+        limits:
+          memory: "1G"
+        requests:
+          cpu: "65m"
+          memory: "156Mi"
+  zookeeperRef:
+    provided:
+      chroot: "/this/will/be/auto/created"
+      zookeeper:
+        persistence:
+          spec:
+            storageClassName: "hostpath"
+            resources:
+              requests:
+                storage: "5Gi"
+        replicas: 1
+        zookeeperPodPolicy:
+          resources:
+            limits:
+              memory: "1G"
+            requests:
+              cpu: "65m"
+              memory: "156Mi"
+EOF
+
+# Wait for solrcloud to be ready
+sleep 60
+kubectl rollout status statefulset/example-solrcloud
+
+# Install a SolrCollection and PrometheusExporter
+cat <<EOF | kubectl apply -f -
+apiVersion: solr.bloomberg.com/v1beta1
+kind: SolrCollection
+metadata:
+  name: example-collection-1
+spec:
+  solrCloud: example
+  collection: example-collection
+  routerName: compositeId
+  autoAddReplicas: false
+  numShards: 2
+  replicationFactor: 1
+  maxShardsPerNode: 1
+  collectionConfigName: "_default"
+---
+apiVersion: solr.bloomberg.com/v1beta1
+kind: SolrPrometheusExporter
+metadata:
+  name: example
+spec:
+  solrReference:
+    cloud:
+      name: "example"
+  numThreads: 4
+  image:
+    tag: 8.5.0
+EOF
+
+# Wait for solrmetrics to be ready
+sleep 5
+kubectl rollout status deployment/example-solr-metrics
+
+####
+##  Upgrade the Solr Operator to v0.2.8
+####
+helm upgrade solr-operator apache-solr/solr-operator --version 0.2.8 --set ingressBaseDomain=localhost.com
+
+kubectl replace -f https://raw.githubusercontent.com/apache/lucene-solr-operator/v0.2.8/helm/solr-operator/crds/crds.yaml
+
+
+
+# Wait until everything is up to date and the cluster is calm
+kubectl get solrcloud -w
+
+####
+
+####
+##  Install the Apache Solr Operator separately
+####
+# Build the Apache release (TODO: Change to release when it is cut)
+make docker-build
+helm dependency build helm/solr-operator
+
+# Uninstall Old ZK Operator
+echo "Deleting all Zookeeper Operator resources, except for CRDs" && \
+  kubectl delete deployment zk-operator && \

Review comment:
       Ahhh if you are running it 0.2.9 already, you should just use `--set zookeeper-operator.install=false --set zookeeper-operator.use=true`
   
   Probably good to add to the docs.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [solr-operator] HoustonPutman merged pull request #241: Help for upgrading from v0.2.x to v0.3.0

Posted by GitBox <gi...@apache.org>.
HoustonPutman merged pull request #241:
URL: https://github.com/apache/solr-operator/pull/241


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [solr-operator] HoustonPutman commented on pull request #241: Help for upgrading from v0.2.x to v0.3.0

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on pull request #241:
URL: https://github.com/apache/solr-operator/pull/241#issuecomment-806022000


   > Should this PR change the chart version in helm/solr-operator/Chart.yaml to 0.3.0?
   
   Yes. We should probably treat the version as the same as Solr, where what's in the branch represents the next release.
   
   Will put a different PR for that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [solr-operator] thelabdude commented on pull request #241: Help for upgrading from v0.2.x to v0.3.0

Posted by GitBox <gi...@apache.org>.
thelabdude commented on pull request #241:
URL: https://github.com/apache/solr-operator/pull/241#issuecomment-806005169


   Should this PR change the chart version in `helm/solr-operator/Chart.yaml` to `0.3.0`? Cool if not ... just confused me when I installed the chart from a checkout of this PR and got:
   ```
   helm ls
   NAME              	NAMESPACE	REVISION	UPDATED                             	STATUS  	CHART                   	APP VERSION
   apache            	tjp      	1       	2021-03-24 11:07:21.514488 -0600 MDT	deployed	solr-operator-0.2.8     	v0.2.8     
   solr-operator     	tjp      	1       	2021-03-24 11:04:56.128582 -0600 MDT	deployed	solr-operator-0.2.8     	v0.2.8     
   zookeeper-operator	tjp      	1       	2021-03-24 10:54:55.174334 -0600 MDT	deployed	zookeeper-operator-0.2.9	0.2.9      
   ```
   If that's done as part of another PR or only during the release, please disregard ^^


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [solr-operator] thelabdude commented on a change in pull request #241: Help for upgrading from v0.2.x to v0.3.0

Posted by GitBox <gi...@apache.org>.
thelabdude commented on a change in pull request #241:
URL: https://github.com/apache/solr-operator/pull/241#discussion_r600658981



##########
File path: hack/test-upgrade.sh
##########
@@ -0,0 +1,172 @@
+#!/usr/bin/env bash
+
+# Clear your kube environment
+kubectl delete crds --all; kubectl delete pvc --all; helm delete solr-operator apache
+helm ls -a --all-namespaces | awk 'NR > 1 { print  "-n "$2, $1}' | xargs -L1 helm delete
+
+helm repo add apache-solr https://solr.apache.org/charts && helm repo update
+
+####
+##  Setup an environment using the v0.2.6 Solr Operator
+####
+
+# Install the Zookeeper Operator
+kubectl apply -f https://apache.github.io/solr-operator/example/dependencies/zk_operator.yaml
+
+# Install a past version of the Solr Operator
+helm install solr-operator apache-solr/solr-operator --version 0.2.6 --set ingressBaseDomain=localhost.com
+kubectl rollout status deployment/solr-operator
+
+# Install an out-of-date Solr Cloud
+cat <<EOF | kubectl apply -f -
+apiVersion: solr.bloomberg.com/v1beta1
+kind: SolrCloud
+metadata:
+  name: example
+spec:
+  dataPvcSpec:
+    resources:
+      requests:
+        storage: "5Gi"
+  replicas: 3
+  solrImage:
+    tag: 8.5.0
+  solrJavaMem: "-Xms1g -Xmx3g"
+  customSolrKubeOptions:
+    podOptions:
+      resources:
+        limits:
+          memory: "1G"
+        requests:
+          cpu: "65m"
+          memory: "156Mi"
+  zookeeperRef:
+    provided:
+      chroot: "/this/will/be/auto/created"
+      zookeeper:
+        persistence:
+          spec:
+            storageClassName: "hostpath"
+            resources:
+              requests:
+                storage: "5Gi"
+        replicas: 1
+        zookeeperPodPolicy:
+          resources:
+            limits:
+              memory: "1G"
+            requests:
+              cpu: "65m"
+              memory: "156Mi"
+EOF
+
+# Wait for solrcloud to be ready
+sleep 60
+kubectl rollout status statefulset/example-solrcloud
+
+# Install a SolrCollection and PrometheusExporter
+cat <<EOF | kubectl apply -f -
+apiVersion: solr.bloomberg.com/v1beta1
+kind: SolrCollection
+metadata:
+  name: example-collection-1
+spec:
+  solrCloud: example
+  collection: example-collection
+  routerName: compositeId
+  autoAddReplicas: false
+  numShards: 2
+  replicationFactor: 1
+  maxShardsPerNode: 1
+  collectionConfigName: "_default"
+---
+apiVersion: solr.bloomberg.com/v1beta1
+kind: SolrPrometheusExporter
+metadata:
+  name: example
+spec:
+  solrReference:
+    cloud:
+      name: "example"
+  numThreads: 4
+  image:
+    tag: 8.5.0
+EOF
+
+# Wait for solrmetrics to be ready
+sleep 5
+kubectl rollout status deployment/example-solr-metrics
+
+####
+##  Upgrade the Solr Operator to v0.2.8
+####
+helm upgrade solr-operator apache-solr/solr-operator --version 0.2.8 --set ingressBaseDomain=localhost.com
+
+kubectl replace -f https://raw.githubusercontent.com/apache/lucene-solr-operator/v0.2.8/helm/solr-operator/crds/crds.yaml
+
+
+
+# Wait until everything is up to date and the cluster is calm
+kubectl get solrcloud -w
+
+####
+
+####
+##  Install the Apache Solr Operator separately
+####
+# Build the Apache release (TODO: Change to release when it is cut)
+make docker-build
+helm dependency build helm/solr-operator
+
+# Uninstall Old ZK Operator
+echo "Deleting all Zookeeper Operator resources, except for CRDs" && \
+  kubectl delete deployment zk-operator && \

Review comment:
       I just did it independently of the solr-operator:
   ```
   helm upgrade --install zookeeper-operator pravega/zookeeper-operator \
     --version=0.2.9 --namespace=${NAMESPACE}
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org