Systemd
This document assumes
/home/ubuntu
is the server user home directory, make sure to change it to fit the directory of your choice.Prerequisites:
- Install mono-devel. If you choose to install via a package manager, add Mono's own repository first.
- Install the Headless Node and import a funded account
- Cron (Optional)
[Unit]
Description=Oracle
After=network.target
[Service]
Type=simple
EnvironmentFile=/home/ubuntu/services/scripts/env
WorkingDirectory=/home/ubuntu/services/zen-oracle/src/Oracle/bin/Release
ExecStart=/usr/bin/mono /home/ubuntu/services/zen-oracle/src/Oracle/bin/Release/zen-oracle.exe s
Restart=on-failure
[Install]
WantedBy=multi-user.target
- 1.Get the oracle service (from GitLab)mkdir /home/ubuntu/servicescd /home/ubuntu/servicesgit clone https://gitlab.com/zenprotocol/zen-oracle.git
- 2.Build the oracle servicecd /home/ubuntu/services/zen-oracle./paket restoremsbuild src/zen-oracle.sln /p:Configuration=Release
- 3.Create
/etc/systemd/system/zen-oracle.service
service file as mentioned above - 4.Put all the environment variables assignments in the file
/home/ubuntu/services/scripts/env
- 5.Follow node deployment instructions and be sure to have the zen-node service enabled
- 6.Enable Zen-Oraclesudo systemctl enable zen-oracle
- 7.Start MongoDBsudo systemctl start mongodb
- 8.Start Zen-Oracle Serversudo systemctl start zen-oracle
- 1.Make sure all the environment variables are provided and correct
- zen_path : path of the oracle committer
- zen_wallet_password: password of the F# wallet
- zen_node_uri: uri of the node
- oracle_api:
uri:port
api port for oracle requests
- In order to commit at a precise time we suggest to use a script in a cron job to take care of the commitment.
Last modified 1yr ago