-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: main
Are you sure you want to change the base?
Conversation
fdaencarrh
commented
Apr 11, 2022
- 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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
||
# 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 |
There was a problem hiding this comment.
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.