Get started with Realm
Install
Section titled “Install”Linux / macOS
curl -fsSL https://realm.bitomia.com/install.sh | sudo shWindows (PowerShell)
irm https://realm.bitomia.com/install.ps1 | sudo iexThe install location can be overridden with the REALM_INSTALL_DIR environment variable.
Start the agent
Section titled “Start the agent”On every machine you want to manage, start the agent with:
realm agent startBy default it reads config.yaml from the current working directory. Point it at another file with -c/--config:
realm agent start --config /etc/realm/config.yamlThe agent serves its REST API on 0.0.0.0:9000 unless you override it in the agent section of the config file:
agent: listen_address: 0.0.0.0 listen_port: 9000That address is what the CLI talks to, so it must match the url you give the node in the nodes section below.
Configure the cluster
Section titled “Configure the cluster”A realm config file specifies the nodes of a cluster and the loads that can be deployed on each node.
Lets start with a basic configuration.
nodes: lab1: url: http://localhost:9000 driver: linux
loads: hello: node: lab1 driver: container driver_config: image: docker.io/library/hello-world:latestThis config specify that our cluster is composed by just one node lab1 that uses the linux node driver, and this node is running a realm agent on http://localhost:9000 (more on agents later).
It also specify a hello load that uses the container driver with a basic hello-world image settings. This load is meant to be deployed on the lab1 node.
So to summarize the basic primitives:
- Nodes: different cluster nodes where a realm agent is running
- Loads: loads meant to be deployed and control per each node
Now with this configuration you can command your cluster using the realm CLI:
realm n state lab1