This Web server aims to synchronize git repositories and serve macros for the WarpFleet™ resolver
{
"host": "0.0.0.0",
"port": 8080,
"remotes": "www.myWebSite.com", // independant of your Warp 10 instance, for admin purpose
"repos" : [
{
"owner": "hammet",
"name": "warpfleet-macros", // must be unique
"url": "[email protected]:senx/warpfleet-macros.git",
"passphrase": "sshPass"
},
{
"owner": "hetfield",
"name": "warpfleet-macros2",
"url": "https://gitlab.com/senx/warpfleet-macros.git",
"username": "oauth2",
"password": "<gitlab oAuth Token>",
"branch": "main"
}
]
}
docker run -d -v /path/to/conf/file/dir/:/data -p 8888:8080 warp10io/warpfleetsynchronizer:latest
java -jar WarpFleetSynchronizer.jar ./path/to/conf.json
Now listen at 0.0.0.0:8080
Add /etc/systemd/system/warpfleet-synchronizer.service
with following content (adjust paths to your needs):
[Unit]
Description=Warp 10 - WarpFleet Synchronizer
Documentation=https://github.com/senx/WarpFleetSynchronizer
After=network-online.target
[Service]
Type=simple
User=warp10
Group=warp10
WorkingDirectory=/path/to/warpfleet/synchronizer
ExecStart=java -jar /path/to/warpfleet/synchronizer/bin/WarpFleetSynchronizer-all.jar /path/to/warpfleet/synchronizer/conf/synchronizer.conf
Restart=on-failure
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
Then start service and enable at boot time:
sudo systemctl start warpfleet-synchronizer
sudo systemctl enable warpfleet-synchronizer
Check it works as expected:
sudo systemctl status warpfleet-synchronizer
or
journalctl -fu warpfleet-synchronizer
Note:
- Clones of git repositories will be stored in
/path/to/warpfleet/synchronizer/tmp
- Macros will be stored in
/path/to/warpfleet/synchronizer/macros/macros/<repo>
http://localhost:8080/macros/<repo name>/path/to/macro.mc2
http://localhost:8080/macros/
Sync all
http://localhost:8080/api/sync
Sync specific repo
http://localhost:8080/api/sync/myRepo
List repositories
http://localhost:8080/api/repos/<owner>
Copyright 2019-2022 SenX S.A.S.