Closed Bug 1429441 Opened 8 years ago Closed 7 years ago

Configure elmo/a10n through environment variables

Categories

(Localization Infrastructure and Tools :: General, enhancement)

enhancement
Not set
normal

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.
User Story: (updated)
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.
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?
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
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.
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
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)
User Story: (updated)
Marking FIXED, I think this is done. There might be boogz, of course.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
User Story: (updated)
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.