Introduction.
Azure Developer CLI is a command line tool used by Clyde app developers.
As of 2022/07/13, it is a public preview and may be subject to specification changes. Please be aware of this.
azd is a command that allows you to work consistently between templates, DevOps workflows, and IDEs.
This is the recommended workflow for the Azure Developer CLI.
- Template Selection
- Get and deploy workflow
- Change code, commit, and automatically deploy to running apps
I have been manually setting up github and pipelines and such, but is this something that can be automated? I would like to try it out.
Try it out
The first task is to deploy the AzureDeveloper CLI template.
The template contains the app code, tools, and infrastructure code.
A CI/CD pipeline can also be configured.
Supported languages include Node.js, Python, and C#. If you check each template, you will see that several combinations are available. You can also customize these yourself.
Azure static web apps are also supported, and AKS will be supported in the future.
Java will also be supported as a language in the future.
Installation of Azure Developer CLI
We would like to install using WSL.
Pre-install the following software
- git
It doesn’t matter because git is originally installed in wsl.
- Azure Developer CLI(azd)
curl -fsSL https://aka.ms/install-azd.sh | sudo bash
In the meantime, run it with sudo.
azd-linux-amd64
install-azd: Successfully installed to /usr/local/bin/azd
Check the version.
azd version
azd version 0.1.0-beta.1 (commit 62c419b34f824a8c464e55f320f3dc8c2c153702)
- NPM+Node.js (v 16.13.1 LTS) At least the latest version should be fine.
Template Execution
Create an appropriate folder and run azd up.
Login in advance with az login.
azd up --template todo-nodejs-mongo
It is executed interactively.
Initializing a new project in /home/kudo/azd
? Please enter a new environment name: demoazd
? Please select an Azure location to use: [Use arrows to move, type to filter]
6. (Asia Pacific) Australia Southeast (australiasoutheast)
7. (Asia Pacific) Central India (centralindia)
8. (Asia Pacific) East Asia (eastasia)
> 9. (Asia Pacific) Japan East (japaneast)
10. (Asia Pacific) Japan West (japanwest)
11. (Asia Pacific) Jio India Central (jioindiacentral)
12. (Asia Pacific) Jio India West (jioindiawest)
? Please select an Azure Subscription to use: [Use arrows to move, type to filter]
> 1. MVP (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx)
Other (enter manually)
Provisioning Azure resources can take some time.
You can view detailed progress in the Azure Portal:
https://portal.azure.com/#blade/HubsExtension/DeploymentDetailsBlade/overview/id/%2Fsubscriptions%2Fxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fdemoazd
Deployment progress is displayed.
Created Azure resources
Deploying service api
Deployed service api
- Endpoint: https://app-api-uyorepwnbv752.azurewebsites.net/
Deploying service web
Deployed service web
- Endpoint: https://app-web-uyorepwnbv752.azurewebsites.net/
View the resources created under the resource group demoazd-rg in Azure Portal:
When deployment is complete, the resource is created as shown below.
confirmation
Access the service web.
A dashboard is also created. This is very convenient.
summary
A new tool called Azure Developer CLI is now available. It is a useful tool for developers, and I think it will be used in a variety of ways.
I will play with it some more.
Original Japanese Post
https://level69.net/archives/31081
Azure Developer CLI is a command line tool used by Clyde app developers.
As of 2022/07/13, it is a public preview and may be subject to specification changes. Please be aware of this.
azd is a command that allows you to work consistently between templates, DevOps workflows, and IDEs.