Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Patch to add HTTP support for configuration file #3

Open
GoogleCodeExporter opened this issue May 10, 2015 · 4 comments
Open

Patch to add HTTP support for configuration file #3

GoogleCodeExporter opened this issue May 10, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I added HTTP support to MOE for the --project_config and --db paths.
With this patch, you can now do stuff like:

  java -jar moe.jar check_config --config_file http://server/project_config

This patch makes it so a company can use a simple REST API internally for 
maintaining projects, and not have to worry about everything necessarily being 
on NFS. It is backward compatible with old usage: if a path is given (without a 
file:// or http:// scheme specifier), it will assume it is a file.

Here is the patch:     https://gist.github.com/1158363





Additionally, I wrote two quick Python scripts for testing and/or reference for 
this new feature.

I wrote a tiny example HTTP server:
* https://gist.github.com/1158377
  moe_config_server.py is a simple example server that implements the
REST api just mentioned. It takes a single argument, which is the port it will 
run on (defaults to 8080). It serves up "./projects/[project_name]/config.js" 
and "./projects/[project_name]/moe.db"

To make calling MOE repeatedly, I wrote a tiny wrapper Python script:
* https://gist.github.com/1158379
moe.py wraps around the main MOE adding arguments based on what it finds in a 
JSON file, "~/.moerc". This saves the user from having to type --test_config 
and --db with every call, and works with the above example server. With moe.py, 
you can just do commands like "moe.py project_name check_config"

Original issue reported on code.google.com by [email protected] on 23 Aug 2011 at 9:29

cgruber added a commit to cgruber/MOE that referenced this issue Feb 19, 2019
Bump version numbers on deps, and add in kotlin-mockito for later.
cgruber added a commit to cgruber/MOE that referenced this issue Aug 31, 2020
Rework git revision history so it does a single fetch for a whole history.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant