Muokkaa

Jaa


Configure deployment sources for App Services on Azure Stack Hub

App Service on Azure Stack Hub supports on-demand deployment from multiple source control providers. This feature lets app developers deploy directly from their source control repositories. If users want to configure App Service to connect to their repositories, a cloud operator must first configure the integration between App Service on Azure Stack Hub and the source control provider.

In addition to local Git, the following source control providers are supported:

  • GitHub
  • BitBucket
  • OneDrive
  • DropBox

View deployment sources in App Service administration

  1. Sign in to the Azure Stack Hub administrator portal as the service admin.

  2. Browse to All Services and select the App Service.

    App Service resource provider admin

  3. Select Source control configuration. You can see the list of all configured deployment sources.

    App Service resource provider admin source control configuration

Configure GitHub

You must have a GitHub account to complete this task. You might want to use an account for your organization rather than a personal account.

  1. Sign in to GitHub, go to https://www.github.com/settings/developers, and then select Register a new application.

    GitHub - Register a new application

  2. Enter an Application name. For example, App Service on Azure Stack Hub.

  3. Enter the Homepage URL. The Homepage URL must be the Azure Stack Hub portal address. For example, https://portal.<region>.<FQDN>. For more information on the Azure Stack Hub fully qualified domain name (FQDN), see Azure Stack Hub DNS namespace.

  4. Enter an Application Description.

  5. Enter the Authorization callback URL. In a default Azure Stack Hub deployment, the URL is in the form https://portal.<region>.<FQDN>/TokenAuthorize.

  6. Select Register application. A page is displayed listing the Client ID and Client Secret for the app.

    GitHub - Completed application registration

  7. In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.

  8. Go to Resource Providers and select the App Service Resource Provider Admin.

  9. Select Source control configuration.

  10. Copy and paste the Client ID and Client Secret into the corresponding input boxes for GitHub.

  11. Select Save.

Configure BitBucket

You must have a BitBucket account to complete this task. You might want to use an account for your organization rather than a personal account.

  1. Sign in to BitBucket and go to Integrations under your account.

    BitBucket Dashboard - Integrations

  2. Select OAuth under Access Management and Add consumer.

    BitBucket Add OAuth Consumer

  3. Enter a Name for the consumer. For example, App Service on Azure Stack Hub.

  4. Enter a Description for the app.

  5. Enter the Callback URL. In a default Azure Stack Hub deployment, the callback URL is in the form https://portal.<region>.<FQDN>/TokenAuthorize. For BitBucket integration to succeed, the URL must follow the capitalization listed here.

  6. Enter the URL. This URL should be the Azure Stack Hub portal URL. For example, https://portal.<region>.<FQDN>.

  7. Select the Permissions required:

    • Repositories: Read
    • Webhooks: Read and write
  8. Select Save. You now see this new app, along with the Key and Secret, under OAuth consumers.

    BitBucket Application Listing

  9. In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.

  10. Go to Resource Providers and select the App Service Resource Provider Admin.

  11. Select Source control configuration.

  12. Copy and paste the Key into the Client ID input box and Secret into the Client Secret input box for BitBucket.

  13. Select Save.

Configure OneDrive

You must have a Microsoft account linked to a OneDrive account to complete this task. You might want to use an account for your organization rather than a personal account.

Note

OneDrive for business accounts are currently not supported.

  1. Go to https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade and sign in using your Microsoft account.

  2. Under App registrations, select New registration.

  3. Enter a Name for the new app registration: for example, enter App Service on Azure Stack Hub.

  4. Under Supported account types, select Personal Microsoft accounts only.

  5. Enter the Redirect URI. Choose platform - Web and in a default Azure Stack Hub deployment, the redirect URI is in the form - https://portal.<region>.<FQDN>/TokenAuthorize.

  6. Select Register.

  7. The next screen lists the properties of your new app. Save the Application (client) ID to a temporary location.

  8. Under Certificates & secrets, choose Client Secrets and select New client secret. Provide a description and choose the expiration length for the new secret and select Add.

  9. Make a note of the value of the new secret.

  10. Under API Permissions, select Add a permission.

  11. Add the Microsoft Graph Permissions - Delegated Permissions.

    • Files.ReadWrite.AppFolder
    • User. Read
  12. In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.

  13. Go to Resource Providers and select the App Service Resource Provider Admin.

  14. Select Source control configuration.

  15. Copy and paste the Application (client) ID into the Client ID input box and Secret into the Client Secret input box for OneDrive.

  16. Select Save.

Configure DropBox

Note

You must have a DropBox account to complete this task. You might want to use an account for your organization rather than a personal account.

  1. Go to https://www.dropbox.com/developers/apps and sign in using your DropBox account credentials.

  2. Select Create app.

    Dropbox apps

  3. Select DropBox API.

  4. Set the access level to App Folder.

  5. Enter a Name for your app.

    Dropbox application registration

  6. Select Create App. You're presented with a page listing the settings for the app, including App key and App secret.

  7. Make sure that the App folder name is set to App Service on Azure Stack Hub.

  8. Set the OAuth 2 Redirect URI and then select Add. In a default Azure Stack Hub deployment, the redirect URI is in the form https://portal.<region>.<FQDN>/TokenAuthorize.

    Dropbox application configuration

  9. In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.

  10. Go to Resource Providers and select the App Service Resource Provider Admin.

  11. Select Source control configuration.

  12. Copy and paste the Application Key into the Client ID input box and App secret into the Client Secret input box for DropBox.

  13. Select Save.

Important

If you are reconfiguring existing applications after upgrading to Azure App Service on Azure Stack Hub 2022 H1 you must revoke all tokens and your end users will need to reauthorize with the providers on their applications to enable synchronisation from source control providers

Configure GitHub

You must have a GitHub account to complete this task. You might want to use an account for your organization rather than a personal account.

  1. Sign in to GitHub, go to https://www.github.com/settings/developers, and then select Register a new application.

    GitHub - Register a new application

  2. Enter an Application name. For example, App Service on Azure Stack Hub.

  3. Enter the Homepage URL. The Homepage URL must be the Azure Stack Hub portal address. For example, https://portal.<region>.<FQDN>. For more information on the Azure Stack Hub fully qualified domain name (FQDN), see Azure Stack Hub DNS namespace.

  4. Enter an Application Description.

  5. Enter the Authorization callback URL. In a default Azure Stack Hub deployment, the URL is in the form https://api.appservice.<region>.<FQDN>:44300/auth/github/callback.

  6. Select Register application. A page is displayed listing the Client ID and Client Secret for the app.

    GitHub - Completed application registration

  7. In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.

  8. Go to Resource Providers and select the App Service Resource Provider Admin.

  9. Select Source control configuration.

  10. Copy and paste the Client ID and Client Secret into the corresponding input boxes for GitHub.

  11. Select Save.

Configure BitBucket

You must have a BitBucket account to complete this task. You might want to use an account for your organization rather than a personal account.

  1. Sign in to BitBucket and go to Integrations under your account.

    BitBucket Dashboard - Integrations

  2. Select OAuth under Access Management and Add consumer.

    BitBucket Add OAuth Consumer

  3. Enter a Name for the consumer. For example, App Service on Azure Stack Hub.

  4. Enter a Description for the app.

  5. Enter the Callback URL. In a default Azure Stack Hub deployment, the callback URL is in the form https://api.appservice.<region>.<FQDN>:44300/auth/bitbucket/callback. For BitBucket integration to succeed, the URL must follow the capitalization listed here.

  6. Enter the URL. This URL should be the Azure Stack Hub portal URL. For example, https://portal.<region>.<FQDN>.

  7. Select the Permissions required:

    • Repositories: Read
    • Webhooks: Read and write
  8. Select Save. You now see this new app, along with the Key and Secret, under OAuth consumers.

    BitBucket Application Listing

  9. In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.

  10. Go to Resource Providers and select the App Service Resource Provider Admin.

  11. Select Source control configuration.

  12. Copy and paste the Key into the Client ID input box and Secret into the Client Secret input box for BitBucket.

  13. Select Save.

Configure OneDrive

You must have a Microsoft account linked to a OneDrive account to complete this task. You might want to use an account for your organization rather than a personal account.

Note

OneDrive for business accounts are currently not supported.

  1. Go to https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade and sign in using your Microsoft account.

  2. Under App registrations, select New registration.

  3. Enter a Name for the new app registration: for example, enter App Service on Azure Stack Hub.

  4. Under Supported account types, select Personal Microsoft accounts only

  5. Enter the Redirect URI. Choose platform - Web and in a default Azure Stack Hub deployment, the redirect URI is in the form - https://api.appservice.<region>.<FQDN>:44300/auth/onedrive/callback.

  6. Select Register

  7. The next screen lists the properties of your new app. Save the Application (client) ID to a temporary location.

  8. Under Certificates & secrets, choose Client Secrets and select New client secret. Provide a description and choose the expiration length for the new secret and select Add.

  9. Make a note of the value of the new secret.

  10. Under API Permissions, select Add a permission

  11. Add the Microsoft Graph Permissions - Delegated Permissions.

    • Files.ReadWrite.AppFolder
    • User. Read
  12. In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.

  13. Go to Resource Providers and select the App Service Resource Provider Admin.

  14. Select Source control configuration.

  15. Copy and paste the Application (client) ID into the Client ID input box and Secret into the Client Secret input box for OneDrive.

  16. Select Save.

Configure DropBox

Note

You must have a DropBox account to complete this task. You might want to use an account for your organization rather than a personal account.

  1. Go to https://www.dropbox.com/developers/apps and sign in using your DropBox account credentials.

  2. Select Create app.

    Dropbox apps

  3. Select DropBox API.

  4. Set the access level to App Folder.

  5. Enter a Name for your app.

    Dropbox application registration

  6. Select Create App. You're presented with a page listing the settings for the app, including App key and App secret.

  7. Make sure that the App folder name is set to App Service on Azure Stack Hub.

  8. Set the OAuth 2 Redirect URI and then select Add. In a default Azure Stack Hub deployment, the redirect URI is in the form https://api.appservice.<region>.<FQDN>:44300/auth/dropbox/callback.

    Dropbox application configuration

  9. In a new browser tab or window, sign in to the Azure Stack Hub administrator portal as the service admin.

  10. Go to Resource Providers and select the App Service Resource Provider Admin.

  11. Select Source control configuration.

  12. Copy and paste the Application Key into the Client ID input box and App secret into the Client Secret input box for DropBox.

  13. Select Save.

Next steps

Users can now use the deployment sources for things like continuous deployment, local Git deployment, and cloud folder synchronization.