Question: How does Forest Admin poll/query Admin Backend?

I’ve deployed the admin-backend on our test Kubernetes cluster, below is the manifest file content:

#############################################
# Deployment
#############################################
apiVersion: apps/v1
kind: Deployment
metadata:
  name: admin-backend-a-deployment
  namespace: application-a
  labels:
    app: admin-backend-a
spec:
  replicas: 1
  selector:
    matchLabels:
      app: admin-backend-a
  template:
    metadata:
      labels:
        app: admin-backend-a
    spec:
      containers:
      - name: admin-backend-a
        image: node:10-alpine
        command: ["/bin/sh", "-c"]
        args:
        - npm install -g lumber-cli@latest -s 2>&1;
          lumber generate $(APP_NAME) --connection-url $(DATABASE_URL) --ssl $(DATABASE_SSL) --schema $(DATABASE_SCHEMA) --application-host $(APPLICATION_HOST) --application-port $(APPLICATION_PORT) --email $(FOREST_EMAIL) --token $(FOREST_TOKEN) 2>&1;
          cd $(APP_NAME) 2>&1;
          npm install -s 2>&1;
          npm start 2>&1;
        ports:
        - containerPort: 3310
        env:
        - name: APP_NAME
          value: 'compono-poc-dev'
        - name: DATABASE_URL
          value: 'postgres://postgres:REDACTED@my_db_url:5432/test'
        - name: DATABASE_SSL
          value: 'false'
        - name: DATABASE_SCHEMA
          value: 'public'
        - name: APPLICATION_HOST
          value: 'https://REDACTED'
        - name: APPLICATION_PORT
          value: '3310'
        - name: FOREST_EMAIL
          value: 'REDACTED@compono.com'
        - name: FOREST_TOKEN
          value: "REDACTED"
---
#############################################
# Service
#############################################
apiVersion: v1
kind: Service
metadata:
  name: admin-backend-a
  namespace: application-a
spec:
  selector:
    app: admin-backend-a
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: 3310
---
#############################################
# IngressRoute
#############################################
kind: Ingress
apiVersion: "networking.k8s.io/v1beta1"
metadata:
  name: "admin-backend-a-ingress-route"
  namespace: application-a
spec:
  rules:
    - host: admin-backend-a.reviews.compono.dev
      http:
        paths:
          - pathType: ImplementationSpecific
            backend:
              serviceName: admin-backend-a
              servicePort: 80

I can confirm that the backend is now up and running, please check screenshot:

image

However it’s seems to me the Backend is not yet picked up correctly in the web UI:

I’ve looked up all available documents on this topic but could not find any info on how Forest Admin website system authenticate with the admin backend.

It would be great if any developer or support staff could guide me to the right place for answers.

Many thanks in advance

Hello @trung_le_at_compono,

Thanks for your feedback, and welcome in the community!

Can you open the browser developer tools, network tab, and find the request that is failing? The request and its error will help a lot finding the origin of your issue.

Could you also provide us all the information that is asked in the template for new topics?

  • Package Version:
  • Express Version:
  • Sequelize Version:
  • Database Dialect:
  • Database Version:
  • Project Name:

Thanks

@GuillaumeGautreau I’ve managed to fix the issue on my end. The issue is with the APPLICATION_PORT which I set to 3310, however my exposed APPLICATION_HOST is https://REDACTED which uses port 443. To fix that I update my manifest file so that:

        - name: APPLICATION_HOST
          value: 'https://REDACTED'
        - name: APPLICATION_PORT
          value: '443'
1 Like