This repository provides an easy way to get started on publishing an offer to the Microsoft Commercial Marketplace.
Included in this repository are:
- Azure Application and Azure Virtual Machine offer type templates
- GitHub actions and starter workflows to help you get started with automation
- Scripts to help you run common tasks, such as creating a VM image
These templates are designed to be a starting point for your offer and are not intended to be a complete solution. You are free to modify the templates to meet your needs.
The easiest way to get started is to use the GitHub Template Repository feature to create a new repository from this template. You can also fork or clone this repository and modify the files to meet your needs.
The templates and scripts in this repository use the following tools:
Please refer to the setup scripts for your operating system for easy installation:
- Linux (Ubuntu/Debian)
- Linux (CentOS/RHEL)
- macOS - installs and uses Homebrew to install tools.
- Windows - installs and uses Chocolatey (default) to install tools. To install without Chocolatey, run
./windows.ps1 -useChocolatey $false
.
The scripts in this repository use the Partner Center API to create and manage offers. To use the scripts, you must first associate an Azure AD application with your Partner Center account. Follow the instructions in the Commercial Marketplace documentation to create an Azure AD application and associate it with your Partner Center account.
Use the following offer templates to build your own Commercial Marketplace offerings. Each offer template includes a README file that contains instructions on how to build the offer and modify it for your use case.
This offer template demonstrates how to build a solution template Azure Application offer. This offer deploys a Windows Server 2019 VM and runs a custom script extension that writes content to a file. The custom script extension runs a PowerShell script after the VM has been provisioned.
This offer template demonstrates how to create a Windows Server 2019 virtual machine image with Chocolatey and Microsoft Edge installed. The image can then be used to create an Azure Virtual Machine offer.
This offer template demonstrates how to build a solution template Azure Application offer that uses a VM image from a Virtual Machine offer.
GitHub actions and starter workflows are provided to automate the build, test and publish process for Commercial Marketplace offers.
Before using a workflow or action, create a new actions repository secret (AZURE_CREDENTIALS) with the following:
{
"clientId": "<Azure AD application client ID>",
"clientSecret": "<Azure AD application client secret>",
"subscriptionId": "<Azure subscription ID>",
"tenantId": "<Azure AD application tenant ID>",
"resourceManagerEndpointUrl": "https://management.azure.com/"
}
For more information on creating a GitHub actions repository secret, see Creating encrypted secrets for a repository.
To use an action, refer to it as follows in your workflow:
microsoft/commercial-marketplace-offer-solution/.github/actions/[ACTION DIRECTORY]
For example:
steps:
- name: Build and create/update offer
uses: microsoft/commercial-marketplace-offer-solution/.github/actions/commercial-marketplace
Refer to the GitHub documentation for more information on using starter workflows.
This repository is still under development. We are working to add more offer templates and scripts for testing and automation.
We have included an example template sync workflow. Create a new GitHub action by copying this file to .github/workflows/
. When triggered, this action will create a new Pull Request with the latest changes from the template repository. If the action initially fails, manual merging may be required for the first time.
When using the repository, we recommend that the original files included remain unchanged, and that new files are created or copied. This will help reduce the likelihood of future merge issues.
Contributions to this repository are welcome. Here's how you can contribute:
- Submit bugs and help us verify fixes.
- Submit feature requests and help us implement them.
- Submit pull requests for bug fixes and features.
Please refer to Contribution Guidelines for more details.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.