├── Chart.yaml ├── .helmignore ├── templates ├── NOTES.txt ├── nginx-service.yaml ├── cog-service.yaml ├── relay-secrets.yaml ├── ingress.yaml ├── cog-secrets.yaml ├── nginx-deployment.yaml ├── _helpers.tpl ├── nginx-configmap.yaml ├── relay-deployment.yaml └── cog-deployment.yaml ├── README.md ├── values.yaml └── LICENSE /Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | description: A Helm chart to deploy Cog on Kubernetes 3 | name: cog 4 | version: 0.2.0 5 | keywords: 6 | - chatops 7 | - bot 8 | - cog 9 | home: https://operable.io/ 10 | sources: 11 | - https://github.com/operable/cog 12 | - https://github.com/operable/relay 13 | - https://github.com/ohaiwalt/cog-helm 14 | maintainers: 15 | - name: Matthew Walter 16 | email: ohaiwalt@gmail.com 17 | engine: gotpl 18 | -------------------------------------------------------------------------------- /.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | The Cog server can be accessed on the following DNS name inside the cluster: 2 | {{ template "cog.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local 3 | 4 | {{ if .Values.cog.ingress.enabled -}} 5 | From outside the cluster, the server URL(s) are: 6 | {{- range .Values.cog.ingress.hosts }} 7 | http://{{ . }} 8 | {{- end }} 9 | {{- end }} 10 | 11 | For more information on running Cog, visit: https://operable.io/ -------------------------------------------------------------------------------- /templates/nginx-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "nginx.fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | heritage: "{{ .Release.Service }}" 9 | release: "{{ .Release.Name }}" 10 | spec: 11 | type: {{ .Values.nginx.serviceType }} 12 | ports: 13 | - port: 80 14 | targetPort: 80 15 | selector: 16 | app: {{ template "nginx.fullname" . }} 17 | -------------------------------------------------------------------------------- /templates/cog-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "cog.fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | heritage: "{{ .Release.Service }}" 9 | release: "{{ .Release.Name }}" 10 | spec: 11 | type: {{ .Values.cog.serviceType }} 12 | ports: 13 | - name: api 14 | port: 4000 15 | targetPort: 4000 16 | - name: trigger-api 17 | port: 4001 18 | targetPort: 4001 19 | - name: service-api 20 | port: 4002 21 | targetPort: 4002 22 | - name: mqtt 23 | port: 1883 24 | targetPort: 1883 25 | selector: 26 | app: {{ template "cog.fullname" . }} 27 | -------------------------------------------------------------------------------- /templates/relay-secrets.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: {{ template "relay.fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | heritage: "{{ .Release.Service }}" 9 | release: "{{ .Release.Name }}" 10 | type: Opaque 11 | data: 12 | {{- if .Values.relay.secrets.RELAY_COG_TOKEN }} 13 | RELAY_COG_TOKEN: {{ .Values.relay.secrets.RELAY_COG_TOKEN | b64enc | quote }} 14 | {{- else }} 15 | RELAY_COG_TOKEN: {{ randAlphaNum 10 | b64enc | quote }} 16 | {{- end }} 17 | {{- if .Values.RELAY_DOCKER_REGISTRY_PASSWORD }} 18 | RELAY_DOCKER_REGISTRY_PASSWORD: {{ .Values.RELAY_DOCKER_REGISTRY_PASSWORD | b64enc | quote }} 19 | {{- end }} 20 | -------------------------------------------------------------------------------- /templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.cog.ingress.enabled -}} 2 | {{- $releaseName := .Release.Name -}} 3 | apiVersion: extensions/v1beta1 4 | kind: Ingress 5 | metadata: 6 | annotations: 7 | {{- range $key, $value := .Values.cog.ingress.annotations }} 8 | {{ $key }}: {{ $value | quote }} 9 | {{- end }} 10 | labels: 11 | app: {{ template "fullname" . }} 12 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 13 | heritage: "{{ .Release.Service }}" 14 | release: "{{ .Release.Name }}" 15 | name: {{ template "cog.fullname" . }} 16 | spec: 17 | backend: 18 | serviceName: {{ template "nginx.fullname" . }} 19 | servicePort: 80 20 | {{- if .Values.cog.ingress.tls }} 21 | tls: 22 | {{ toYaml .Values.cog.ingress.tls | indent 4 }} 23 | {{- end -}} 24 | {{- end -}} 25 | -------------------------------------------------------------------------------- /templates/cog-secrets.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: {{ template "cog.fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | heritage: "{{ .Release.Service }}" 9 | release: "{{ .Release.Name }}" 10 | type: Opaque 11 | data: 12 | SLACK_API_TOKEN: {{ .Values.cog.secrets.SLACK_API_TOKEN | b64enc | quote }} 13 | DATABASE_URL: {{ .Values.cog.secrets.DATABASE_URL | b64enc | quote }} 14 | {{- if .Values.cog.secrets.COG_BOOTSTRAP_PASSWORD }} 15 | COG_BOOTSTRAP_PASSWORD: {{ .Values.cog.secrets.COG_BOOTSTRAP_PASSWORD | b64enc | quote }} 16 | {{- else }} 17 | COG_BOOTSTRAP_PASSWORD: {{ randAlphaNum 10 | b64enc | quote }} 18 | {{- end }} 19 | {{- if .Values.cog.config.COG_HIPCHAT_ENABLED }} 20 | COG_HIPCHAT_JABBER_PASSWORD: 21 | COG_HIPCHAT_USER_JABBER_PASSWORD: 22 | {{- end }} 23 | -------------------------------------------------------------------------------- /templates/nginx-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "nginx.fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | heritage: "{{ .Release.Service }}" 9 | release: "{{ .Release.Name }}" 10 | spec: 11 | replicas: {{ .Values.nginx.replicaCount }} 12 | template: 13 | metadata: 14 | labels: 15 | app: {{ template "nginx.fullname" . }} 16 | spec: 17 | containers: 18 | - name: {{ .Values.nginx.name }} 19 | image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag}}" 20 | imagePullPolicy: {{ .Values.image.pullPolicy }} 21 | ports: 22 | - containerPort: 80 23 | resources: 24 | {{ toYaml .Values.nginx.resources | indent 10 }} 25 | volumeMounts: 26 | - mountPath: /etc/nginx/conf.d 27 | name: config 28 | volumes: 29 | - name: config 30 | configMap: 31 | name: {{ template "nginx.fullname" . }} 32 | items: 33 | - key: cog.conf 34 | path: cog.conf 35 | -------------------------------------------------------------------------------- /templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 24 -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | */}} 13 | {{- define "fullname" -}} 14 | {{- $name := default .Chart.Name .Values.nameOverride -}} 15 | {{- printf "%s-%s" .Release.Name $name | trunc 24 -}} 16 | {{- end -}} 17 | 18 | {{/* 19 | Create a fully qualified Cog name. 20 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 21 | */}} 22 | {{- define "cog.fullname" -}} 23 | {{- printf "%s-%s" .Release.Name "cog" | trunc 63 -}} 24 | {{- end -}} 25 | 26 | {{/* 27 | Create a fully qualified Relay name. 28 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 29 | */}} 30 | {{- define "relay.fullname" -}} 31 | {{- printf "%s-%s" .Release.Name "relay" | trunc 63 -}} 32 | {{- end -}} 33 | 34 | {{/* 35 | Create a full qualified Nginx name. 36 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 37 | */}} 38 | {{- define "nginx.fullname" -}} 39 | {{- printf "%s-%s" .Release.Name "nginx" | trunc 63 -}} 40 | {{- end -}} 41 | -------------------------------------------------------------------------------- /templates/nginx-configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ template "nginx.fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | heritage: "{{ .Release.Service }}" 9 | release: "{{ .Release.Name }}" 10 | data: 11 | cog.conf: | 12 | upstream cog_base { server {{ template "cog.fullname" . }}:4000; } 13 | upstream cog_triggers { server {{ template "cog.fullname" . }}:4001; } 14 | upstream cog_service { server {{ template "cog.fullname" . }}:4002; } 15 | 16 | server { 17 | listen 80 default_server; 18 | 19 | location / { 20 | proxy_set_header X-Real_IP $remote_addr; 21 | proxy_set_header X-Forwarded-Host $host; 22 | proxy_set_header X-Forwarded-Server $host; 23 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 24 | proxy_pass http://cog_base; 25 | } 26 | location /trigger { 27 | proxy_set_header X-Real_IP $remote_addr; 28 | proxy_set_header X-Forwarded-Host $host; 29 | proxy_set_header X-Forwarded-Server $host; 30 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 31 | proxy_pass http://cog_triggers/; 32 | } 33 | location /service { 34 | proxy_set_header X-Real_IP $remote_addr; 35 | proxy_set_header X-Forwarded-Host $host; 36 | proxy_set_header X-Forwarded-Server $host; 37 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 38 | proxy_pass http://cog_service/; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /templates/relay-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "relay.fullname" . }} 5 | labels: 6 | app: {{ template "fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | heritage: "{{ .Release.Service }}" 9 | release: "{{ .Release.Name }}" 10 | spec: 11 | replicas: {{ .Values.relay.replicaCount }} 12 | template: 13 | metadata: 14 | labels: 15 | app: {{ template "relay.fullname" . }} 16 | spec: 17 | containers: 18 | - name: {{ .Values.relay.name }} 19 | image: "{{ .Values.relay.image.repository }}:{{ .Values.relay.image.tag }}" 20 | imagePullPolicy: {{ .Values.image.pullPolicy }} 21 | securityContext: 22 | privileged: true 23 | command: 24 | - /usr/local/bin/relay 25 | resources: 26 | {{ toYaml .Values.relay.resources | indent 10 }} 27 | volumeMounts: 28 | - name: docker-socket 29 | mountPath: /var/run/docker.sock 30 | - name: {{ .Values.relay.name }}-data 31 | mountPath: /data 32 | env: 33 | - name: RELAY_COG_HOST 34 | value: {{ template "cog.fullname" . }} 35 | 36 | {{- range $key, $value := .Values.relay.config }} 37 | - name: {{ $key | upper | replace "-" "_" }} 38 | value: {{ $value | quote }} 39 | {{- end }} 40 | 41 | - name: RELAY_COG_TOKEN 42 | valueFrom: 43 | secretKeyRef: 44 | name: {{ template "relay.fullname" . }} 45 | key: RELAY_COG_TOKEN 46 | 47 | {{- if .Values.RELAY_DOCKER_REGISTRY_PASSWORD }} 48 | - name: RELAY_DOCKER_REGISTRY_PASSWORD 49 | valueFrom: 50 | secretKeyRef: 51 | name: {{ template "relay.fullname" . }} 52 | key: RELAY_DOCKER_REGISTRY_PASSWORD 53 | - name: RELAY_DOCKER_REGISTRY_USER 54 | value: {{ .Values.RELAY_DOCKER_REGISTRY_USER | quote }} 55 | - name: RELAY_DOCKER_REGISTRY_EMAIL 56 | value: {{ .Values.RELAY_DOCKER_REGISTRY_EMAIL | quote }} 57 | {{- end }} 58 | 59 | volumes: 60 | - name: docker-socket 61 | hostPath: 62 | path: /var/run/docker.sock 63 | - name: {{ .Values.relay.name }}-data 64 | emptyDir: {} 65 | -------------------------------------------------------------------------------- /templates/cog-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "cog.fullname" . }} 5 | labels: 6 | app: {{ template "cog.fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 8 | heritage: "{{ .Release.Service }}" 9 | release: "{{ .Release.Name }}" 10 | spec: 11 | replicas: {{ .Values.cog.replicaCount }} 12 | template: 13 | metadata: 14 | labels: 15 | app: {{ template "cog.fullname" . }} 16 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" 17 | heritage: "{{ .Release.Service }}" 18 | release: "{{ .Release.Name }}" 19 | spec: 20 | containers: 21 | - name: {{ .Values.cog.name }} 22 | image: "{{ .Values.cog.image.repository }}:{{ .Values.cog.image.tag }}" 23 | imagePullPolicy: {{ .Values.image.pullPolicy }} 24 | command: 25 | - /home/operable/cog/scripts/docker-start 26 | ports: 27 | - containerPort: 4000 28 | - containerPort: 4001 29 | - containerPort: 4002 30 | - containerPort: 1883 31 | resources: 32 | {{ toYaml .Values.cog.resources | indent 10 }} 33 | volumeMounts: 34 | - name: {{ .Values.cog.name }}-data 35 | mountPath: /data 36 | env: 37 | {{- range $key, $value := .Values.cog.config }} 38 | - name: {{ $key | upper | replace "-" "_" }} 39 | value: {{ $value | quote }} 40 | {{- end }} 41 | {{- if .Values.cog.config.COG_SLACK_ENABLED }} 42 | - name: SLACK_API_TOKEN 43 | valueFrom: 44 | secretKeyRef: 45 | name: {{ template "cog.fullname" . }} 46 | key: SLACK_API_TOKEN 47 | {{- end }} 48 | {{- if .Values.cog.config.COG_HIPCHAT_ENABLED }} 49 | - name: COG_HIPCHAT_JABBER_PASSWORD 50 | valueFrom: 51 | secretKeyRef: 52 | name: {{ template "cog.fullname" . }} 53 | key: COG_HIPCHAT_JABBER_PASSWORD 54 | - name: COG_HIPCHAT_USER_JABBER_PASSWORD 55 | valueFrom: 56 | secretKeyRef: 57 | name: {{ template "cog.fullname" . }} 58 | key: COG_HIPCHAT_USER_JABBER_PASSWORD 59 | {{- end }} 60 | - name: DATABASE_URL 61 | valueFrom: 62 | secretKeyRef: 63 | name: {{ template "cog.fullname" . }} 64 | key: DATABASE_URL 65 | - name: COG_BOOTSTRAP_PASSWORD 66 | valueFrom: 67 | secretKeyRef: 68 | name: {{ template "cog.fullname" . }} 69 | key: COG_BOOTSTRAP_PASSWORD 70 | - name: RELAY_COG_TOKEN 71 | valueFrom: 72 | secretKeyRef: 73 | name: {{ template "relay.fullname" . }} 74 | key: RELAY_COG_TOKEN 75 | 76 | # can't recall why used index here 77 | - name: RELAY_ID 78 | value: {{ index .Values.relay.config "RELAY_ID" | quote }} 79 | 80 | volumes: 81 | - name: {{ .Values.cog.name }}-data 82 | emptyDir: {} 83 | 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cog 2 | 3 | [Cog](https://operable.io) is a ChatOps platform with some really great access control features, and allows writing additional functionality in any language. 4 | 5 | This chart is still alpha and will not include a Postgres database container until Helm includes a means of excluding dependent subcharts during deployment. 6 | 7 | In the mean time, deploying the [Postgres](https://github.com/kubernetes/charts/tree/master/stable/postgresql) chart from the Kubernetes charts repository will provide a small testing database for Cog's use. 8 | 9 | ## TL;DR; 10 | 11 | ```bash 12 | $ git clone https://github.com/ohaiwalt/cog-helm cog 13 | $ helm install cog 14 | ``` 15 | 16 | ## Introduction 17 | 18 | This chart bootstraps a [Cog](https://github.com/operable/cog) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. 19 | 20 | ## Prerequisites 21 | 22 | - Kubernetes 1.4+ with Beta APIs enabled 23 | - External Postgresql database 24 | - Slack API token 25 | 26 | ## Installing the Chart 27 | 28 | To install the chart with the release name `my-release`: 29 | 30 | ```bash 31 | $ helm install --name my-release cog-helm 32 | ``` 33 | 34 | The command deploys Cog on the Kubernetes cluster in the default configuration. 35 | 36 | > **Tip**: List all releases using `helm list` 37 | 38 | ## Uninstalling the Chart 39 | 40 | To uninstall/delete the `my-release` deployment: 41 | 42 | ```bash 43 | $ helm delete my-release 44 | ``` 45 | 46 | The command removes all the Kubernetes components associated with the chart and deletes the release. 47 | 48 | ## Configuration 49 | 50 | The following tables lists the required configuration variables. See the [values.yml](values.yml) file for more detailed information. 51 | 52 | | Parameter | Description | Default | 53 | | ----------------------- | ---------------------------------- | ---------------------------------------------------------- | 54 | | `cog.secrets.SLACK_API_TOKEN` | API Token for connecting to Slack | None | 55 | | `cog.secrets.DATABASE_URL` | Database connection string | `ecto://cog:cog@postgres:5432/cog` | 56 | | `relay.config.RELAY_ID` | Relay Id | `00000000-0000-0000-0000-000000000000` 57 | 58 | 59 | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, 60 | 61 | ```bash 62 | $ helm install --name my-release \ 63 | --set cog.secrets.SLACK_API_TOKEN=token,cog.secrets.DATABASE_URL=connection,relay.config.RELAY_ID=$(uuidgen | tr '[:upper:]' '[:lower:]') \ 64 | cog-helm 65 | ``` 66 | 67 | Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, 68 | 69 | ```bash 70 | $ helm install --name my-release -f values.yaml cog-helm 71 | ``` 72 | 73 | > **Tip**: You can use the default [values.yaml](values.yaml) 74 | 75 | ## Persistence 76 | 77 | The [Cog](https://github.com/operable/cog) image stores configuration data and configurations in an external PostgreSQL database. This chart currently does not run a database. 78 | -------------------------------------------------------------------------------- /values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for cog. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | image: 5 | pullPolicy: IfNotPresent 6 | 7 | ## Configure Docker Registry login credentials for private repositories 8 | RELAY_DOCKER_REGISTRY_EMAIL: 9 | RELAY_DOCKER_REGISTRY_USER: 10 | RELAY_DOCKER_REGISTRY_PASSWORD: 11 | 12 | ## 13 | ## COG 14 | ## 15 | cog: 16 | name: cog 17 | serviceType: ClusterIP 18 | replicaCount: 1 19 | image: 20 | repository: operable/cog 21 | tag: 1.0.1 22 | 23 | resources: 24 | # limits: 25 | # cpu: 100m 26 | # memory: 128Mi 27 | requests: 28 | cpu: 100m 29 | memory: 128Mi 30 | 31 | # Adds an ingress in front of Nginx 32 | ingress: 33 | enabled: false 34 | 35 | # annotations: 36 | # kubernetes.io/tls-acme: true 37 | # kubernetes.io/ingress.class: nginx 38 | # tls: 39 | # - hosts: 40 | # - cog.example.com 41 | # secretName: cog-tls 42 | 43 | ## Config values snake-case for templating delimiter 44 | config: 45 | 46 | ## Chat provider toggle 47 | ## Only one can be 'true' at a time 48 | COG_SLACK_ENABLED: true 49 | COG_HIPCHAT_ENABLED: false 50 | 51 | ## Hipchat specific configuration 52 | # COG_HIPCHAT_API_TOKEN: 53 | # COG_HIPCHAT_JABBER_ID: 54 | # COG_HIPCHAT_NICKNAME: 55 | # COG_HIPCHAT_ROOMS: 56 | # COG_HIPCHAT_USER_API_TOKEN: 57 | # COG_HIPCHAT_USER_JABBER_ID: 58 | # COG_HIPCHAT_USER_NICKNAME: 59 | 60 | ## 61 | MIX_ENV: prod 62 | 63 | COG_ALLOW_SELF_REGISTRATION: 1 64 | COG_MQTT_HOST: 0.0.0.0 65 | COG_MQTT_PORT: 1883 66 | 67 | COG_API_URL_BASE: cog.example.com 68 | ## Cog usually represents these endpoints as separate ports 69 | ## Configuring the url-base allows them on the same domain 70 | COG_SERVICE_URL_BASE: cog.example.com/service 71 | COG_TRIGGER_URL_BASE: cog.example.com/trigger 72 | 73 | ## These variables are used to configure an initial admin account 74 | # COG_BOOTSTRAP_CHAT_HANDLE: 75 | COG_BOOTSTRAP_USERNAME: admin 76 | COG_BOOTSTRAP_EMAIL_ADDRESS: cog@localhost 77 | COG_BOOTSTRAP_FIRST_NAME: Cog 78 | COG_BOOTSTRAP_LAST_NAME: Administrator 79 | 80 | ## send anonymized user data back to Operable 81 | COG_TELEMETRY: false 82 | 83 | ## Secrets don't like '-' 84 | secrets: 85 | SLACK_API_TOKEN: 86 | DATABASE_URL: 'ecto://cog:cog@postgresql:5432/cog' 87 | COG_BOOTSTRAP_PASSWORD: 88 | COG_HIPCHAT_JABBER_PASSWORD: 89 | COG_HIPCHAT_USER_JABBER_PASSWORD: 90 | 91 | ## 92 | ## RELAY 93 | ## 94 | relay: 95 | name: relay 96 | replicaCount: 1 97 | image: 98 | repository: operable/relay 99 | tag: latest 100 | 101 | resources: 102 | # limits: 103 | # cpu: 100m 104 | # memory: 128Mi 105 | requests: 106 | cpu: 100m 107 | memory: 128Mi 108 | 109 | config: 110 | RELAY_ID: 00000000-0000-0000-0000-000000000000 111 | RELAY_MANAGED_DYNAMIC_CONFIG: true 112 | RELAY_DYNAMIC_CONFIG_ROOT: /tmp/bundle_configs 113 | RELAY_COG_REFRESH_INTERVAL: 30s 114 | RELAY_DOCKER_CLEAN_INTERVAL: 1m 115 | RELAY_LOG_LEVEL: info 116 | 117 | ## Secrets don't like '-' 118 | secrets: 119 | RELAY_COG_TOKEN: 120 | 121 | nginx: 122 | name: nginx 123 | replicaCount: 1 124 | image: 125 | repository: nginx 126 | tag: 1.11 127 | resources: 128 | # limits: 129 | # cpu: 100m 130 | # memory: 128Mi 131 | requests: 132 | cpu: 100m 133 | memory: 128Mi 134 | serviceType: LoadBalancer 135 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------