<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Databricks asset bundles deployment to development in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-deployment-to-development/m-p/48762#M28373</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am using Databricks Asset Bundles to deploy my code on github to databricks workspace. I have written out the Github Action as provided on &lt;A href="https://docs.gcp.databricks.com/dev-tools/bundles/ci-cd.html" target="_self"&gt;databricks documentation.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have setup the personal access token for the service principal I want to use to deploy with a Github Action.&lt;/P&gt;&lt;P&gt;I have can_user &amp;amp; can_manage permisions on this service principal.&lt;/P&gt;&lt;P&gt;I generated a personal access token for a service principal following the steps from &lt;A href="https://docs.gcp.databricks.com/dev-tools/service-principals.html" target="_blank" rel="noopener"&gt;https://docs.gcp.databricks.com/dev-tools/service-principals.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Following which I have setup the Github Action following &lt;A href="https://docs.gcp.databricks.com/dev-tools/bundles/ci-cd.html" target="_blank" rel="noopener"&gt;https://docs.gcp.databricks.com/dev-tools/bundles/ci-cd.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have the SP_TOKEN setup on the github secrets for the respective environments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I deploy from my local using my user personal access token, I can see the development mode deployment working very well.&lt;/P&gt;&lt;P&gt;However, on using my user personal token or the personal token of service principal from Github Actions, I get following error:&lt;/P&gt;&lt;PRE&gt;Error: default auth: cannot configure default credentials. Config: host=&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following is the Github Actions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# This workflow validates, deploys, and runs the specified bundle
# within a pre-production target named "qal".
name: "DAB - Non Production deployment"

# Ensure that only a single job or workflow using the same concurrency group
# runs at a time.
concurrency: "1"

## Trigger this workflow whenever a pull request is opened against the repo's
## main branch or an existing pull request's head branch is updated.
on:
  workflow_dispatch:
    inputs:
      Environment:
        type: choice
        description: 'Choose the environment:'
        required: true
        options:
          - dev
          - qal


jobs:
  deploy:
    name: "Deploy bundle"
    runs-on: ubuntu-latest

    steps:
      # Check out this repo, so that this workflow can access it.
      - uses: actions/checkout@v3

      # Download the Databricks CLI.
      # See https://github.com/databricks/setup-cli
      - uses: databricks/setup-cli@main


      # Validate the bundle to the selected target as defined
      # in the bundle's settings file.
      - run: databricks bundle validate
        working-directory: .
        env:
          DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
          DATABRICKS_BUNDLE_ENV: ${{github.event.inputs.Environment}}


      # Deploy the bundle to the selected target as defined
      # in the bundle's settings file.
      - run: databricks bundle deploy
        working-directory: .
        env:
          DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
          DATABRICKS_BUNDLE_ENV: ${{github.event.inputs.Environment}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone who have setup the Github Actions with DAB help me out&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Oct 2023 12:28:00 GMT</pubDate>
    <dc:creator>naga_databricks</dc:creator>
    <dc:date>2023-10-09T12:28:00Z</dc:date>
    <item>
      <title>Databricks asset bundles deployment to development</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-deployment-to-development/m-p/48762#M28373</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am using Databricks Asset Bundles to deploy my code on github to databricks workspace. I have written out the Github Action as provided on &lt;A href="https://docs.gcp.databricks.com/dev-tools/bundles/ci-cd.html" target="_self"&gt;databricks documentation.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have setup the personal access token for the service principal I want to use to deploy with a Github Action.&lt;/P&gt;&lt;P&gt;I have can_user &amp;amp; can_manage permisions on this service principal.&lt;/P&gt;&lt;P&gt;I generated a personal access token for a service principal following the steps from &lt;A href="https://docs.gcp.databricks.com/dev-tools/service-principals.html" target="_blank" rel="noopener"&gt;https://docs.gcp.databricks.com/dev-tools/service-principals.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Following which I have setup the Github Action following &lt;A href="https://docs.gcp.databricks.com/dev-tools/bundles/ci-cd.html" target="_blank" rel="noopener"&gt;https://docs.gcp.databricks.com/dev-tools/bundles/ci-cd.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have the SP_TOKEN setup on the github secrets for the respective environments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I deploy from my local using my user personal access token, I can see the development mode deployment working very well.&lt;/P&gt;&lt;P&gt;However, on using my user personal token or the personal token of service principal from Github Actions, I get following error:&lt;/P&gt;&lt;PRE&gt;Error: default auth: cannot configure default credentials. Config: host=&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following is the Github Actions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# This workflow validates, deploys, and runs the specified bundle
# within a pre-production target named "qal".
name: "DAB - Non Production deployment"

# Ensure that only a single job or workflow using the same concurrency group
# runs at a time.
concurrency: "1"

## Trigger this workflow whenever a pull request is opened against the repo's
## main branch or an existing pull request's head branch is updated.
on:
  workflow_dispatch:
    inputs:
      Environment:
        type: choice
        description: 'Choose the environment:'
        required: true
        options:
          - dev
          - qal


jobs:
  deploy:
    name: "Deploy bundle"
    runs-on: ubuntu-latest

    steps:
      # Check out this repo, so that this workflow can access it.
      - uses: actions/checkout@v3

      # Download the Databricks CLI.
      # See https://github.com/databricks/setup-cli
      - uses: databricks/setup-cli@main


      # Validate the bundle to the selected target as defined
      # in the bundle's settings file.
      - run: databricks bundle validate
        working-directory: .
        env:
          DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
          DATABRICKS_BUNDLE_ENV: ${{github.event.inputs.Environment}}


      # Deploy the bundle to the selected target as defined
      # in the bundle's settings file.
      - run: databricks bundle deploy
        working-directory: .
        env:
          DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
          DATABRICKS_BUNDLE_ENV: ${{github.event.inputs.Environment}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone who have setup the Github Actions with DAB help me out&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 12:28:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-deployment-to-development/m-p/48762#M28373</guid>
      <dc:creator>naga_databricks</dc:creator>
      <dc:date>2023-10-09T12:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks asset bundles deployment to development</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-deployment-to-development/m-p/48836#M28396</link>
      <description>&lt;P&gt;Finally, i was able to identify the missing piece. This was setting up the environment identifier for the runner.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    name: "Deploy bundle"
    runs-on: ubuntu-latest
    environment: ${{github.event.inputs.Environment}}&lt;/LI-CODE&gt;&lt;P&gt;With this, the action was able to get the secrets from the github environment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The host property for DATABRICKS_HOST is provided via the bundles configurations, it doesnt need to be provided again on the Github action.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 10:01:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundles-deployment-to-development/m-p/48836#M28396</guid>
      <dc:creator>naga_databricks</dc:creator>
      <dc:date>2023-10-10T10:01:17Z</dc:date>
    </item>
  </channel>
</rss>

