Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions apps/docs/redirects/en/01.json
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,14 @@
"from": "https://www.azion.com/en/documentation/edge-firewall/",
"moved": "https://www.azion.com/en/documentation/platform/firewall/"
},
{
"from": "https://www.azion.com/en/documentation/guides/application-development/automation/edge-node-first-steps/",
"moved": "https://www.azion.com/en/documentation/guides/application-development/automation/install-orchestrator-agent/"
},
{
"from": "https://www.azion.com/en/documentation/guides/application-development/automation/edge-services-first-steps/",
"moved": "https://www.azion.com/en/documentation/guides/application-development/automation/create-edge-service/"
},
{
"from": "https://www.azion.com/en/documentation/guides/application-development/getting-started/basic-troubleshooting/",
"moved": "https://www.azion.com/en/documentation/support/basic-troubleshooting/"
Expand Down Expand Up @@ -2477,11 +2485,11 @@
},
{
"from": "https://www.azion.com/en/documentation/products/guides/edge-node-first-steps/",
"moved": "https://www.azion.com/en/documentation/guides/application-development/automation/edge-node-first-steps/"
"moved": "https://www.azion.com/en/documentation/guides/application-development/automation/install-orchestrator-agent/"
},
{
"from": "https://www.azion.com/en/documentation/products/guides/edge-services-first-steps/",
"moved": "https://www.azion.com/en/documentation/guides/application-development/automation/edge-services-first-steps/"
"moved": "https://www.azion.com/en/documentation/guides/application-development/automation/create-edge-service/"
},
{
"from": "https://www.azion.com/en/documentation/products/guides/edge-sql-vector-search/",
Expand Down
12 changes: 10 additions & 2 deletions apps/docs/redirects/pt-br/01.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,14 @@
"from": "https://www.azion.com/pt-br/documentacao/edge-firewall/",
"moved": "https://www.azion.com/pt-br/documentacao/plataforma/firewall/"
},
{
"from": "https://www.azion.com/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criando-edge-service/",
"moved": "https://www.azion.com/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criar-edge-service/"
},
{
"from": "https://www.azion.com/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/edge-node-primeiros-passos/",
"moved": "https://www.azion.com/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/instalar-orchestrator-agent/"
},
{
"from": "https://www.azion.com/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/primeiros-passos/investigacao-problemas-basico/",
"moved": "https://www.azion.com/pt-br/documentacao/suporte/investigacao-problemas-basico/"
Expand Down Expand Up @@ -2989,11 +2997,11 @@
},
{
"from": "https://www.azion.com/pt-br/documentacao/produtos/guias/orchestrator/criando-edge-service/",
"moved": "https://www.azion.com/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criando-edge-service/"
"moved": "https://www.azion.com/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criar-edge-service/"
},
{
"from": "https://www.azion.com/pt-br/documentacao/produtos/guias/orchestrator/edge-node-primeiros-passos/",
"moved": "https://www.azion.com/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/edge-node-primeiros-passos/"
"moved": "https://www.azion.com/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/instalar-orchestrator-agent/"
},
{
"from": "https://www.azion.com/pt-br/documentacao/produtos/guias/paywall-edge-function-jwt/",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,116 @@
---
title: Explore Orchestrator
title: How Orchestrator works
description: >-
Discover commands and features of Azion Orchestrator Agent, including
installation, logs, and terminal commands to enhance device functioning.
How the Orchestrator Agent turns a machine into a managed node, how services
reach it, and how the agent keeps their files in the state you defined.
permalink: /documentation/platform/orchestrator/explore-usage/
meta_tags: >-
Azion Edge Orchireply, Edge Node Authorization, Orchestrator Agent,
Install Edge Agent, Edge Node Commands, Edge Terminal Commands, Edge Node
Logs, Edge Services Logs
Orchestrator, Orchestrator Agent, node, node authorization, services,
resources, triggers, variables, facts, manifest, Watcher, logs
namespace: docs_deploy_explore_usage
---

import DocButton from '~/components/webkit/DocButton.vue';
import FrameBox from '@aziontech/webkit/frame-box'
import ItemList from '@aziontech/webkit/item-list'
import DocItem from '@aziontech/webkit/doc-item'

**Azion Orchestrator** works based on an agent. This agent is installed on your device, making your device, from this moment on, an edge node that [must be authorized](/en/documentation/guides/application-development/automation/authorize-an-edge-node/) before starting the orchestration.
Orchestrator installs and keeps software on machines you run yourself, such as servers, routers, and small devices. You describe the software once, as a service in Azion Console. You choose the machines that run it, and an agent on each machine applies that description and repairs any drift from it. A change to the service reaches every machine it is bound to without a login on each one.

[Azion Orchestrator Agent](/en/documentation/guides/application-development/automation/install-orchestrator-agent/) presents a list of commands that can be run in the terminal and help you use its features.
The sections cover the agent and the node, authorization, services and their resources, the bind between a service and a node, how the agent applies a manifest, the Watcher, and the logs.

The list of commands includes:
---

- Install and uninstall.
- Help with general commands.
- Status of the execution of the agent.
## The agent and the node

<DocButton href="/en/documentation/platform/orchestrator/edge-node/#agent-commands-and-options" label="Go to Orchestrator agent's commands reference" kind="secondary" target="_blank" size="medium" />
A machine joins Orchestrator when you install the Orchestrator Agent on it. The agent is a single binary, `edge-orchestrator`, built for FreeBSD, Linux, and macOS on several processor architectures. Its `install` command registers the agent with the machine's service manager, when the machine has one, and asks for a [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/). The token ties the machine to your Azion account.

You can [check logs](/en/documentation/guides/application-development/automation/watch-logs/) related to the edge nodes execution by accessing the file `/var/log/azion/edge-orchestrator.log` and edge services logs in `/var/log/azion/edge-services.log`.
Once the agent is installed and started, the machine is listed as a node of your account. On its first start, the agent can also set the node's name and the groups the node belongs to. Without a name, the node takes the machine's hostname. The OS, architectures, and privileges a node needs are listed in [Node requirements](/en/documentation/platform/orchestrator/edge-node/#requirements).

The Orchestrator Agent lets you turn any device into a managed edge node and operate it directly from the terminal, which is useful for hybrid and on-premises deployments that extend Azion's network to your own infrastructure.
The agent does the work on the node, and Azion Console holds the configuration. Azion manages the node remotely over an end-to-end encrypted channel, on local and public networks and behind NAT.

## Related resources
---

## Authorization

A new node appears in the **Edge Nodes** list of Azion Console with the status `Waiting Authorization`, and it receives no service until you authorize it. The list identifies each node by the hash it used to register, in the **HashId** column. After the authorization, the node can take up to 10 seconds before services can be orchestrated on it.

In Azion Console, you can authorize several nodes in one action. The steps are in [Authorize a node](/en/documentation/guides/application-development/automation/authorize-an-edge-node/).

---

## Services and resources

A service is the description of one piece of software, kept in the **Edge Services** list of Azion Console. It holds resources, and each resource is a file the agent writes to an absolute path on the node. A resource has one of two types:

- [Install the Orchestrator Agent](/en/documentation/guides/application-development/automation/install-orchestrator-agent/)
- [Authorize an edge node](/en/documentation/guides/application-development/automation/authorize-an-edge-node/)
- [Watch logs](/en/documentation/guides/application-development/automation/watch-logs/)
- **Text**: the agent copies the content to the path as plain text. Configuration files use this type.
- **Shell Script**: the agent writes the script and runs it on the triggers you select. The agent runs the script with the interpreter in its shebang line, or with `/bin/sh` when the script has none.

A Shell Script resource runs on one or more of three triggers. **Install** runs first, when the service reaches the node. **Reload** runs after every resource of the service is installed, and again whenever the bind between the service and the node changes, for example when a variable value changes. **Uninstall** runs when the service leaves the node.

The content of a resource can carry two kinds of placeholders. A variable, written `{{ VARNAME }}`, takes a value you set, so the same service can listen on port 3306 on one node and on port 3307 on another. A fact, written `{{ FACT_NAME }}`, takes a value the agent reads from the node, such as its architecture, OS, number of CPUs, or memory. You cannot overwrite a fact. The Services reference lists the [predefined variables](/en/documentation/platform/orchestrator/edge-services/#variables) and the [facts](/en/documentation/platform/orchestrator/edge-services/#facts).

---

## The bind between a service and a node

A service runs nowhere until you bind it to a node. A bind names the service, the node, and the variable values for that node, so one service bound to many nodes runs everywhere with values that fit each machine. Only an active service can be bound.

A service changes in one place and reaches every node bound to it. When you update a service, the change is deployed to the nodes bound to it. When you change a variable value on a bind, the Reload trigger runs on that node. When you remove the bind, the Uninstall trigger runs and the service leaves that node. The steps are in [Bind a service to a node](/en/documentation/guides/application-development/automation/bind-service-node/).

---

## How the agent applies a manifest

The agent receives the configuration of its node as a manifest, which carries the resources of the services bound to the node. Each manifest has a version number, and the agent logs each version it applies. The agent applies a manifest in order, one resource at a time, and respects the dependencies between resources and the triggers they need.

The diagram shows one node receiving its manifest. Solid arrows carry the configuration and the actions the agent takes on the node, and the thick arrow carries the log the agent writes. Each label starts with the number of its step below.

```mermaid
%%{init: {"layout": "elk", "themeVariables": {"fontSize": "13px"}, "flowchart": {"nodeSpacing": 24, "rankSpacing": 36, "padding": 8, "wrappingWidth": 150, "useMaxWidth": true}, "sequence": {"width": 120, "actorMargin": 30, "useMaxWidth": true}}}%%
flowchart TD
Console["Azion Console"]
Agent["Orchestrator Agent"]
Files[["provisioned files"]]
Scripts[["Shell Script resources"]]
Logs[("logs on the node")]
Console -->|"1. manifest"| Agent
Agent -->|"2. write"| Files
Agent -->|"3. Install, Reload"| Scripts
Agent -->|"4. restore drift"| Files
Agent ==>|"5. log"| Logs
```

1. The node receives a manifest with the resources of the services bound to it and the variable values of each bind.
2. The agent writes each resource to its absolute path, one resource at a time.
3. The agent runs the Install trigger of each Shell Script resource, then Reload.
4. The Watcher scans the provisioned files on a schedule and restores any file that drifted from the last applied manifest.
5. The agent logs the manifest version it applied and the result of each Watcher scan.

While a manifest is applied, the agent exposes two predefined variables to the scripts. `CHANGESET_ADD_PATH` names a file that lists the paths added or modified in this manifest, and `CHANGESET_RM_PATH` names a file that lists the paths removed or modified. A script can read them to act only on the files that changed.

---

## The Watcher

After a manifest is applied, the agent keeps the files in the state it describes. A part of the agent called the Watcher runs a group of workers on a schedule. The workers scan every provisioned file and compare it with the last applied manifest. A file that was modified or removed is restored.

The Watcher protects a node from drift, and that protection has a cost: the service and its binds are the only places to change a provisioned file. A local edit on the node is reverted at the next scan, and you cannot turn the Watcher off. Every change, including an urgent one, goes into the service. Files the service does not provision are outside the Watcher's scope.

---

## Logs on the node

The agent writes two logs on the node. `/var/log/azion/edge-orchestrator.log` records the agent's own work: the manifest versions it applies, its communication with Azion, and each Watcher scan, with the number of files checked and the number that drifted. `/var/log/azion/edge-services.log` records what the triggers of the bound services wrote. To read them, refer to [Watch Orchestrator logs](/en/documentation/guides/application-development/automation/watch-logs/).

---

## Related resources

<FrameBox>
<ItemList>
<DocItem title="Nodes" href="/en/documentation/platform/orchestrator/edge-node/">Node requirements, and every command and option of the Orchestrator Agent.</DocItem>
<DocItem title="Services" href="/en/documentation/platform/orchestrator/edge-services/">Resources, variables, facts, and triggers, field by field.</DocItem>
<DocItem title="Install the Orchestrator Agent" href="/en/documentation/guides/application-development/automation/install-orchestrator-agent/">The steps to turn a machine into a node.</DocItem>
<DocItem title="Create a service" href="/en/documentation/guides/application-development/automation/create-edge-service/">The steps to describe a piece of software and its resources.</DocItem>
</ItemList>
</FrameBox>
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,16 @@ Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI spe
</Fragment>

</Tabs>

After the authorization, an edge node can take up to 10 seconds before services can be orchestrated on it.

## Authorize several edge nodes at once

To authorize several edge nodes in one action in Azion Console:

1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**.
2. Select the edge nodes you want to authorize. To select every edge node in the list, select the checkbox in the list header.
3. Select **Actions** and then select **Authorize**.
4. Select **Confirm**.

A confirmation message appears.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Download the Azion Edge Node option that matches your operating system:

Alternatively, you can download it using the command line. In the example, the download link refers to the Linux/x86_64 agent. If you want to download another version, just change the URL for the required operating system or architecture:

`curl -O http://downloads.azion.com/linux/x86_64/edge-orchestrator`
`curl -O https://downloads.azion.com/linux/x86_64/edge-orchestrator`

:::note
The commands executed in the orchestrator agent must be executed with administrator privileges. It might be necessary to run the commands with `sudo`.
Expand Down Expand Up @@ -69,7 +69,9 @@ If your operating system doesn't have a service manager (such as `systemd`), you
```

:::note
The logs to run the Orchestrator agent are stored in the installation directory, under `/var/log/azion/edge-orchestrator.log`
The Orchestrator agent writes its log to `/var/log/azion/edge-orchestrator.log`.
:::

The machine now appears in the **Edge Nodes** list of [Azion Console](https://console.azion.com/) as an edge node with the status `Waiting Authorization`. The **HashId** column shows the hash the edge node used to register. Before services can run on it, [authorize the edge node](/en/documentation/guides/application-development/automation/authorize-an-edge-node/).


Loading
Loading