Вернуться   AXForum > Microsoft Dynamics NAV > NAV: Blogs
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

Опции темы Поиск в этой теме Опции просмотра
Старый 14.07.2020, 21:16   #1  
Blog bot is offline
Blog bot
23,255 / 788 (73) +++++++
Регистрация: 28.10.2006
waldo: Installing a DevOps Agent (with Docker) with the most chance of success

You might have read my previous blog on DevOps build agents. Since then, I’ve been quite busy with DevOps – and especially with ALOps. And I had to conclude that one big bottleneck keeps being the same: a decent (stable) installation of a DevOps Build server that supports Docker with the images from Microsoft. Or in many cases: a decent build agent that supports Docker – not even having to do anything with the images from Microsoft.
You probably have read about Microsoft’s new approach on providing images being: Microsoft is not going to provide you any images any more, but will help you in creating your own images – all with navcontainerhelper. The underlying reason is actually exactly the same: something needed to change to make “working with BC on Docker” more stable.

Back to Build Agents

In many support cases, I had to refer back to the one solution: “run your Docker images with Hyper-V isolation”. While that solved the majority of the problems (anything regarding alc.exe (compile) and finsql.exe (import objects)) .. in some cases, it wasn’t solving anything, which only has one conclusion: it’s your infrastructure: version of windows and/or how you installed everything.

So .. that made me conclude that it might be interesting to share with you a workflow that – in some perspective doesn’t make any sense – but does solve the majority of the unexplainable problems with using Docker on a Build Server for AL Development :-).

Step 1 – Install Windows Server 2019

We have best results with Windows Server 2019 as it’s more stable, and is able to use the smaller images for Docker.

Step 2 – Full windows updates

Very important: don’t combine docker/windows updates and such. First, install ALL windows updates and then reboot the server. Don’t forget to reboot the server after ONLY installing all Windows updates.

Step 3 – Install the necessary windows features

So, all windows updates have applied and you have restarted – time to add the components that are necessary for Docker. With this PowerShell script, you can do just that:

Install-WindowsFeature Hyper-V, Containers -RestartYou see – again, you need to restart after you did this! Very important!

Step 4 – Install Docker

You can also install Docker with a script:

Install-PackageProvider -Name NuGet -MinimumVersion -Confirm:$false -ForceInstall-Module DockerProvider -Confirm:$false -ForceInstall-Package Docker -RequiredVersion 19.03.2 -ProviderName DockerProvider -Confirm:$false -Force  You see, we refer to a specific version of Docker. We noticed not all versions of Docker are stable – this one is, and we always try to test a certain version (with the option to roll back), in stead of just applying all new updates automatically. For a build agent, we just need a working docker, not an up-to-date Docker ;-).

Step 5 – The funky part: remove the “Containers” feature

What? Are you serious? Well .. Yes. Now, remove the Containers feature with this script and – very important – restart the server again!

Uninstall-WindowsFeature ContainersRestart-Computer -Force:$true -Confirm:$falseStep 6 – Re-install the “Containers” feature

With a very simpilar script:

Install-WindowsFeature Containers
Restart-Computer -Force:$true -Confirm:$falseI can’t explain why these last two steps are necessary – but it seems the installation of Docker messes up something in the Containers-feature, that – in some cases – needs to be restored.. . Again, don’t forget to restart your server!

Step 7 – Disable Windows Updates

As Windows updates can terribly mess up the stability of your Build Agent, I always advice to disable them. When we want to apply windows updates, what we do, is just execute the entire process described above again! Yes ineed .. again!

That’s it!

If you ask yourself – is all this still necessary when we moved to the new way to work with Docker: when we build our own images and such. Well – I don’t know, but one thing I do know: the problems we have had to solve were not all related to the Business Central Images – but some just also regarding just “Docker” and the way Docker was talking to Windows .. (or so we assumed). So I guess it can’t hurt to try to find a way to setup your build servers that way that you know it’s just going to work right away.. . And that’s all what I tried to do here ;-).

Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
waldo: Installing a DevOps Agent (with Docker) with the most chance of success Blog bot NAV: Blogs 0 14.07.2020 15:11
waldo: DevOps for AL – ALOps is ALive! Blog bot NAV: Blogs 0 18.06.2019 03:47
waldo: Microsoft Dynamics NAV 2017 – what’s really new? Blog bot NAV: Blogs 0 13.10.2016 05:22
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Часовой пояс GMT +3, время: 13:49.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.