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

Customize beakerd container #1

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Customize beakerd container #1

wants to merge 1 commit into from

Conversation

fdaencarrh
Copy link
Contributor

  • Wait for mysql to be ready
  • Run the process alone instead of using systemd
  • Populate the beaker database

* Wait for mysql to be ready
* Run the process alone instead of using systemd
* Populate the beaker database
@@ -10,7 +10,7 @@ server.webpath = "/bkr/"
# The charset=utf8 option is required for proper Unicode support.
# The pool_recycle setting is required for MySQL, which will (by default)
# terminate idle client connections after 10 hours.
sqlalchemy.dburi = "mysql://beaker:beaker@dci-beaker-containers_db_1/beaker?charset=utf8"
sqlalchemy.dburi = "mysql://beaker:beaker@172.20.0.10/beaker?charset=utf8"
Copy link
Contributor

Choose a reason for hiding this comment

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

How do we know this is the address?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This address came from the docker-compose file:
https://github.com/redhat-cip/dci-beaker-containers/blob/main/container-compose.yml#L21

I will try to use a variable instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

I created static addresses for each container for use in beaker config files.

@fdaencarrh fdaencarrh marked this pull request as draft April 12, 2022 14:10

# Poll until MySQL responds to our ping.
function wait_for_mysql() {
while ! mysqladmin -h 172.20.0.10 -u root -ppassword ping &>/dev/null; do
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we limit the number of attempts to connect in case there is a problem with the DB? Maybe 2 minutes? It seems the DB is usually ready in about 30 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants