telescope icon indicating copy to clipboard operation
telescope copied to clipboard

Update gitpod to cache_from docker.cdot.systems

Open TDDR opened this issue 2 years ago • 9 comments

Issue This PR Addresses

Fixes #3340

Type of Change

  • [x] Bugfix: Change which fixes an issue

Description

We needed to update the GitPod yaml in order to incorporate the move to docker.cdot.systems based images.

Steps to test the PR

Open up GitPod and see if it works.

TDDR avatar Mar 31 '22 15:03 TDDR

gitpod-io[bot] avatar Mar 31 '22 15:03 gitpod-io[bot]

I am to blame https://github.com/Seneca-CDOT/telescope/pull/2915

We removed pnpm install from gitpod initilization thinking it was packaged with the base workspace but it's actually the node workspace. So to fix this, we could change this line from gitpod/workspace-base to gitpod/workspace-node so that pnpm is installed.

https://github.com/Seneca-CDOT/telescope/blob/9d86ea70f1445a691cd22a72220a022222a6fced/.gitpod.Dockerfile#L1

DukeManh avatar Mar 31 '22 16:03 DukeManh

It's almost there now, it kinda built but couldn't connect to elasticsearch. Will try the suggested solution of "Use MOCK_ELASTIC=1 in your .env" when I get back to this.

image

[ 2022-03-31 17:03:47.819 ] INFO (7602 on tddr-telescope-iiagb87ed0l): Attempting to connect to elasticsearch...
[ 2022-03-31 17:03:48.319 ] INFO (7602 on tddr-telescope-iiagb87ed0l): Attempting to connect to elasticsearch...
[ 2022-03-31 17:03:48.793 ] ERROR (7602 on tddr-telescope-iiagb87ed0l): Unable to connect to Elasticsearch. Use `MOCK_ELASTIC=1` in your `.env` to mock Elasticsearch, or install (see https://github.com/Seneca-CDOT/telescope/blob/master/docs/environment-setup.md)
    err: {
      "type": "Error",
      "message": "Unable to connect to Elasticsearch. Use `MOCK_ELASTIC=1` in your `.env` to mock Elasticsearch, or install (see https://github.com/Seneca-CDOT/telescope/blob/master/docs/environment-setup.md)",
      "stack":
          Error: Unable to connect to Elasticsearch. Use `MOCK_ELASTIC=1` in your `.env` to mock Elasticsearch, or install (see https://github.com/Seneca-CDOT/telescope/blob/master/docs/environment-setup.md)
              at Timeout._onTimeout (/workspace/telescope/src/backend/utils/indexer.js:221:9)
              at listOnTimeout (node:internal/timers:559:17)
              at processTimers (node:internal/timers:502:7)
    }
[ 2022-03-31 17:03:48.795 ] INFO (7602 on tddr-telescope-iiagb87ed0l): Received UNHANDLED REJECTION, starting shut down
[ 2022-03-31 17:03:48.795 ] ERROR (7602 on tddr-telescope-iiagb87ed0l):
    error: {}
[ 2022-03-31 17:03:48.795 ] DEBUG (7602 on tddr-telescope-iiagb87ed0l): Queue feed-queue paused.
[ 2022-03-31 17:03:48.796 ] INFO (7602 on tddr-telescope-iiagb87ed0l): Feed queue shut down.
[ 2022-03-31 17:03:48.796 ] INFO (7602 on tddr-telescope-iiagb87ed0l): Web server shut down.
[ 2022-03-31 17:03:48.796 ] INFO (7602 on tddr-telescope-iiagb87ed0l): Completing shut down.
LIFECYCLE  Command failed with exit code 1.
 ```

TDDR avatar Mar 31 '22 17:03 TDDR

This is #3369, we can do what is suggested there and add a restart: unless-stopped.

humphd avatar Mar 31 '22 21:03 humphd

This is #3369, we can do what is suggested there and add a restart: unless-stopped.

Should I add the restart: unless-stopped to every service? Or just specific ones?

TDDR avatar Mar 31 '22 23:03 TDDR

I haven't used GitPod for a while now.

When I run Telescope, the API server is open on PORT 8443 but I can't hit any service, all give me 404 image

DukeManh avatar Mar 31 '22 23:03 DukeManh

Still giving me the same error after adding restart: unless-stopped

[+] Running 13/13
 ⠿ Network telescope_api_default  Created                                         0.0s
 ⠿ Container login                Started                                         0.7s
 ⠿ Container redis                Started                                         1.0s
 ⠿ Container test-web-content     Started                                         1.1s
 ⠿ Container elasticsearch        Started                                         1.1s
 ⠿ Container traefik              Started                                         1.0s
 ⠿ Container rss-bridge           Started                                         2.3s
 ⠿ Container image                Started                                         2.3s
 ⠿ Container sso                  Started                                         2.6s
 ⠿ Container search               Started                                         2.7s
 ⠿ Container status               Started                                         2.5s
 ⠿ Container posts                Started                                         2.5s
 ⠿ Container feed-discovery       Started                                         4.8s

> @senecacdot/[email protected] start /workspace/telescope
> node src/backend

[ 2022-04-05 14:21:24.249 ] INFO (5917 on tddr-telescope-be423z37qhe): Loading all feeds into feed queue for processing
[ 2022-04-05 14:21:24.252 ] INFO (5917 on tddr-telescope-be423z37qhe): Telescope listening on port 3000
[ 2022-04-05 14:21:24.762 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:25.257 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:25.758 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:26.257 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:26.757 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:27.256 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:27.757 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:28.257 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:28.756 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:29.258 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:29.758 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:30.258 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:30.759 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:31.260 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:31.761 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:32.260 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:32.761 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:33.262 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:33.763 ] INFO (5917 on tddr-telescope-be423z37qhe): Attempting to connect to elasticsearch...
[ 2022-04-05 14:21:34.251 ] ERROR (5917 on tddr-telescope-be423z37qhe): Unable to connect to Elasticsearch. Use `MOCK_ELASTIC=1` in your `.env` to mock Elasticsearch, or install (see https://github.com/Seneca-CDOT/telescope/blob/master/docs/environment-setup.md)
    err: {
      "type": "Error",
      "message": "Unable to connect to Elasticsearch. Use `MOCK_ELASTIC=1` in your `.env` to mock Elasticsearch, or install (see https://github.com/Seneca-CDOT/telescope/blob/master/docs/environment-setup.md)",
      "stack":
          Error: Unable to connect to Elasticsearch. Use `MOCK_ELASTIC=1` in your `.env` to mock Elasticsearch, or install (see https://github.com/Seneca-CDOT/telescope/blob/master/docs/environment-setup.md)
              at Timeout._onTimeout (/workspace/telescope/src/backend/utils/indexer.js:221:9)
              at listOnTimeout (node:internal/timers:559:17)
              at processTimers (node:internal/timers:502:7)
    }
[ 2022-04-05 14:21:34.251 ] INFO (5917 on tddr-telescope-be423z37qhe): Received UNHANDLED REJECTION, starting shut down
[ 2022-04-05 14:21:34.251 ] ERROR (5917 on tddr-telescope-be423z37qhe):
    error: {}
[ 2022-04-05 14:21:34.252 ] DEBUG (5917 on tddr-telescope-be423z37qhe): Queue feed-queue paused.
[ 2022-04-05 14:21:34.252 ] INFO (5917 on tddr-telescope-be423z37qhe): Feed queue shut down.
[ 2022-04-05 14:21:34.252 ] INFO (5917 on tddr-telescope-be423z37qhe): Web server shut down.
[ 2022-04-05 14:21:34.253 ] INFO (5917 on tddr-telescope-be423z37qhe): Completing shut down.
 ELIFECYCLE  Command failed with exit code 1.

TDDR avatar Apr 05 '22 14:04 TDDR

The problem above is that the pnpm start command is failing (e.g., legacy backend can't find ES in time, so dies). The new parser service would restart, so the fix here it to remove the legacy backend (#2777) and only use containers cc @TueeNguyen

humphd avatar Apr 06 '22 13:04 humphd

Hi @TDDR,

Just wondering if you're still working on this PR.

cindyorangis avatar Sep 05 '22 18:09 cindyorangis