-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add nats deployment example #345
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,48 @@ | ||||||||||||||||||||||||||||||||
# oCIS with NATS deployment example | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
## Introduction | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
This example shows how to deploy NATS with NATS as message bus and store. | ||||||||||||||||||||||||||||||||
It will deploy an oCIS instance and NATS, preconfigured to work together. | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
***Note***: This example is not intended for production use. It is intended to get a working oCIS | ||||||||||||||||||||||||||||||||
with NATS running in Kubernetes as quickly as possible. It is not hardened in any way. | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
## Getting started | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
### Prerequisites | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
This example requires the following things to be installed: | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
- [Kubernetes](https://kubernetes.io/) cluster, with an ingress controller installed. | ||||||||||||||||||||||||||||||||
- [Helm](https://helm.sh/) v3 | ||||||||||||||||||||||||||||||||
- [Helmfile](https://github.com/helmfile/helmfile) | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
### End result | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
After following the steps in this guide, you should be able to access the following endpoint, you | ||||||||||||||||||||||||||||||||
may want to add these to your `/etc/hosts` file pointing to your ingress controller IP: | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
- https://ocis.kube.owncloud.test | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
Note that if you want to use your own hostname and domain, you will have to change the `externalDomain` value. | ||||||||||||||||||||||||||||||||
Comment on lines
+21
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
...should be able to access the following endpoint... but where is the endpoint mentioned? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The endpoint is the the url down below, so There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. THX, will adapt the suggestion - done. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will do this in a subsequent PR, because this feedback can be applied to all deployment examples. Tracker ticket, so it doesn't get lost: #354 |
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
### Deploying | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
In this directory, run the following commands: | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||
$ helmfile sync | ||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
This will deploy oCIS and NATS. | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
### Logging in | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
You can get the admin password with the following command: | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||
$ kubectl -n ocis get secret admin-user -o go-template --template="{{.data.password | base64decode }}" | ||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
You can use this password to login with the user `admin`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
repositories: | ||
- name: nats | ||
url: https://nats-io.github.io/k8s/helm/charts | ||
|
||
releases: | ||
- name: nats | ||
chart: nats/nats | ||
namespace: ocis-nats | ||
values: | ||
- cluster: | ||
enabled: true | ||
name: "ocis-cluster" | ||
- nats: | ||
jetstream: | ||
enabled: true | ||
|
||
- name: ocis | ||
chart: ../../charts/ocis | ||
namespace: ocis | ||
values: | ||
- externalDomain: ocis.kube.owncloud.test | ||
- ingress: | ||
enabled: true | ||
ingressClassName: nginx | ||
annotations: | ||
nginx.ingress.kubernetes.io/proxy-body-size: 1024m | ||
tls: | ||
- secretName: ocis-dev-tls | ||
hosts: | ||
- ocis.kube.owncloud.test | ||
|
||
- insecure: | ||
oidcIdpInsecure: true | ||
ocisHttpApiInsecure: true | ||
|
||
- messagingSystem: | ||
external: | ||
enabled: true | ||
endpoint: nats.ocis-nats.svc.cluster.local:4222 | ||
tls: | ||
enabled: false | ||
|
||
- registry: | ||
type: nats | ||
nodes: | ||
- nats.ocis-nats.svc.cluster.local:4222 | ||
|
||
- store: | ||
type: nats-js | ||
nodes: | ||
- nats.ocis-nats.svc.cluster.local:4222 | ||
|
||
- services: | ||
idm: | ||
persistence: | ||
enabled: true | ||
|
||
nats: | ||
persistence: | ||
enabled: true | ||
|
||
search: | ||
persistence: | ||
enabled: true | ||
|
||
storagesystem: | ||
persistence: | ||
enabled: true | ||
|
||
storageusers: | ||
persistence: | ||
enabled: true | ||
|
||
store: | ||
persistence: | ||
enabled: true | ||
|
||
thumbnails: | ||
persistence: | ||
enabled: true | ||
|
||
web: | ||
persistence: | ||
enabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do this in a subsequent PR, because this feedback can be applied to all deployment examples. Tracker ticket, so it doesn't get lost: #354