Compiling your own Actyx
This guide is the starting point to deploying your own Actyx swarm to production. We start by showing you how to compile Actyx enabling you to fully control which applications run on your swarm.
If you're still testing Actyx or developing your application, set the node licensing
development in the node settings.
When running in production, Actyx provides you with authentication and authorization mechanisms, these mechanisms allow you to:
- Sign application manifests, ensuring the authenticity of the running application.
- License applications, ensuring the applications running on a given node are authorized to do so.
To enable this, Actyx makes use of assymetric cryptography, more precisely Ed25519 keys. When running your own Actyx deployment, you will need to generate these key pairs and compile Actyx from source.
To simplify the rest of the tutorial, ensure you have downloaded Actyx's source code:
git clone [email protected]:Actyx/Actyx.git
Generate your own Actyx key pair
As discussed, to roll your own Actyx deployment, you will need to generate your own key pair, so, without further ado, let's start.
In upcoming tutorials, a "developer key pair" will be mentioned, the generation process for said key is the same as for the Actyx key (i.e. you can come back and read this section).
- Navigate to
- Using the Actyx CLI (
ax), generate your Actyx key pair. The CLI will ask you where to store the key pair (you can use the default directory or select your own, in either case, just make sure you do not lose the key pair — you will need it).
cargo run --bin ax users keygen
Generating public/private key pair ..
Enter path in which to save the key (/Users/jmgd/Library/Application Support/actyx/keys/users/id):
Your private key has been saved at /Users/jmgd/Library/Application Support/actyx/keys/users/id
Your public key has been saved at /Users/jmgd/Library/Application Support/actyx/keys/users/id.pub
If you are just trying out the process and do not want to generate a key pair, you can use the following example keys (these are for demonstration purposes only).
If you followed the previous section, you will already be halfway there.
You should have downloaded the Actyx source code and be in the
Actyx depends on `protoc` and compilation will fail if it isn't installed on your system. Open to learn how to install it on your system.
choco install protoc
brew install protobuf
apt-get install protobuf-compiler
- Compile Actyx, using your public key.
export AX_PUBLIC_KEY="$(cat <public_key>)"
cargo build --bin actyx --release --locked
public_key is the path to the public key you generated in the previous section.
- (Optional) Double check that your public key is, in fact, embedded in the Actyx binary:
strings target/release/actyx | grep $AX_PUBLIC_KEY