Public Information
This commit is contained in:
69
samples/pinning/README.md
Normal file
69
samples/pinning/README.md
Normal file
@@ -0,0 +1,69 @@
|
||||
|
||||
# Pinning Versions
|
||||
|
||||
## Old Version
|
||||
|
||||
If you want to test rolling updates and upgrades to a new minor version, check out the *e90* sample:
|
||||
|
||||
This sample installs version 9.0.1400 for testing. Because cluster node discovery changed with a newer jGroups version in nscale, the chart detects the older version and enables the legacy discovery mechanism so the Pod can find its peers on versions prior to 9.1.1200.
|
||||
|
||||
```
|
||||
helm install \
|
||||
--values samples/empty.yaml \
|
||||
--values samples/demo.yaml \
|
||||
--values versions/9.0.1400.yaml \
|
||||
sample-e90 nplus/nplus-instance
|
||||
```
|
||||
|
||||
## New Version Sample
|
||||
|
||||
Some nscale versions are license compatible, meaning a 9.1 license file can also run nscale 9.0 software. But that is not always the case.
|
||||
|
||||
So you may need to set individual licenses per instance:
|
||||
|
||||
```
|
||||
kubectl create secret generic nscale-license-e10 \
|
||||
--from-file=license.xml=license10.xml
|
||||
```
|
||||
|
||||
Check that the license has been created:
|
||||
|
||||
```
|
||||
# kubectl get secret | grep license
|
||||
nscale-license Opaque 1 7d22h
|
||||
nscale-license-e10 Opaque 1 17s
|
||||
```
|
||||
|
||||
Now install the instance:
|
||||
|
||||
```
|
||||
helm upgrade -i \
|
||||
--values samples/empty.yaml \
|
||||
--values samples/demo.yaml \
|
||||
--values versions/10.0.yaml \
|
||||
--set global.license=nscale-license-e10 \
|
||||
sample-e10 nplus/nplus-instance
|
||||
```
|
||||
|
||||
## Probes
|
||||
|
||||
Older versions might not work with the newer/current probes and may not start even though they are actually running. You can override the probes to match older versions, for example:
|
||||
|
||||
```
|
||||
nappl:
|
||||
probes:
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /index.html
|
||||
port: 8080
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /index.html
|
||||
port: 8080
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 5
|
||||
```
|
||||
97
samples/pinning/build.sh
Executable file
97
samples/pinning/build.sh
Executable file
@@ -0,0 +1,97 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This sample script builds the example as described. It is also used to build the test environment in our lab,
|
||||
# so it should be well tested.
|
||||
#
|
||||
|
||||
# Make sure it fails immediately, if anything goes wrong
|
||||
set -e
|
||||
|
||||
# -- ENVironment variables:
|
||||
# CHARTS: The path to the source code
|
||||
# DEST: The path to the build destination
|
||||
# SAMPLE: The directory of the sample
|
||||
# NAME: The name of the sample, used as the .Release.Name
|
||||
# KUBE_CONTEXT: The name of the kube context, used to build this sample depending on where you run it against. You might have different Environments such as lab, dev, qa, prod, demo, local, ...
|
||||
|
||||
# Check, if we have the source code available
|
||||
if [ ! -d "$CHARTS" ]; then
|
||||
echo "ERROR Building $SAMPLE example: The Charts Sources folder is not set. Please make sure to run this script with the full Source Code available"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$DEST" ]; then
|
||||
echo "ERROR Building $SAMPLE example: DEST folder not found."
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$CHARTS/instance" ]; then
|
||||
echo "ERROR Building $SAMPLE example: Chart Sources in $CHARTS/instance not found. Are you running this script as a subscriber?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# VERSION 9.0
|
||||
#
|
||||
|
||||
# Set the Variables
|
||||
SAMPLE="nscale-90"
|
||||
NAME="sample-$SAMPLE"
|
||||
|
||||
# Output what is happening
|
||||
echo "Building $NAME"
|
||||
|
||||
# Create the manifest
|
||||
mkdir -p $DEST/instance
|
||||
helm template --debug \
|
||||
--values $SAMPLES/application/empty.yaml \
|
||||
--values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
|
||||
--values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
|
||||
--values $WORKSPACE/versions/9.0.1400.yaml \
|
||||
--values $SAMPLES/pinning/values.yaml \
|
||||
--set global.license=nscale-license-e92 \
|
||||
$NAME $CHARTS/instance > $DEST/instance/$SAMPLE.yaml
|
||||
|
||||
# creating the Argo manifest
|
||||
mkdir -p $DEST/instance-argo
|
||||
helm template --debug \
|
||||
--values $SAMPLES/application/empty.yaml \
|
||||
--values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
|
||||
--values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
|
||||
--values $WORKSPACE/versions/9.0.1400.yaml \
|
||||
--values $SAMPLES/pinning/values.yaml \
|
||||
--set global.license=nscale-license-e92 \
|
||||
$NAME-argo $CHARTS/instance-argo > $DEST/instance-argo/$SAMPLE-argo.yaml
|
||||
|
||||
|
||||
#
|
||||
# VERSION 9.1
|
||||
#
|
||||
|
||||
# Set the Variables
|
||||
SAMPLE="nscale-91"
|
||||
NAME="sample-$SAMPLE"
|
||||
|
||||
# Output what is happening
|
||||
echo "Building $NAME"
|
||||
|
||||
# Create the manifest
|
||||
mkdir -p $DEST/instance
|
||||
helm template --debug \
|
||||
--values $SAMPLES/application/empty.yaml \
|
||||
--values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
|
||||
--values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
|
||||
--values $WORKSPACE/versions/9.1.1506.yaml \
|
||||
--values $SAMPLES/pinning/values.yaml \
|
||||
--set global.license=nscale-license-e92 \
|
||||
$NAME $CHARTS/instance > $DEST/instance/$SAMPLE.yaml
|
||||
|
||||
# creating the Argo manifest
|
||||
mkdir -p $DEST/instance-argo
|
||||
helm template --debug \
|
||||
--values $SAMPLES/application/empty.yaml \
|
||||
--values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
|
||||
--values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
|
||||
--values $WORKSPACE/versions/9.1.1506.yaml \
|
||||
--values $SAMPLES/pinning/values.yaml \
|
||||
--set global.license=nscale-license-e92 \
|
||||
$NAME-argo $CHARTS/instance-argo > $DEST/instance-argo/$SAMPLE-argo.yaml
|
||||
|
||||
16
samples/pinning/values.yaml
Normal file
16
samples/pinning/values.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
nappl:
|
||||
probes:
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /index.html
|
||||
port: 8080
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /index.html
|
||||
port: 8080
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 5
|
||||
Reference in New Issue
Block a user