Lessons learn while trying to deploy a Docker container in Azure

(Ce billet en aussi disponible en français.)


Since I saw Donovan Brown do his demo during the Connect(); // 2016 Keynote, I really want to have a taste of that left click to turn a project to Docker containers. So last Sunday I wake up early and armed with a big bowl of cafe latte start prepping my VM to try it. But as you could imagine, it didn't work on the first attempt, and that what I want to share to you.

DonovanBrown

Let's get started


I build a new VirtualBox virtual machine (VM) using an ISO of Windows 10, then install all the updates to get the anniversary edition. I afterward went to visualstudio.com to get the Visual Studio 2017 RC and install it with a few components: web, azure, etc. And next when looking for Docker for windows. Same here super easy just need to download and install the MSO from docker.com and voila... or not. Like specified in the Docker documentation the installer noticed that Hyper-V was not present in my environment and suggested installing it and reboot the machine. Until then, everything was going fine, but when Docker try to start, after the reboot, I got an error message:

Error creating machine: Error in driver during machine creation: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory

However, the setting was set, as you can see in the screenshot.

VT-xSetting

After a short investigation, I found that VirtualBox was not supporting nested virtualization, yet. Well, let's try another virtualization platform then.

First Success


I created a new VM under VMware Player this time and repeated all the steps as before. After the reboot, the little white whale in the system didn't prompt any error... Was it working? Let's try to create a Nginx Hello-world container to check. And the answer was YES!

2016-11-22_19-00-45

Docker and Azure


Now let's get serious. It's time to do the left click on the project and add Docker Project Support. Then press F5 to try it locally.

ERROR: for mystuff Cannot create container for service mystuff: C: drive is not shared. Please share it in Docker for Windows Settings Encountered errors while bringing up the project..

I got too excited, and I had skipped some reading... It's written black on white in the documentation that you need to share some drive to make it work.

ShareDrice

After that it when smoothly and in few minutes, I got my website to run in a Docker container accessible via localhost:32768. Great! Now to get it available on Azure, I need to create a registry where all the images will be saved. To do that simply left click again on the project, and select Publish. The guided dialog will popup and help you to create and deploy your things. An interesting point is before clicking the "Create" button you will have the option to export your template as a json file, very useful. But for now click Create, then Publish.

DockerPublishing

After a moment you should have a new browser window that will popup with your App now deployed in Azure.

DockerOnline

Wow! That was really a great experience. It's definitely a very simple process to get started. I really appreciate the Docker for Windows and Kitematic user interface. Of course, all the command-line are still available, but now I also have another option for the day where I feel more for clicking instead of typing.

DockerTools

Let's build it and ship it, from any platform to the cloud!



Reading Notes #257

2016-11-20_21-14-57Suggestion of the week

  • Microsoft Connect(); 2016 Recap (Joseph Hill) - Three full day of great content. However, if you are like me, you didn't that much free time. Fortunately, all the presentations are available in video on demand. You need a summary because even if the keynote was really good... it is still 2h30, this post is the place to start.

Cloud


Programming


Miscellaneous



Reading Notes #256

IMG_20161107_104028Cloud

Programming

Miscellaneous



What did you say you are, an MVP?


A few years ago, I decided to put myself in a situation where I’d be in contact with more people. Of course, I got a lot of technical questions, but also, and more often than you may think, people ask me about my MVP title. What’s an MVP? What do you need to do to become one? What do you do when you are an MVP? What do you get as an MVP? You can always come see me and ask me; it would be a pleasure to speak with you. However, for those who want to stay in the shadows, or are not sure how to ask, I decided to write a blog post about it.


What is MVP?

MVP_Logo_Preferred_Cyan300_RGB_300ppiIn short, MVPs are Microsoft Most Valuable Professionals (MVPs). For more than twenty years, Microsoft has given that award to technology experts who passionately share their knowledge with the community. There are close to 4,000 MVPs around the globe specializing in approximately seventeen different categories. MVPs share their passion by writing blog posts, articles, and books, answering questions in forums, and giving presentations in community groups and events.

How I Became an MVP

Firstly, I didn’t do anything to become an MVP. I became an MVP because of what I was doing. And that’s how I think it should be approached.

I’ve always read a lot about new technologies and enjoy working on home “pet projects”. I find that the optimal way to learn is by doing whenever possible. Having real struggles with “features” are the best brain push-up you can get. Because things are changing quickly, and because I was playing with a large variety of technologies, I was keeping notes on my work. First, my notes were on a disk; then I put them online. From time to time, when someone would ask me a question at work, I would search through my notes. Although my online notes were public, the URL was purposely not a friendly one. Before long, co-workers started to ask me if they could have the URL to my notes and I knew it was time to take the first real step into the light.

I still remember clearly that talk I had with Dom, an "Eagle" (tech prime) at the office. I was shy but he told me to give it a try; some people were already liking what I was sharing, and after all, I was doing the work for myself anyways so why not share it with others? Since getting out of your comfort zone is a good way to learn, I decided to start my blog. And just to add a level of difficulty, I decided to do it in English since at the time I only knew French.

I started my blog, FrankysNotes.com, and changed all my funny avatars to my photo. Since starting my blog, I publish my reading notes every Monday. And exactly like the saying goes, “build it, and they will come.” The weeks passed and the number of weekly views on my blog grew from dozens to hundreds. Encouraged, I decided to publish the notes from one of my home projects. Immediately the number of views jumped. I was trying to write more, but it was a very long process since I was definitely not fluent in English. However, every time I published a post, I was really proud. Not only had I successfully finished a project and learned something new, I had also written a post that would help others learn too. At the same time, I joined the Canadian Windows Azure Community Experts group and participated in events.

Sharing my passion through presentations, blog posts, and meetups was enough for me to be welcomed into the big MVP family.

CanadianMVPFamilly

What I’ve Been Up to Since Becoming an MVP

Having been recognized as an MVP didn’t change me. I’m still very nervous before a presentation or publishing a blog post. I continue to code late at night on personal projects. More than ever, I’m excited when after a long battle with a bug, I finally find the way to make everything work.
What is different is that I now have more opportunities. All those friends reaching out to me (and other times it’s me reaching out to them) to ask a quick question or invite me to join them at an event. It’s up to me to embrace those challenges, get out of my comfort zone and continue to share my passion and my journey through the technology I like so much. I’ve started a second blog, in French this time, called CloudenFrancais.com. I’ve also joined the MSDEVMTL (Cloud) community group in Montreal, Quebec, Canada as a co-admin and started a new community in Ottawa, Ontario, Canada called OttCloudTech.

Thank you for reading my blog posts and asking questions. Next time you have the chance, reach out to me, it would be terrific to finally meet you.
See you soon.


References

ReadingNotes #256


Cloud



Programming



Miscellaneous



Reading Notes #255

microsoft_studioCloud


Programming


integration


Miscellaneous




Reading Notes #254

IMG_20161019_192029Cloud


Programming


Databases


Miscellaneous



Reading Notes #253

2016-10-17_09-17-05Suggestion of the week


Cloud


Programming


Databases



Reading Notes #252

ReadingNotesAppCloud

  • Azure Subscription Migration to CSP (Kirill Kotlyarenko) - Excellent post that explains the differences between the different types and how to migrate ... with a minimum of pain.
  • New lower Azure pricing (Takeshi Numoto) - Really good news more VMs types and lower prices.
  • Storing and using secrets in Azure (Bertrand Le Roy) - This p is great tutorial that explains all h steps to configure use the Azure Vault, when our secrets need more then sits in a config file.

Programming


Databases

  • Avoid ORDER BY in SQL Server views (Aaron Bertrand) - Sometimes we need workarounds to bend some services to our wishes, but we must keep in mind the real best practices.