Friday, July 10, 2020

The New-BcContainerWizard! And working through Docker errors...

By Steve Endow

UPDATE: If you're interested in a convenient way to run the BcContainerHelper PowerShell commands, check out Krzysztof's Azure Data Studio Notebook with sample BcContainerHelper commands.  Jupyter Notebooks are a great way to include documentation and commands in a single convenient format.

Have you used the new New-BcContainerWizard tool?  If not, settle in!  And I'll throw in a story about a puzzling Docker error and how Freddy helped me work through it.

Here's a video where I walk through my recent Docker learning:



Yesterday I planned on working through Erik Hougaard's video about calling an external web API from AL and processing the JSON response.  

Since I needed a new BC Docker Container to work on the demo code, I thought it would be a good opportunity to test Freddy's new BC Container Wizard tool.  So I made sure I had the latest version of NAV Container Helper, and typed New-BcContainerWizard.

The wizard is a really nifty PowerShell utility that asks you a series of questions that walk you through the different options available when using the NewBcContainer command.  After I completed the questions, it provided me with this script.

 $containerName = 'sandbox1'  
 $password = 'P@ssword'  
 $securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force  
 $credential = New-Object pscredential 'admin', $securePassword  
 $auth = 'UserPassword'  
 $artifactUrl = Get-BcArtifactUrl -type 'Sandbox' -version '' -country 'us' -select 'Latest'  
 $licenseFile = 'c:\zdisks\business central\2020-06bcv16license.flf'  
 New-BcContainer `  
   -accept_eula `  
   -containerName $containerName `  
   -credential $credential `  
   -auth $auth `  
   -artifactUrl $artifactUrl `  
   -updateHosts `  
   -assignPremiumPlan `  
   -licenseFile $licenseFile `  
   -dns '192.168.25.21' `  
   -imageName 'mybc16'   
 Setup-BcContainerTestUsers -containerName $containerName -Password $credential.Password -credential $credential  

This is a really great tool.  When I first started using NavContainerHelper, it seemed very confusing and I had no idea which options to include and which values made sense for my needs.  This wizard resolves that and will be a great resource for people who are new to Docker.

Now that I had my nifty PowerShell script, I ran it.  

Sad Trombone
Sad Trombone

"This request is not supported"

Um.  What?

After a bit of googling, I eventually made my way to the NavContainerHelper GitHub repository to see if I could learn anything from the Issues list.  I saw another issue that also had "CreateComputeSystem", but the specific error was different.

So I submitted a separate issue on GitHub.  This was the first GitHub issue I've ever submitted, so I didn't know how or what to include.  I used another issue as an example, and I stumbled through the process, including what I was trying to do, a copy of my New-BcContainer script, and as much information about the error that I had available.

Freddy responded within a few hours asking for the full build log from a successful container build (excluding the imageName parameter).  I was able to attach that full build log as a text file.

Within a few minutes, he replied, explaining that the log showed I was using a very old version of windows.

The last few digits are the important ones

Sure enough, Windows Update had a few failed updates.  Those failed updates had prevented ANY updates from being applied to my server.  Once I cleared those errors and updated my server to the latest windows build, the New-BcContainer script worked successfully with the imageName parameter.

I then looked through the full container build log that I had submitted to the issue, and sure enough, there it was.

I'm talkin' to you!


Among the hundreds of lines that scrolled by during the build process, the warning was right there, showing that I had a very old Windows build and that the generic image didn't match.

While this did delay me by over a day in my AL learning process, this side adventure was very valuable, as it helped me understand a little bit more about Docker and the NavContainerHelper build process.


Wednesday, July 8, 2020

I'm no PowerShell expert: Discovering Update-Module for NavContainerHelper

By Steve Endow

I wrote a post in April, "Make sure to update NavContainerHelper", in which I described some issues I had that were caused by having several old versions of the NavContainerHelper module installed.

Today, while updating the NavContainerHelper module on my Docker VM, I learned a few things, and I think I finally have a basic understanding of the PowerShell Module install and update process.

If you're a PowerShell pro or a NavContainerHelper pro, this will probably seem obvious, but as a newbie with both tools, it was a "learning moment" for me that explained the issues I had previously with multiple NavContainerHelper versions.

Let's start with a screen shot.

Install-Module -Force Warning

Wednesday, July 1, 2020

Business Central Basic Docker Commands

By Steve Endow

If you haven't used Docker before, and if you're not a PowerShell expert, welcome to the club.

I am new to both, and the only reason I'm using Docker and PowerShell is to use Business Central Docker Containers.  I know just enough to do the bare minimum that I need to manage a few Business Central Docker Containers for development and testing.

I have a live stream video demonstrating the commands:

https://www.youtube.com/watch?v=u-mlyIqNl5c





Here are the basic Docker commands that I have been using.


 #Containers  
   
 docker ps  
 docker ps -a  
   
 docker start <id>  
 docker stop <id>  
   
 docker rm <id>  
   
 #Stop all running containers:  
 docker stop $(docker ps -aq)  
   
   
 #Images  
   
 docker images  
 docker images -a  
   
 docker rmi <id>  
   
 docker rmi <repository>:<tag>  
   
   
 #Check NavContainerHelper version  
 Get-InstalledModule  
   
   
 #Install Latest NavContainerHelper  
 $MyModuleName = <modulename>  
 Uninstall-Module $MyModuleName -allversions   
 Install-Module $MyModuleName -Force  





Steve Endow is a Microsoft MVP in Los Angeles.  He works with Dynamics 365 Business Central, Microsoft Power Automate, Power Apps, Azure, .NET, Dynamics GP, and SQL Server.

You can also find him on Twitter and YouTube


New "Learning Business Central" Live Stream Video Series: Two Blind Mice

By Steve Endow

After weeks of research and testing and cameras and microphones and troubleshooting, my friend Tanya Henderson and I launched our new live stream series:  Two Blind Mice: Learning Business Central.

We plan on discussing new features, updates, and sharing our learning journey as we explore Dynamics 365 Business Central.

Here is the first episode:

https://www.youtube.com/watch?v=OyL5BAq68Nw


When we go live, the live stream will be posted on my Twitter account with a link to the Periscope stream.  But you can also watch the live stream on YouTube and Twitch.




If you don't want to watch the live stream, no worries!  You can find the recorded streams on my YouTube and Twitch channels:

https://www.youtube.com/steveendow

https://www.twitch.tv/steveendow





You can also find him on Twitter and YouTube


Monday, June 29, 2020

Live Streaming Business Central Content

By Steve Endow

This morning I did my first solo "live stream". 


     YouTube:  https://youtu.be/J-EmRpHilNs

     Twitch:  https://www.twitch.tv/videos/664954911

     Periscope:  https://twitter.com/steveendow/status/1277607187683045378?s=20


I've participated in a few Power Platform Share live streams hosted by my friend Belinda Allen, but this morning was the first time I've streamed on my own.

Monday, May 18, 2020

Business Central Navigation Challenge: Finding "Hidden" Pages?

By Steve Endow

I'm new to Business Central.  So please excuse my lack of proper Business Central decorum.

I don't yet know the lingo, the tricks, or the secret handshake.  I barely know the basics as I slowly learn the product.

So...I'm like a new "User".  One of those pesky new users who asks the "dumb" questions.  The obvious questions.  The questions that all real Business Central users already know and don't even think about.

Like how to navigate and find pages in Business Central.

Can I just ask for directions?

"Don't navigate! Just use Search!", is the obvious response.

But I, as a typical User, will find the oddities and exceptions.  The apparent secrets of Business Central that are not obvious to a new user.

Thursday, May 14, 2020

How will developers and customers deal with software EULAs in the age of SaaS?

By Steve Endow

In the last 10 years, I've sold software to over 500 "mid-market" customers.

Only 8 of those customers read the software license agreement that I provided to them.  Which is fine--I don't read them either.

But 8 of my customers did actually read the license agreement--all were large corporations.  Presumably they reviewed the license agreement because it is their corporate policy, and likely because they actually have a "legal department" or some legal resource that handles the task of reviewing software licenses.  Fun job, for sure.

We've all ignored it

If you've ever had a lawyer read a legal document drafted by someone else, you know that they will always come back with requested changes.  Always.  Whenever I hear "legal department", I know what happens next.

Of the 8 customers who had their lawyer read my license agreement, all 8 requested changes to the agreement.

How many digits can a Business Central Amount field actually support?

 by Steve Endow (If anyone has a technical explanation for the discrepancy between the Docs and the BC behavior, let me know!) On Sunday nig...