mirror of
https://github.com/kerberos-io/deployment.git
synced 2026-08-23 15:18:32 +00:00
Merge pull request #12 from kerberos-io/fix/improve-documentation
Improve documentation for deployment
This commit is contained in:
@@ -120,12 +120,25 @@ To simplify the experience, we have created a `configure.sh` script to automate
|
||||
|
||||
### A. Scripted installation
|
||||
|
||||
To create a new deployment you can use following command.
|
||||
|
||||
```bash
|
||||
./configure.sh -i <ipaddress> -s <host_storage_path>
|
||||
ubuntu@xxxx:~/deployment$ ./configure.sh
|
||||
Usage: ./configure.sh {apply|delete} [-s <storage_path>] [-i <ip_address>]
|
||||
```
|
||||
|
||||
When looking into the `configure.sh` script, you will notice that `microk8s` is utilized. You are encouraged to adjust the overlay to suit your requirements or create a new overlay as needed.
|
||||
|
||||
```bash
|
||||
ubuntu@xxxx:~/deployment$ ./configure.sh apply -i x.x.x.x -s /media/storage
|
||||
```
|
||||
|
||||
To delete you can use the deletion argument.
|
||||
|
||||
```bash
|
||||
ubuntu@xxxx:~/deployment$ ./configure.sh delete
|
||||
```
|
||||
|
||||
### B. Native installation
|
||||
|
||||
If you prefer to use `kustomize` directly without the `configure.sh` script, that's perfectly fine. You can adjust an existing overlay or create a new one to suit your needs. By using the `kustomize` configuration mechanism, you can override our `base` directory settings.
|
||||
@@ -225,7 +238,9 @@ sudo systemctl restart coturn
|
||||
|
||||
Once the installation is complete, you can customize the user interface with your own branding. A persistent volume claim (PVC) has been created and attached to the `hub-frontend` pod. To locate the persistent volume, navigate to your specified storage path. The volume will have a name starting with `kerberos-hub-custom-layout-claim-pvc`.
|
||||
|
||||
cp -r base/volume/ /media/storage/kerberos-hub-custom-layout-claim-pvc-.../
|
||||
```bash
|
||||
cp -r base/volume/* /media/storage/kerberos-hub-custom-layout-claim-pvc-.../
|
||||
```
|
||||
|
||||
Once the files are copied, you should see the CSS override on the Hub landing page.
|
||||
|
||||
|
||||
@@ -44,8 +44,6 @@ data:
|
||||
db = conn.getDB('Kerberos');
|
||||
|
||||
// This will create a user with the following credentials.
|
||||
// This user can access the Hub front-end but not the admin panel. To use the admin panel you
|
||||
// should use the application user (see below).
|
||||
// username: example-user
|
||||
// password: example-password
|
||||
db.users.updateOne(
|
||||
@@ -54,43 +52,44 @@ data:
|
||||
$set: {
|
||||
'username': 'example-user',
|
||||
'email': 'example-user@email.com',
|
||||
'role': 'owner',
|
||||
'admin': true,
|
||||
'password': '$2a$10$jwLcD/.UT/1WLK7ct1XuHewI3GQXwW3zerPhCCs7QDrReEuIHbVYi',
|
||||
'amazon_access_key_id': 'AKIAxxxxxxG5Q',
|
||||
'amazon_secret_access_key': 'K6rRLBI1xxxCk3C1H',
|
||||
'role': 'owner',
|
||||
'google2fa_enabled': false,
|
||||
'timezone': 'Europe/Brussels',
|
||||
'isActive': NumberLong(1),
|
||||
'registerToken': '',
|
||||
'timezone': 'Europe/Brussels',
|
||||
'updated_at': ISODate('2020-06-14T05:01:35.000Z'),
|
||||
'created_at': ISODate('2016-09-20T09:27:58.811Z'),
|
||||
'card_brand': 'MasterCard',
|
||||
'card_last_four': '6888',
|
||||
'amazon_secret_access_key': 'K6rRLBI1xxxCk3C1H',
|
||||
'amazon_access_key_id': 'AKIAxxxxxxG5Q',
|
||||
'card_brand': 'Visa',
|
||||
'card_last_four': '0000',
|
||||
'card_status': 'ok',
|
||||
'card_status_message': null,
|
||||
'google2fa_enabled': false
|
||||
'card_status_message': null
|
||||
}
|
||||
},
|
||||
{ upsert: true }
|
||||
);
|
||||
|
||||
|
||||
// This will create am application user with the following credentials.
|
||||
// Application user can access the admin panel.
|
||||
// username: application
|
||||
// This will create an application with the following credentials, which
|
||||
// can be used to authenticate with the admin panel.
|
||||
// username: example-application
|
||||
// password: example-password
|
||||
db.users.updateOne(
|
||||
{ '_id': ObjectId('57e1011e3178aa6c5cc774d1') },
|
||||
{ '_id': ObjectId('57e1011e3178aa6c5cc774d2') },
|
||||
{
|
||||
$set: {
|
||||
'username': 'application',
|
||||
'email': 'example-user@email.com',
|
||||
'role': 'application',
|
||||
'admin': true,
|
||||
'username': 'example-application',
|
||||
'email': 'example-application@email.com',
|
||||
'password': '$2a$10$jwLcD/.UT/1WLK7ct1XuHewI3GQXwW3zerPhCCs7QDrReEuIHbVYi',
|
||||
'isActive': NumberLong(1),
|
||||
'role': 'application',
|
||||
'google2fa_enabled': false,
|
||||
'timezone': 'Europe/Brussels',
|
||||
'google2fa_enabled': false
|
||||
'isActive': NumberLong(1),
|
||||
'registerToken': '',
|
||||
'updated_at': ISODate('2020-06-14T05:01:35.000Z'),
|
||||
'created_at': ISODate('2016-09-20T09:27:58.811Z')
|
||||
}
|
||||
},
|
||||
{ upsert: true }
|
||||
@@ -241,4 +240,4 @@ data:
|
||||
}
|
||||
},
|
||||
{ upsert: true }
|
||||
);
|
||||
);
|
||||
@@ -6,7 +6,8 @@ get_ip_address() {
|
||||
}
|
||||
|
||||
# Parse command line arguments
|
||||
command=""
|
||||
command=$1
|
||||
shift
|
||||
while getopts ":s:i:" opt; do
|
||||
case $opt in
|
||||
s) storage_path="$OPTARG"
|
||||
@@ -18,9 +19,6 @@ while getopts ":s:i:" opt; do
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND -1))
|
||||
command=$1
|
||||
|
||||
if [ "$command" == "apply" ]; then
|
||||
if [ -z "$storage_path" ]; then
|
||||
echo "Usage: $0 apply -s <storage_path> [-i <ip_address>]"
|
||||
|
||||
83
overlays/documentdb/kustomization.yaml
Normal file
83
overlays/documentdb/kustomization.yaml
Normal file
@@ -0,0 +1,83 @@
|
||||
metadata:
|
||||
name: documentdb
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
patches:
|
||||
- target:
|
||||
kind: StorageClass
|
||||
name: ssd-hostpath
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /parameters/pvDir
|
||||
value: /media/Storage
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: agent1
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/template/spec/containers/0/env/14/value
|
||||
value: tcp://localhost:31883
|
||||
- op: replace
|
||||
path: /spec/template/spec/containers/0/env/17/value
|
||||
value: turn:localhost:8443
|
||||
- target:
|
||||
kind: Job
|
||||
name: hub-import-database-job
|
||||
patch: |-
|
||||
- op: replace
|
||||
path: /spec/template/spec/initContainers/0/command
|
||||
value: ["sh", "-c", "until nc -z docdb-x-x-x-x-x-x.xxx.xx-xx-x.docdb.amazonaws.com 27017 > /dev/null; do echo Waiting for master.; sleep 2; done;"]
|
||||
- op: replace
|
||||
path: /spec/template/spec/containers/0/command
|
||||
value: ['sh', '-c', 'mongosh --host docdb-x-x-x-x-x-x.xxx.xx-xx-x.docdb.amazonaws.com:27017 --username xxxx --password "xxx" --authenticationDatabase admin --db Kerberos --file /data/hub-import.js']
|
||||
helmCharts:
|
||||
- name: hub
|
||||
releaseName: hub
|
||||
namespace: kerberos-hub
|
||||
repo: https://charts.kerberos.io
|
||||
version: 0.77.0
|
||||
valuesFile: ../../base/hub/kerberos-hub-values.yaml
|
||||
valuesInline:
|
||||
license: "L/+FAwEBB2xpY2Vuc2UB/4YAAQIBB1BheWxvYWQBCgABCVNpZ25hdHVyZQEKAAAA/gMw/4YB/gEl/8wQACxnaXRodWIuY29tL3V1Zy1haS9odWItbGljZW5zZS9tb2RlbHMuTGljZW5zZf+BAwEBB0xpY2Vuc2UB/4IAAQwBAklkAf+EAAEDS2V5AQwAAQdDb21wYW55AQwAAQdFeHBUaW1lAQQAAQREYXlzAQQAAQdDYW1lcmFzAQQAAQVTaXRlcwEEAAEGVmF1bHRzAQQAAQpNZWRpYUxpbWl0AQQAAQlQZXJwZXR1YWwBAgABBkFjdGl2ZQECAAEJSXBBZGRyZXNzAQwAAAAY/4MBAQEIT2JqZWN0SUQB/4QAAQYBGAAAPf+COgEMAAAAAAAAAAAAAAAAAg9nZW5lcmljLWxpY2Vuc2UB+AJl6LAHsRMYAfoB0alKIAABEAEUARQDAQAB/gIAFlQqo9yJj1a3OH1+5iGjCPcz9VtrRuGfz/iuQEFohbCfSiZGAdHh16gEc59Z2kPaey+eJcwY0BQsBoipW7SwFRmcHkrWLuxt+Yzi2kvwmL4TN0quWqM4xxBzH1sejS6kZpPm7bw11JBsBuaNOYMbl5lgpPCFajWUH6GzfmuQlptNQKosocacI/9PaaqEUUM0ALjDZNSqqFwZPPsFh9WTeaHGbRbmwQRMPFDgaPCxiHnCCUagbvuVZeOQbKaR5gPTUfPQY/L4mrN9QnMxdzwUJgqm7FbTH4UhoZn6EEzNGTN6DbHhpx8lezzCRW8dzMNuK8R1igiORV5gdWOPzBMZlTgodIZRD07e8iAo2XqT/BWcqaJXutdqXltaiJKshh2QzStdv2WZUynVTguYIQJyBNhrXEkewKZA0UftcSemDPkCmp6VovMMveV4X3Cpzkm7ZHtE7j39At/kpuqY/icTEzRWYuQqEDtqXMVar84VOpgVhxeNrrqZniLq8o3ezRdwy0BJG5xT9cuMxq13ZB3Am9iqTSjx2mh5VZZeB33GjLVAtLscj8NoKWy7BThchXB9xwoiy2RLO8nE+EI8wPbg+ajb2Ta7AFyxHgJJU6cea+zEpiBMARwjPKqk2nn02xdfdqMzQ+E9e115sIqhotBM5RI7uBIf8DDwT93HLsJZRBAA"
|
||||
mqtt:
|
||||
host: "localhost"
|
||||
port: "31080"
|
||||
protocol: "ws"
|
||||
username: "yourusername"
|
||||
password: "yourpassword"
|
||||
turn:
|
||||
host: "turn:localhost:8443"
|
||||
username: "username1"
|
||||
password: "password1"
|
||||
kerberoshub:
|
||||
api:
|
||||
url: "localhost:32081"
|
||||
mongodb:
|
||||
host: docdb-x-x-x-x-x-x.xxx.xx-xx-x.docdb.amazonaws.com:27017
|
||||
adminDatabase: admin
|
||||
authenticationMechanism: SCRAM-SHA-1
|
||||
username: "xxx"
|
||||
password: "xxx"
|
||||
- name: mongodb
|
||||
releaseName: mongodb
|
||||
namespace: mongodb
|
||||
repo: oci://registry-1.docker.io/bitnamicharts
|
||||
valuesFile: ../../base/mongodb/mongodb-values.yaml
|
||||
valuesInline:
|
||||
global:
|
||||
storageClass: "ssd-hostpath"
|
||||
- name: rabbitmq
|
||||
releaseName: rabbitmq
|
||||
namespace: rabbitmq
|
||||
repo: oci://registry-1.docker.io/bitnamicharts
|
||||
valuesFile: ../../base/rabbitmq/rabbitmq-values.yaml
|
||||
valuesInline:
|
||||
global:
|
||||
storageClass: "ssd-hostpath"
|
||||
- name: vernemq
|
||||
releaseName: vernemq
|
||||
# For some reason it doesn't work with a namespace
|
||||
#namespace: vernemq
|
||||
repo: https://vernemq.github.io/docker-vernemq
|
||||
valuesFile: ../../base/vernemq/vernemq-values.yaml
|
||||
@@ -43,6 +43,11 @@ helmCharts:
|
||||
kerberoshub:
|
||||
api:
|
||||
url: "localhost:32081"
|
||||
mongodb:
|
||||
host: mongodb.mongodb
|
||||
adminDatabase: admin
|
||||
username: "root"
|
||||
password: "yourpassword"
|
||||
- name: mongodb
|
||||
releaseName: mongodb
|
||||
namespace: mongodb
|
||||
|
||||
Reference in New Issue
Block a user