diff --git a/frontend/pages/docs/administration/getting-started/app-configuration.mdx b/frontend/pages/docs/administration/getting-started/app-configuration.mdx new file mode 100644 index 000000000..639583874 --- /dev/null +++ b/frontend/pages/docs/administration/getting-started/app-configuration.mdx @@ -0,0 +1,52 @@ +import DocsWrapper from 'src/docs/DocsWrapper' + +# App Configuration + +## Configuration Files + +> ⚠️ Note: If you use Helm this information does not apply to you. We use Helm to automatically configure the +> application for you. Within helm you can manually alter this configuration in +> `infrastructure/helm/bailo/templates/bailo/bailo.configmap.yaml` + +Bailo uses [`node-config`](https://github.com/node-config/node-config#readme) for application configuration. +`node-config` organizes hierarchical configurations, allowing the user to set a series of overides over a base +configuration. + +The default set of configuration can be found in `config/default.js`, with overrides for other environments included in +the same folder. For production environments, configuration should be placed in either `production.cjs` or `local.js` to +override the default configuration. + +The full order of configuration inheritance can be found +[on the node-config wiki](https://github.com/node-config/node-config/wiki/Configuration-Files). + +Given the following set of files: + +```javascript +// default.js +{ a: 5, b: "ten", c: { d: 20, e: 25 } } + +// production.cjs +{ b: 10, c: { d: "d" } } + +// local.js +{ c: { d: 999 } } +``` + +The result is: + +```javascript +{ + a: 5, // no overrides + b: 10, // overridden in production.cjs + c: { + d: 999, // overriden in production.cjs, then again in local.js + e: 25 // not overwritten, objects are merged together. + } +} +``` + +When deploying using `helm`, configuration is primarily handled through `values.yaml` controlling +`helm/bailo/templates/bailo/bailo.configmap.yaml`. Configuration is loaded when the application starts. The application +must be restarted when configuration changes. + +export default ({ children }) => {children} diff --git a/frontend/pages/docs/administration/helm/basic-usage.mdx b/frontend/pages/docs/administration/helm/basic-usage.mdx new file mode 100644 index 000000000..ada52f9d5 --- /dev/null +++ b/frontend/pages/docs/administration/helm/basic-usage.mdx @@ -0,0 +1,51 @@ +import DocsWrapper from 'src/docs/DocsWrapper' + +# Helm Deployments + +If you are deploying to a Kubernetes or OpenShift cluster, Helm is the only supported method of deployment. It is a +package manager for Kubernetes and allows us to simplify installing and upgrading the project. It enables you to use the +same base templates for deploying Bailo, configuring overrides to values as needed for your specific use case. + +For more details, see the [Helm project page](https://helm.sh/). + +## Requirements + +- [HELM CLI](https://github.com/helm/helm/releases) +- [Kubectl](https://kubernetes.io/docs/tasks/tools/) + +If you are deploying to OpenShift, you will also need OC: + +- [OpenShift CLI](https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz) + +## Deployment + +### Setup + +All commands assume they are run in the `infrastructure/helm/bailo` directory. You should have already authenticated +`kubectl` to their cluster and changed to the correct context: + +1. `kubectl config set-context --current --namespace=bailo` + +You can test out your connection by running: + +1. `kubectl cluster-info` + +When Deploying to OpenShift login to `oc` instead: + +1. `oc login ` + +### Installation + +1. `helm dependency update` +2. `helm install bailo .` +3. `helm list # check the installation exists` + +### Upgrade + +1. `helm upgrade bailo .` + +### Remove + +1. `helm uninstall bailo` + +export default ({ children }) => {children} diff --git a/frontend/pages/docs/administration/helm/configuration.mdx b/frontend/pages/docs/administration/helm/configuration.mdx new file mode 100644 index 000000000..2c24f7ff0 --- /dev/null +++ b/frontend/pages/docs/administration/helm/configuration.mdx @@ -0,0 +1,41 @@ +import DocsWrapper from 'src/docs/DocsWrapper' + +# Helm Configuration + +The default Helm configuration is stored within `values.yaml`. You should not alter this configuration directly, instead +overriding individual values via the command line `--set` flag, or by providing a custom `--values` file. + +To override a single value, add `--set