Public Information
This commit is contained in:
93
samples/application/README.md
Normal file
93
samples/application/README.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# Installing Document Areas
|
||||
|
||||
## Creating an empty document area while deploying an Instance
|
||||
|
||||
This is the simplest sample, just the core services with an empty document area:
|
||||
|
||||
```
|
||||
helm install \
|
||||
--values samples/application/empty.yaml \
|
||||
--values samples/environment/demo.yaml \
|
||||
empty nplus/nplus-instance
|
||||
```
|
||||
|
||||
The empty Document Area is created with
|
||||
|
||||
```yaml
|
||||
components:
|
||||
application: true
|
||||
prepper: true
|
||||
|
||||
application:
|
||||
docAreas:
|
||||
- id: "Sample"
|
||||
run:
|
||||
- "/pool/downloads/sample.sh"
|
||||
|
||||
prepper:
|
||||
download:
|
||||
- "https://git.nplus.cloud/public/nplus/raw/branch/master/assets/sample.tar.gz"
|
||||
```
|
||||
|
||||
This turns on the *prepper* component, used to download a sample tarball from git. It will also extract the tarball into the `downloads` folder that is created on the *pool* automatically.
|
||||
|
||||
Then, after the Application Layer is running, a document area `Sample` is created. The content of the sample script will be executed.
|
||||
|
||||
If you use **argoCD** as deployment tool, you would go with
|
||||
|
||||
```
|
||||
helm install \
|
||||
--values samples/application/empty.yaml \
|
||||
--values samples/environment/demo.yaml \
|
||||
empty-argo nplus/nplus-instance-argo
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Deploying the *SBS* Apps to a new document area
|
||||
|
||||
In the SBS scenario, some Apps are installed into the document area:
|
||||
|
||||
```bash
|
||||
helm install \
|
||||
--values samples/applications/sbs.yaml \
|
||||
--values samples/environment/demo.yaml \
|
||||
sbs nplus/nplus-instance
|
||||
```
|
||||
|
||||
The values look like this:
|
||||
|
||||
```yaml
|
||||
components:
|
||||
application: true
|
||||
application:
|
||||
nameOverride: SBS
|
||||
docAreas:
|
||||
- id: "SBS"
|
||||
name: "DocArea with SBS"
|
||||
description: "This is a sample DocArea with the SBS Apps installed"
|
||||
apps:
|
||||
- "/pool/nstore/bl-app-9.0.1202.zip"
|
||||
- "/pool/nstore/gdpr-app-9.0.1302.zip"
|
||||
...
|
||||
- "/pool/nstore/ts-app-9.0.1302.zip"
|
||||
- "/pool/nstore/ocr-base-9.0.1302.zip"
|
||||
|
||||
```
|
||||
|
||||
This will create a document area `SBS` and install the SBS Apps into it.
|
||||
|
||||
|
||||
# Accounting in nstl
|
||||
|
||||
To collect Accounting Data in *nscale Server Storage Layer*, you can enable the nstl accouting feature by setting `accounting: true`.
|
||||
This will create the accounting csv files in *ptemp* under `<instance>/<component>/accounting`.
|
||||
Additionally, you can enable a log forwarder printing it to stdout.
|
||||
|
||||
```
|
||||
nstl:
|
||||
accounting: true
|
||||
logForwarder:
|
||||
- name: Accounting
|
||||
path: "/opt/ceyoniq/nscale-server/storage-layer/accounting/*.csv"
|
||||
```
|
||||
80
samples/application/build.sh
Executable file
80
samples/application/build.sh
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/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
|
||||
|
||||
# Set the Variables
|
||||
SAMPLE="empty"
|
||||
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/hid/values.yaml \
|
||||
--values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
|
||||
--values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
|
||||
$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/hid/values.yaml \
|
||||
--values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
|
||||
--values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
|
||||
$NAME-argo $CHARTS/instance-argo > $DEST/instance-argo/$SAMPLE-argo.yaml
|
||||
|
||||
|
||||
|
||||
# Set the Variables
|
||||
SAMPLE="sbs"
|
||||
NAME="sample-$SAMPLE"
|
||||
|
||||
# Output what is happening
|
||||
echo "Building $NAME"
|
||||
|
||||
# Create the manifest
|
||||
mkdir -p $DEST/instance
|
||||
helm template --debug \
|
||||
--values $SAMPLES/application/sbs.yaml \
|
||||
--values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
|
||||
--values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
|
||||
$NAME $CHARTS/instance > $DEST/instance/$SAMPLE.yaml
|
||||
|
||||
# creating the Argo manifest
|
||||
mkdir -p $DEST/instance-argo
|
||||
helm template --debug \
|
||||
--values $SAMPLES/application/sbs.yaml \
|
||||
--values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
|
||||
--values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
|
||||
$NAME-argo $CHARTS/instance-argo > $DEST/instance-argo/$SAMPLE-argo.yaml
|
||||
|
||||
20
samples/application/empty.yaml
Normal file
20
samples/application/empty.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
components:
|
||||
application: true
|
||||
prepper: true
|
||||
|
||||
application:
|
||||
docAreas:
|
||||
- id: "Sample"
|
||||
run:
|
||||
- "/pool/downloads/sample.sh"
|
||||
|
||||
prepper:
|
||||
download:
|
||||
- "https://git.nplus.cloud/public/nplus/raw/branch/master/assets/sample.tar.gz"
|
||||
|
||||
nstl:
|
||||
accounting: true
|
||||
logForwarder:
|
||||
- name: Accounting
|
||||
path: "/opt/ceyoniq/nscale-server/storage-layer/accounting/*.csv"
|
||||
db: "/opt/ceyoniq/nscale-server/storage-layer/logsdb/logs.db"
|
||||
28
samples/application/sbs.yaml
Normal file
28
samples/application/sbs.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
components:
|
||||
application: true
|
||||
application:
|
||||
nameOverride: SBS
|
||||
docAreas:
|
||||
- id: "SBS"
|
||||
name: "DocArea with SBS"
|
||||
description: "This is a sample DocArea with the SBS Apps installed"
|
||||
apps:
|
||||
- "/pool/nstore/bl-app-9.0.1202.zip"
|
||||
- "/pool/nstore/gdpr-app-9.0.1302.zip"
|
||||
- "/pool/nstore/sbs-base-9.0.1302.zip"
|
||||
- "/pool/nstore/sbs-app-9.0.1302.zip"
|
||||
- "/pool/nstore/tmpl-app-9.0.1302.zip"
|
||||
- "/pool/nstore/cm-base-9.0.1302.zip"
|
||||
- "/pool/nstore/cm-app-9.0.1302.zip"
|
||||
- "/pool/nstore/hr-base-9.0.1302.zip"
|
||||
- "/pool/nstore/hr-app-9.0.1302.zip"
|
||||
- "/pool/nstore/pm-base-9.0.1302.zip"
|
||||
- "/pool/nstore/pm-app-9.0.1302.zip"
|
||||
- "/pool/nstore/sd-base-9.0.1302.zip"
|
||||
- "/pool/nstore/sd-app-9.0.1302.zip"
|
||||
- "/pool/nstore/kon-app-9.0.1302.zip"
|
||||
- "/pool/nstore/kal-app-9.0.1302.zip"
|
||||
- "/pool/nstore/dok-app-9.0.1302.zip"
|
||||
- "/pool/nstore/ts-base-9.0.1302.zip"
|
||||
- "/pool/nstore/ts-app-9.0.1302.zip"
|
||||
- "/pool/nstore/ocr-base-9.0.1302.zip"
|
||||
Reference in New Issue
Block a user