Skip to content
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

Action for Deploying to Azure VM #143

Open
bennettnw2 opened this issue May 3, 2023 · 4 comments
Open

Action for Deploying to Azure VM #143

bennettnw2 opened this issue May 3, 2023 · 4 comments

Comments

@bennettnw2
Copy link

I've been looking for information on how to deploy dockerized applications to an Azure VM. My search has led me to here what seems to be a dead-end. #32

Since I don't see an action for deploying to Azure virtual machines, I assume there is no action to deploy to Azure VMs. Is my assumption accurate? If so, and if there are no plans to support deploying an image or application to a virtual machine, feel free to close this issue.

@mukeshsalaria01
Copy link

@bennettnw2 Any news on this? I'm looking for the same. Wants to deploy .net core 7.0 application to Azure VM using github actions.

@TheProdigyLeague
Copy link

doc

Looked at #32
User @raiyanalam seems to have answered it with a link to repo.
dockerized apps deployed to vm
I also found this...

name: create_custom_vm_image
on: [push]

jobs:
  BUILD-CUSTOM-IMAGE:
    runs-on: windows-latest    
    steps:
    - name: Checkout
      uses: actions/checkout@v2    
$Azure(cTM)/usr/login/cred.yml
    
    - name: Login via Az module
        uses: azure/login@v1
        with:
          creds: ${{secrets.AZURE_CREDENTIALS}}

$Azure(cTM)/usr/login/cred/createIMG.sh

    - name: CREATE APP BAKED VM IMAGE
      id: imageBuilder
      uses: azure/build-vm-image@v0
      with:
        location: 'eastus'
        resource-group-name: 'raivmdemo-rg'
        managed-identity: 'rai-identity2' # Managed identity as mentioned in pre-requisites.

        source-os-type: 'windows'
        source-image-type: 'platformImage'
        source-image: MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest #unique  identitifier of source image

        customizer-source: '${{ GITHUB.WORKSPACE }}\webApp'  # This folder gets injected to the image at directory location C:\
        customizer-script: |
          & 'c:\webApp\webconfig.ps1'

        dist-type: 'SharedImageGallery'
        dist-resource-id: '/subscriptions/${{ secrets.SUBSCRIPTION_ID }}resourceGroups/raivmdemo-rg/providers/Microsoft.Compute/galleries/appImageGallery/images/AppBakedVMs/versions/0.1.${{ GITHUB.RUN_ID }}' #Replace with the resource id of your shared image  gallery's image definition
        dist-location: 'eastus'

$Azure(cTM)/usr/login/cred/createVM.sh

    - name: CREATE VM
      uses: azure/CLI@v1
      with:
        azcliversion: 2.0.72
        inlineScript: |
          az vm create --resource-group raivmdemo-rg  --name "app-vm-${{ GITHUB.RUN_NUMBER }}"  --admin-username moala --admin-password "${{ secrets.VM_PWD }}" --location  eastus \
          --image "${{ steps.imageBuilder.outputs.custom-image-uri }}"              

$Azure(cTM)/usr/login/cred/createVM.sh
$Azure(cTM)/usr/login/cred/_node.js
$Azure(cTM)/usr/login/cred/AzureApp/Gallrey/BakedVM/node.js/

builder failed to delete resources
`FROM node:8
LABEL maintainer="Azure App Services Container Images [email protected]"

Create app directory

WORKDIR /app

Bundle app source

COPY . .

EXPOSE 8080 80
CMD [ "npm", "start" ]`
Basically, Devs posted this in response:
token

@GeethaK18
Copy link

Is there are any actions with which I can directly deploy the my published dotnet code to Azure VM (IIS) ?

@TheProdigyLeague
Copy link

TheProdigyLeague commented Mar 19, 2024

Is there are any actions with which I can directly deploy the my published dotnet code to Azure VM (IIS) ?

Responses to what you are attempting to achieve have been inconsistent.
But since then, no one else has commented or responded...
The quick response is in the affirmative.
Will the api most likely contain errors? Indeed.
How are the developers going to address these errors? No. Basically, if you're authorized to do that, ask the Azure development team for approval.

actions: deploy publisher: GeethaK18 nodejs: GeethaK18.net server: Azure(cTM)
Go through the basic development to deployment actions.
[object Window] ▶ Main_menu | VM152 | ⮕ forms "ReferenceError 'require' not defined" [object Window] ▶ Main_menu | VM294 | ⮕ forms "ReferenceError 'require' not defined" ▶ Main_menu | VM609 | ⮕ forms ▶ Unexpected string @<anonymous>:1:14 ['VM4588']:1 <VisualStudio>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants