Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use env vars to select between dev and prod #158

Merged
merged 1 commit into from
Aug 14, 2023
Merged

Conversation

vladbogo
Copy link
Collaborator

No description provided.

@vladbogo vladbogo force-pushed the dev_env branch 6 times, most recently from 99c2c37 to 05b3efe Compare August 10, 2023 21:16
@vladbogo vladbogo requested a review from fauust August 10, 2023 21:17
Copy link
Collaborator

@fauust fauust left a comment

Choose a reason for hiding this comment

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

I think that the ./generate-config.py command in the .github/workflow/deploy.yaml needs to be updated.

Also, the default variables should be for local deployments (so localhost and not the prod) since we have an prod.env file for the prod.

rsync.exclude Outdated
@@ -6,3 +6,4 @@ ci_build_images
docker-compose/logs
docker-compose/mariadb
master-private.cfg
dockerfiles
Copy link
Collaborator

Choose a reason for hiding this comment

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

I may be wrong but this seems to be needed by one of the master (nonstandard or galera, not sure exactly which one).

@@ -344,7 +342,7 @@ c['multiMaster'] = True

c['mq'] = { # Need to enable multimaster aware mq. Wamp is the only option for now.
'type' : 'wamp',
'router_url': 'ws://crossbar:8085/ws',
'router_url': os.getenv('MQ_ROUTER_URL', default='ws://localhost:8085/ws'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

the default should be crossbar:8085 (since this is what we will use in the future).

- TITLE=MariaDB CI
- TITLE_URL=https://github.com/MariaDB/server
- BUILDMASTER_URL=https://buildbot.dev.mariadb.org/
- MQ_ROUTER_URL=ws://crossbar:8085/ws
Copy link
Collaborator

@fauust fauust Aug 11, 2023

Choose a reason for hiding this comment

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

This seems wrong to me, you should rely on the env file and just define which environment variable are exposed in the container:

    environment:
      - TITLE
      - TITLE_URL
      - BUILDMASTER_URL
      - MQ_ROUTER_URL

And then the stack is started with either:

docker-compose --env-file dev.env up -d

or

docker-compose --env-file prod.env up -d

See: https://gitlab.com/mariadb/downloads-mariadb-python3/-/blob/master/.gitlab-ci/deploy-dev.yml and https://gitlab.com/mariadb/downloads-mariadb-python3/-/tree/master/docker?ref_type=heads for examples.

@vladbogo vladbogo force-pushed the dev_env branch 2 times, most recently from 3fd6853 to e697647 Compare August 11, 2023 09:36
@fauust
Copy link
Collaborator

fauust commented Aug 11, 2023

LGTM feel free to merge.

@vladbogo vladbogo force-pushed the dev_env branch 3 times, most recently from 1606617 to f263613 Compare August 14, 2023 15:41
@vladbogo vladbogo merged commit 7fe888b into MariaDB:dev Aug 14, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants