Files
nplus/samples/detached/README.md
2025-01-24 16:18:47 +01:00

1.7 KiB

Using detached applications

All the other samples use an application that is deployed inside of an instance. However, you can also deploy an application detached from the instance as a solo chart.

The reason for this is, that you

  • can update the instance without running the application update
  • update the application without touching the instance
  • have multiple applications deployed within one instance

There are two major things you need to do:

  1. make sure the application charts sets the instance name of the instance, it should connect to
  2. take the default values of the application match the ones it would get by an instance deployment

This is a sample: (find the complete one in the application.yaml)

nameOverride: SBS
docAreas:
  - id: "SBS"
    name: "DocArea with SBS"
    description: "This is a sample DocArea with the SBS Apps installed"
    apps:
    ...

instance:
  # this is the name of the instance, it should belong to
  name: "sample-detached"

# make sure it can wait for the nappl of the instance to be ready, before it deploys.
waitImage:
  repo: cr.nplus.cloud/subscription
  name: toolbox2
  tag: 1.2.1300
  pullPolicy: IfNotPresent
waitFor:
  - "-service {{ .component.prefix }}nappl.{{ .Release.Namespace }}.svc.cluster.local:{{ .this.nappl.port }} -timeout 1800"

# Now we define where and what to deploy 
nappl:
  host: "{{ .component.prefix }}nappl.{{ .Release.Namespace }}"
  port: 8080
  ssl: false
  instance: "nscalealinst1"
  account: admin
  domain: nscale
  password: admin
  secret:
nstl:
  host: "{{ .component.prefix }}nstl.{{ .Release.Namespace }}"
rs:
  host: "{{ .component.prefix }}rs.{{ .Release.Namespace }}"