Skip to content

{Workload-orchestration} Initial CLI Extension Release #8773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/service_name.json
Original file line number Diff line number Diff line change
Expand Up @@ -948,5 +948,10 @@
"Command": "az vme",
"AzureServiceName": "Azure Arc Kubernetes Version Managed Extensions",
"URL": ""
}
},
{
"Command": "az workload-orchestration",
"AzureServiceName": "Workload Orchestration Manager",
"URL": "https://learn.microsoft.com/en-us/azure/azure-arc/workload-orchestration"
}
]
8 changes: 8 additions & 0 deletions src/workload-orchestration/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

1.0.0b1
++++++
* Initial release.
163 changes: 163 additions & 0 deletions src/workload-orchestration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# Workload Orchestration

This guide will help you get started with Workload Orchestration for authoring, deploying, and monitoring application configurations using the converged object model.

Key features of the public preview release include end-to-end flows for application dependencies, along with an enhanced UI experience offering additional capabilities like Compare, Copy, Delete, Uninstall, and more.

---

## User Personas

- **IT Persona**
- *IT Admin*: Responsible for initial setup via CLI.
- *IT Developer/DevOps*: Manages applications and configurations using CLI.
- **OT Persona**
- No-code users, using the portal for day-to-day activities.

| Profile | How to use Workload Orchestration |
|-----------------|-----------------------------------|
| IT Admin/DevOps | Use CLI as described below |
| OT personas | Use [the portal](https://int.test.digitaloperations.configmanager.azure.com/#/browse/overview) |

---

## Workload Orchestration CLI Steps

### 1. Install Extension & Login

```sh
az extension add --source <path-to-extension-file-workload-orchestration.whl>
az login
```

---

### 2. Create/Update Context

```sh
az workload-orchestration context create \
--subscription <subscription-id> \
--resource-group <resource-group> \
--location <location> \
--name <context-name> \
--capabilities "@context-capabilities.json" \
--hierarchies [0].name=country [0].description=Country [1].name=region [1].description=Region [2].name=factory [2].description=Factory [3].name=line [3].description=Line
```

---

### 3. Create Site Reference

```sh
az workload-orchestration context.site-reference create \
--subscription <subscription-id> \
--resource-group <resource-group> \
--context-name <context-name> \
--name <site-reference-name> \
--site-id "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Edge/sites/<site-name>"
```

---

### 4. Create Target

```sh
az workload-orchestration target create \
--resource-group <resource-group> \
--location <location> \
--name <target-name> \
--display-name <display-name> \
--hierarchy-level line \
--capabilities <capability> \
--description "<description>" \
--solution-scope "new" \
--target-specification '@targetspecs.json' \
--extended-location '@custom-location.json'
```

---

### 5. Create Schema

```sh
az workload-orchestration schema create \
--resource-group <resource-group> \
--version "1.0.0" \
--schema-name <schema-name> \
--schema-file ./shared-schema.yaml \
--location <location>
```

Or, if version is in the file, omit `--version`.

---

### 6. Create Solution Template and Version

```sh
az workload-orchestration solution-template create \
--solution-template-name <solution-template-name> \
-g <resource-group> \
-l <location> \
--capabilities <capability> \
--description "<description>" \
--configuration-template-file ./hotmelt-config-template.yaml \
--specification "@specs.json" \
--version "1.0.0"
```

```sh
az workload-orchestration solution-template-version create \
--template-name <solution-template-name> \
--version 1.0.0 \
--file solution-template-version.yaml
```

---

### 7. Set Configuration Values

```sh
az workload-orchestration configuration set \
-g <resource-group> \
--solution-template-name <solution-template-name> \
--target-name <target-name>
```

---

### 8. Resolve and Review

```sh
az workload-orchestration target review \
--solution-template-name <solution-template-name> \
--solution-template-version 1.0.0 \
--resource-group <resource-group> \
--target-name <target-name>
```
*Review the output for `reviewId` and new solution version.*

---

### 9. Publish and Install

**Publish:**
```sh
az workload-orchestration target publish \
--solution-name <solution-template-name> \
--solution-version <new-version> \
--review-id <review-id> \
--resource-group <resource-group> \
--target-name <target-name>
```

**Install:**
```sh
az workload-orchestration target install \
--solution-name <solution-template-name> \
--solution-version <new-version> \
--resource-group <resource-group> \
--target-name <target-name>
```

---
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from azext_workload_orchestration._help import helps # pylint: disable=unused-import


class WorkloadOperationsCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
custom_command_type = CliCommandType(
operations_tmpl='azext_workload_orchestration.custom#{}')
super().__init__(cli_ctx=cli_ctx,
custom_command_type=custom_command_type)

def load_command_table(self, args):
from azext_workload_orchestration.commands import load_command_table
from azure.cli.core.aaz import load_aaz_command_table
try:
from . import aaz
except ImportError:
aaz = None
if aaz:
load_aaz_command_table(
loader=self,
aaz_pkg_name=aaz.__name__,
args=args
)
load_command_table(self, args)
return self.command_table

def load_arguments(self, command):
from azext_workload_orchestration._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = WorkloadOperationsCommandsLoader
11 changes: 11 additions & 0 deletions src/workload-orchestration/azext_workload_orchestration/_help.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: disable=line-too-long
# pylint: disable=too-many-lines

from knack.help_files import helps # pylint: disable=unused-import
13 changes: 13 additions & 0 deletions src/workload-orchestration/azext_workload_orchestration/_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: disable=too-many-lines
# pylint: disable=too-many-statements


def load_arguments(self, _): # pylint: disable=unused-argument
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"workload-orchestration",
)
class __CMDGroup(AAZCommandGroup):
"""Manage workload orchestration resources
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"workload-orchestration config-template",
)
class __CMDGroup(AAZCommandGroup):
"""workload-orchestration config-template helps to manage Config Templates
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._create import *
from ._delete import *
from ._list import *
from ._remove_version import *
from ._show import *
from ._wait import *
Loading
Loading