Introduced in the 3.3 version of TM is a new feature to load the UserData repository from an external location (GitHub or local folder).
This post shows how to set it up.
First step is to get the latest version of TeamMentor from GitHub, where we can clone it locally or download the zip file
Using the Zip file has an example, unzip the 10Mb file into a local folder, and click on start_TeamMentor.bat
This will open an empty TM site, and a new Library_Data folder should had been created:
With this default structure:
Now in GitHub (or on a local folder), create a new Git Repository (which should be marked as private, since security sensitive data will be stored here)
Once the repository is created, copy its git url (in this case git@github.com:TMClients/Site_vulnerabilities.teammentor.net.git )
Back in the local copy of TeamMentor, open the TBot page:
which will require an admin account:
After login, open the Edit GitUserLocation
And enter the Git url copied from GitHub:
After the data is saved, go back to the commands list:
Go to the Reload Server Objects
And click on ‘Reload UserData’:
After that step is completed, if you look at the Library_Data folder, you should see a new UserData folder in there (that uses the git repository name as part of its path)
Inside it, you will see the README.md that was received from GitHub, and a new TMSecretData.config and Users folder
Back in TBot’s page, if you click on any link you should be redirected to the login page, and you will need to login again using the default admin credentials (this happens because the current browser cookie is pointing
to the admin user that is in XmlDatabase\User_Data and not in the newly created XmlDatabase\User_Data_Git_Site_vulnerabilities.teammentor.net :
After logging in, open the Edit SecretData command:
Which should look like this (with correct values for the Rijndael and SMTP fields):
The value that we want to change is the Libraries_Git_Repositories, which should point to the Git repo we want to add to this TM instance. In this case:
Add the git url as an item in the Libraries_Git_Repositories Javascript array:
After the data is saved, open the Reload Server Objects again:
And this time around click on the Reload Cache button:
Once that is completed, if your open the XmlDatabase/TM_Libraries folder, you should see a new Vulnerabilities subfolder
Which is in fact a git clone:
of the git repository configured on the Libraries_Git_Repositories value
Quickly opening the main TM page, will now show the Vulnerabilities Library:
Final step is to do manually commit the changes made to the User_Data_Git_Site_vulnerabilities.teammentor.net local repository (note: auto commit and push is disabled on the UserData when running TM from localhost)
Which will put those updates in GitHub
Now that we have this GitHub repository configured, we can configure the Git UserLocation of live QA server:
And after reloading the cache:
The https://tm-vulnerabilities.azurewebsites.net will now have the Lib_Vulnerabilities library