[WIP] add debian packages
Debian packages
This introduces building of .deb packages using the [cargo-deb] plugin.
This is still work in progress so using this PR as to discuss how to work with this.
How to build the packages:
-
Step 0 Install cargo-deb cargo install cargo-deb
-
Step 1 Build the code as normal using cargo. Don't build the docker image, but rather only the binaries. cargo build --release -p mashnet-node cargo build --release -p kilt-parachain
-
Step 2 One package is created for each of "mashnet-node" and "kilt-parachain". They build as: cd nodes/parachain cargo deb -v cd ../../standalone cargo deb -v
-
Step 3: Once you have installed the deb for the node-type you like, the coresponing service is configured for start via /etc/default/kilt-parachain or /erc/default/mashnet-node.
The services are started with systemctl like. systemctl start kilt-parachain
TODO
- The dev-specs json-files could perhaps be moved from the current location in the root of the repo?
- Introduce capability to start/stop the service using credentials for the keystore
- More testing
- Include in the CI/CD for Kilt with a normal release
- Add to the official docs on building packages.
I've added a repo on my personal account on GH from which the packges can be tested as they are now. Both services will start from some defaults and should operated on Ubuntu focal.
Here is how to add and test:
https://github.com/erik78se/mashnet-node/blob/develop/README.md
I'm considering also using https://crates.io/crates/debcargo instead since it can build also source packages.
We will see how that works.
Let's pick this up at a later point