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

Improve automated loading of data files and (re)starting otp server #7

Open
miraculixx opened this issue Feb 19, 2015 · 0 comments
Open

Comments

@miraculixx
Copy link
Owner

The current setup requires the manual reconfiguration of nginx, because the (re)started docker container will have a new IP address everytime => currently requires manual effort for initial load and restart. This needs to be fully automated.

Expected behavior

  1. Building the graph and starting nginx is one single command.
  2. Rebuilding the graph can be done from the client command line (rather than entering the full docker command on the server)
  3. Nginx is automatically (re)configured/reloaded so it catches the new IP address of the restarted docker container

Command lines

# server, specify as many --urls as you want, add multiple options in quotes 
server$ /path/to/script/loaddata --url <url> --options <options>
# client
client$ fab loaddata:server=<fabric role>,urls=<url1 for gtfs file[,url2[, ...]]>,options=<options>

Implementation notes

  • the fabric command shall be implemented as simple wrapper to call some server-side script(s), so actually the fabfile.py will (almost) be as simple as e.g.
@task
def loaddata(server,urls,options):
    # figure out the host to run on
    # see http://stackoverflow.com/a/6313237/890242
    # need to pass on options
    run('/path/to/serverside/script/loaddata`)
  • The rationale for the above is such that we can easily implement server side processes using the very same commands, e.g. scheduled reloading once a day etc.
@miraculixx miraculixx changed the title Improve automated loading of data files and restarting otp server Improve automated loading of data files and (re)starting otp server Feb 19, 2015
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

1 participant