Public Information

This commit is contained in:
2025-01-24 16:18:47 +01:00
commit 0bd2038c86
449 changed files with 108655 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
# Using Object Stores
Blobstores aka Objectstores have a REST Interface that you can upload your Payload to and receive an ID for it. They are normally structured into *Buckets* or *Containers* to privide
some sort of pooling payload within the store.
The *nscale Server Storage Layer* supports multiple brands of objectstores, the most popular being Amazon S3 and Microsoft Azure Blobstore.
In order to use them, you need to
- get an account for the store
- configure the *nstl* with the url, credentials etc.
- Add firewall rules to access to store
Have a look at the sample files
- s3-env.yaml
for Amazon S3 compatible storage, and
- azureblob.yaml
for Azure Blobstore
For S3 compatible storage, there are multiple S3 flavours available.
# Custom Environment Variables
There are multiple ways of how to set custom environment variables in addition to the named values, you set in helm:
## Using `env`
Please have a look at `s3-env.yaml` to see how custom environment variables can be injected into a component:
```
nstl:
env:
# Archivtyp
NSTL_ARCHIVETYPE_900_NAME: "S3"
NSTL_ARCHIVETYPE_900_ID: "900"
NSTL_ARCHIVETYPE_900_LOCALMIGRATION: "0"
NSTL_ARCHIVETYPE_900_LOCALMIGRATIONTYPE: "NONE"
NSTL_ARCHIVETYPE_900_S3MIGRATION: "1"
```
This will set the environment variables in the storage layer to add an archive type with id 900.
## Using `envMap` and `envSecret`
Alternatively to the standard `env`setting, you can also use configmaps and secrets for additional environment variables.
The file `s3-envres.yaml` creates a configmap and a secret with the same variables as used in the `s3-env.yaml` sample. `s3-envfrom.yaml` shows how to import them.
Please be aware, that data in secrets need to be base64 encoded:
```
echo "xxx" | base64
```
So in order to use the envFrom mechanism,
- prepare the resources (as in `s3-envres.yaml`)
- upload the resources to your cluster
```
kubectl apply -f s3-envres.yaml
```
- add it to your configuration
```
nstl:
# These resources are set in the s3-envres.yaml sample file
# you can set single values (envMap or envSecret) or lists (envMaps or envSecrets)
envMaps:
- env-sample-archivetype
- env-sample-device
envSecret: env-sample-device-secret
```

View File

@@ -0,0 +1,20 @@
nstl:
env:
# global
NSTL_RETRIEVALORDER: "AZURE, HARDDISK_ADAPTER, REMOTE_EXPLICIT, REMOTE_DA"
# Archive Type
NSTL_ARCHIVETYPE_901_NAME: "AZUREBLOB"
NSTL_ARCHIVETYPE_901_ID: "901"
NSTL_ARCHIVETYPE_901_LOCALMIGRATION: "0"
NSTL_ARCHIVETYPE_901_LOCALMIGRATIONTYPE: "NONE"
NSTL_ARCHIVETYPE_901_AZUREMIGRATION: "1"
# Device
NSTL_AZURE_0_CONFIGURED: "1"
NSTL_AZURE_0_ARCHIVETYPES: "AZUREBLOB"
NSTL_AZURE_0_INDEX: "0"
NSTL_AZURE_0_NAME: "AZUREBLOB"
NSTL_AZURE_0_INITIALLYACTIVE: "1"
NSTL_AZURE_0_PERMANENTMIGRATION: "1"
NSTL_AZURE_0_CONTAINERNAME: "demostore"
NSTL_AZURE_0_ACCOUNTNAME: "xxx"
NSTL_AZURE_0_ACCOUNTKEY: "xxx"

View File

@@ -0,0 +1,23 @@
nstl:
env:
# Archivtyp
NSTL_ARCHIVETYPE_900_NAME: "S3"
NSTL_ARCHIVETYPE_900_ID: "900"
NSTL_ARCHIVETYPE_900_LOCALMIGRATION: "0"
NSTL_ARCHIVETYPE_900_LOCALMIGRATIONTYPE: "NONE"
NSTL_ARCHIVETYPE_900_S3MIGRATION: "1"
# Device
NSTL_S3_0_CONFIGURED: "1"
NSTL_S3_0_ARCHIVETYPES: "S3"
NSTL_S3_0_INDEX: "0"
NSTL_S3_0_TYPE: "S3_COMPATIBLE"
NSTL_S3_0_NAME: "S3"
NSTL_S3_0_INITIALLYACTIVE: "1"
NSTL_S3_0_USESSL: "1"
NSTL_S3_0_VERIFYSSL: "0"
NSTL_S3_0_ACCESSID: "xxx"
NSTL_S3_0_SECRETKEY: "xxx"
NSTL_S3_0_ENDPOINT: "s3.nplus.cloud"
NSTL_S3_0_BUCKETNAME: "nstl"
NSTL_S3_0_USEVIRTUALADDRESSING: "0"
NSTL_S3_0_PERMANENTMIGRATION: "1"

View File

@@ -0,0 +1,7 @@
nstl:
# These resources are set in the s3-envres.yaml sample file
# you can set single values (envMap or envSecret) or lists (envMaps or envSecrets)
envMaps:
- env-sample-archivetype
- env-sample-device
envSecret: env-sample-device-secret

View File

@@ -0,0 +1,40 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: env-sample-archivetype
namespace: lab
data:
NSTL_ARCHIVETYPE_900_NAME: "S3"
NSTL_ARCHIVETYPE_900_ID: "900"
NSTL_ARCHIVETYPE_900_LOCALMIGRATION: "0"
NSTL_ARCHIVETYPE_900_LOCALMIGRATIONTYPE: "NONE"
NSTL_ARCHIVETYPE_900_S3MIGRATION: "1"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: env-sample-device
namespace: lab
data:
NSTL_S3_0_CONFIGURED: "1"
NSTL_S3_0_ARCHIVETYPES: "S3"
NSTL_S3_0_INDEX: "0"
NSTL_S3_0_TYPE: "S3_COMPATIBLE"
NSTL_S3_0_NAME: "S3"
NSTL_S3_0_INITIALLYACTIVE: "1"
NSTL_S3_0_USESSL: "1"
NSTL_S3_0_VERIFYSSL: "0"
NSTL_S3_0_ENDPOINT: "s3.nplus.cloud"
NSTL_S3_0_BUCKETNAME: "nstl"
NSTL_S3_0_USEVIRTUALADDRESSING: "0"
NSTL_S3_0_PERMANENTMIGRATION: "1"
---
apiVersion: v1
kind: Secret
metadata:
name: env-sample-device-secret
namespace: lab
type: Opaque
data:
NSTL_S3_0_ACCESSID: eHh4Cg==
NSTL_S3_0_SECRETKEY: eHh4Cg==