Read Me First
Check out the Numera new joiner guide for additional information.
Prerequisites
Basically, you need to prepare the following:
- Create GitHub token
- Configure settings
- Open VPN connection
The details of these steps are explained in the following sections.
Create a GitHub token
Create an access token in Github. After creating the token, copy and paste it to a safe place. Once you leave that view, the token will not be visible to you anymore.
Make sure to configure SSO for this token, authorizing PIT-Numera and PIT-User-Tools.
Create a .settings.xml file
Copy the following settings to a file called settings.xml, located in ${HOME}/.m2:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/PIT-Numera/maven-packages/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>your-github-user-name</username>
<password>your-github-token</password>
</server>
</servers>
</settings>
where your-github-user-name is your GitHub username (something like firstname-lastname_statista) and your-github-token is the token (some string starting with ghp_) you created in the previous step.
Open a VPN connection
The service needs a database which runs in AWS and can only be accessed through a VPN tunnel.
You get a vpn configuration file firstname.lastname.ovpn from one of your colleagues. Put it somewhere in a local directory.
Install open vpn, e.g. by calling
sudo apt install openvpn
Open a separate terminal window and call
sudo openvpn --config firstname.lastname.ovpn
where firstname.lastname.ovpn is the path to the VPN config file you got earlier. (The call does not return. That's why it is good to open a separate
terminal for it.)
Run the service
Get the source code
Open another terminal window and get the latest version of the service by calling
git clone git@github.com:PIT-Numera/migration-service.git
cd migration-service
Run maven
Test the service installation by calling
./mvnw clean package
(If mvn is installed on your machine, you can of course also call that instead of ./mvnw.)
Run the service by calling
./mvnw spring-boot:run -Dspring-boot.run.profiles=devdb