Skip to content

Quickstart for Development

After development environment has been set up:

  1. If k8s is running on your machine with the ruok containers, skip to step 2, else:

In local terminal (ctrl, shift, p -> new integrated terminal):

1
2
3
make build
make kind-push-all
make k8s-deploy
  1. Forward ports to local machine. In local terminal (ctrl, shift, p -> new integrated terminal):

    1
    make port-forward
    
    Do not close this terminal - open a new one to continue.

  2. Add the 'ruok' database

  3. In a web browser, navigate to http://localhost:8529/

  4. Username - root, no password, login
  5. In _system db, in the left menu, select databases. Add a db called 'ruok'.
  6. In the header, select the refresh icon near _system db.
  7. Log back into ruok database with the previous credentials.

  8. Populate the database

    1
    2
    cd api/src
    python initialize_db.py
    

  9. Populate the .env files

  10. Spin up webhook server (listening for events from github)

    1
    2
    cd /workspaces/ruok-service-autochecker/event-collectors/github-webhook-server
    make forward-webhook
    
    Note - you may need to direnv allow first Leave this terminal open as well, open another terminal to continue.

  11. If you're working with the scanners, or need the database populated with a GitHub Repo scan, either re-send an event from github, or manually send one with NATS.

    1
    nats pub "EventsScanner.githubEndpoints" "{\"endpoint\":\"https://github.com/PHACDataHub/ruok-service-autochecker\"}"
    

  12. Update containers with dev changes Rebuid containers, push to kind (in local terminal)

    1
    2
    make build
    make kind-push-all
    
    Once pushed, delete pod (using k9s) in order to propagate the new changes.