Skip to content

Update gitpod to cache_from docker.cdot.systems#3371

Draft
TDDR wants to merge 1 commit into
Seneca-CDOT:masterfrom
TDDR:GitpodMigration
Draft

Update gitpod to cache_from docker.cdot.systems#3371
TDDR wants to merge 1 commit into
Seneca-CDOT:masterfrom
TDDR:GitpodMigration

Conversation

@TDDR

@TDDR TDDR commented Mar 31, 2022

Copy link
Copy Markdown
Contributor

Issue This PR Addresses

Fixes #3340

Type of Change

  • 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.

@gitpod-io

gitpod-io Bot commented Mar 31, 2022

Copy link
Copy Markdown

@TDDR TDDR self-assigned this Mar 31, 2022
@TDDR TDDR added the type: bug Something isn't working label Mar 31, 2022
@TDDR TDDR force-pushed the GitpodMigration branch from 865031d to 63ba4da Compare March 31, 2022 15:48

@humphd humphd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried this on gitpod, and get:

bash: pnpm: command not found
WARNING: The GIT_COMMIT variable is not set. Defaulting to a blank string.
WARNING: The GIT_COMMIT variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker/gitpod.yml' is invalid because:
services.nginx.build contains unsupported option: 'ports'
ERROR: The Compose file './docker/gitpod.yml' is invalid because:
services.nginx.build contains unsupported option: 'ports'
[1]-  Exit 127                pnpm install
[2]+  Exit 1                  docker-compose --env-file .env build $SERVICES
exit

🤙 This task ran as a workspace prebuild

WARNING: The GIT_COMMIT variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker/gitpod.yml' is invalid because:
services.nginx.build contains unsupported option: 'ports'
bash: pnpm: command not found

You need to bump nginx's volumes and ports one tab-stop to the left so it's in the same level as build vs. under it.

Also, I'm not sure what's up with the pnpm not found bit. cc @DukeManh, @Kevan-Y.

@DukeManh

DukeManh commented Mar 31, 2022

Copy link
Copy Markdown
Contributor

I am to blame #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.

FROM gitpod/workspace-base

@TDDR

TDDR commented Mar 31, 2022

Copy link
Copy Markdown
Contributor Author

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.
 ```

@humphd

humphd commented Mar 31, 2022

Copy link
Copy Markdown
Contributor

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

@TDDR

TDDR commented Mar 31, 2022

Copy link
Copy Markdown
Contributor Author

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?

@DukeManh DukeManh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like containers are not running.

Comment thread .gitpod.Dockerfile Outdated
FROM gitpod/workspace-base
FROM gitpod/workspace-node

# Installing Node LTS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we are working with workspace-node, you can remove node and docker-compose and nvm installion below

@DukeManh

DukeManh commented Mar 31, 2022

Copy link
Copy Markdown
Contributor

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

@TDDR

TDDR commented Apr 5, 2022

Copy link
Copy Markdown
Contributor Author

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/telescope@2.9.0 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 TDDR requested review from DukeManh and humphd April 5, 2022 14:27
@humphd

humphd commented Apr 6, 2022

Copy link
Copy Markdown
Contributor

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

@sirinoks sirinoks added review: normal area: autodeployment Anything related to auto deployment Blocked Can't do this, until something else is done and removed Blocked Can't do this, until something else is done labels Apr 19, 2022
@cindyorangis

Copy link
Copy Markdown
Contributor

Hi @TDDR,

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

@manekenpix manekenpix force-pushed the master branch 17 times, most recently from 94eec21 to e27efa5 Compare December 3, 2022 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: autodeployment Anything related to auto deployment type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitPod no longer runs with move to docker.cdot.systems

6 participants