SCM Processor Setup
If RepoTool is installed for the first time on the server follow the below steps:
Create an admin account: docker exec -it debbie-django python manage.py createsuperuser
Enter the username and password for the admin account (keep the username and password the same as Mongo for better accessibility).
Go to http://<server-ip>:8000/admin and login using the credentials entered above to login.
After login select the API keys option and select the ADD API KEY button highlighted below.
Copy the API key generated and save it as it will be only displayed once.
There is also an alternative for steps c,d, and e if those don’t work in case URL is inaccessible:
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
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)
The above code will give the API key as output, copy it
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>Stop the containers using docker stop debbie-django debbie-knowhow and docker rm debbie-django debbie-knowhow.
Start using docker-compose up -d debbie-django debbie-knowhow.
Paste the RepoTool api key in customapi.properties file as
repoToolAPIKey=<repotool-api-key-here>
Restart the server docker restart customapi.
© 2022 Publicis Sapient. All rights reserved.