Use /etc/hosts aliases instead of $DBHOST and other#2475
Use /etc/hosts aliases instead of $DBHOST and other#2475msmith-techempower merged 3 commits intoTechEmpower:masterfrom
Conversation
| mode=benchmark | ||
| os=linux | ||
| server_host=127.0.0.1 | ||
| server_host=TFB-server |
There was a problem hiding this comment.
There was once, long ago, an implementation similar to this; we removed it because some frameworks could not resolve names for reasons we could not explain. Hopefully, this is no longer the case....
There was a problem hiding this comment.
If it is the case, those frameworks can still do the sed stuff they're doing now and pull in the ip from the /etc/hosts file.
There was a problem hiding this comment.
I see this being done in travis and vagrant, but I don't see this setup happening in the general case (like our production code): you should plan on adding that in.
There was a problem hiding this comment.
This would be part of the setup. So it would be something done manually (see the linked installation guide) or did you have something else in mind?
|
@msmith-techempower Here is the corresponding documentation: https://github.com/TechEmpower/TFB-Documentation/pull/58/files All of the modified tests pass. We can leave If this is good for you, we can merge this in and I can update a lot of the others. |
frameworks/C/h2o/setup.sh
Outdated
| BUILD_DIR="${H2O_APP_HOME}_build" | ||
| H2O_APP_PROFILE_PORT="54321" | ||
| H2O_APP_PROFILE_URL="http://127.0.0.1:$H2O_APP_PROFILE_PORT" | ||
| H2O_APP_PROFILE_URL="http://TFB-database:$H2O_APP_PROFILE_PORT" |
There was a problem hiding this comment.
This is wrong: The URL has nothing to do with the database (note that it is used as a parameter for curl); it is just the location at which the HTTP server is temporarily accessible while gathering the profiling data.
|
@volyrique Thanks. Going through some of the setups, to test this change. At a quick glance I misread the port as |
I noticed that
TFB-clientTFB-databaseandTFB-serverwere already being set up in the/etc/hostsfile during vagrant bootstrapping. I've updated the travis setup to do the same. Before something like this gets merged in, a note in the Installation Guide for those not using vagrant is needed.Ideally, we would no longer need to use $DBHOST and other environment variables for IP addresses. We would also no longer need to use
sedin setup files to replace IPs. I've edited a few frameworks here as a proof of concept, but also, the suite usesbenchmark.cfg.exampleif abenchmark.cfgdoesn't exist. So for the sake of this travis run,$DBHOST=TFB-database.