Closed
Bug 1429441
Opened 8 years ago
Closed 7 years ago
Configure elmo/a10n through environment variables
Categories
(Localization Infrastructure and Tools :: General, enhancement)
Localization Infrastructure and Tools
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Pike, Assigned: Pike)
References
Details
User Story
We should use environment variables to configure elmo and a10n. Use the following variables with defaults: All: ELMO_DB_HOST ELMO_DB_NAME ELMO_DB_USER ELMO_DB_PASSWORD ELMO_SECRET_KEY ELMO_REPOSITORY_BASE web, bb: ELMO_BUILD_BASE ES_COMPARE_HOST ES_COMPARE_INDEX web: ELMO_LDAP_HOST ELMO_LDAP_DN ELMO_LDAP_PASSWORD ELMO_MEMCACHED (host:port) ELMO_INCLUDE_ANALYTICS (true on production only) web, a10n: ELMO_SENTRY_DSN bb: ELMO_HG_SHARES # for local working dir a10n: ELMO_TRANSPORT # for rabbitmq hg-poller(a10n): ELMO_HG_POLLER_DELAY # defaults to 1 second
On AWS, we'll configure elmo/a10n/masterball through environment variables, let's start doing that on the existing installs.
Assignee | ||
Updated•8 years ago
|
User Story: (updated)
Assignee | ||
Comment 1•8 years ago
|
||
Side note, the way I'll do this is to keep the local.py files and its friends, but have a version of those that read the values from the environment as specified above.
Assignee | ||
Comment 2•8 years ago
|
||
I'm struggling to get docker-compose development config into docker container environment variables.
Miles, do you have examples to follow for a docker-compose setup for local development and AWS prod?
Comment 3•8 years ago
|
||
Socorro has a full docker-compose configuration and uses a similar set of services to elmo/a10n. Files are specified in order of increasing precedence in the env_file block for each service, so for example variables defined in the "my.env" file would supersede the defaults declared elsewhere. [0]
There's a "local_dev.env" file that includes default values for running in docker-compose. I've based my production env file off of those, replacing docker-compose hostnames with actual endpoints for the database, elasticsearch, and everything else. [1]
[0] https://github.com/mozilla-services/socorro/blob/master/docker-compose.yml#L28-L32
[1] https://github.com/mozilla-services/socorro/blob/master/docker/config/local_dev.env
Comment 4•8 years ago
|
||
Tecken also has a full docker-compose configuration, and is a little simpler than Socorro's setup.
https://github.com/mozilla-services/tecken/blob/master/docker-compose.yml
In general, we only use docker-compose for local development environments. Production environments tend to run a single docker container per node, and to do so using docker directly and not docker-compose. In summary, you don't have to worry about a prodlike docker-compose setup so long as we have containers that we can use.
Assignee | ||
Comment 5•8 years ago
|
||
I got something working that I start to like, taking this bug to have something to reference. It's also part of my work for good docker containers, so making this bug block that one.
Assignee: nobody → l10n
Blocks: 1431275
Assignee | ||
Comment 6•7 years ago
|
||
Not yet fixed for elmo, but for a10n and master-ball, this is done:
https://github.com/Pike/a10n/commit/e6b0c60f8c42392eb941cde132f91219eb3fdb13
https://github.com/Pike/master-ball/commit/30929b7726f0be6b64d3adf5a5e69bb6ecd5a647
This is also deployed on prod, but with a local.py doing the actual config for now.
User Story: (updated)
Assignee | ||
Updated•7 years ago
|
User Story: (updated)
Comment 7•7 years ago
|
||
Commit pushed to develop at https://github.com/mozilla/elmo
https://github.com/mozilla/elmo/commit/3ef6068d4e0c84bf900f0ace587974f86b64939c
bug 1429441, allow environment to configure elmo
Assignee | ||
Comment 8•7 years ago
|
||
Marking FIXED, I think this is done. There might be boogz, of course.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•7 years ago
|
User Story: (updated)
Assignee | ||
Comment 9•7 years ago
|
||
Adding an environment to control the poller delay.
User Story: (updated)
You need to log in
before you can comment on or make changes to this bug.
Description
•