Closed sjlongland closed 6 years ago
What does your deployment look like? I run a very similar setup with Kubernetes.
As I say, not very complicated; just a nginx
front-end proxy pointed at ServiceBot (private image on Docker Hub; it generated the above nginx
config). The container we use for the front-end proxy takes care of Let's Encrypt registration. The deployment script was generated from a tweaked (by adding the reverse proxy) docker-compose.yml
file, then converted using kompose
.
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -o kompose.yml -f docker-compose.yaml
kompose.version: 1.8.0 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: db
name: db
spec:
clusterIP: None
ports:
- name: headless
port: 55555
targetPort: 0
selector:
io.kompose.service: db
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -o kompose.yml -f docker-compose.yaml
kompose.version: 1.8.0 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: nginx
name: nginx
spec:
ports:
- name: "80"
port: 80
targetPort: 80
- name: "443"
port: 443
targetPort: 443
type: LoadBalancer
selector:
io.kompose.service: nginx
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -o kompose.yml -f docker-compose.yaml
kompose.version: 1.8.0 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: servicebot
name: servicebot
spec:
clusterIP: None
ports:
- name: headless
port: 55555
targetPort: 0
selector:
io.kompose.service: servicebot
status:
loadBalancer: {}
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -o kompose.yml -f docker-compose.yaml
kompose.version: 1.8.0 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: db
name: db
spec:
replicas: 1
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: db
spec:
containers:
- env:
- name: POSTGRES_DB
value: 'xxxxxxxx'
- name: POSTGRES_PASSWORD
value: 'xxxxxxxx'
- name: POSTGRES_USER
value: 'xxxxxxxx'
image: postgres:latest
name: db
resources: {}
restartPolicy: Always
imagePullSecrets:
- name: regcred
status: {}
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -o kompose.yml -f docker-compose.yaml
kompose.version: 1.8.0 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: nginx
name: nginx
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: nginx
spec:
containers:
- env:
- name: CERT_TYPE
value: le
- name: LETS_ENCRYPT_ADMIN
value: softeng@vrt.com.au
- name: MOUNT_DEST0
value: /
- name: MOUNT_SRC0
value: http://servicebot:3000/
- name: SECURE_REDIRECT
value: "TRUE"
- name: SERVER_NAME
value: widesky.vrtaws.vk4msl.id.au
image: vrtsystems/widesky-nginx:develop
name: nginx
ports:
- containerPort: 80
- containerPort: 443
resources: {}
volumeMounts:
- mountPath: /var/local
name: nginx-data
restartPolicy: Always
imagePullSecrets:
- name: regcred
volumes:
- name: nginx-data
persistentVolumeClaim:
claimName: nginx-data
status: {}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: nginx-data
name: nginx-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -o kompose.yml -f docker-compose.yaml
kompose.version: 1.8.0 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: servicebot
name: servicebot
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: servicebot
spec:
containers:
- args:
- sh
- -c
- node /usr/src/app/bin/wait-for-it.js db 5432 && npm run-script start
env:
- name: PORT
value: '3000'
- name: POSTGRES_DB_HOST
value: 'db'
- name: POSTGRES_DB_NAME
value: 'xxxxxxxx'
- name: POSTGRES_DB_PASSWORD
value: 'xxxxxxxx'
- name: POSTGRES_DB_PORT
value: '5432'
- name: POSTGRES_DB_USER
value: 'xxxxxxxx'
image: servicebot/servicebot
name: servicebot
resources: {}
volumeMounts:
- mountPath: /usr/src/app/uploads
name: upload-data
- mountPath: /usr/src/app/env
name: environment-file
restartPolicy: Always
imagePullSecrets:
- name: regcred
volumes:
- name: upload-data
persistentVolumeClaim:
claimName: upload-data
- name: environment-file
persistentVolumeClaim:
claimName: environment-file
status: {}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: upload-data
name: upload-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: environment-file
name: environment-file
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
kind: List
metadata: {}
The following change to my service config fixed the problem:
stuartl@vk4msl-ws /tmp/ws-servicebot $ diff -u ../servicebot-kubernetes.yml servicebot-kubernetes.yml
--- ../servicebot-kubernetes.yml 2018-03-05 09:54:54.281647303 +1000
+++ servicebot-kubernetes.yml 2018-03-05 10:26:42.478879301 +1000
@@ -200,7 +202,7 @@
value: '5432'
- name: POSTGRES_DB_USER
value: 'sbuser'
- image: servicebot/servicebot
+ image: servicebot/servicebot:version-0.8.3
name: servicebot
resources: {}
volumeMounts:
It would appear there's a regression between this version and the latest.
When configuring ServiceBot in either Firefox 57 or Chromium 63, the set-up fails with the message "There seems to be a problem in processing your request. Please try again.". Trying again does nothing.
Deployed instance for trial of ServiceBot:
Deployment details:
ServiceBot is behind a nginx reverse proxy with the following configuration
Logs from console (Firefox):