This video demonstrates how to automate the deployment of Azure Synapse Analytics workspace artifacts (data plane) to a different environment (e.g., UAT) using GitHub Actions, triggered by changes in the workspace's publish branch.
Mind Map
Click to expand
Click to explore the full interactive mind map • Zoom, pan, and navigate
cicd fans my name is Roy cunha and I'm a
support escalation engineer on the Azure
synapse analytics team the
welcome to this video series on synapse
CI CD
in today's video I will be demonstrating
how you can deploy your workspace
artifacts to a different environment
this time our workspace will be
integrated with the GitHub repository
we will be covering data plane related
operations only
so any control plane related resource
like a SQL tool or a spark pool will be
out of scope
our use case today is very simple
we are working on a multiple environment
scenario and we have finished the
development in our lower environment and
we want our features to be tested in a
different environment in uad for example
our workspace is integrated with the
GitHub repository and we are required to
set up a new CI CD workflow to deploy
these artifacts to this uat environment
let's watch the video and see how you
can achieve this
here's my GitHub repository and I will
show you how you can use the GitHub
action to deploy the synapse workspace
artifacts to a Target environment you
can think about the action as a Azure
devops task they run they are triggered
by release pipelines or yaml pipelines
and in this GitHub context these actions
they are triggered by workflows so you
need to set up a workflow first to run
these actions if you take a look at the
Microsoft public documentation you will
see a few input depths are required to
be created as repository secrets so this
is the first thing that we need to do is
to create these secrets I will also
create the secret for the subscription
ID and for the tenant ID not to expose
this values here in the in the task so
let's start by creating the service
principle that will run this GitHub
action and this workflow so I will go to
my active directory and I will create a
I will register this application I will
copy this client ID
I have to create this client Secret
you must generate here under the
certificates and secrets and new client
secret for your app
get up secrets
I will have this secret and now what you
need to do is to copy this value so I have
have
now my secret value my application ID
I'm pasting here on a notepad to keep
these values and once you create this
app registration what we are going to do
in the repository I'm going to settings
secrets and variables and create my
action Secrets the first secret to
create will be my client ID that is my
application ID
paste it here next will be my client
secret that's my secret value I will add
it here as well foreign
foreign ID
and my tenant ID
after creating your app registration
there's a few things that you need to do
at Azure rbac level you need to Grant
this service principle the contributor
role in your resource Group or your
workspace the second action that you
need to to take is to Grant this service
principle the synapse administrator are
back in synapse studio so let's start
with the first action go to my target workspace
workspace
and let me go to the access control
Grant the contributor role to this
so this is azure rbac now
second level of permissions uat
workspace Access Control
let me add the synapse administrator to
my git
service principle the synapse
administrator will be necessary in case
you wanted to deploy the managed private
endpoints as well if not the synapse
artifact publisher our back is
sufficient and once these steps are
completed let me set up my workflow my
goal is to run this workflow whenever
the arm templates are generated into the
workspace publish Branch when I create
my GitHub action here
I will start by setting up a workflow
and if you see this workflow is being
created in the main branch I have
already here ready my yaml code prepared
and I want this workflow to be triggered
Whenever there is a push on my workspace publish
publish
so I will name this as my workspace apply
apply
I will commit this
look at the path here Dot gitup and then
workflows now what I'm going to do is to
switch to my
publish branch that I don't have yet here
here
because I need to create this Branch by
publishing my changes and Publishing
just this SQL script to generate the arm
templates and create the workspace
publish Branch so I'm expecting this
Branch now to appear here if we click
here you will see the workspace publish
now and under this folder my workspace
name I will have the two arm templates
the template for workspace Json and the
template parameters for workspace.js
what I want to do is to set up my
workflow here and I'm going to add a file
file
and this file will be created under the
dot GitHub
slash Works workflow sorry
workflows and then workspace deployment yaml
commit this change if you go now to actions
actions
you will see this workflow
that is running now in the workspace
publish Branch now if you click on the
workflow run
so the workspace deployment task is running
running
and it's deploying the artifacts here it
and the workspace deployment task is
finished I can go now to my uat environment
environment
and here it is my SQL script that's been
deployed if I go here to my Dev
environment and just for the second time
I will commit directly here in my main
branch just to create a second SQL script
script
commit my changes and publish these
changes as this will generate my new arm templates
templates
and when this arm templates are
generated to the workspace publish
Branch put it here under the summary
and go back to the workflow Branch here
it is my second run that was triggered
by the generation of the arm templates
into the workspace publish branch this
was my commit here is the second job run
deploying my artifacts to the Target
workspace so now this workflow is
running Whenever there is a push on the
workspace publish so I I know that this
push will occur when the arm templates
are generated when I hit that publish
button to generate the arm templates
into that publish branch
now that the synapse workspace
deployment is finished and our job is
complete I'm going to my uet environment
just refreshing Studio here and here it
is my C my second SQL script and using
GitHub actions and and workflows will
allow you in GitHub will allow you to
use the workspace deployment task to
deploy your changes from a lower
environment to a Target environment let
us know your thoughts and share your
ideas tips and tricks in the comments
below and don't forget to like comment
and subscribe our Channel
thanks for watching and I'll catch you
Click on any text or timestamp to jump to that moment in the video
Share:
Most transcripts ready in under 5 seconds
One-Click Copy125+ LanguagesSearch ContentJump to Timestamps
Paste YouTube URL
Enter any YouTube video link to get the full transcript
Transcript Extraction Form
Most transcripts ready in under 5 seconds
Get Our Chrome Extension
Get transcripts instantly without leaving YouTube. Install our Chrome extension for one-click access to any video's transcript directly on the watch page.