Closed scottcrespo closed 8 years ago
New PR submitted, #39 can some people verify the changes work successfully?
Disclaimer... Testing is still a manual process. I've opened up #40 to create a test framework so that new code can ship with the appropriate tests.
I made some changes to the Vagrant configuration. There are now 4 hello world processes running in the background, which allows us to test command-line overrides of which backends to forward requests to.
if your Vagrant box is already running...
$ vagrant provision
$ vagrant ssh
$ ps axf | grep hello
Your output should be similar to the following
vagrant@vagrant-ubuntu-trusty-64:~$ ps axf | grep hello
6220 pts/0 S+ 0:00 \_ grep --color=auto hello
6078 ? Sl 0:00 \_ /vagrant/bin/eps-conduit-hello --port 8004
6082 ? Sl 0:00 \_ /vagrant/bin/eps-conduit-hello --port 8003
6121 ? Sl 0:00 \_ /vagrant/bin/eps-conduit-hello --port 8001
6125 ? Sl 0:00 \_ /vagrant/bin/eps-conduit-hello --port 8002
By running vagrant provision, the project should already be re-compiled
$ eps-conduit
$ curl localhost:8000
Hello world app should respond from backends ports 8001 and 8002
$ eps-conduit -b localhost:8003,localhost:8004
$ curl localhost:8000
Hello world app should respond from backends ports 8003 and 8004
Play around with overriding configuration with the available command line parameters
@picardrulez @etse-topps
Current Behavior
The configuration file path (eps-conduit.conf) is static, and defaults to the current working directory. As I'm working on the Vagrantfile and Chef cookbooks for the project, it creates problems when starting the app from a different working directory.
Proposed Behavior
Config file path as a command line parameter
Pretty standard have a
--config
parameter to specify location of the configuration file. There are plenty of use cases where the config file will not be in the current working directory.Default config file path outside of the project directory
I recommend choosing a default file path for the config that's outside the project directory. I propose placing the file in /etc/eps-conduit.conf, following Mongo's default config file path, which is /etc/mongod.conf)
Nonetheless, we should still ship the source code with an example configuration file that users can copy into the default file path.