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

Issues to consider before releasing as production #3

Open
3 tasks
manics opened this issue Jul 13, 2017 · 10 comments
Open
3 tasks

Issues to consider before releasing as production #3

manics opened this issue Jul 13, 2017 · 10 comments

Comments

@manics
Copy link
Member

manics commented Jul 13, 2017

Now that #1 is merged we're close to production. Once this becomes official it'll be harder to make changes. Some of the issues we should give a final review to are:

  • Configuration environment variables: e.g. CONFIG_omero_web_public_enabled=false becomes omero.web.public.enabled=false
  • Default passwords: The default OMERO root account password is omero, should we generate a random password instead? Similarly for the public password when Enable public user #2 is merged?
  • Default value for the database host. Currently it's db under the assumption that a postgres container will be linked with the name db, should we remove the default and make it mandatory instead?
@joshmoore
Copy link
Member

  • I slightly prefer using the dotted versions and dropping the underscore parsing.
  • I'd vote yes for generating passwords.
  • I don't particularly mind db being part of the the docker "API".

@manics
Copy link
Member Author

manics commented Jul 13, 2017

I slightly prefer using the dotted versions

Unfortunately that doesn't work for environment variables:

$ docker run -it -e ENV.VAR=a -e ENV_VAR=b centos sh -c 'set | grep ENV'
BASH_EXECUTION_STRING='set | grep ENV'
ENV_VAR=b

@joshmoore
Copy link
Member

docker run -ti --rm -e a.b=1 centos python -c "import os; print os.environ['a.b']"

does as does:

docker run -it --rm -e ENV.VAR=a -e ENV_VAR=b centos bash -c 'printenv ENV.VAR'
a

@manics
Copy link
Member Author

manics commented Jul 14, 2017

Cool, I wasn't aware of that. Do you know an easy way to reference ENV.VAR in a shell, e.g. @dpwrussell uses a bash script in #2 165c1ae

@dpwrussell
Copy link
Member

dpwrussell commented Jul 18, 2017

I also just realised that the underscore replacement technique wont work because of configs like this: omero.web.public.url_filter, which contain a literal underscore.

@dpwrussell
Copy link
Member

With respect to password generation, it would then be necessary to pass in a password if using docker-compose (or some other prescripted docker start commands) I assume?

@manics
Copy link
Member Author

manics commented Jul 20, 2017

Underscores are supported by replacing _ with __, e.g. CONFIG_omero_web_public_url__filter=

. in the variable names seems nicer but less standard or obvious to work with in scripting languages. Do you have a preference, or other ideas?

For password generation: I guess if you're linking containers then the onus would be on you to define a password for all containers requiring it.

@dpwrussell
Copy link
Member

Ah, I see.

I think it would be a mistake to use the periods as then it is harder to customize as you couldn't write a bash script for example.

I can imagine that as configs get more complicated, we would probably want to be passing some encoded lock of YML or JSON, so perhaps the underscore technique is ok, if it is not going to be the recommended way down the line.

@manics
Copy link
Member Author

manics commented Aug 17, 2017

One alternative to using env-vars could be to pass them as command line parameters when starting the container, e.g. docker run openmicroscopy/omero-server --config omero.db.name=xxx --config omero.data.dir=/external/mount

@mtbc
Copy link
Member

mtbc commented Aug 17, 2017

Though, maybe not for passwords because one's command-line parameters are visible to other users on the system. (I may be misunderstanding this discussion though.)

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

No branches or pull requests

4 participants