diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/run-scripts/run-scripts-v3.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/run-scripts/run-scripts-v3.mdx new file mode 100644 index 0000000000..6097161cfa --- /dev/null +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/run-scripts/run-scripts-v3.mdx @@ -0,0 +1,312 @@ +--- +title: How to run scripts on edge nodes | v3 +description: >- + Install Azion CLI on Orchestrator edge nodes with a Shell Script resource, using Azion Console or API v3. +permalink: /documentation/guides/application-development/automation/run-scripts-v3/ +meta_tags: >- + Azion CLI, Orchestrator Agent, install Azion, edge service configuration, + shell script resource, edge node setup, API guide for edge services, Edge + Computing, edge node authorization, Dpkg package manager +namespace: docs_deploy_run_scripts_edge_node_v3 +--- + +import DocButton from '~/components/webkit/DocButton.vue'; +import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/en/snippet.mdx' + +[How to run scripts on edge nodes](/en/documentation/guides/application-development/automation/run-scripts/) + + +To be able to orchestrate services on your device, you must configure all the resources needed to install, uninstall, and reload your services. + +This guide presents how to install [Azion CLI](/en/documentation/devtools/cli/) on your edge nodes through a resource of the type `Shell Script` configured on a specific edge service. + +--- + +## Requirements + + +Console +API + + + +### Console + +- An edge node with **Orchestrator Agent** installed and authorized. +- The Dpkg package manager installed on this node. + + + + +:::note +You can find the download links to the respective architectures on [Azion CLI's releases page](https://github.com/aziontech/azion/releases). You must choose the correct download link based on the architecture of your edge node and replace the `BINARY_URL` in the script with the correct URL. +::: + + + + + +### API + +- An edge node with **Orchestrator Agent** installed and authorized. +- The Dpkg package manager installed on this node. + + + + +:::note +You can find the download links to the respective architectures on [Azion CLI's releases page](https://github.com/aziontech/azion/releases). You must choose the correct download link based on the architecture of your edge node and replace the `BINARY_URL` in the script with the correct URL. +::: + + + + + +--- + +## Creating an edge service + + + + + +### Console + +1. Access [Azion Console](https://console.azion.com/) > **Edge Services**. +2. Select **+ Service**. +3. Name this service `Azion CLI Installation`. +4. Enter the variables and values for the resource, if necessary. +5. Set the status as **Active**. +6. Select **Save**. + + + + +### API + +1. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and informing the name of the service being created: + +```bash +curl --location 'https://api.azionapi.net/edge_services/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "name": "Azion CLI Installation" +}' +``` + +2. Keep the ID of the edge service you've just created. You can access it in the response body, for example: + +```json +{ + "id": 1196, + "name": "Azion CLI Installation", + "updated_at": "2024-01-18T17:24:33Z", + "last_editor": "xxxxx", + "active": false, + "bound_nodes": 0, + "permissions": [ + "read", + "write" + ] +} +``` + +:::note +When running the request in the terminal, the response might not return formatted as presented on the example above. +::: + +3. Run the following `PATCH` request in your terminal to set the service as active, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/): + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "active": true, + "name": "Azion CLI Installation", + "variables": [ + { + "name": "string", + "value": "string" + } + ] +}' +``` + +:::note +If an edge service isn't set as active, it isn't available for binding to an edge node. +::: + + + + +--- + +## Creating a resource + + + + + +### Console + +1. Inside the service you've just created, called `Azion CLI Installation`, go to the **Resources** tab. +2. Click on **+ Resource**. +3. Enter `/scripts/install-cli` in the **Path** field. +4. Choose the type **Shell Script**. +5. Choose the trigger **Install**. +6. Add the following content to the **Content** block: + + + +7. Click the **Save** button. + +This script will install the Azion binary in the following path: `/usr/local/bin` + + + + +### API + +1. Run the following `POST` request in your terminal: + + + +Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge service and inform the following parameters in the request body: + +| Property | Description | Required | +| - | - | - | +| `content_type` | Content type of the resource being created | Yes | +| `name` | Name of the resource being created | Yes | +| `content` | Content that defines actions performed when the resource state changes in the edge node | Yes | + + + + +--- + +## Binding an edge service to an edge node + + + + + +### Console + +1. Go to **Edge Nodes**. +2. Select the edge node to which you want to bind a service. +3. Go to the **Services** tab and click the **+ Service** button. +4. Choose the service `Azion CLI Installation` you've created. +5. Click the **Save** button. + + + + +### API + +1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID you wish to bind to an edge service: + + + +2. Run the following `POST` request in your terminal: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/:node_id/services' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "service_id": 1196, + "variables": [ + { + "name": "string", + "value": "string" + } + ] +}' +``` + +Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:node_id` with the ID of the edge node, and `1196` in the request body with the ID of the edge service you kept when you created it: + +| Property | Description | Required | +| - | - | - | +| `service_id` | ID of the edge service being bound to the edge node, as a number | Yes | +| `variables` | Variables to be replaced during the processing on the edge node | No | + + + + +--- + +## Accessing Azion CLI + +After this process, in your edge node, access the folder: + +```bash +cd /usr/local/bin +``` + +Run: + +```bash +./azion -h +``` + +The output will be similar to: + +```text +Azion CLI 1.10.2 + +DESCRIPTION + The Azion Command Line Interface is a unified tool to manage your Azion projects and resources + +SYNOPSIS + azion [flags] + +EXAMPLES + $ azion + $ azion -t azionb43a9554776zeg05b11cb1declkbabcc9la + $ azion --debug + $ azion -h +... +``` + +:::tip +Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. +::: \ No newline at end of file diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/run-scripts/run-scripts.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/run-scripts/run-scripts.mdx index 056bcbdf5e..cac8a85c20 100644 --- a/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/run-scripts/run-scripts.mdx +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/run-scripts/run-scripts.mdx @@ -1,8 +1,7 @@ --- title: How to run scripts on edge nodes description: >- - Learn how to configure and install Azion CLI on edge nodes using Shell Script - resources via Azion Console and API, including service binding and setup. + Install Azion CLI on Orchestrator edge nodes with a Shell Script resource in Azion Console. permalink: /documentation/guides/application-development/automation/run-scripts/ meta_tags: >- Azion CLI, Orchestrator Agent, install Azion, edge service configuration, @@ -12,9 +11,12 @@ namespace: docs_deploy_run_scripts_edge_node --- import DocButton from '~/components/webkit/DocButton.vue'; -import Tabs from '~/components/webkit/Tabs.vue' import Code from '~/components/webkit/CodeBlock.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet.mdx' +[How to run scripts on edge nodes | v3](/en/documentation/guides/application-development/automation/run-scripts-v3/) + +API v4 has no Orchestrator endpoints, so this guide uses Azion Console. To be able to orchestrate services on your device, you must configure all the resources needed to install, uninstall, and reload your services. @@ -24,30 +26,6 @@ This guide presents how to install [Azion CLI](/en/documentation/devtools/cli/) ## Requirements - -Console -API - - - -### Console - -- An edge node with **Orchestrator Agent** installed and authorized. -- The Dpkg package manager installed on this node. - - - - -:::note -You can find the download links to the respective architectures on [Azion CLI's releases page](https://github.com/aziontech/azion/releases). You must choose the correct download link based on the architecture of your edge node and replace the `BINARY_URL` in the script with the correct URL. -::: - - - - - -### API - - An edge node with **Orchestrator Agent** installed and authorized. - The Dpkg package manager installed on this node. @@ -58,101 +36,21 @@ You can find the download links to the respective architectures on [Azion CLI's You can find the download links to the respective architectures on [Azion CLI's releases page](https://github.com/aziontech/azion/releases). You must choose the correct download link based on the architecture of your edge node and replace the `BINARY_URL` in the script with the correct URL. ::: - - - - --- ## Creating an edge service - - - - -### Console - 1. Access [Azion Console](https://console.azion.com/) > **Edge Services**. 2. Select **+ Service**. 3. Name this service `Azion CLI Installation`. 4. Enter the variables and values for the resource, if necessary. 5. Set the status as **Active**. 6. Select **Save**. - - - - -### API - -1. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and informing the name of the service being created: - -```bash -curl --location 'https://api.azionapi.net/edge_services/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "name": "Azion CLI Installation" -}' -``` - -2. Keep the ID of the edge service you've just created. You can access it in the response body, for example: - -```json -{ - "id": 1196, - "name": "Azion CLI Installation", - "updated_at": "2024-01-18T17:24:33Z", - "last_editor": "xxxxx", - "active": false, - "bound_nodes": 0, - "permissions": [ - "read", - "write" - ] -} -``` - -:::note -When running the request in the terminal, the response might not return formatted as presented on the example above. -::: - -3. Run the following `PATCH` request in your terminal to set the service as active, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/): - -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "active": true, - "name": "Azion CLI Installation", - "variables": [ - { - "name": "string", - "value": "string" - } - ] -}' -``` - -:::note -If an edge service isn't set as active, it isn't available for binding to an edge node. -::: - - - --- ## Creating a resource - - - - -### Console - 1. Inside the service you've just created, called `Azion CLI Installation`, go to the **Resources** tab. 2. Click on **+ Resource**. 3. Enter `/scripts/install-cli` in the **Path** field. @@ -182,93 +80,16 @@ echo "Installation completed successfully" 7. Click the **Save** button. This script will install the Azion binary in the following path: `/usr/local/bin` - - - - -### API - -1. Run the following `POST` request in your terminal: - - - -Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge service and inform the following parameters in the request body: - -| Property | Description | Required | -| - | - | - | -| `content_type` | Content type of the resource being created | Yes | -| `name` | Name of the resource being created | Yes | -| `content` | Content that defines actions performed when the resource state changes in the edge node | Yes | - - - --- ## Binding an edge service to an edge node - - - - -### Console - 1. Go to **Edge Nodes**. 2. Select the edge node to which you want to bind a service. 3. Go to the **Services** tab and click the **+ Service** button. 4. Choose the service `Azion CLI Installation` you've created. 5. Click the **Save** button. - - - - -### API - -1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID you wish to bind to an edge service: - - - -2. Run the following `POST` request in your terminal: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/:node_id/services' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "service_id": 1196, - "variables": [ - { - "name": "string", - "value": "string" - } - ] -}' -``` - -Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:node_id` with the ID of the edge node, and `1196` in the request body with the ID of the edge service you kept when you created it: - -| Property | Description | Required | -| - | - | - | -| `service_id` | ID of the edge service being bound to the edge node, as a number | Yes | -| `variables` | Variables to be replaced during the processing on the edge node | No | - - - --- @@ -304,7 +125,3 @@ EXAMPLES $ azion -h ... ``` - -:::tip -Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. -::: \ No newline at end of file diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/uninstall/uninstall-node-v3.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/uninstall/uninstall-node-v3.mdx new file mode 100644 index 0000000000..e5f489bb24 --- /dev/null +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/uninstall/uninstall-node-v3.mdx @@ -0,0 +1,90 @@ +--- +title: How to uninstall Orchestrator Agent | v3 +description: >- + Uninstall Azion Orchestrator Agent from a device and delete its edge node with Azion Console or API v3. +permalink: /documentation/guides/application-development/automation/uninstall-agent-v3/ +meta_tags: >- + uninstall Azion Orchestrator, delete edge node, Azion API, edge node + management, edge technology, node removal instructions, Azion console guide, + system update termination, secure node deletion, Azion platform +namespace: docs_deploy_uninstall_agent_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/en/snippet.mdx' + +[How to uninstall Orchestrator Agent](/en/documentation/guides/application-development/automation/uninstall-agent/) + + +## Uninstalling agent + +To uninstall Azion Orchestrator Agent: + +1. Access your device from which you want to remove the agent. +2. Open the terminal and go to the folder where the agent is installed. +3. Run: + +```bash +sudo ./edge-orchestrator uninstall +``` + +Output: + +```bash +Orchestrator was uninstalled successfully +``` + +From this moment on, your node won't receive updates anymore. + +:::note +Uninstalling the agent from your device doesn't remove the node from the list of nodes. To complete the process, you need to delete your node from the list of available edge nodes. +::: + +--- + +## Deleting edge node + +:::caution +Once an edge node is deleted, it can't be recovered. +::: + + + Console + API + + + +### Console + +1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Find the edge node you wish to remove. +3. Select the three dots icon and select **Delete**. +4. Confirm the deletion. + + + + +### API + +1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID you wish to delete: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Run the following `DELETE` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and `:id` with the edge node ID: + +```bash +curl --location --request DELETE 'https://api.azionapi.net/edge_nodes/:id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +:::tip +Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. +::: + + + \ No newline at end of file diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/uninstall/uninstall-node.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/uninstall/uninstall-node.mdx index f70320ddc3..e6f2e1ba05 100644 --- a/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/uninstall/uninstall-node.mdx +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/advanced-config/uninstall/uninstall-node.mdx @@ -1,8 +1,7 @@ --- title: How to uninstall Orchestrator Agent description: >- - Learn how to uninstall Azion Orchestrator Agent and delete edge nodes via - the Azion console or API, including steps for secure node removal. + Uninstall Azion Orchestrator Agent from a device and delete its edge node in Azion Console. permalink: /documentation/guides/application-development/automation/uninstall-agent/ meta_tags: >- uninstall Azion Orchestrator, delete edge node, Azion API, edge node @@ -11,8 +10,11 @@ meta_tags: >- namespace: docs_deploy_uninstall_agent --- -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet.mdx' +[How to uninstall Orchestrator Agent | v3](/en/documentation/guides/application-development/automation/uninstall-agent-v3/) + +API v4 has no Orchestrator endpoints, so this guide uses Azion Console. ## Uninstalling agent @@ -46,43 +48,7 @@ Uninstalling the agent from your device doesn't remove the node from the list of Once an edge node is deleted, it can't be recovered. ::: - - Console - API - - - -### Console - 1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Find the edge node you wish to remove. 3. Select the three dots icon and select **Delete**. 4. Confirm the deletion. - - - - -### API - -1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID you wish to delete: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Run the following `DELETE` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and `:id` with the edge node ID: - -```bash -curl --location --request DELETE 'https://api.azionapi.net/edge_nodes/:id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -:::tip -Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. -::: - - - \ No newline at end of file diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/authorize-node/authorize-node-v3.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/authorize-node/authorize-node-v3.mdx new file mode 100644 index 0000000000..cac2d9ef68 --- /dev/null +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/authorize-node/authorize-node-v3.mdx @@ -0,0 +1,87 @@ +--- +title: How to authorize an edge node | v3 +description: >- + Authorize an edge node with Azion Console or API v3 so it can run Orchestrator edge services. +permalink: /documentation/guides/application-development/automation/authorize-an-edge-node-v3/ +meta_tags: >- + Azion, Edge Node, Authorization, Orchestrator, API, Deployment, Edge + Services, Edge Computing, Console Access, Platform Integration +namespace: docs_deploy_authorize_node_v3 +--- + +import DocButton from '~/components/webkit/DocButton.vue'; +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/en/snippet.mdx' + +[How to authorize an edge node](/en/documentation/guides/application-development/automation/authorize-an-edge-node/) + + +If you've already installed [Azion Orchestrator Agent](/en/documentation/guides/application-development/automation/install-orchestrator-agent/) on your device, the next step is to authorize the edge node on the platform. You can do so in Azion Console or with the Azion API. + + + + +## Authorize the edge node + + + Console + API + + + +### Console + +1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Find the edge node you wish to authorize, which will have the status `Waiting Authorization`. +3. Select the three dots button and then select **Authorize**. +4. Confirm the authorization. + + + + +### API + +1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID you wish to authorize: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Run the following `PATCH` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and informing the edge node ID: + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_nodes/authorize' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--header 'accept: application/json; version=3' \ +--data '{ + "edge_node_ids": [ + 0 + ] +}' +``` + +Now, your edge node is authorized and able to work with [edge services](/en/documentation/platform/orchestrator/edge-services/). + +:::tip +Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. +::: + + + + +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. diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/authorize-node/authorize-node.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/authorize-node/authorize-node.mdx index 77357d4b37..1c22ba8a65 100644 --- a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/authorize-node/authorize-node.mdx +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/authorize-node/authorize-node.mdx @@ -1,8 +1,7 @@ --- title: How to authorize an edge node description: >- - Learn how to authorize and deploy Edge Nodes using Azion Console and API for - optimal Edge Services integration and Orchestrator. + Authorize an edge node in Azion Console so it can run Orchestrator edge services. permalink: /documentation/guides/application-development/automation/authorize-an-edge-node/ meta_tags: >- Azion, Edge Node, Authorization, Orchestrator, API, Deployment, Edge @@ -11,65 +10,20 @@ namespace: docs_deploy_authorize_node --- import DocButton from '~/components/webkit/DocButton.vue'; -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet.mdx' +[How to authorize an edge node | v3](/en/documentation/guides/application-development/automation/authorize-an-edge-node-v3/) -If you've already installed [Azion Orchestrator Agent](/en/documentation/guides/application-development/automation/install-orchestrator-agent/) on your device, the next step is to authorize the edge node on the platform. You can do so in Azion Console or with the Azion API. - +If you've already installed [Azion Orchestrator Agent](/en/documentation/guides/application-development/automation/install-orchestrator-agent/) on your device, the next step is to authorize the edge node on the platform. You can do so in Azion Console. API v4 has no Orchestrator endpoints. ## Authorize the edge node - - Console - API - - - -### Console - 1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Find the edge node you wish to authorize, which will have the status `Waiting Authorization`. 3. Select the three dots button and then select **Authorize**. 4. Confirm the authorization. - - - - -### API - -1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID you wish to authorize: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Run the following `PATCH` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and informing the edge node ID: - -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_nodes/authorize' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---header 'accept: application/json; version=3' \ ---data '{ - "edge_node_ids": [ - 0 - ] -}' -``` - -Now, your edge node is authorized and able to work with [edge services](/en/documentation/platform/orchestrator/edge-services/). - -:::tip -Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. -::: - - - After the authorization, an edge node can take up to 10 seconds before services can be orchestrated on it. diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/bind-service/bind-service-v3.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/bind-service/bind-service-v3.mdx new file mode 100644 index 0000000000..9e3897aaeb --- /dev/null +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/bind-service/bind-service-v3.mdx @@ -0,0 +1,96 @@ +--- +title: How to bind an edge service to an edge node | v3 +description: >- + Bind an edge service to an edge node with Azion Console or API v3 so Orchestrator can deploy it. +permalink: /documentation/guides/application-development/automation/bind-service-node-v3/ +meta_tags: >- + Edge Services, Azion API, Edge Node Binding, Deploy Edge Service, Azion + Console, API Integration, Edge Nodes Management, Configure Edge Services, Edge + Node Connection, Edge Node Configuration +namespace: docs_deploy_bind_service_v3 +--- + +import DocButton from '~/components/webkit/DocButton.vue'; +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/en/snippet.mdx' + +[How to bind an edge service to an edge node](/en/documentation/guides/application-development/automation/bind-service-node/) + + +**Edge Services** allows orchestrated services to be managed on your own edge nodes. To do so, you must have an edge service created and to bind it to an edge node. + + + +You can create a relation between an edge node and an edge service in Azion Console or with the Azion API. + +## Bind the edge service to the edge node + + + Console + API + + + +### Console + +1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Select the edge node you want to bind to a service. +3. In the **Main Settings** tab, look for the option **Add-On Services** under **Orchestration Modules** and activate it. +4. Go to the **Services** tab and select **+ Service**. +5. Choose the service you want to bind and add the variables if needed. +6. Select **Save**. + + + + +### API + +1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID you wish to bind to an edge service: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge service ID you wish to bind to an edge node: + +```bash +curl --location 'https://api.azionapi.net/edge_services/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +3. Run the following `POST` request in your terminal: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "service_id": 0, + "variables": [ + { + "name": "string", + "value": "string" + } + ] +}' +``` + +Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge node informing the edge node ID and inform the following properties in the request body: + +| Property | Description | Required | +| - | - | - | +| `service_id` | ID of the edge service being bound to the edge node | Yes | +| `variables` | Variables to be replaced during the processing on the edge node | No (requires checking) | + +Now, your edge node and your edge service have a relation between them and are ready to be orchestrated. + +:::tip +Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. +::: + + + diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/bind-service/bind-service.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/bind-service/bind-service.mdx index bc6a576a31..bdfd25348b 100644 --- a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/bind-service/bind-service.mdx +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/bind-service/bind-service.mdx @@ -1,8 +1,7 @@ --- title: How to bind an edge service to an edge node description: >- - Learn how to deploy and manage Edge Services via Azion API and Azion Console, - effectively binding services to edge nodes for optimized performance. + Bind an edge service to an edge node in Azion Console so Orchestrator can deploy it. permalink: /documentation/guides/application-development/automation/bind-service-node/ meta_tags: >- Edge Services, Azion API, Edge Node Binding, Deploy Edge Service, Azion @@ -12,83 +11,21 @@ namespace: docs_deploy_bind_service --- import DocButton from '~/components/webkit/DocButton.vue'; -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet.mdx' +[How to bind an edge service to an edge node | v3](/en/documentation/guides/application-development/automation/bind-service-node-v3/) **Edge Services** allows orchestrated services to be managed on your own edge nodes. To do so, you must have an edge service created and to bind it to an edge node. -You can create a relation between an edge node and an edge service in Azion Console or with the Azion API. +You can create a relation between an edge node and an edge service in Azion Console. API v4 has no Orchestrator endpoints. ## Bind the edge service to the edge node - - Console - API - - - -### Console - 1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Select the edge node you want to bind to a service. 3. In the **Main Settings** tab, look for the option **Add-On Services** under **Orchestration Modules** and activate it. 4. Go to the **Services** tab and select **+ Service**. 5. Choose the service you want to bind and add the variables if needed. 6. Select **Save**. - - - - -### API - -1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID you wish to bind to an edge service: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge service ID you wish to bind to an edge node: - -```bash -curl --location 'https://api.azionapi.net/edge_services/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -3. Run the following `POST` request in your terminal: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "service_id": 0, - "variables": [ - { - "name": "string", - "value": "string" - } - ] -}' -``` - -Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge node informing the edge node ID and inform the following properties in the request body: - -| Property | Description | Required | -| - | - | - | -| `service_id` | ID of the edge service being bound to the edge node | Yes | -| `variables` | Variables to be replaced during the processing on the edge node | No (requires checking) | - -Now, your edge node and your edge service have a relation between them and are ready to be orchestrated. - -:::tip -Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. -::: - - - diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/create-service/create-service-v3.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/create-service/create-service-v3.mdx new file mode 100644 index 0000000000..ad83653d16 --- /dev/null +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/create-service/create-service-v3.mdx @@ -0,0 +1,102 @@ +--- +title: How to create an edge service | v3 +description: >- + Create and activate an edge service for Orchestrator edge nodes with Azion Console or API v3. +permalink: /documentation/guides/application-development/automation/create-edge-service-v3/ +meta_tags: >- + Edge Service, Azion Console, Azion API, Deploy Edge Service, Edge Node + Deployment, Create Edge Service, Edge Service Tutorial, Edge Computing, + Service Configuration, Edge Resources +namespace: docs_deploy_create_service_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/en/snippet.mdx' + +[How to create an edge service](/en/documentation/guides/application-development/automation/create-edge-service/) + + +You can create an edge service in Azion Console or with the Azion API. + +## Create the edge service + + + Console + API + + + +### Console + +1. Access [Azion Console](https://console.azion.com/) > **Edge Services**. +2. Click on the **+ Service** button. +3. Give a name for your service. +4. Define the variables, if necessary. + - The variables must be in the format `Variable = Value`. +5. Set the status as **Active**. +6. Click the **Save** button. +7. Go to the **Resources** tab and [provide resources](/en/documentation/guides/application-development/automation/provision-files-v3/) for your service. + + + + +### API + +1. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and informing the name of the service being created: + +```bash +curl --location 'https://api.azionapi.net/edge_services/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "name": "string" +}' +``` + +2. Keep the `id` returned in the response body. The API creates the service with `"active": false`: + +```json +{ + "id": 1196, + "name": "string", + "updated_at": "2024-01-18T17:24:33Z", + "last_editor": "xxxxx", + "active": false, + "bound_nodes": 0, + "permissions": [ + "read", + "write" + ] +} +``` + +3. To set the service as active, run the following `PATCH` request: + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "active": true +}' +``` + +Replace `[TOKEN VALUE]` with your personal token and `:id` with the ID of the edge service. + +Now, the service is active and you can bind it to your edge nodes. + +:::note +If an edge service is not active, it is not available for binding to an edge node. +::: + +:::tip +Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. +::: + + + + +Watch a video tutorial on how to create an edge service on Azion’s YouTube channel: + diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/create-service/create-service.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/create-service/create-service.mdx index be000ffeed..c0ecd1f079 100644 --- a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/create-service/create-service.mdx +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/create-service/create-service.mdx @@ -1,9 +1,7 @@ --- title: How to create an edge service description: >- - Learn to create and deploy edge services using Azion Console and API, - configuring resources and activating with ease for efficient edge node - deployment. + Create and activate an edge service in Azion Console for Orchestrator edge nodes. permalink: /documentation/guides/application-development/automation/create-edge-service/ meta_tags: >- Edge Service, Azion Console, Azion API, Deploy Edge Service, Edge Node @@ -12,21 +10,14 @@ meta_tags: >- namespace: docs_deploy_create_service --- -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet.mdx' +[How to create an edge service | v3](/en/documentation/guides/application-development/automation/create-edge-service-v3/) -You can create an edge service in Azion Console or with the Azion API. +You can create an edge service in Azion Console. API v4 has no Orchestrator endpoints. ## Create the edge service - - Console - API - - - -### Console - 1. Access [Azion Console](https://console.azion.com/) > **Edge Services**. 2. Click on the **+ Service** button. 3. Give a name for your service. @@ -35,67 +26,10 @@ You can create an edge service in Azion Console or with the Azion API. 5. Set the status as **Active**. 6. Click the **Save** button. 7. Go to the **Resources** tab and [provide resources](/en/documentation/guides/application-development/automation/provision-files/) for your service. - - - - -### API - -1. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and informing the name of the service being created: - -```bash -curl --location 'https://api.azionapi.net/edge_services/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "name": "string" -}' -``` - -2. Keep the `id` returned in the response body. The API creates the service with `"active": false`: - -```json -{ - "id": 1196, - "name": "string", - "updated_at": "2024-01-18T17:24:33Z", - "last_editor": "xxxxx", - "active": false, - "bound_nodes": 0, - "permissions": [ - "read", - "write" - ] -} -``` - -3. To set the service as active, run the following `PATCH` request: - -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "active": true -}' -``` - -Replace `[TOKEN VALUE]` with your personal token and `:id` with the ID of the edge service. - -Now, the service is active and you can bind it to your edge nodes. :::note If an edge service is not active, it is not available for binding to an edge node. ::: -:::tip -Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. -::: - - - - Watch a video tutorial on how to create an edge service on Azion’s YouTube channel: diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/provision-files/provision-file-v3.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/provision-files/provision-file-v3.mdx new file mode 100644 index 0000000000..c1d3182ef9 --- /dev/null +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/provision-files/provision-file-v3.mdx @@ -0,0 +1,101 @@ +--- +title: How to provision files | v3 +description: >- + Add Text and Shell Script resources to an Orchestrator edge service with Azion Console or API v3. +permalink: /documentation/guides/application-development/automation/provision-files-v3/ +meta_tags: >- + Azion Console, Azion API, Edge Services, Configure Edge Resources, Deploy Edge + Resources, API Resource Management, Edge Node Configuration, Edge Service + Orchestrator, Shell Script Edge, Text Resource Edge +namespace: docs_deploy_provision_files_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/en/snippet.mdx' + +[How to provision files](/en/documentation/guides/application-development/automation/provision-files/) + + +To be able to orchestrate services on your device, you need to configure all the resources. These resources can be: + +- **Text**: for content being copied as plain text to the edge node. +- **Shell Script**: for resources that will be installed and run according to the selected *trigger*. + +You can create a resource in Azion Console or with the Azion API. + +--- + +## Create the resource + + + Console + API + + + +### Console + +1. Access [Azion Console](https://console.azion.com/) > **Edge Services**. +2. Select the edge service to which you want to add a resource. +3. Go to the **Resources** tab and select **+ Resource**. +4. Enter the **Path** of the resource. +5. Choose the type **Text**. +6. Add the following content to the content block: + +```bash +My name is {{name}}, and this is my first added resource +``` + +:::note +The tag `{{name}}` will be replaced by the environment configured for the service or the variable configured on the node. The edge node variable will override the variable configure on the edge service. +::: + +7. Select **Save**. + + + + +### API + +1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge service ID: + +```bash +curl --location 'https://api.azionapi.net/edge_services/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Run the following `POST` request in your terminal: + +```bash +curl --location 'https://api.azionapi.net/edge_services/:id/resources' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "content_type": "Text", + "name": "/resource", + "content": "My name is {{name}}, and this is my first added resource" +}' +``` + +Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge service and inform the following parameters in the request body: + +| Property | Description | Required | +| - | - | - | +| `content_type` | Content type of the resource being created | Yes | +| `name` | Name of the resource being created | Yes | +| `content` | Content that defines actions performed when the resource state changes in the edge node | Yes | + +Now, your resource is created and able to work with the edge nodes related to the service in specific. + +:::tip +Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. +::: + + + + +import DocButton from '~/components/webkit/DocButton.vue'; + + \ No newline at end of file diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/provision-files/provision-file.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/provision-files/provision-file.mdx index 12935c3bd8..105c03bb92 100644 --- a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/provision-files/provision-file.mdx +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/provision-files/provision-file.mdx @@ -1,8 +1,7 @@ --- title: How to provision files description: >- - Learn how to configure and deploy resources via Azion Console and API, manage - edge services, and effectively use edge nodes and orchestrators. + Add Text and Shell Script resources to an Orchestrator edge service in Azion Console. permalink: /documentation/guides/application-development/automation/provision-files/ meta_tags: >- Azion Console, Azion API, Edge Services, Configure Edge Resources, Deploy Edge @@ -11,28 +10,21 @@ meta_tags: >- namespace: docs_deploy_provision_files --- -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet.mdx' +[How to provision files | v3](/en/documentation/guides/application-development/automation/provision-files-v3/) To be able to orchestrate services on your device, you need to configure all the resources. These resources can be: - **Text**: for content being copied as plain text to the edge node. - **Shell Script**: for resources that will be installed and run according to the selected *trigger*. -You can create a resource in Azion Console or with the Azion API. +You can create a resource in Azion Console. API v4 has no Orchestrator endpoints. --- ## Create the resource - - Console - API - - - -### Console - 1. Access [Azion Console](https://console.azion.com/) > **Edge Services**. 2. Select the edge service to which you want to add a resource. 3. Go to the **Resources** tab and select **+ Resource**. @@ -49,50 +41,6 @@ The tag `{{name}}` will be replaced by the environment configured for the servic ::: 7. Select **Save**. - - - - -### API - -1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge service ID: - -```bash -curl --location 'https://api.azionapi.net/edge_services/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Run the following `POST` request in your terminal: - -```bash -curl --location 'https://api.azionapi.net/edge_services/:id/resources' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "content_type": "Text", - "name": "/resource", - "content": "My name is {{name}}, and this is my first added resource" -}' -``` - -Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge service and inform the following parameters in the request body: - -| Property | Description | Required | -| - | - | - | -| `content_type` | Content type of the resource being created | Yes | -| `name` | Name of the resource being created | Yes | -| `content` | Content that defines actions performed when the resource state changes in the edge node | Yes | - -Now, your resource is created and able to work with the edge nodes related to the service in specific. - -:::tip -Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. -::: - - - import DocButton from '~/components/webkit/DocButton.vue'; diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/unbind-service/unbind-service-v3.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/unbind-service/unbind-service-v3.mdx new file mode 100644 index 0000000000..c80f967a36 --- /dev/null +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/unbind-service/unbind-service-v3.mdx @@ -0,0 +1,74 @@ +--- +title: How to unbind an edge service | v3 +description: >- + Unbind an edge service from an Orchestrator edge node with Azion Console or API v3. +permalink: /documentation/guides/application-development/automation/unbind-service-v3/ +meta_tags: >- + Azion Console, Edge Nodes, Unbind Services, API, DELETE request, Edge Service, + Azion API, Edge Node Management, Curl Commands, Configuration Steps +namespace: docs_deploy_unbind_service_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/en/snippet.mdx' + +[How to unbind an edge service](/en/documentation/guides/application-development/automation/unbind-service/) + + +You can unbind an edge service from an edge node in Azion Console or with the Azion API. + +--- + +## Unbind the edge service + + + Console + API + + + +### Console + +1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Select the edge node from which you want to unbind a service. +3. Go to the **Services** tab. +4. Find the service you wish to unbind and select the trash can icon. +5. Confirm the unbinding. + + + + +### API + +1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID to which you wish to unbind an edge service: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and `:id` with the ID of the edge node, and retrieve the ID of the relation between the edge node and the chosen service: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +3. Run the following `DELETE` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:node_id` with the ID of the edge node and `:bind_id` with the ID of the relation between edge node and edge service: + +```bash +curl --location --request DELETE 'https://api.azionapi.net/edge_nodes/:node_id/services/:bind_id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +Now, your edge node doesn't have a relation with this specific edge service anymore. + +:::tip +Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. +::: + + + diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/unbind-service/unbind-service.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/unbind-service/unbind-service.mdx index 55482a8b35..896dc4458e 100644 --- a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/unbind-service/unbind-service.mdx +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/unbind-service/unbind-service.mdx @@ -1,8 +1,7 @@ --- title: How to unbind an edge service description: >- - Learn how to unbind services from edge nodes using the Azion Console and API, - with detailed steps on execution of DELETE requests through Curl commands. + Unbind an edge service from an Orchestrator edge node in Azion Console. permalink: /documentation/guides/application-development/automation/unbind-service/ meta_tags: >- Azion Console, Edge Nodes, Unbind Services, API, DELETE request, Edge Service, @@ -10,63 +9,18 @@ meta_tags: >- namespace: docs_deploy_unbind_service --- -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet.mdx' +[How to unbind an edge service | v3](/en/documentation/guides/application-development/automation/unbind-service-v3/) -You can unbind an edge service from an edge node in Azion Console or with the Azion API. +You can unbind an edge service from an edge node in Azion Console. API v4 has no Orchestrator endpoints. --- ## Unbind the edge service - - Console - API - - - -### Console - 1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Select the edge node from which you want to unbind a service. 3. Go to the **Services** tab. 4. Find the service you wish to unbind and select the trash can icon. 5. Confirm the unbinding. - - - - -### API - -1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID to which you wish to unbind an edge service: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and `:id` with the ID of the edge node, and retrieve the ID of the relation between the edge node and the chosen service: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -3. Run the following `DELETE` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:node_id` with the ID of the edge node and `:bind_id` with the ID of the relation between edge node and edge service: - -```bash -curl --location --request DELETE 'https://api.azionapi.net/edge_nodes/:node_id/services/:bind_id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -Now, your edge node doesn't have a relation with this specific edge service anymore. - -:::tip -Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. -::: - - - diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/work-with-variables/work-with-variables-v3.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/work-with-variables/work-with-variables-v3.mdx new file mode 100644 index 0000000000..e2a806b936 --- /dev/null +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/work-with-variables/work-with-variables-v3.mdx @@ -0,0 +1,241 @@ +--- +title: How to work with variables | v3 +description: >- + Set Orchestrator variables on edge services and edge nodes with Azion Console or API v3, and learn which value wins. +permalink: /documentation/guides/application-development/automation/work-with-variables-v3/ +meta_tags: >- + Orchestrator, Azion Console, API, edge service variables, edge node + variables, deploy, orchestrator +namespace: docs_deploy_work_with_variables_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/en/snippet.mdx' + +[How to work with variables](/en/documentation/guides/application-development/automation/work-with-variables/) + +During the deployment process on [Orchestrator](/en/documentation/platform/orchestrator/), you can work with variables. A variable can be set on an [edge service](#edge-services-variables) and an [edge node](#edge-node-variables). + +You can create edge node and edge services variables using: + +- [Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/) +- [Azion API](https://api.azion.com/v3) + +:::note +The priority is always the edge node variable. So, if you have a variable configured on an edge service and the same variable configured on an edge node, the one on the node will override the one configured on the edge service. +::: + +--- + +## Edge Services variables + + + Console + API + + + +### Console + +1. Access [Azion Console](https://console.azion.com/) > **Edge Services**. +2. Select the [edge service](/en/documentation/guides/application-development/automation/create-edge-service-v3/) to which you want to add a variable. +3. In the **Variables** section, add the following variable: + + + +4. Select **Save**. + +Now, you've created a variable related to a specific service. You need to access this variable through a resource. + +1. Navigate to the **Resources** tab. +2. Click on **+ Resource** or select the resource to which you wish to use the variable. +3. Enter the **Path** of the resource. +4. Choose the type **Text**. +5. Add the following content to the content block: + +```bash +I am using {{name}} Orchestrator +``` + +6. Click the **Save** button. + + + + +### API + +1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge service ID to which you wish to add a variable: + + + +2. Create a variable related to the service. Run the following `PATCH` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and informing the variable's name and value: + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "active": true, + "name": "service", + "variables": [ + { + "name": "name", + "value": "azion" + } + ] +}' +``` + +Now, you've created a variable related to a specific service. You need to access this variable through a resource. + +3. Run the following `POST` request in your terminal: + +```bash +curl --location 'https://api.azionapi.net/edge_services/:id/resources' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "content_type": "Text", + "name": "/resource", + "content": "I am using {{name}} Orchestrator" +}' +``` + +Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge service and inform the following parameters in the request body: + +| Property | Description | Required | +| - | - | - | +| `content_type` | Content type of the resource being created | Yes | +| `name` | Name of the resource being created | Yes | +| `content` | Content that defines actions performed when the resource state changes in the edge node | Yes | + +:::tip +Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. +::: + + + + +--- + +## Edge Node variables + + + + + +### Console + +1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Select the edge node to which you want to add a variable. +3. Go to the **Services** tab. +4. Choose the [service](/en/documentation/guides/application-development/automation/create-edge-service-v3/) to which you want to apply the variable. +5. Add the following content to the variables block: + +```bash +name=azion2 +``` + +6. Select **Save**. + +Now, you've created a variable related to a specific node. You need to access this variable through a resource. + +1. Go to **Edge Services**. +2. Select the service related to the resource. +3. Click on **+ Resource** or select the resource where you wish to use the variable. +4. Enter the **Path** of the resource. +5. Choose the type **Text**. +6. Add the following content to the content block: + +```bash +I am using {{name}} Orchestrator +``` + +7. Click the **Save** button. + + + + +### API + +1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID to which you wish to add a variable: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and `:id` with the ID of the edge node, and retrieve the ID of the relation between the edge node and the chosen service: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +3. Run the following `PATCH` request in your terminal: + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_nodes/:node_id/services/:bind_id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--data '{ + "variables": [ + { + "name": "name", + "value": "Azion" + } + ] +}' +``` + +Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge node and `:bind_id` with the ID of the relation retrieved in step 2, informing the following properties in the request body: + +| Property | Description | Required | +| - | - | - | +| `variables` | Variables to be replaced during the processing on the edge node. | No | + +Now, your variables are created and ready to be accessed during the execution on your nodes related to the specific service. It's relevant to stress that when you have a variable with the same name configured on a service and on a node, the value stored on the node will prevail, for example: + +Variable configured on the edge service: + +```bash +name=azion +``` + +Variable configured on the edge node + +```bash +name=azion2 +``` + +When the resource is accessed, the value of the variable will be `azion2` instead of `azion`. + +To access the resource on the edge node, you need to access the file. You can access it through the filepath you informed during the creation of the resource. + +Resource name: + +```bash +/txt/test +``` + +To access it: + +```bash +nano /txt/test +``` + +:::tip +Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. +::: + + + \ No newline at end of file diff --git a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/work-with-variables/work-with-variables.mdx b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/work-with-variables/work-with-variables.mdx index 101b98dbe8..4c21c82d10 100644 --- a/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/work-with-variables/work-with-variables.mdx +++ b/apps/docs/src/content/docs/en/pages/deploy-journey/configure-node/work-with-variables/work-with-variables.mdx @@ -1,8 +1,7 @@ --- title: How to work with variables description: >- - Explore how to utilize variables in Orchestrator with Azion Console and - API to manage and override edge service and node variables effectively. + Set Orchestrator variables on edge services and edge nodes in Azion Console, and learn which value wins. permalink: /documentation/guides/application-development/automation/work-with-variables/ meta_tags: >- Orchestrator, Azion Console, API, edge service variables, edge node @@ -10,15 +9,14 @@ meta_tags: >- namespace: docs_deploy_work_with_variables --- -import Tabs from '~/components/webkit/Tabs.vue' import Code from '~/components/webkit/CodeBlock.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/en/snippet.mdx' -During the deployment process on [Orchestrator](/en/documentation/platform/orchestrator/), you can work with variables. A variable can be set on an [edge service](#edge-services-variables) and an [edge node](#edge-node-variables). +[How to work with variables | v3](/en/documentation/guides/application-development/automation/work-with-variables-v3/) -You can create edge node and edge services variables using: +During the deployment process on [Orchestrator](/en/documentation/platform/orchestrator/), you can work with variables. A variable can be set on an [edge service](#edge-services-variables) and an [edge node](#edge-node-variables). -- [Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/) -- [Azion API](https://api.azion.com/) +You can create edge node and edge services variables in [Azion Console](/en/documentation/guides/platform/account-and-billing/how-to-access-azion-console/). API v4 has no Orchestrator endpoints. :::note The priority is always the edge node variable. So, if you have a variable configured on an edge service and the same variable configured on an edge node, the one on the node will override the one configured on the edge service. @@ -28,14 +26,6 @@ The priority is always the edge node variable. So, if you have a variable config ## Edge Services variables - - Console - API - - - -### Console - 1. Access [Azion Console](https://console.azion.com/) > **Edge Services**. 2. Select the [edge service](/en/documentation/guides/application-development/automation/create-edge-service/) to which you want to add a variable. 3. In the **Variables** section, add the following variable: @@ -57,80 +47,11 @@ I am using {{name}} Orchestrator ``` 6. Click the **Save** button. - - - - -### API - -1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge service ID to which you wish to add a variable: - - - -2. Create a variable related to the service. Run the following `PATCH` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and informing the variable's name and value: - -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "active": true, - "name": "service", - "variables": [ - { - "name": "name", - "value": "azion" - } - ] -}' -``` - -Now, you've created a variable related to a specific service. You need to access this variable through a resource. - -3. Run the following `POST` request in your terminal: - -```bash -curl --location 'https://api.azionapi.net/edge_services/:id/resources' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "content_type": "Text", - "name": "/resource", - "content": "I am using {{name}} Orchestrator" -}' -``` - -Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge service and inform the following parameters in the request body: - -| Property | Description | Required | -| - | - | - | -| `content_type` | Content type of the resource being created | Yes | -| `name` | Name of the resource being created | Yes | -| `content` | Content that defines actions performed when the resource state changes in the edge node | Yes | - -:::tip -Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. -::: - - - --- ## Edge Node variables - - - - -### Console - 1. Access [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Select the edge node to which you want to add a variable. 3. Go to the **Services** tab. @@ -157,51 +78,12 @@ I am using {{name}} Orchestrator ``` 7. Click the **Save** button. - - - - -### API - -1. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and retrieve the edge node ID to which you wish to add a variable: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Run the following `GET` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and `:id` with the ID of the edge node, and retrieve the ID of the relation between the edge node and the chosen service: -```bash -curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -3. Run the following `PATCH` request in your terminal: - -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_nodes/:node_id/services/:bind_id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---data '{ - "variables": [ - { - "name": "name", - "value": "Azion" - } - ] -}' -``` - -Replace `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/), `:id` with the ID of the edge node and `:bind_id` with the ID of the relation retrieved in step 2, informing the following properties in the request body: +--- -| Property | Description | Required | -| - | - | - | -| `variables` | Variables to be replaced during the processing on the edge node. | No | +## Access the resource on the edge node -Now, your variables are created and ready to be accessed during the execution on your nodes related to the specific service. It's relevant to stress that when you have a variable with the same name configured on a service and on a node, the value stored on the node will prevail, for example: +Your variables are ready to be accessed during the execution on the nodes related to the service. It's relevant to stress that when you have a variable with the same name configured on a service and on a node, the value stored on the node will prevail, for example: Variable configured on the edge service: @@ -230,10 +112,3 @@ To access it: ```bash nano /txt/test ``` - -:::tip -Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API. -::: - - - \ No newline at end of file diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/desinstalar-node/desinstalar-node-v3.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/desinstalar-node/desinstalar-node-v3.mdx new file mode 100644 index 0000000000..26665b2b69 --- /dev/null +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/desinstalar-node/desinstalar-node-v3.mdx @@ -0,0 +1,90 @@ +--- +title: Como desinstalar o Orchestrator Agent | v3 +description: >- + Aprenda a desinstalar o Azion Orchestrator e remover edge nodes usando o + Azion Console, Real-Time Manager ou API. Tutorial passo a passo. +permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/desinstalar-agent-v3/ +meta_tags: >- + Desinstalar Azion Orchestrator, remover edge node, Azion Console, + Real-Time Manager, API de Azion, exclusão de edge node +namespace: docs_deploy_uninstall_agent_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/pt/snippet.mdx' + +[Como desinstalar o Orchestrator Agent](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/desinstalar-agent/) + + +## Desinstale o agente + +Para desinstalar o Azion Orchestrator Agent: + +1. Acesse o dispositivo (edge node) do qual você deseja remover o agente. +2. Abra o terminal e vá para a pasta onde o agente está instalado. +3. Execute: + +```bash +sudo ./edge-orchestrator uninstall +``` + +Saída: + +```bash +Orchestrator was uninstalled successfully +``` + +A partir deste momento, seu edge node não receberá mais atualizações. + +:::note[nota] +Desinstalar o agente do seu dispositivo não remove o edge node da lista de nodes disponíveis. Para completar o processo, você precisa [excluir seu edge node](#exclua-um-edge-node) da lista de edge nodes disponíveis. +::: + +--- + +## Exclua um edge node + +:::caution[Atenção] +Uma vez que um edge node é deletado, ele não pode ser recuperado. +::: + + + Console + API + + + +### Console + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Encontre o edge node que você deseja remover. +3. Selecione o ícone de três pontos e então selecione **Delete**. +4. Confirme a exclusão. + + + + +### API + +1. Execute a seguinte requisição `GET` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge node que você deseja deletar: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Execute a seguinte requisição `DELETE` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e `:id` com o ID do edge node: + +```bash +curl --location --request DELETE 'https://api.azionapi.net/edge_nodes/:id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +:::tip +Confira a [documentação da API da Azion](https://api.azion.com/v3) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todas as funcionalidades disponíveis via API. +::: + + + \ No newline at end of file diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/desinstalar-node/desinstalar-node.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/desinstalar-node/desinstalar-node.mdx index bc1168eda0..ffc1688673 100644 --- a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/desinstalar-node/desinstalar-node.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/desinstalar-node/desinstalar-node.mdx @@ -1,8 +1,7 @@ --- title: Como desinstalar o Orchestrator Agent description: >- - Aprenda a desinstalar o Azion Orchestrator e remover edge nodes usando o - Azion Console, Real-Time Manager ou API. Tutorial passo a passo. + Saiba como desinstalar o Azion Orchestrator Agent de um dispositivo e excluir o edge node dele no Azion Console. permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/desinstalar-agent/ meta_tags: >- Desinstalar Azion Orchestrator, remover edge node, Azion Console, @@ -10,8 +9,11 @@ meta_tags: >- namespace: docs_deploy_uninstall_agent --- -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet.mdx' +[Como desinstalar o Orchestrator Agent | v3](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/desinstalar-agent-v3/) + +A API v4 não tem endpoints do Orchestrator, então este guia usa o Azion Console. ## Desinstale o agente @@ -45,43 +47,7 @@ Desinstalar o agente do seu dispositivo não remove o edge node da lista de node Uma vez que um edge node é deletado, ele não pode ser recuperado. ::: - - Console - API - - - -### Console - 1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Encontre o edge node que você deseja remover. 3. Selecione o ícone de três pontos e então selecione **Delete**. 4. Confirme a exclusão. - - - - -### API - -1. Execute a seguinte requisição `GET` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge node que você deseja deletar: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Execute a seguinte requisição `DELETE` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e `:id` com o ID do edge node: - -```bash -curl --location --request DELETE 'https://api.azionapi.net/edge_nodes/:id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -:::tip -Confira a [documentação da API da Azion](https://api.azion.com/) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todas as funcionalidades disponíveis via API. -::: - - - \ No newline at end of file diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/rodar-scripts/rodar-scripts-v3.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/rodar-scripts/rodar-scripts-v3.mdx new file mode 100644 index 0000000000..a2b7e43b73 --- /dev/null +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/rodar-scripts/rodar-scripts-v3.mdx @@ -0,0 +1,312 @@ +--- +title: Como rodar scripts nos edge nodes | v3 +description: >- + Guia de instalação e configuração da Azion CLI em edge nodes usando Shell + Script em um edge service específico para orquestração eficiente. +permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/rodar-scripts-v3/ +meta_tags: >- + Azion CLI, instalação Azion CLI, edge node, Orchestrator, Shell Script, + edge service, vincular edge service, API Azion, automação edge, resource + script +namespace: docs_deploy_run_scripts_edge_node_v3 +--- + +import DocButton from '~/components/webkit/DocButton.vue'; +import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/pt/snippet.mdx' + +[Como rodar scripts nos edge nodes](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/rodar-scripts/) + +Para conseguir orquestrar serviços em seu dispositivo, é necessário configurar todos os recursos necessários para instalar, desinstalar e recarregar seus serviços. + +Este guia apresenta como instalar a [Azion CLI](/pt-br/documentacao/devtools/cli/) em seus edge nodes por meio de um recurso do tipo `Shell Script` configurado em um edge service específico. + +--- + +## Pré-requisitos + + +Console +API + + + +### Console + +- Um edge node com o **Orchestrator Agent** instalado e autorizado. +- O gerenciador de pacotes Dpkg instalado neste edge node. + + + + +:::note +Você pode encontrar os links para download das respectivas arquiteturas na [página de lançamentos da Azion CLI](https://github.com/aziontech/azion/releases). Ao acessar a página, você deve escolher o link de download correto com base na arquitetura do seu dispositivo (edge node) e substituir a variável `BINARY_URL` no script pela URL correta. +::: + + + + + +### API + +- Um edge node com o **Orchestrator Agent** instalado e autorizado. +- O gerenciador de pacotes Dpkg instalado neste edge node. + + + + +:::note +Você pode encontrar os links para download das respectivas arquiteturas na [página de lançamentos da Azion CLI](https://github.com/aziontech/azion/releases). Ao acessar a página, você deve escolher o link de download correto com base na arquitetura do seu dispositivo (edge node) e substituir a variável `BINARY_URL` no script pela URL correta. +::: + + + + + +--- + +## Crie um edge service + + + + + +### Console + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Services**. +2. Selecione **+ Service**. +3. Nomeie este serviço como `Instalação Azion CLI`. +4. Insira as varáveis e valores para o recurso, se necessário. +5. Defina o status como **Active**. +6. Selecione **Save**. + + + + +### API + +1. Execute a seguinte requisição `POST` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e informando o nome do serviço a ser criado: + + + +2. Guarde o ID do edge service que você acabou de criar. Você pode acessá-lo no corpo da resposta, por exemplo: + +```json +{ + "id": 1196, + "name": "Instalação do Azion CLI", + "updated_at": "2024-01-18T17:24:33Z", + "last_editor": "xxxxx", + "active": false, + "bound_nodes": 0, + "permissions": [ + "read", + "write" + ] +} +``` + +:::note +Ao executar a requisição no terminal, a resposta pode não retornar formatada como apresentado no exemplo acima. +::: + +3. Execute a seguinte requisição `PATCH` no seu terminal para definir o serviço como ativo, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e `:id` pelo ID do edge service: + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "active": true, + "name": "Instalação do Azion CLI", + "variables": [ + { + "name": "string", + "value": "string" + } + ] +}' +``` + +:::note +Se um edge service não estiver definido como ativo, ele não estará disponível para vinculação a um edge node. +::: + + + + +--- + +## Crie um recurso + + + + + +### Console + +1. Dentro do serviço que você acabou de criar, chamado `Instalação Azion CLI` vá para a aba **Resources**. +2. Clique em **+ Resource**. +3. Insira `/scripts/install-cli` no campo **Filepath**. +4. Escolha o tipo **Shell Script**. +5. Escolha o *trigger* **Install**. +6. Adicione o seguinte conteúdo ao bloco **Content**: + + + +7. Clique no botão **Save**. + +Este script instalará o binário `azion` no seguinte caminho: `/usr/local/bin` + + + + +### API + +1. Execute a seguinte requisição `POST` no seu terminal: + + + +Substitua [TOKEN VALUE] pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge service e informe os seguintes parâmetros no corpo da requisição: + +| Propriedade | Descrição | Obrigatório | +| - | - | - | +| `content_type` | Tipo de conteúdo do recurso a ser criado | Sim | +| `name` | Nome do recurso a ser criado | Sim | +| `content` | Conteúdo que define as ações realizadas quando o estado do recurso muda no edge node | Sim | + + + + +--- + +## Vincule um edge service a um edge node + + + + + +### Console + +1. Vá para **Edge Nodes**. +2. Selecione o edge node ao qual você deseja vincular um serviço. +3. Vá para a guia **Services** e clique no botão **+ Service**. +4. Escolha o serviço `Instalação Azion CLI` que você criou. +5. Clique no botão **Save**. + + + + +### API + +1. Execute a seguinte requisição `GET` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge node ao qual deseja vincular a um edge service: + + + +2. Execute a seguinte requisição `POST` no seu terminal: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/:node_id/services' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "service_id": 1196, + "variables": [ + { + "name": "string", + "value": "string" + } + ] +}' +``` + +Substitua `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:node_id` pelo ID do edge node e, no corpo da requisição, `1196` pelo ID do edge service que você guardou ao criá-lo: + +| Propriedade | Descrição | Obrigatório | +| - | - | - | +| `service_id` | ID do edge service a ser vinculado ao edge node, como número | Sim | +| `variables` | Variáveis a serem substituídas durante o processamento no edge node| Não | + + + + +--- + +## Acesse a Azion CLI + +Após este processo, em seu edge node, acesse a pasta: + +```bash +cd /usr/local/bin +``` + +E execute: + +```bash +./azion -h +``` + +A saída será semelhante a: + +```text +Azion CLI 1.10.2 + +DESCRIPTION + The Azion Command Line Interface is a unified tool to manage your Azion projects and resources + +SYNOPSIS + azion [flags] + +EXAMPLES + $ azion + $ azion -t azionb43a9554776zeg05b11cb1declkbabcc9la + $ azion --debug + $ azion -h +... +``` + +:::tip +Confira a [documentação da API da Azion](https://api.azion.com/v3) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. +::: \ No newline at end of file diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/rodar-scripts/rodar-scripts.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/rodar-scripts/rodar-scripts.mdx index 6a02583b50..08c74b1e28 100644 --- a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/rodar-scripts/rodar-scripts.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/avancado/rodar-scripts/rodar-scripts.mdx @@ -1,8 +1,7 @@ --- title: Como rodar scripts nos edge nodes description: >- - Guia de instalação e configuração da Azion CLI em edge nodes usando Shell - Script em um edge service específico para orquestração eficiente. + Saiba como instalar a Azion CLI em edge nodes do Orchestrator com um resource Shell Script no Azion Console. permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/rodar-scripts/ meta_tags: >- Azion CLI, instalação Azion CLI, edge node, Orchestrator, Shell Script, @@ -12,8 +11,12 @@ namespace: docs_deploy_run_scripts_edge_node --- import DocButton from '~/components/webkit/DocButton.vue'; -import Tabs from '~/components/webkit/Tabs.vue' import Code from '~/components/webkit/CodeBlock.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet.mdx' + +[Como rodar scripts nos edge nodes | v3](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/rodar-scripts-v3/) + +A API v4 não tem endpoints do Orchestrator, então este guia usa o Azion Console. Para conseguir orquestrar serviços em seu dispositivo, é necessário configurar todos os recursos necessários para instalar, desinstalar e recarregar seus serviços. @@ -23,135 +26,31 @@ Este guia apresenta como instalar a [Azion CLI](/pt-br/documentacao/devtools/cli ## Pré-requisitos - -Console -API - - - -### Console - -- Um edge node com o **Orchestrator Agent** instalado e autorizado. -- O gerenciador de pacotes Dpkg instalado neste edge node. - - - - -:::note -Você pode encontrar os links para download das respectivas arquiteturas na [página de lançamentos da Azion CLI](https://github.com/aziontech/azion/releases). Ao acessar a página, você deve escolher o link de download correto com base na arquitetura do seu dispositivo (edge node) e substituir a variável `BINARY_URL` no script pela URL correta. -::: - - - - - -### API - - Um edge node com o **Orchestrator Agent** instalado e autorizado. - O gerenciador de pacotes Dpkg instalado neste edge node. - + :::note Você pode encontrar os links para download das respectivas arquiteturas na [página de lançamentos da Azion CLI](https://github.com/aziontech/azion/releases). Ao acessar a página, você deve escolher o link de download correto com base na arquitetura do seu dispositivo (edge node) e substituir a variável `BINARY_URL` no script pela URL correta. ::: - - - - --- ## Crie um edge service - - - - -### Console - 1. Acesse [Azion Console](https://console.azion.com/) > **Edge Services**. 2. Selecione **+ Service**. 3. Nomeie este serviço como `Instalação Azion CLI`. 4. Insira as varáveis e valores para o recurso, se necessário. 5. Defina o status como **Active**. 6. Selecione **Save**. - - - - -### API - -1. Execute a seguinte requisição `POST` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e informando o nome do serviço a ser criado: - - - -2. Guarde o ID do edge service que você acabou de criar. Você pode acessá-lo no corpo da resposta, por exemplo: - -```json -{ - "id": 1196, - "name": "Instalação do Azion CLI", - "updated_at": "2024-01-18T17:24:33Z", - "last_editor": "xxxxx", - "active": false, - "bound_nodes": 0, - "permissions": [ - "read", - "write" - ] -} -``` - -:::note -Ao executar a requisição no terminal, a resposta pode não retornar formatada como apresentado no exemplo acima. -::: - -3. Execute a seguinte requisição `PATCH` no seu terminal para definir o serviço como ativo, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e `:id` pelo ID do edge service: - -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "active": true, - "name": "Instalação do Azion CLI", - "variables": [ - { - "name": "string", - "value": "string" - } - ] -}' -``` - -:::note -Se um edge service não estiver definido como ativo, ele não estará disponível para vinculação a um edge node. -::: - - - --- ## Crie um recurso - - - - -### Console - 1. Dentro do serviço que você acabou de criar, chamado `Instalação Azion CLI` vá para a aba **Resources**. 2. Clique em **+ Resource**. 3. Insira `/scripts/install-cli` no campo **Filepath**. @@ -181,93 +80,16 @@ echo "Instalação concluída com sucesso" 7. Clique no botão **Save**. Este script instalará o binário `azion` no seguinte caminho: `/usr/local/bin` - - - - -### API - -1. Execute a seguinte requisição `POST` no seu terminal: - - - -Substitua [TOKEN VALUE] pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge service e informe os seguintes parâmetros no corpo da requisição: - -| Propriedade | Descrição | Obrigatório | -| - | - | - | -| `content_type` | Tipo de conteúdo do recurso a ser criado | Sim | -| `name` | Nome do recurso a ser criado | Sim | -| `content` | Conteúdo que define as ações realizadas quando o estado do recurso muda no edge node | Sim | - - - --- ## Vincule um edge service a um edge node - - - - -### Console - 1. Vá para **Edge Nodes**. 2. Selecione o edge node ao qual você deseja vincular um serviço. 3. Vá para a guia **Services** e clique no botão **+ Service**. 4. Escolha o serviço `Instalação Azion CLI` que você criou. 5. Clique no botão **Save**. - - - - -### API - -1. Execute a seguinte requisição `GET` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge node ao qual deseja vincular a um edge service: - - - -2. Execute a seguinte requisição `POST` no seu terminal: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/:node_id/services' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "service_id": 1196, - "variables": [ - { - "name": "string", - "value": "string" - } - ] -}' -``` - -Substitua `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:node_id` pelo ID do edge node e, no corpo da requisição, `1196` pelo ID do edge service que você guardou ao criá-lo: - -| Propriedade | Descrição | Obrigatório | -| - | - | - | -| `service_id` | ID do edge service a ser vinculado ao edge node, como número | Sim | -| `variables` | Variáveis a serem substituídas durante o processamento no edge node| Não | - - - --- @@ -303,7 +125,3 @@ EXAMPLES $ azion -h ... ``` - -:::tip -Confira a [documentação da API da Azion](https://api.azion.com/) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. -::: \ No newline at end of file diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/autorizar-node/autorizar-node-v3.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/autorizar-node/autorizar-node-v3.mdx new file mode 100644 index 0000000000..2ad06fdfd8 --- /dev/null +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/autorizar-node/autorizar-node-v3.mdx @@ -0,0 +1,88 @@ +--- +title: Como autorizar um edge node | v3 +description: >- + Saiba como autorizar um Edge Node na Azion usando Console, Real-Time Manager + ou API Azion. Acesse recursos de Orchestrator eficientemente. +permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/autorizar-edge-node-v3/ +meta_tags: >- + Azion, Edge Node, Autorização, Real-Time Manager, Console Preview, API Azion, + Orchestrator, OpenAPI +namespace: docs_deploy_authorize_node_v3 +--- + +import DocButton from '~/components/webkit/DocButton.vue'; +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/pt/snippet.mdx' + +[Como autorizar um edge node](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/autorizar-edge-node/) + + +Se você já instalou o [Azion Orchestrator Agent](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/instalar-orchestrator-agent/) no seu dispositivo, o próximo passo é autorizar o edge node na plataforma. Você pode fazer isso no Azion Console ou com a Azion API. + + + + +## Autorize o edge node + + + Console + API + + + +### Console + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Encontre o edge node que você deseja autorizar, que terá o status `Waiting Authorization`. +3. Selecione o ícone de três pontos e depois selecione **Authorize**. +4. Confirme a autorização. + + + + +### API + +1. Execute a seguinte requisição `GET` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [token pessoal](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/): + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Execute a seguinte requisição `PATCH` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [token pessoal](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e informando o ID do edge node: + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_nodes/authorize' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--header 'accept: application/json; version=3' \ +--data '{ + "edge_node_ids": [ + 0 + ] +}' +``` + +Agora, seu edge node está autorizado e pode trabalhar com [edge services](/pt-br/documentacao/plataforma/orchestrator/edge-services/). + +:::tip[dica] +Confira a [documentação da API Azion](https://api.azion.com/v3) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. +::: + + + + +Depois da autorização, um edge node pode levar até 10 segundos para que serviços possam ser orquestrados nele. + +## Autorize vários edge nodes de uma vez + +Para autorizar vários edge nodes em uma única ação no Azion Console: + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Selecione os edge nodes que você quer autorizar. Para selecionar todos os edge nodes da lista, selecione a caixa de seleção no cabeçalho da lista. +3. Selecione **Actions** e depois selecione **Authorize**. +4. Selecione **Confirm**. + +Uma mensagem de confirmação aparece. diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/autorizar-node/autorizar-node.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/autorizar-node/autorizar-node.mdx index 457151d4a9..f1622c9644 100644 --- a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/autorizar-node/autorizar-node.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/autorizar-node/autorizar-node.mdx @@ -1,8 +1,7 @@ --- title: Como autorizar um edge node description: >- - Saiba como autorizar um Edge Node na Azion usando Console, Real-Time Manager - ou API Azion. Acesse recursos de Orchestrator eficientemente. + Saiba como autorizar um edge node no Azion Console para que ele rode edge services do Orchestrator. permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/autorizar-edge-node/ meta_tags: >- Azion, Edge Node, Autorização, Real-Time Manager, Console Preview, API Azion, @@ -11,65 +10,20 @@ namespace: docs_deploy_authorize_node --- import DocButton from '~/components/webkit/DocButton.vue'; -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet.mdx' +[Como autorizar um edge node | v3](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/autorizar-edge-node-v3/) -Se você já instalou o [Azion Orchestrator Agent](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/instalar-orchestrator-agent/) no seu dispositivo, o próximo passo é autorizar o edge node na plataforma. Você pode fazer isso no Azion Console ou com a Azion API. - +Se você já instalou o [Azion Orchestrator Agent](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/instalar-orchestrator-agent/) no seu dispositivo, o próximo passo é autorizar o edge node na plataforma. Você pode fazer isso no Azion Console. A API v4 não tem endpoints do Orchestrator. ## Autorize o edge node - - Console - API - - - -### Console - 1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Encontre o edge node que você deseja autorizar, que terá o status `Waiting Authorization`. 3. Selecione o ícone de três pontos e depois selecione **Authorize**. 4. Confirme a autorização. - - - - -### API - -1. Execute a seguinte requisição `GET` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [token pessoal](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/): - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Execute a seguinte requisição `PATCH` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [token pessoal](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e informando o ID do edge node: - -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_nodes/authorize' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---header 'accept: application/json; version=3' \ ---data '{ - "edge_node_ids": [ - 0 - ] -}' -``` - -Agora, seu edge node está autorizado e pode trabalhar com [edge services](/pt-br/documentacao/plataforma/orchestrator/edge-services/). - -:::tip[dica] -Confira a [documentação da API Azion](https://api.azion.com/) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. -::: - - - Depois da autorização, um edge node pode levar até 10 segundos para que serviços possam ser orquestrados nele. diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/criar-service/criar-service-v3.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/criar-service/criar-service-v3.mdx new file mode 100644 index 0000000000..69b89e340d --- /dev/null +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/criar-service/criar-service-v3.mdx @@ -0,0 +1,100 @@ +--- +title: Como criar um edge service | v3 +description: >- + Descubra como criar e gerenciar Edge Services na Azion usando o Console, + Real-Time Manager ou API, otimizando suas operações em Edge Nodes. +permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criar-edge-service-v3/ +meta_tags: >- + Azion, Edge Service, Azion Console, Real-Time Manager, Edge Nodes, + Gerenciamento de serviços, API Azion, Deployment Edge, Configuração Edge, Edge + Computing +namespace: docs_deploy_create_service_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/pt/snippet.mdx' + +[Como criar um edge service](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criar-edge-service/) + + +Você pode criar um edge service no Azion Console ou com a Azion API. + +## Crie o edge service + + + Console + API + + + +### Console + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Services**. +2. Clique no botão **+ Service**. +3. Nomeie seu serviço. +4. Defina as variáveis a usar, se necessário. + - As variáveis devem seguir o padrão "Variável = Valor". +5. Defina o status como **Active**. +6. Clique no botão **Save**. +7. Selecione a aba **Resources** e [forneça recursos](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/provisionar-arquivos-v3/) para seu serviço. + + + + +### API + +1. Execute a seguinte requisição `POST` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [token pessoal](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e informando o nome do serviço a ser criado: + +```bash +curl --location 'https://api.azionapi.net/edge_services/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ +"name": "string" +}' +``` + +2. Guarde o `id` retornado no corpo da resposta. A API cria o serviço com `"active": false`: + +```json +{ + "id": 1196, + "name": "string", + "updated_at": "2024-01-18T17:24:33Z", + "last_editor": "xxxxx", + "active": false, + "bound_nodes": 0, + "permissions": [ + "read", + "write" + ] +} +``` + +3. Para definir o serviço como ativo, execute a seguinte requisição `PATCH`: + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "active": true +}' +``` + +Substitua `[TOKEN VALUE]` pelo seu token pessoal e `:id` pelo ID do edge service. + +Agora, o serviço está ativo e você pode vinculá-lo aos seus edge nodes. + +:::note[nota] +Se um edge service não estiver definido como ativo, ele não estará disponível para vinculação a um edge node. +::: + +:::tip[dica] +Confira a [documentação da API da Azion](https://api.azion.com/v3) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. +::: + + + diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/criar-service/criar-service.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/criar-service/criar-service.mdx index 0fb116aef8..5e4e5c465d 100644 --- a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/criar-service/criar-service.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/criar-service/criar-service.mdx @@ -1,8 +1,7 @@ --- title: Como criar um edge service description: >- - Descubra como criar e gerenciar Edge Services na Azion usando o Console, - Real-Time Manager ou API, otimizando suas operações em Edge Nodes. + Saiba como criar e ativar um edge service no Azion Console para edge nodes do Orchestrator. permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criar-edge-service/ meta_tags: >- Azion, Edge Service, Azion Console, Real-Time Manager, Edge Nodes, @@ -11,21 +10,14 @@ meta_tags: >- namespace: docs_deploy_create_service --- -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet.mdx' +[Como criar um edge service | v3](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criar-edge-service-v3/) -Você pode criar um edge service no Azion Console ou com a Azion API. +Você pode criar um edge service no Azion Console. A API v4 não tem endpoints do Orchestrator. ## Crie o edge service - - Console - API - - - -### Console - 1. Acesse [Azion Console](https://console.azion.com/) > **Edge Services**. 2. Clique no botão **+ Service**. 3. Nomeie seu serviço. @@ -34,64 +26,7 @@ Você pode criar um edge service no Azion Console ou com a Azion API. 5. Defina o status como **Active**. 6. Clique no botão **Save**. 7. Selecione a aba **Resources** e [forneça recursos](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/provisionar-arquivos/) para seu serviço. - - - - -### API - -1. Execute a seguinte requisição `POST` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [token pessoal](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e informando o nome do serviço a ser criado: - -```bash -curl --location 'https://api.azionapi.net/edge_services/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ -"name": "string" -}' -``` - -2. Guarde o `id` retornado no corpo da resposta. A API cria o serviço com `"active": false`: - -```json -{ - "id": 1196, - "name": "string", - "updated_at": "2024-01-18T17:24:33Z", - "last_editor": "xxxxx", - "active": false, - "bound_nodes": 0, - "permissions": [ - "read", - "write" - ] -} -``` - -3. Para definir o serviço como ativo, execute a seguinte requisição `PATCH`: - -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "active": true -}' -``` - -Substitua `[TOKEN VALUE]` pelo seu token pessoal e `:id` pelo ID do edge service. - -Agora, o serviço está ativo e você pode vinculá-lo aos seus edge nodes. :::note[nota] Se um edge service não estiver definido como ativo, ele não estará disponível para vinculação a um edge node. ::: - -:::tip[dica] -Confira a [documentação da API da Azion](https://api.azion.com/) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. -::: - - - diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/desvincular-service/unbind-service-v3.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/desvincular-service/unbind-service-v3.mdx new file mode 100644 index 0000000000..0df5c8e9c2 --- /dev/null +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/desvincular-service/unbind-service-v3.mdx @@ -0,0 +1,76 @@ +--- +title: Como desvincular um edge service | v3 +description: >- + Aprenda a desvincular um edge service de um edge node usando o Azion Console, + Real-Time Manager ou API, simplificando a gestão de edge services. +permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/desvincular-servico-v3/ +meta_tags: >- + Azion, desvinculação de serviço, edge service, edge node, Azion Console, + Real-Time Manager, Azion API, gestão de edge computing, desvinculação via API, + gerenciamento de serviços edge +namespace: docs_deploy_unbind_service_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/pt/snippet.mdx' + +[Como desvincular um edge service](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/desvincular-servico/) + + +Você pode desvincular um edge service de um edge node no Azion Console ou com a Azion API. + +--- + +## Desvincule o edge service + + + Console + API + + + +### Console + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Selecione o edge node do qual você deseja desvincular um serviço. +3. Vá para a aba **Services**. +4. Encontre o serviço que você deseja desvincular e selecione o ícone de lixeira. +5. Confirme a desvinculação. + + + + +### API + +1. Execute a seguinte requisição `GET` no seu terminal, substituindo `[TOKEN VALUE]` com seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) para recuperar o ID do edge node do qual deseja desvincular o edge service: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Execute a seguinte requisição `LIST` no seu terminal, substituindo `[TOKEN VALUE]` com seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e `:id` pelo ID do edge node para obter o ID da relação entre o edge node e o serviço escolhido: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +3. Execute a seguinte requisição `DELETE` no seu terminal, substituindo `[TOKEN VALUE]` com seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:node_id` pelo ID do edge node e `:bind_id` com o ID da relação entre o edge node e o edge service: + +```bash +curl --location --request DELETE 'https://api.azionapi.net/edge_nodes/:node_id/services/:bind_id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +Agora, seu edge node não tem mais uma relação com este edge service específico. + +:::tip[dica] +Consulte a [documentação da API da Azion](https://api.azion.com/v3) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. +::: + + + diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/desvincular-service/unbind-service.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/desvincular-service/unbind-service.mdx index 94b1bff2a5..5c08c79d76 100644 --- a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/desvincular-service/unbind-service.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/desvincular-service/unbind-service.mdx @@ -1,8 +1,7 @@ --- title: Como desvincular um edge service description: >- - Aprenda a desvincular um edge service de um edge node usando o Azion Console, - Real-Time Manager ou API, simplificando a gestão de edge services. + Saiba como desvincular um edge service de um edge node do Orchestrator no Azion Console. permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/desvincular-servico/ meta_tags: >- Azion, desvinculação de serviço, edge service, edge node, Azion Console, @@ -11,63 +10,18 @@ meta_tags: >- namespace: docs_deploy_unbind_service --- -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet.mdx' +[Como desvincular um edge service | v3](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/desvincular-servico-v3/) -Você pode desvincular um edge service de um edge node no Azion Console ou com a Azion API. +Você pode desvincular um edge service de um edge node no Azion Console. A API v4 não tem endpoints do Orchestrator. --- ## Desvincule o edge service - - Console - API - - - -### Console - 1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Selecione o edge node do qual você deseja desvincular um serviço. 3. Vá para a aba **Services**. 4. Encontre o serviço que você deseja desvincular e selecione o ícone de lixeira. 5. Confirme a desvinculação. - - - - -### API - -1. Execute a seguinte requisição `GET` no seu terminal, substituindo `[TOKEN VALUE]` com seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) para recuperar o ID do edge node do qual deseja desvincular o edge service: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Execute a seguinte requisição `LIST` no seu terminal, substituindo `[TOKEN VALUE]` com seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e `:id` pelo ID do edge node para obter o ID da relação entre o edge node e o serviço escolhido: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -3. Execute a seguinte requisição `DELETE` no seu terminal, substituindo `[TOKEN VALUE]` com seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:node_id` pelo ID do edge node e `:bind_id` com o ID da relação entre o edge node e o edge service: - -```bash -curl --location --request DELETE 'https://api.azionapi.net/edge_nodes/:node_id/services/:bind_id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -Agora, seu edge node não tem mais uma relação com este edge service específico. - -:::tip[dica] -Consulte a [documentação da API da Azion](https://api.azion.com/) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. -::: - - - diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/provisionar-arquivos/provisionar-arquivos-v3.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/provisionar-arquivos/provisionar-arquivos-v3.mdx new file mode 100644 index 0000000000..8915572e9a --- /dev/null +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/provisionar-arquivos/provisionar-arquivos-v3.mdx @@ -0,0 +1,102 @@ +--- +title: Como provisionar arquivos | v3 +description: >- + Aprenda como configurar e gerenciar resources no Azion Console e Real-Time + Manager para otimizar seus Edge Services e impulsionar a eficiência da Edge + Computing. +permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/provisionar-arquivos-v3/ +meta_tags: >- + Azion, Edge Services, Configurar Edge Resources, Azion Console, Real-Time + Manager, API Azion, Resource Deployment, Edge Computing, Orchestrator +namespace: docs_deploy_provision_files_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/pt/snippet.mdx' + +[Como provisionar arquivos](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/provisionar-arquivos/) + + +Para poder orquestrar edge services em seu dispositivo, você precisa configurar todos os *resources*. Esses resources podem ser: + +- **Texto**: para conteúdo sendo copiado como texto simples no edge node. +- **Shell Script**: para recursos que serão instalados e executados de acordo com o *gatilho* selecionado. + +Você pode criar um resource no Azion Console ou com a Azion API. + +--- + +## Crie o resource + + + Console + API + + + +### Console + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Services**. +2. Selecione o edge service ao qual você deseja adicionar um resource. +3. Vá para a aba **Resources** e selecione **+ Resource**. +4. Insira o **Path** do arquivo do resource. +5. Escolha o tipo **Text**. +6. Adicione o seguinte conteúdo ao bloco `Content`: + +```bash +Meu nome é {{name}}, e este é o meu primeiro resource adicionado +``` + +:::note[nota] +A tag `{{name}}` será substituída pelo ambiente configurado para o edge service ou pela variável configurada no edge node. A variável do edge node substituirá a variável configurada no edge service. +::: + +7. Selecione **Save**. + + + + +### API + +1. Execute a seguinte requisição `GET` no seu terminal, substituindo [TOKEN VALUE] pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge service: + +```bash +curl --location 'https://api.azionapi.net/edge_services/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUEVALOR DO TOKEN]' +``` + +2. Execute a seguinte requisição `POST` no seu terminal: + +```bash +curl --location 'https://api.azionapi.net/edge_services/:id/resources' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUEVALOR DO TOKEN]' \ +--header 'Content-Type: application/json' \ +--data '{ + "content_type": "Text", + "name": "/resource", + "content": "Meu nome é {{name}}, e este é o meu primeiro resource adicionado" +}' +``` + +Substitua [TOKEN VALUE] pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge service e informe os seguintes parâmetros no corpo da requisição: + +| Propriedade | Descrição | Obrigatório | +| - | - | - | +| `content_type` | Tipo de conteúdo do resource sendo criado | Sim | +| `name` | Nome do resource sendo criado | Sim | +| `content` | Conteúdo que define ações realizadas quando o estado do resource muda no edge node | Sim | + +Agora, seu resource está criado e pode trabalhar com os edge nodes relacionados ao edge service em específico. + +:::tip[dica] +Confira a [documentação da API Azion](https://api.azion.com/v3) e a especificação [OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. +::: + + + + +import DocButton from '~/components/webkit/DocButton.vue'; + + diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/provisionar-arquivos/provisionar-arquivos.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/provisionar-arquivos/provisionar-arquivos.mdx index af693c4121..a13982ed11 100644 --- a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/provisionar-arquivos/provisionar-arquivos.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/provisionar-arquivos/provisionar-arquivos.mdx @@ -1,9 +1,7 @@ --- title: Como provisionar arquivos description: >- - Aprenda como configurar e gerenciar resources no Azion Console e Real-Time - Manager para otimizar seus Edge Services e impulsionar a eficiência da Edge - Computing. + Saiba como adicionar resources do tipo Text e Shell Script a um edge service do Orchestrator no Azion Console. permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/provisionar-arquivos/ meta_tags: >- Azion, Edge Services, Configurar Edge Resources, Azion Console, Real-Time @@ -11,28 +9,21 @@ meta_tags: >- namespace: docs_deploy_provision_files --- -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet.mdx' +[Como provisionar arquivos | v3](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/provisionar-arquivos-v3/) Para poder orquestrar edge services em seu dispositivo, você precisa configurar todos os *resources*. Esses resources podem ser: - **Texto**: para conteúdo sendo copiado como texto simples no edge node. - **Shell Script**: para recursos que serão instalados e executados de acordo com o *gatilho* selecionado. -Você pode criar um resource no Azion Console ou com a Azion API. +Você pode criar um resource no Azion Console. A API v4 não tem endpoints do Orchestrator. --- ## Crie o resource - - Console - API - - - -### Console - 1. Acesse [Azion Console](https://console.azion.com/) > **Edge Services**. 2. Selecione o edge service ao qual você deseja adicionar um resource. 3. Vá para a aba **Resources** e selecione **+ Resource**. @@ -49,50 +40,6 @@ A tag `{{name}}` será substituída pelo ambiente configurado para o edge servic ::: 7. Selecione **Save**. - - - - -### API - -1. Execute a seguinte requisição `GET` no seu terminal, substituindo [TOKEN VALUE] pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge service: - -```bash -curl --location 'https://api.azionapi.net/edge_services/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUEVALOR DO TOKEN]' -``` - -2. Execute a seguinte requisição `POST` no seu terminal: - -```bash -curl --location 'https://api.azionapi.net/edge_services/:id/resources' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUEVALOR DO TOKEN]' \ ---header 'Content-Type: application/json' \ ---data '{ - "content_type": "Text", - "name": "/resource", - "content": "Meu nome é {{name}}, e este é o meu primeiro resource adicionado" -}' -``` - -Substitua [TOKEN VALUE] pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge service e informe os seguintes parâmetros no corpo da requisição: - -| Propriedade | Descrição | Obrigatório | -| - | - | - | -| `content_type` | Tipo de conteúdo do resource sendo criado | Sim | -| `name` | Nome do resource sendo criado | Sim | -| `content` | Conteúdo que define ações realizadas quando o estado do resource muda no edge node | Sim | - -Agora, seu resource está criado e pode trabalhar com os edge nodes relacionados ao edge service em específico. - -:::tip[dica] -Confira a [documentação da API Azion](https://api.azion.com/) e a especificação [OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. -::: - - - import DocButton from '~/components/webkit/DocButton.vue'; diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/trabalhar-variaveis/trabalhar-com-variaveis-v3.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/trabalhar-variaveis/trabalhar-com-variaveis-v3.mdx new file mode 100644 index 0000000000..52f7698ddc --- /dev/null +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/trabalhar-variaveis/trabalhar-com-variaveis-v3.mdx @@ -0,0 +1,245 @@ +--- +title: Como trabalhar com variáveis no Orchestrator | v3 +description: >- + Descubra como utilizar variáveis em Edge Services e Edge Nodes com Azion + Console, Real-Time Manager e API Azion, otimizando o deployment no Edge + Orchestrator. +permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/trabalhar-com-variaveis-v3/ +meta_tags: >- + Azion, Edge Nodes, Edge Services, Orchestrator, variáveis, Real-Time + Manager, Azion Console, API de Azion, deployment, edge computing +namespace: docs_deploy_work_with_variables_v3 +--- + +import Tabs from '~/components/webkit/Tabs.vue' +import Code from '~/components/webkit/CodeBlock.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/pt/snippet.mdx' + +[Como trabalhar com variáveis no Orchestrator](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/trabalhar-com-variaveis/) + +Durante o processo de implantação no [Orchestrator](/pt-br/documentacao/plataforma/orchestrator/), você pode trabalhar com variáveis. Uma variável pode ser definida em [edge services](#variaveis-em-edge-services) e [edge nodes](#variaveis-em-edge-nodes). + +Você pode criar variáveis de edge node e de edge services usando: + +- [Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/) +- [API da Azion](https://api.azion.com/v3) + +:::note +A prioridade é sempre a variável do edge node. Portanto, se você tiver uma variável configurada em um edge service e a mesma variável configurada em um edge node, a do edge node irá substituir a configurada no edge service. +::: + +--- + +## Variáveis em edge services + + + Console + API + + + +### Console + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Services**. +2. Selecione o [edge service](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criar-edge-service-v3/) ao qual você deseja adicionar uma variável. +3. Na seção **Variables**, adicione a seguinte variável: + + + +4. Selecione **Save**. + +Agora, você criou uma variável relacionada a um serviço específico. Você precisa acessar essa variável através de um recurso. + +1. Navegue até a aba **Resources** . +2. Clique em **+ Resource** ou selecione o recurso no qual você deseja usar a variável. +3. Insira o **Path** do arquivo do recurso. +4. Escolha o tipo **Text**. +5. Adicione o seguinte conteúdo ao bloco **Content**: + +```bash +Estou usando {{name}} Orchestrator +``` + +6. Clique no botão **Save**. + + + + +### API + +1. Execute a seguinte requisição `GET` no seu terminal, substituindo [TOKEN VALUE] pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge service ao qual você deseja adicionar uma variável: + + + +2. Crie uma variável relacionada ao serviço. Execute a seguinte requisição `PATCH` no seu terminal, substituindo `[TOKEN VALUE]` por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do service e informe o nome e o valor da variável: + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "active": true, + "name": "service", + "variables": [ + { + "name": "name", + "value": "azion" + } + ] +}' +``` + +Agora, você criou uma variável relacionada a um serviço específico. Você precisa acessar essa variável através de um recurso. + +3. Execute a seguinte requisição `POST` no seu terminal: + +```bash +curl --location 'https://api.azionapi.net/edge_services/:id/resources' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ + "content_type": "Text", + "name": "/resource", + "content": "Estou usando {{name}} Orchestrator" +}' +``` + +Substitua `[TOKEN VALUE]` por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge service e informe os seguintes parâmetros no corpo da requisição: + +| Propriedade | Descrição | Obrigatório | +| - | - | - | +| content_type | Tipo de conteúdo do recurso sendo criado | Sim | +| name | Nome do recurso sendo criado | Sim | +| content | Conteúdo que define ações realizadas quando o estado do recurso muda no edge node | Sim | + +:::tip +Confira a [documentação da API da Azion](https://api.azion.com/v3) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. +::: + + + + +--- + +## Variáveis em edge nodes + + + + + +### Console + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Selecione o edge node ao qual você deseja adicionar uma variável. +3. Vá para a aba **Services**. +4. Escolha o [serviço](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criar-edge-service-v3/) ao qual você deseja aplicar a variável. +5. Adicione o seguinte conteúdo ao bloco de variáveis: + + + +6. Selecione **Save**. + +Agora, você criou uma variável relacionada a um node específico. Você precisa acessar essa variável através de um recurso. + +1. Vá para **Edge Services**. +2. Selecione o serviço relacionado ao recurso. +3. Clique em **+ Resource**. +4. Insira o **Path** do arquivo do recurso. +5. Escolha o tipo **Text**. +6. Adicione o seguinte conteúdo ao bloco de conteúdo: + +```bash +Estou usando {{name}} Orchestrator +``` + +7.Clique no botão **Save**. + + + + +### API + +1. Execute a seguinte requisição `GET` no seu terminal, substituindo [TOKEN VALUE] por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge node ao qual você deseja adicionar uma variável: + + + +2. Execute a seguinte requisição `GET` no seu terminal, substituindo [TOKEN VALUE] por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e `:id` pelo ID do edge node, e recupere o ID da relação entre o edge node e o serviço escolhido: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +3. Execute a seguinte requisição `PATCH` no seu terminal: + +```bash +curl --location --request PATCH 'https://api.azionapi.net/edge_nodes/:node_id/services/:bind_id' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--data '{ + "variables": [ + { + "name": "name", + "value": "azion2" + } + ] +}' +``` + +Substitua [TOKEN VALUE] por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge node e `:bind_id` pelo ID da relação recuperada na etapa 2, informando as seguintes propriedades no corpo da requisição: + +| Propriedade | Descrição | Obrigatório | +| - | - | - | +| variables | Variáveis a serem substituídas durante o processamento no edge node. | Não | + +Agora, suas variáveis estão criadas e prontas para serem acessadas durante a execução em seus nodes relacionados ao serviço específico. É relevante enfatizar que, quando você tem uma variável com o mesmo nome configurada em um serviço e em um node, o valor armazenado no node prevalecerá, por exemplo: + +Variável configurada no edge service: + +```bash +name=azion +``` + +Variável configurada no edge node: + +```bash +name=azion2 +``` + +Quando o recurso é acessado, o valor da variável será azion2 em vez de azion. + +Para acessar o recurso no edge node, você precisa acessar o arquivo. Você pode acessá-lo através do caminho do arquivo que você informou durante a criação do recurso. + +Nome do recurso: + +```bash +/txt/test +``` + +Para acessá-lo: + +```bash +nano /txt/test +``` + +:::tip +Confira a [documentação da API da Azion](https://api.azion.com/v3) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. +::: + + + diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/trabalhar-variaveis/trabalhar-com-variaveis.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/trabalhar-variaveis/trabalhar-com-variaveis.mdx index 500c6b1385..53a615b54d 100644 --- a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/trabalhar-variaveis/trabalhar-com-variaveis.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/trabalhar-variaveis/trabalhar-com-variaveis.mdx @@ -1,9 +1,7 @@ --- title: Como trabalhar com variáveis no Orchestrator description: >- - Descubra como utilizar variáveis em Edge Services e Edge Nodes com Azion - Console, Real-Time Manager e API Azion, otimizando o deployment no Edge - Orchestrator. + Saiba como definir variáveis do Orchestrator em edge services e edge nodes no Azion Console, e qual valor prevalece. permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/trabalhar-com-variaveis/ meta_tags: >- Azion, Edge Nodes, Edge Services, Orchestrator, variáveis, Real-Time @@ -11,15 +9,14 @@ meta_tags: >- namespace: docs_deploy_work_with_variables --- -import Tabs from '~/components/webkit/Tabs.vue' import Code from '~/components/webkit/CodeBlock.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet.mdx' -Durante o processo de implantação no [Orchestrator](/pt-br/documentacao/plataforma/orchestrator/), você pode trabalhar com variáveis. Uma variável pode ser definida em [edge services](#variaveis-em-edge-services) e [edge nodes](#variaveis-em-edge-nodes). +[Como trabalhar com variáveis no Orchestrator | v3](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/trabalhar-com-variaveis-v3/) -Você pode criar variáveis de edge node e de edge services usando: +Durante o processo de implantação no [Orchestrator](/pt-br/documentacao/plataforma/orchestrator/), você pode trabalhar com variáveis. Uma variável pode ser definida em [edge services](#variaveis-em-edge-services) e [edge nodes](#variaveis-em-edge-nodes). -- [Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/) -- [API da Azion](https://api.azion.com/) +Você pode criar variáveis de edge node e de edge services no [Azion Console](/pt-br/documentacao/guias/plataforma/conta-e-billing/como-acessar-o-azion-console/). A API v4 não tem endpoints do Orchestrator. :::note A prioridade é sempre a variável do edge node. Portanto, se você tiver uma variável configurada em um edge service e a mesma variável configurada em um edge node, a do edge node irá substituir a configurada no edge service. @@ -29,14 +26,6 @@ A prioridade é sempre a variável do edge node. Portanto, se você tiver uma va ## Variáveis em edge services - - Console - API - - - -### Console - 1. Acesse [Azion Console](https://console.azion.com/) > **Edge Services**. 2. Selecione o [edge service](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/criar-edge-service/) ao qual você deseja adicionar uma variável. 3. Na seção **Variables**, adicione a seguinte variável: @@ -60,80 +49,11 @@ Estou usando {{name}} Orchestrator ``` 6. Clique no botão **Save**. - - - - -### API - -1. Execute a seguinte requisição `GET` no seu terminal, substituindo [TOKEN VALUE] pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge service ao qual você deseja adicionar uma variável: - - - -2. Crie uma variável relacionada ao serviço. Execute a seguinte requisição `PATCH` no seu terminal, substituindo `[TOKEN VALUE]` por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do service e informe o nome e o valor da variável: - -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "active": true, - "name": "service", - "variables": [ - { - "name": "name", - "value": "azion" - } - ] -}' -``` - -Agora, você criou uma variável relacionada a um serviço específico. Você precisa acessar essa variável através de um recurso. - -3. Execute a seguinte requisição `POST` no seu terminal: - -```bash -curl --location 'https://api.azionapi.net/edge_services/:id/resources' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "content_type": "Text", - "name": "/resource", - "content": "Estou usando {{name}} Orchestrator" -}' -``` - -Substitua `[TOKEN VALUE]` por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge service e informe os seguintes parâmetros no corpo da requisição: - -| Propriedade | Descrição | Obrigatório | -| - | - | - | -| content_type | Tipo de conteúdo do recurso sendo criado | Sim | -| name | Nome do recurso sendo criado | Sim | -| content | Conteúdo que define ações realizadas quando o estado do recurso muda no edge node | Sim | - -:::tip -Confira a [documentação da API da Azion](https://api.azion.com/) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. -::: - - - --- ## Variáveis em edge nodes - - - - -### Console - 1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Selecione o edge node ao qual você deseja adicionar uma variável. 3. Vá para a aba **Services**. @@ -160,51 +80,12 @@ Estou usando {{name}} Orchestrator ``` 7.Clique no botão **Save**. - - - - -### API -1. Execute a seguinte requisição `GET` no seu terminal, substituindo [TOKEN VALUE] por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge node ao qual você deseja adicionar uma variável: - - - -2. Execute a seguinte requisição `GET` no seu terminal, substituindo [TOKEN VALUE] por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e `:id` pelo ID do edge node, e recupere o ID da relação entre o edge node e o serviço escolhido: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` +--- -3. Execute a seguinte requisição `PATCH` no seu terminal: +## Acessar o resource no edge node -```bash -curl --location --request PATCH 'https://api.azionapi.net/edge_nodes/:node_id/services/:bind_id' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---data '{ - "variables": [ - { - "name": "name", - "value": "azion2" - } - ] -}' -``` - -Substitua [TOKEN VALUE] por seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge node e `:bind_id` pelo ID da relação recuperada na etapa 2, informando as seguintes propriedades no corpo da requisição: - -| Propriedade | Descrição | Obrigatório | -| - | - | - | -| variables | Variáveis a serem substituídas durante o processamento no edge node. | Não | - -Agora, suas variáveis estão criadas e prontas para serem acessadas durante a execução em seus nodes relacionados ao serviço específico. É relevante enfatizar que, quando você tem uma variável com o mesmo nome configurada em um serviço e em um node, o valor armazenado no node prevalecerá, por exemplo: +Suas variáveis estão prontas para serem acessadas durante a execução nos nodes relacionados ao serviço. É relevante enfatizar que, quando você tem uma variável com o mesmo nome configurada em um serviço e em um node, o valor armazenado no node prevalecerá, por exemplo: Variável configurada no edge service: @@ -232,11 +113,4 @@ Para acessá-lo: ```bash nano /txt/test -``` - -:::tip -Confira a [documentação da API da Azion](https://api.azion.com/) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. -::: - - - +``` diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/vincular-service/vincular-service-v3.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/vincular-service/vincular-service-v3.mdx new file mode 100644 index 0000000000..4814cc1a90 --- /dev/null +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/vincular-service/vincular-service-v3.mdx @@ -0,0 +1,96 @@ +--- +title: Como vincular um edge service a um edge node | v3 +description: >- + Descubra como gerenciar seus serviços no Edge com o Azion Console ou RTM e a + integração via Azion API para orquestração eficiente. +permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/vincular-servico-v3/ +meta_tags: >- + Azion, Edge Services, Edge Nodes, Azion Console, Real-Time Manager, Azion API, + orchestration, service deployment, API integration, Orchestrator +namespace: docs_deploy_bind_service_v3 +--- + +import DocButton from '~/components/webkit/DocButton.vue'; +import Tabs from '~/components/webkit/Tabs.vue' +import VersionDeprecated from '~/includes/snippets/versionDeprecated/pt/snippet.mdx' + +[Como vincular um edge service a um edge node](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/vincular-servico/) + + +**Edge Services** permite que serviços orquestrados sejam gerenciados em seus próprios edge nodes. Para isso, você deve ter um edge service criado e vinculá-lo a um edge node. + + + +Você pode criar uma relação entre um edge node e um edge service no Azion Console ou com a Azion API. + +## Vincule o edge service ao edge node + + + Console + API + + + +### Console + +1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. +2. Selecione o edge node que você deseja vincular a um serviço. +3. Na aba **Main Settings**, procure a opção **Add-On Services** na seção **Orchestration Modules** e ative-a. +4. Vá para a aba **Services** e selecione **+ Service**. +5. Escolha o serviço que deseja vincular e adicione as variáveis se necessário. +6. Selecione **Save**. + + + + +### API + +1. Execute a seguinte requisição `GET` em seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) para recuperar o ID do edge node que você deseja vincular a um edge service: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +2. Execute a seguinte requisição `GET` em seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge service que você deseja vincular a um edge node: + +```bash +curl --location 'https://api.azionapi.net/edge_services/' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' +``` + +3. Execute a seguinte requisição `POST` em seu terminal: + +```bash +curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ +--header 'Accept: application/json; version=3' \ +--header 'Authorization: Token [TOKEN VALUE]' \ +--header 'Content-Type: application/json' \ +--data '{ +"service_id": 0, +"variables": [ +{ +"name": "string", +"value": "string" +} +] +}' +``` + +Substitua `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge node e informe as seguintes propriedades no corpo da requisição: + +| Propriedade | Descrição | Obrigatório | +| - | - | - | +| `service_id` | ID do edge service sendo vinculado ao edge node | Sim | +| `variables` | Variáveis a serem substituídas durante o processamento no edge node | Não | + +Agora, seu edge node e seu edge service têm uma relação entre eles e estão prontos para serem orquestrados. + +:::tip[dica] +Confira a [documentação da API da Azion](https://api.azion.com/v3) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. +::: + + + diff --git a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/vincular-service/vincular-service.mdx b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/vincular-service/vincular-service.mdx index 1504167853..00988e576d 100644 --- a/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/vincular-service/vincular-service.mdx +++ b/apps/docs/src/content/docs/pt-br/pages/deploy-jornada/configurar-node/vincular-service/vincular-service.mdx @@ -1,8 +1,7 @@ --- title: Como vincular um edge service a um edge node description: >- - Descubra como gerenciar seus serviços no Edge com o Azion Console ou RTM e a - integração via Azion API para orquestração eficiente. + Saiba como vincular um edge service a um edge node no Azion Console para que o Orchestrator faça o deploy dele. permalink: /documentacao/guias/desenvolvimento-de-aplicacoes/automacao/vincular-servico/ meta_tags: >- Azion, Edge Services, Edge Nodes, Azion Console, Real-Time Manager, Azion API, @@ -11,83 +10,21 @@ namespace: docs_deploy_bind_service --- import DocButton from '~/components/webkit/DocButton.vue'; -import Tabs from '~/components/webkit/Tabs.vue' +import VersionRollingOut from '~/includes/snippets/versionRollingOut/pt/snippet.mdx' +[Como vincular um edge service a um edge node | v3](/pt-br/documentacao/guias/desenvolvimento-de-aplicacoes/automacao/vincular-servico-v3/) **Edge Services** permite que serviços orquestrados sejam gerenciados em seus próprios edge nodes. Para isso, você deve ter um edge service criado e vinculá-lo a um edge node. -Você pode criar uma relação entre um edge node e um edge service no Azion Console ou com a Azion API. +Você pode criar uma relação entre um edge node e um edge service no Azion Console. A API v4 não tem endpoints do Orchestrator. ## Vincule o edge service ao edge node - - Console - API - - - -### Console - 1. Acesse [Azion Console](https://console.azion.com/) > **Edge Nodes**. 2. Selecione o edge node que você deseja vincular a um serviço. 3. Na aba **Main Settings**, procure a opção **Add-On Services** na seção **Orchestration Modules** e ative-a. 4. Vá para a aba **Services** e selecione **+ Service**. 5. Escolha o serviço que deseja vincular e adicione as variáveis se necessário. 6. Selecione **Save**. - - - - -### API - -1. Execute a seguinte requisição `GET` em seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) para recuperar o ID do edge node que você deseja vincular a um edge service: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -2. Execute a seguinte requisição `GET` em seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/) e recupere o ID do edge service que você deseja vincular a um edge node: - -```bash -curl --location 'https://api.azionapi.net/edge_services/' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' -``` - -3. Execute a seguinte requisição `POST` em seu terminal: - -```bash -curl --location 'https://api.azionapi.net/edge_nodes/:id/services' \ ---header 'Accept: application/json; version=3' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ -"service_id": 0, -"variables": [ -{ -"name": "string", -"value": "string" -} -] -}' -``` - -Substitua `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/guias/plataforma/conta-e-billing/personal-tokens/), `:id` pelo ID do edge node e informe as seguintes propriedades no corpo da requisição: - -| Propriedade | Descrição | Obrigatório | -| - | - | - | -| `service_id` | ID do edge service sendo vinculado ao edge node | Sim | -| `variables` | Variáveis a serem substituídas durante o processamento no edge node | Não | - -Agora, seu edge node e seu edge service têm uma relação entre eles e estão prontos para serem orquestrados. - -:::tip[dica] -Confira a [documentação da API da Azion](https://api.azion.com/) e a [especificação OpenAPI](https://github.com/aziontech/azionapi-openapi/) para saber mais sobre todos os recursos disponíveis via API. -::: - - - diff --git a/apps/docs/src/nav/trees/guides.json b/apps/docs/src/nav/trees/guides.json index c043d93efc..6689d428ba 100644 --- a/apps/docs/src/nav/trees/guides.json +++ b/apps/docs/src/nav/trees/guides.json @@ -929,14 +929,41 @@ "page": "docs_deploy_authorize_node", "products": ["orchestrator"] }, + { + "page": "docs_deploy_authorize_node_v3", + "products": ["orchestrator"], + "hidden": true, + "slug": { + "en": "authorize-an-edge-node-v3", + "pt-br": "autorizar-edge-node-v3" + } + }, { "page": "docs_deploy_bind_service", "products": ["orchestrator"] }, + { + "page": "docs_deploy_bind_service_v3", + "products": ["orchestrator"], + "hidden": true, + "slug": { + "en": "bind-service-node-v3", + "pt-br": "vincular-servico-v3" + } + }, { "page": "docs_deploy_create_service", "products": ["orchestrator"] }, + { + "page": "docs_deploy_create_service_v3", + "products": ["orchestrator"], + "hidden": true, + "slug": { + "en": "create-edge-service-v3", + "pt-br": "criar-edge-service-v3" + } + }, { "page": "docs_deploy_install_agent", "products": ["orchestrator", "marketplace"] @@ -954,6 +981,15 @@ "products": ["functions"], "kind": "how-to-guide" }, + { + "page": "docs_deploy_provision_files_v3", + "products": ["functions"], + "hidden": true, + "slug": { + "en": "provision-files-v3", + "pt-br": "provisionar-arquivos-v3" + } + }, { "page": "documentation_devtools_mcp_guide_deploy_static_site", "kind": "how-to-guide", @@ -985,14 +1021,41 @@ "page": "docs_deploy_run_scripts_edge_node", "products": ["orchestrator"] }, + { + "page": "docs_deploy_run_scripts_edge_node_v3", + "products": ["orchestrator"], + "hidden": true, + "slug": { + "en": "run-scripts-v3", + "pt-br": "rodar-scripts-v3" + } + }, { "page": "docs_deploy_unbind_service", "products": ["orchestrator"] }, + { + "page": "docs_deploy_unbind_service_v3", + "products": ["orchestrator"], + "hidden": true, + "slug": { + "en": "unbind-service-v3", + "pt-br": "desvincular-servico-v3" + } + }, { "page": "docs_deploy_uninstall_agent", "products": ["orchestrator", "marketplace"] }, + { + "page": "docs_deploy_uninstall_agent_v3", + "products": ["orchestrator", "marketplace"], + "hidden": true, + "slug": { + "en": "uninstall-agent-v3", + "pt-br": "desinstalar-agent-v3" + } + }, { "page": "docs_deploy_watch_logs", "kind": "how-to-guide", @@ -1006,6 +1069,15 @@ "products": ["cli", "applications"], "kind": "how-to-guide" }, + { + "page": "docs_deploy_work_with_variables_v3", + "products": ["cli", "applications"], + "hidden": true, + "slug": { + "en": "work-with-variables-v3", + "pt-br": "trabalhar-com-variaveis-v3" + } + }, { "page": "docs_guides_route_an_api_path_to_a_backend", "kind": "how-to-guide",