---Presenter: Christopher BlackSubject: Deployment GuideDetails: Follow along to learn how to deploy your code from a completed pull request to the client's QA (Quality Assurance) site.Duration: 00:18:15---00:00:05.510 --> 00:00:10.281 - So what we're going to be doing today is we're going to be 00:00:10.281 --> 00:00:12.116 - following the how to deployment 00:00:12.116 --> 00:00:17.890 - guide. So what I'll be doing today is deploying the latest 00:00:17.890 --> 00:00:22.590 - code from a developers completed pull request into the clients, 00:00:22.590 --> 00:00:29.170 - QA or quality assurance site. So this QA site is going to be used 00:00:29.170 --> 00:00:35.280 - for QA before we push the changes to the staging or a user 00:00:35.280 --> 00:00:36.690 - acceptance testing site. 00:00:37.880 --> 00:00:41.282 - And then later on push those changes to production. 00:00:42.670 --> 00:00:46.895 - These steps are not only for this QA site, but they can be 00:00:46.895 --> 00:00:50.470 - used for QA, you 80 or production. So the first thing 00:00:50.470 --> 00:00:54.695 - we're going to do is just roll over straight over to step one. 00:00:54.695 --> 00:00:58.270 - We're going to check Azure for any active pull requests that 00:00:58.270 --> 00:01:01.520 - may need to be included into deployment. There appears that 00:01:01.520 --> 00:01:04.770 - need to go in before deployment, paying the relevant teams 00:01:04.770 --> 00:01:08.670 - channel for the client and bring it to the attention of the 00:01:08.670 --> 00:01:12.570 - developers. So I've already gone ahead and done this in my teams 00:01:12.570 --> 00:01:15.836 - channel. But instead of letting them know. 00:01:17.350 --> 00:01:22.433 - That the there is any kind of extra pull requests. I just let 00:01:22.433 --> 00:01:26.734 - them know that I would be deploying to the QA environment 00:01:26.734 --> 00:01:31.817 - and the site would be down for a little while while we deployed. 00:01:31.817 --> 00:01:37.291 - So that is part of Step 2, but while we're in this room, let's 00:01:37.291 --> 00:01:42.765 - go ahead and check the repo in Azure. I can see that there's a 00:01:42.765 --> 00:01:46.675 - few branches for this particular client under support clients ATI 00:01:46.675 --> 00:01:48.630 - we have PRD for production. 00:01:48.860 --> 00:01:52.490 - QA for quality assurance and then stage, which is also 00:01:52.490 --> 00:01:56.846 - synonymous with you. 80 or user acceptance testing so we can see 00:01:56.846 --> 00:02:01.565 - the PR's here under this tab and see what's active. We know that 00:02:01.565 --> 00:02:05.558 - there are no active pull requests at this time for this 00:02:05.558 --> 00:02:09.914 - website, so we're going to move on to the next step here. 00:02:10.700 --> 00:02:15.562 - So this is generally what it would look like if there was an 00:02:15.562 --> 00:02:19.302 - active pull request under the active tab for that particular 00:02:19.302 --> 00:02:24.164 - client. So what we're going to be doing is turning off all the 00:02:24.164 --> 00:02:25.660 - app pools in IIS. 00:02:26.860 --> 00:02:31.492 - Typical app pools for Sept 2021 are below, so we're going to 00:02:31.492 --> 00:02:36.510 - have an API API storefront web for our DN side of things there. 00:02:36.510 --> 00:02:40.756 - Reporting an the scheduler. So I've pulled up IIS, IIS manager 00:02:40.756 --> 00:02:45.002 - and filtered the app pools by ATI. There's a few different 00:02:45.002 --> 00:02:48.862 - sites for this particular client, but we're just going to 00:02:48.862 --> 00:02:53.880 - focus on the ATI QA sites. I'm not going to turn off, connect 00:02:53.880 --> 00:02:57.740 - and stop that connect job. I'm only going to focus. 00:02:57.790 --> 00:03:02.912 - On these particular apples here, so I have my ATI QA API app 00:03:02.912 --> 00:03:07.640 - pool. I'm going to go ahead and stop that API storefront. Going 00:03:07.640 --> 00:03:13.156 - to stop that as well, and so on and so forth. So stopping the 00:03:13.156 --> 00:03:16.734 - DNN. Reporting. And the 00:03:16.734 --> 00:03:23.623 - scheduler here. So I'm going to. I have my File Explorer open to 00:03:23.623 --> 00:03:29.512 - the project so it's local C data projects ATI QA. You'll notice I 00:03:29.512 --> 00:03:34.495 - have my connect instance sev web 9 images folder, the actual 00:03:34.495 --> 00:03:38.572 - connect folder here. And then fetching prune battery set 00:03:38.572 --> 00:03:44.008 - hardback just in case we need to reset anything there. I'm going 00:03:44.008 --> 00:03:49.444 - to open CMD and run it as an administrator. This will be 00:03:49.444 --> 00:03:53.950 - helpful. Just because we'll need to be an administrator on this 00:03:53.950 --> 00:03:58.086 - particular server DF oh to run the necessary gulp commands. So 00:03:58.086 --> 00:04:02.974 - what I'll do here is all this. Capture the address of where I 00:04:02.974 --> 00:04:04.854 - want to change directories into. 00:04:06.400 --> 00:04:11.902 - Might not let me do it through this machine, so we'll do it the 00:04:11.902 --> 00:04:16.618 - old manual way here. So I'm going to data projects ATI QA. 00:04:17.240 --> 00:04:22.595 - I'm gonna go right on into stuff here, so I'm going to do a git 00:04:22.595 --> 00:04:26.522 - status. I should give us the branch if there's any particular 00:04:26.522 --> 00:04:30.449 - work that needs to be committed or anything like that. It 00:04:30.449 --> 00:04:34.376 - doesn't particularly look like there is. There is a dot back 00:04:34.376 --> 00:04:38.303 - file we don't generally commit those in source control, and for 00:04:38.303 --> 00:04:42.230 - this particular client I know that we don't need that. Also, 00:04:42.230 --> 00:04:46.514 - looks like there is changes to the CS project, but again, we 00:04:46.514 --> 00:04:47.942 - shouldn't need that here. 00:04:48.160 --> 00:04:53.710 - So what I'm going to do is run a git stash in stash those local 00:04:53.710 --> 00:04:57.780 - working changes there. Alright, so I'm going to go ahead and 00:04:57.780 --> 00:04:59.630 - ensure that I'm on the. 00:05:01.420 --> 00:05:04.885 - Origin support clients ATI branch, which it does appear 00:05:04.885 --> 00:05:06.040 - that we are. 00:05:07.790 --> 00:05:10.908 - Just ensure. I'm gonna do it get pull. 00:05:12.450 --> 00:05:16.602 - That'll make sure that we have all the latest code for this 00:05:16.602 --> 00:05:20.754 - particular repo, so it looks like there was a few there we 00:05:20.754 --> 00:05:25.598 - can scroll up and see what those are. It looks like there's a few 00:05:25.598 --> 00:05:29.058 - files for the Oracle integration for this particular client, as 00:05:29.058 --> 00:05:32.864 - well as some JS Configs, product controls, different HTML and CSS 00:05:32.864 --> 00:05:37.016 - or sass files, as well as some JavaScript files as well. So 00:05:37.016 --> 00:05:39.092 - it's nice that we capture those. 00:05:40.560 --> 00:05:44.580 - Alright, before we do anything here, I'm gonna go over to the 00:05:44.580 --> 00:05:48.600 - website of things, do the same thing here. Going to get status. 00:05:55.290 --> 00:05:59.410 - Looks like there are some modified DLLS just from desktop 00:05:59.410 --> 00:06:01.058 - modules being installed here. 00:06:09.070 --> 00:06:11.236 - We are on origin support clients 00:06:11.236 --> 00:06:15.870 - ATI QA. And it looks like we are ahead by 5 commits. 00:06:17.420 --> 00:06:18.090 - So. 00:06:19.230 --> 00:06:23.214 - Let's go ahead and make sure that we're on the correct commit 00:06:23.214 --> 00:06:25.870 - here, so I'm going to run a git 00:06:25.870 --> 00:06:32.080 - log dash 1. I should give us the latest here, which is 00:06:32.080 --> 00:06:38.800 - Monday, July 20th, so I'm going to go over to my ATI project an 00:06:38.800 --> 00:06:41.200 - Azure and you compare that. 00:06:42.670 --> 00:06:47.860 - To where I should be so I should be on the QA branch here I'm 00:06:47.860 --> 00:06:52.704 - going to go ahead and look at history, see if I can line that 00:06:52.704 --> 00:06:56.510 - up. This is a merge commit, so it's merging ATI QA. 00:06:57.380 --> 00:07:01.580 - In to support clients ATI QA. Alright, so let's see 00:07:01.580 --> 00:07:05.360 - what that's about. So that is on July 20th. 00:07:09.930 --> 00:07:14.517 - So it looks like this is actually ahead of the current 00:07:14.517 --> 00:07:19.104 - source control, so will actually need to push these changes up, 00:07:19.104 --> 00:07:23.691 - but it doesn't appear that we actually need to pull anything 00:07:23.691 --> 00:07:28.278 - into this particular bit here, since this one is actually 5 00:07:28.278 --> 00:07:33.282 - commits ahead, which is ahead of this source control, so this is 00:07:33.282 --> 00:07:37.452 - pretty atypical. I would say generally your server will have 00:07:37.452 --> 00:07:39.954 - work that is behind the remote 00:07:39.954 --> 00:07:43.990 - repository. This particular case, it looks like we had a dev 00:07:43.990 --> 00:07:47.719 - working directly on the server, so it looks like there's a 00:07:47.719 --> 00:07:52.126 - little bit of work that's here. So what will do is we will 00:07:52.126 --> 00:07:56.533 - change directory back into Seth, so we should be all good to go. 00:07:56.533 --> 00:07:59.584 - There were going to change direct error. Actually, we're 00:07:59.584 --> 00:08:01.279 - going to open this project. 00:08:01.850 --> 00:08:06.158 - And build the back end and run just to rebuild. So what 00:08:06.158 --> 00:08:10.466 - will do is we will open this in Visual Studio 2019. I'm 00:08:10.466 --> 00:08:14.415 - going to go ahead and right click on that solution file. 00:08:14.415 --> 00:08:16.569 - I'm going to say open with. 00:08:18.560 --> 00:08:21.140 - Microsoft Visual Studio 2019. 00:08:22.310 --> 00:08:26.606 - You'll notice that it gave me a couple of options for Visual 00:08:26.606 --> 00:08:30.544 - Studio 2019. That is because on this particular server we have 00:08:30.544 --> 00:08:33.766 - Visual Studio 2019 installed for Enterprise and professional. If 00:08:33.766 --> 00:08:38.062 - you are a front end developer, your license will be for the 00:08:38.062 --> 00:08:41.642 - professional version. If you're back in developer, you will have 00:08:41.642 --> 00:08:44.864 - the enterprise version, so open those appropriately there. So 00:08:44.864 --> 00:08:49.160 - what I'm going to do here, it looks like everything is loaded. 00:08:49.160 --> 00:08:51.666 - I'm just going to simply run a 00:08:51.666 --> 00:08:54.788 - rebuild. That should capture everything that we need. I'm 00:08:54.788 --> 00:08:58.044 - going to switch the output to build. It will do it 00:08:58.044 --> 00:09:01.596 - automatically most of the time, but just in case, I always liked 00:09:01.596 --> 00:09:04.556 - you manually switch that over in case it does not. 00:09:06.700 --> 00:09:10.240 - So should catch a ball. All of our output looks like it's 00:09:10.240 --> 00:09:13.780 - catching a few of our changes there, so we will just wait 00:09:13.780 --> 00:09:17.320 - for this to roll through our project and then will start on 00:09:17.320 --> 00:09:18.205 - the goal built. 00:09:42.120 --> 00:09:45.591 - Change this back to the build so I can watch this through and 00:09:45.591 --> 00:09:48.528 - make sure it's done building before I start. My goal built. 00:10:24.880 --> 00:10:29.236 - Perfect so it looks like our rebuild worked. All 68 project 00:10:29.236 --> 00:10:33.592 - succeeded, 0 failed and zero skipped. So what we're going to 00:10:33.592 --> 00:10:37.948 - do is open up our command prompt. Here we're going to 00:10:37.948 --> 00:10:42.304 - change directories into the 08 UI folder. Then will run are 00:10:42.304 --> 00:10:46.660 - just gulp build command, so this should grab everything and start 00:10:46.660 --> 00:10:51.412 - compiling it for us. For the what is needed for the front 00:10:51.412 --> 00:10:55.372 - end. So that's going to be the three different applications, 00:10:55.372 --> 00:10:56.560 - one for the. 00:10:56.890 --> 00:11:01.822 - Admin one for the store front and one for the storefront admin 00:11:01.822 --> 00:11:05.521 - itself on those are three separate angular JS applications 00:11:05.521 --> 00:11:11.275 - at the moment and what this will do is build all of our bases, 00:11:11.275 --> 00:11:15.796 - build all of our HTML templates, grab the overrides if necessary 00:11:15.796 --> 00:11:21.550 - and it should go ahead and build the less files in the admin for 00:11:21.550 --> 00:11:26.071 - that application and build the sass files in the storefront as 00:11:26.071 --> 00:11:27.304 - well for us. 00:11:27.730 --> 00:11:31.404 - After this is complete, we're just going to run another gulp 00:11:31.404 --> 00:11:35.078 - command for the build to Minify all those files 'cause those 00:11:35.078 --> 00:11:39.420 - will be the actual output files that are served to the front end 00:11:39.420 --> 00:11:40.422 - in the browser. 00:11:44.600 --> 00:11:49.436 - And also again, you may not need to be an administrator on your 00:11:49.436 --> 00:11:53.900 - local machine, but on DF. Oh, or other machines you might be 00:11:53.900 --> 00:11:57.248 - might need to be an administrator to run these. 00:11:57.248 --> 00:12:01.340 - These builds in the command prompt so it looks like those 00:12:01.340 --> 00:12:05.804 - all succeeded. So I will go ahead and run the gulp build 00:12:05.804 --> 00:12:09.524 - minify that is, go build Colon Minified Command. All these 00:12:09.524 --> 00:12:14.360 - files can also or all these commands I should say can all be 00:12:14.360 --> 00:12:19.568 - found in. Yeah, gold file config and the 08 UI directory. 00:12:42.560 --> 00:12:46.915 - So it looks like our goal builds both past and went ahead and 00:12:46.915 --> 00:12:51.270 - successfully ran. I'm going to go ahead and turn on all the app 00:12:51.270 --> 00:12:55.290 - pools for our website again, so that's going to be the scheduler 00:12:55.290 --> 00:12:56.630 - reporting of course RDN. 00:12:57.480 --> 00:13:02.121 - Cite the API store front and the API. I'm gonna go back to 00:13:02.121 --> 00:13:05.691 - the website here in Google Chrome. I'm just going to 00:13:05.691 --> 00:13:07.476 - open up my dev tools. 00:13:12.350 --> 00:13:17.750 - Right click on the reload empty cache and hard reload so that 00:13:17.750 --> 00:13:19.550 - should clear our cache. 00:13:20.590 --> 00:13:23.878 - And grab the latest files from 00:13:23.878 --> 00:13:28.055 - the. The goal build and the actual bill that we just did. 00:13:29.020 --> 00:13:32.464 - So this should take a second to load since it's going to 00:13:32.464 --> 00:13:34.760 - be the first initial load of the website. 00:14:01.910 --> 00:14:05.378 - So it looks like all my calls are coming through there, all 00:14:05.378 --> 00:14:09.135 - two hundreds and this is on the XHR side. We can see everything 00:14:09.135 --> 00:14:12.314 - else that was coming through just for the static DN content, 00:14:12.314 --> 00:14:16.071 - some images and all that, but the XHR is all of our API 00:14:16.071 --> 00:14:19.250 - requests for stuff, so it looks like those are all coming 00:14:19.250 --> 00:14:23.007 - through as they should. So I'm going to go back and spot check 00:14:23.007 --> 00:14:26.186 - this website a little bit. This is a registration form. Looks 00:14:26.186 --> 00:14:29.654 - fine here. I'm going to hit the homepage, just make sure that's 00:14:29.654 --> 00:14:33.122 - all loading fine as well, see if there's anything out of place. 00:14:33.360 --> 00:14:37.650 - And that wouldn't typically be there. Also want to check my 00:14:37.650 --> 00:14:41.550 - API calls, make sure that those are all succeeding, and 00:14:41.550 --> 00:14:45.450 - it looks like this build was successful, so this deployment 00:14:45.450 --> 00:14:50.130 - is good to go here. Let's go back to the deployment guide 00:14:50.130 --> 00:14:55.200 - and see what's next. So we ran the git commands here over in 00:14:55.200 --> 00:14:59.490 - this step to pull all of our code. Stash if necessary. 00:15:01.170 --> 00:15:05.818 - Then after turning off all the app pools, So what we did was we 00:15:05.818 --> 00:15:09.138 - rebuilt the solution in Visual Studio. There were C sharp 00:15:09.138 --> 00:15:13.454 - changes and there were on our side. So we also went ahead an 00:15:13.454 --> 00:15:17.106 - rebuilt the front end for the TypeScript, HTML, CSS, SCS and 00:15:17.106 --> 00:15:21.422 - less changes than what we did is switched on over to the step 00:15:21.422 --> 00:15:25.406 - forward turning on all of the apples. We looked at the site 00:15:25.406 --> 00:15:29.390 - spot, checked it, then what we'll do is we'll go into Azure 00:15:29.390 --> 00:15:33.374 - and make sure we change all the statuses of the deployed tickets 00:15:33.374 --> 00:15:34.702 - to a new state. 00:15:34.850 --> 00:15:39.026 - That state is going to be deployed to QA in this case. 00:15:39.026 --> 00:15:43.898 - That way our QA Department can go ahead and test all of the new 00:15:43.898 --> 00:15:48.074 - functionality in those tickets to make sure that they are up to 00:15:48.074 --> 00:15:52.598 - up to snuff. Ann will be deployed to you 80, so after we 00:15:52.598 --> 00:15:57.470 - do that, the last step is going to be reach out in the teams 00:15:57.470 --> 00:16:00.602 - channel to inform the team of the completed deployment. 00:16:00.602 --> 00:16:03.734 - Preferably the same thread started when informing the team 00:16:03.734 --> 00:16:05.126 - of the original deployment. 00:16:05.460 --> 00:16:10.569 - So what we'll do is we'll hop on over to teams. Let everybody 00:16:10.569 --> 00:16:16.071 - know that the site is up and good to go, and those are your 00:16:16.071 --> 00:16:20.394 - steps for the deployment guide. Now you might run into some 00:16:20.394 --> 00:16:24.717 - issues later on. We're debugging is needed in some cases. Maybe 00:16:24.717 --> 00:16:25.896 - you have some. 00:16:27.370 --> 00:16:31.582 - You know, files that needed to be pushed up? Or maybe you 00:16:31.582 --> 00:16:35.794 - accidentally or on a different branch, but you can just kind of 00:16:35.794 --> 00:16:40.006 - take those as they come. I will also say with our deployment 00:16:40.006 --> 00:16:44.569 - again will go back to the website and we saw that when we 00:16:44.569 --> 00:16:48.430 - ran the Git Status Command on the web file file folder 00:16:48.430 --> 00:16:52.291 - structure, we did see the category Sitemap XML a few of 00:16:52.291 --> 00:16:56.503 - the desktop modules have been added here, so it's going to Add 00:16:56.503 --> 00:17:01.172 - all these. Our files for us or some things were changed 00:17:01.172 --> 00:17:06.068 - here, so looks like a few of our DLLS or modified for 00:17:06.068 --> 00:17:09.740 - those those desktop modules or extensions that will add 00:17:09.740 --> 00:17:14.636 - to DNN. Looks like we have some action form XML that was 00:17:14.636 --> 00:17:19.124 - added in some of the skins were modified as well and 00:17:19.124 --> 00:17:23.612 - then some other DLLS that are native to those plugins at 00:17:23.612 --> 00:17:24.836 - the bin level. 00:17:26.430 --> 00:17:30.093 - Then it looks like there was also some untracked files that 00:17:30.093 --> 00:17:33.756 - probably needed to be tracked, like this config for the desktop 00:17:33.756 --> 00:17:37.752 - modules, and then it looks like just some jpegs could be added 00:17:37.752 --> 00:17:42.081 - in there as well, just so we have all the sites assets added 00:17:42.081 --> 00:17:45.744 - for that client. So again, typically you would not have a 00:17:45.744 --> 00:17:49.740 - server that's ahead of the work in the remote repo. In this 00:17:49.740 --> 00:17:53.403 - particular case it looks like some work was done directly on 00:17:53.403 --> 00:17:57.399 - the server, so in this case it's ahead, so will need to. 00:17:57.660 --> 00:18:02.424 - Revert that code or not revert that code. I should say add 00:18:02.424 --> 00:18:07.188 - that code and then include that in a push to that remote 00:18:07.188 --> 00:18:10.364 - repo and that's going to complete our deployment. 00:18:11.910 --> 00:18:14.520 - For this particular client, thanks.