To gain a better understanding of deployment processes, I'm revisiting the procedures from yesterday. My goal is to redeploy a web application on Azure, and today, I've chosen to exclusively utilize the command-line interface (CLI).
To achieve this, I installed the Azure CLI. Since I'm using Windows, the process was straightforward due to the MSI file. Subsequently, I logged into Azure:
az login
This command opens a browser-based login page. After logging in, my data is presented in the console in JSON format.
Following that, I navigated to my project folder and published my web application:
az webapp up --sku F1 --name <app-name> --os-type <os>
This is akin to the "Publish" button in Visual Studio. Initially, I forgot the "up" command, but afterward, everything went smoothly. The value for "--name" must be unique, as it represents a domain in azurewebsites.net. "F1" denotes the free pricing tier, and "--os-type" should be either "linux" or "windows."
It took a while, but eventually, the following message appeared:
The application can be accessed at http://azuretestapp310823.azurewebsites.net.
The new app can now be inspected in the Azure Portal.
My next step was to introduce changes. I modified the app's code and entered the following command:
az webapp up
This also went well. All the changes were adopted. Thus, I concluded that performing deployment through the CLI isn't all that complex.
[Tutorial]
Top comments (0)