Transcript:
0:00 hi everyone this is patrick from nord52
0:03 in this video i'm going to demonstrate
0:05 the steps needed to create migrate and
0:09 execute a data packager in North52
0:12 using azure devops
0:14 firstly we will need to create a data
0:16 package
0:18 here in my source environment i have
0:20 five contacts
0:21 five accounts and a configuration record
0:23 as well as two tasks
0:25 these are what i intend to move to my
0:28 destination system
0:32 i navigate to the North52 app
0:35 and then open data packages
0:38 and click new
0:45 i set the name of my data package in
0:47 this case it's going to be
0:49 data package demo
0:51 2
0:52 and now i click save
1:01 first i go to the explore tab
1:04 i select accounts from the drop down
1:06 and then i search for
1:08 a demo data package
1:10 i take the box and the records i want
1:12 and click the lightning bolt
1:15 as you can see
1:16 this adds the account sheet to the data
1:18 package and builds the records as rules
1:20 on that sheet
1:24 now i select contacts
1:26 again i search for demo data package and
1:29 click light and bolt the contact sheet
1:31 is added and the records are added to it
1:40 next i add my tasks
1:47 and finally i add my custom
1:48 configuration record
1:58 i want to make a change to the task
2:00 record
2:01 i want the due date to be the date these
2:03 records are imported into the target
2:05 environment
2:06 so i replaced the hard-coded dates with
2:09 a utc date function
2:11 and then i saved my data package
2:20 i changed the deployment solution to a
2:22 custom solution that i have created for
2:23 this data package and then export it
2:26 from dynamics like any other solution
2:34 here in azure devops you can see that
2:36 i've added the solution file to my repo
2:41 the next step involves creating a
2:42 service connection to allow my azure
2:45 devops pipeline to connect to my target
2:47 environment
2:49 to do this we will first need to install
2:51 the power platform build tools and the
2:54 North52 devops extension
2:57 we click on the button to open the
2:58 marketplace
2:59 and then search for power and select
3:01 power platform build tools and then
3:04 complete the installation steps
3:22 next we repeat the process for the north
3:24 52 devops extension
3:38 these extensions give us access to a
3:40 variety of pipeline tools and the
3:42 service connection that we will need to
3:44 use to authenticate our pipeline to the
3:46 destination dynamics environment
3:50 we create a service connection
3:52 and then select power platform from the
3:54 list and click next
3:56 for this service connection we will need
3:58 four pieces of information
4:00 the url of the destination dynamics
4:02 instance
4:04 the azure tenant id for that destination
4:06 dynamics instance exists
4:08 an application id and a secret for an
4:11 app registration that we will create out
4:13 an azure active directory
4:18 here in portal.azure.com i am signed in
4:22 as an administrator for the destination
4:24 environment
4:25 i open azure active directory and then
4:27 select app registrations from the list
4:34 we create a new app registration and
4:36 give it a name
4:38 in this case i'm going to call it azure
4:40 pipelines
4:43 we set the redirect to web
4:45 and the url to localhost
4:51 then we click register
4:57 from this screen we can retrieve the
4:59 application id
5:01 and the tenant id for our service
5:03 connection
5:13 next we create our secret key and copy
5:16 that over as well
5:18 please note that secret keys only show
5:20 up the first time they are created
5:22 if you need it again you will need to
5:24 create another secret
5:34 we go to api permissions
5:37 select dynamics crm
5:39 and then user admin access to grant that
5:41 permission to the app registration this
5:44 will allow the app registration to
5:45 access dynamics
5:52 finally we open up our manifest file and
5:55 change allow public client to be true
5:58 and click save
6:06 the last piece of data we need for the
6:08 service connection
6:10 is the url of the environment we are
6:11 using
6:20 we now have our service connection and
6:22 our app registration
6:23 the next step in the authentication
6:25 process is to create an application user
6:27 for our dynamics instance we do this
6:30 from admin.powerplatform.com
6:33 we navigate to our environment
6:35 select settings and then search for
6:38 application users
6:42 we select new app user
6:45 select our application registration
6:48 and then granted an appropriate security
6:50 rule
6:51 in this example i'm using the system
6:53 administrator security rule but you
6:55 could grant it any appropriate security
6:57 rule
6:58 make sure you have specified your
7:00 business unit and then click create
7:20 so now we have created an azure active
7:22 directory app registration that our
7:25 service connection can use
7:26 and we have created an application user
7:29 inside dynamics with a security role
7:31 that our app registration can use
7:34 next we will create an azure pipeline
7:37 that uses that service connection
7:40 we open pipelines and select create
7:43 pipeline
7:45 we will use the classic editor
7:47 and azure repos git since that's where
7:49 our solution is
7:51 and then we will start with an empty job
7:56 we name the pipeline
7:59 deploy and execute North52 data
8:02 packager
8:03 and we start adding tasks
8:07 the first task we will add is the power
8:09 platform tool installer then power
8:13 platform import solution
8:15 we select our data packager solution and
8:17 our service connection
8:19 we then add the power platform publish
8:21 customization task
8:23 again setting the service connection
8:35 the next step is to add an agentless job
8:38 this will allow us to set a delay time
8:40 on the pipeline to allow the North52
8:42 publish all customization system jobs
8:45 inside dynamics to complete
8:47 here i will set the delay to be 20
8:49 minutes and i set a dependency to be on
8:51 the first java
8:56 now i add another agent task
8:58 and to this i add my north52 execute
9:01 data package task
9:03 again i set the service connection and
9:05 specify the name of the data package i
9:07 want to execute
9:08 in this case i'm going to use data
9:10 package demo 2.
9:13 i then make sure to set a dependency for
9:14 this for the
9:16 completion of the agentless task
9:22 my pipeline is now ready to execute
9:25 so i queue it up and let it run
9:36 as you can see the pipeline has finished
9:38 executing
9:39 and when i open my target dynamics
9:41 environment
9:42 we can see the data packages here
9:45 and here you can see the account records
9:47 that have been created
9:49 the contacts
9:51 the configuration record
9:54 and the tasks
10:17 when i open this task you can see that
10:19 the due date has been set to today's
10:21 date as per the utc datetime function
10:24 in the data package
10:28 thank you for watching this video if you
10:30 have any questions please contact
10:32 support north52.com or visit
10:35 support.north52.com
10:38 please make sure to like this video and
10:40 subscribe to north52 for future content
10:42 thank you
