Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

  • If RepoTool is installed for the first time on the server follow the below steps:

    1. Create an admin account: docker exec -it debbie-django python manage.py createsuperuser

    2. Enter the username and password for the admin account (keep the username and password the same as Mongo for better accessibility).

    3. Go to http://<server-ip>:8000/admin and login using the credentials entered above to login.

    4. After login select the API keys option and select the ADD API KEY button highlighted below.

    5. Copy the API key generated and save it as it will be only displayed once.

    6. There is also an alternative for steps c,d, and e if those don’t work in case URL is inaccessible:

      1. SSH to the VM where KnowHOW or RepoTool is installed and then in the console enter this cmd docker exec -it debbie-django python manage.py shell_plus --ipython

      2. Once the python shell opens enter the following code:

        from rest_framework_api_key.models import APIKey
        api_key, key = APIKey.objects.create_key(name="my-key")
        print(key)
      3. The above code will give the API key as output, copy it

    7. In the env file of RepoTool /app/apps/.env, paste the below lines:
      BASE_HOST_URL=https://4bdf-89-136-52-54.ngrok-free.app
      DEBBIE_INTERNAL_API_KEY=<enter the copied API key>
      SCAN_STATUS_APIS=http://customapi:8080/api/processor/saveRepoToolsStatus
      SCAN_STATUS_APIS_TOKEN=<exposed_api_key value of customapi properties>

    8. Stop the containers using docker stop debbie-django debbie-knowhow and docker rm debbie-django debbie-knowhow.

    9. Start using docker-compose up -d debbie-django debbie-knowhow.

    10. Paste the RepoTool api key in customapi.properties file as

      repoToolAPIKey=<repotool-api-key-here>
    11. Restart the server docker restart customapi.

  • No labels