You are currently browsing the category archive for the ‘experiment’ category.

I started teaching myself Docker during my time off December 2016.  I grabbed my dockerUbuntu laptop, loaded up Docker and got to work.  Docker is really easy to pick up and get started with.  I even loaded it up and build a few containers for a Raspberry Pi.  🙂

With Windows 10 and Windows Server 2016, Windows containers are now available.  You can get a base Windows container from Docker hub and run it from one of these OS’s.  Be forewarned, the images made from Windows Core are 10GB in size!  So much for being light. At least you only need to download them once.

I have and old (unfinished) ASP.NET MVC site running at http://brettski.com.  I figured this would be a good candidate to throw in a container since it has no external dependencies, like databases, etc.  It runs on ASP.NET MVC 3 or 4 and dotnet framework 3.5.

For windows base containers there are two bases I have seen from Microsoft: Windows Core and Windows Nano.  Since I haven’t worked with Nano and understand it is really stripped down, I decided to start with Windows Core.

Since the site runs on IIS, I started with the Microsoft/IIS container. The container is a build of Windows Core with web server role added.   I started out with the following Dockerfile for my site which is located at the root of the solution.  I published the site to ./brettski4/pub/release/, so it may be easily mapped in the file.

#FROM microsoft/iis:latest

# copy compiled code into container
# build sent to /pub
RUN mkdir c:\\website
COPY .\\brettski4\\pub\\release c:\\website

WORKDIR c:\\website

# Add features
RUN powershell -Command Add-WindowsFeature -Name Web-Server; \
 Add-WindowsFeature -Name Web-Asp-Net

# Add sites
RUN powershell -NoProfile -Command Import-Module IISAdministration; \
 New-IISSite -Name "brettskicom" -PhysicalPath "c:\website" -BindingInformation "*:8088:"

EXPOSE 8088

ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]

It’s a really simple Dockerfile. It starts by using the microsoft/iis:latest container image.  It then makes a directory in the container for the site files (c:\\website). Copies those files from the local machine into the container’s new directory, and finally makes the workdir c:\\website, which isn’t really needed for this container.

I needed to add two features to the container, ASP.NET application service and DotNet 3.5 (which isn’t in the file above).  This is the first place I was tripped up as ASP.NET 3.5 cannot be loaded in this container, it’s isn’t an available option!  Either is Dotnet Framework 3.5.  An error is raised that the source files are not available.  I wasn’t sure where to get them on the web, or what exactly was needed to add them (WSIM, etc.).

So sought out a different container.  Looking through the containers in the Microsoft Docker Hub listing I came across microsoft/aspnet.  Which is tagged for two versions: 3.5 and 4.6.2 (which has a few flavors). Going for the microsoft/aspnet:3.5 container image I updated my Dockerfile to add in web-server and asp.net application service.

FROM microsoft/dotnet-framework:3.5

# copy compiled code into container
# build sent to /pub
RUN mkdir c:\\website
COPY .\\brettski4\\pub\\release c:\\website

WORKDIR c:\\website

# Add features
RUN powershell -Command Add-WindowsFeature -Name Web-Server; \
 Add-WindowsFeature -Name Web-Asp-Net45; \
 Invoke-WebRequest -Uri "https://github.com/Microsoft/iis-docker/raw/master/windowsservercore/ServiceMonitor.exe" -Outfile "c:\ServiceMonitor.exe"

# Add sites
RUN powershell -NoProfile -Command Import-Module IISAdministration; \
 New-IISSite -Name "brettskicom" -PhysicalPath "c:\website" -BindingInformation "*:8088:"

EXPOSE 8088 

ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]

This Dockerfile starts out the same but is a bit different when adding features.  We add Web-Server, and ASP.NET 4.5.  Since this container didn’t come with IIS, Microsoft didn’t add the ServerMonitor.exe executable, I decided to grab it from the GitHub repo and save it in the container.

I am still not 100% sure what ServerMonitor.exe is used for, though it seems to keep the container active after it starts.  From what I have read, people had added useless loops written in powershell to have some type of process running at the start of the container. Running ServiceMonitor.exe while in the container only says, Usage: ServiceMonitor.exe [service name]. So little help there.

So this was my Tuesday, in between other things, getting something to work inside a Windows container.  If you haven’t played with Docker yet, I strongly suggest that you do.  It is quite easy to get started with, and containerization is going to continue to grow as big if not bigger than Virtual Machines did.

The Container image built is in my Docker repository here.

 

I want to know, how often do you verify file hashes?

Most of us are continuously downloading files from the internet.  With many of these files there is a posted hash value to verify the integrity of the file.  How often do you actually make sure that the file’s hash value is equal to what is posted?

If you are using windows there is a really convenient, easy to use program called BD File Hash.  This super small, .NET based application will calculate and verify file hashes using MD5, SHA-1, and SHA-256 algorithms.  If there is a different type of hash you require, leave me a comment and I will see if can be added to the application.

BD File Hash: http://bdfilehash.codeplex.com

BD File Hash has been found 100% malware free by Softpedia.

I have this really, really bad habit; I spend a lot of time searching and trying out new tools for my tool box.  Some times to such extent I never get around to actually using the tools to build something, and that is just silly.

On the positive side is have given me a lot of exposure to the many, many options available to us, but on the negative side I think I use it as a form of procrastination.  If I am looking for for something, than I don’t actually have to ‘work’ on something.  How convenient.

The toughest part, is that I really enjoy checking out different applications.  Experiencing what so many are putting their hard work into.

So I have started a list, it is by no means complete, nor do I really plan on making it complete.  Though it will give you a pretty good idea on all the different things I have checked out and played around with.

There has been a lot of positive buzz about Windows 7; a lot of stuff that has me excited about it.  As a user of Windows XP, I want to move on.  Vista is ‘nice’ but didn’t really deliver anything extra for me.  Sure some nice eye candy, and perhaps nicer plug and pray, but what a pig.  It’s just a system hog, and I wasn’t ready to update any computers yet.

With the release of Windows 7 on October 22nd. 2009 I will be purchasing a new laptop with windows 7, and will probably get a version for my main desktop machine.  Though it’s only an AMD 4000, I don’t think I will have any trouble running Windows 7.  It’s that machine I am installing on today so I will be able to compare performance from the same system running Windows XP and Windows 7.

I received a product key, downloaded the iso and burned a new DVD.  For the system I grabbed an old 80GB hdd I am not using any longer and put it as the sole drive.

Never really using Vista myself (of course I have seen it and helped others with it) I don’t know it intimately.  This is going to create a bit of a learning curve here.  The installation moved along pretty smoothly; couple reboots, nothing special–then it happened.

Black screen.  I had a black screen with nothing more then version informaion at the lower right hand corner:

Evaluation copy. Build 7100.

I was still able to move the mouse pointer around the screen, but couldn’t do anything else.  I tried restarting, removing unneeded stuff, reloading.  Nothing was fixing it.  Time to hit the web.  It didn’t take too long to find, ten-fifteen minutes, I ran into this website, http://windows7forums.com, and they had a thread on this very issue.  It is definitely a monitor/video issue, though some of the resolutions where slightly different.

For me, it was having two monitors connected while loading.  Once I disconnected the second monitor from my system, Windows 7 was able to finish it’s “first time boot” and setup the environment.         Wow there is a lot of eye candy here!

I am running around setting stuff up, checking things out.  (cool wallpaper schems).  Let’s set up taskmgr to launch on start up.

Hey, why can’t I add a new shortcut on a right-click?  That’s a pain, what am I missing?

I created the shortcut to taskmgr on the desktop and copied it to the startup folder.  When I did that I was prompted for Admin rights to do that.  That is interesting, not sure if like that. I guess I need to take some time to look into security.  Specially since that was the single reason so many people hated Vista, it locked up so many areas breaking shit.  Whatever, as long as they haven’t totally abstracted everything away, there will be a solution.

Since I am trying out a new OS, I might as well load up a beta IDE too.  So I am now in the middle of loading up VS2010.  I have no idea if I will have any time to work with it, but I hope I make the time.

Windows 7 changing the wallpaper automagically is weird.  I dig it though.

Interesting, SQL 2008 (bundled with VS2010 beta) must be at SP1 or higher to work with Winows7.  I am glad it let me know while loading it.

Everytime I reboot and see that long-lived black screen, I get nervous that the system will lock again.

At this point, I will have to say that Winows 7 is running as well as a new installation of winows XP does.  It boots as fast plus launches and runs apps as fast.  Can’t wait until I get more stuff loaded.

Instead of creating a bunch of short articles, I am going to consolidate my experiences here.
Please note that this experiment is being conducted on GoDaddy’s economy plan which came free with a domain purchase.  I assume its functional, just with the annoyance of ads.  Thinking about this now this experiment may not have much weight, since I don’t know if these ‘free’ trials are throttled, etc.

  • Making a connection to FTP took some time to complete
    File upload speeds where decent, but switching from file to file was very slow.  Updating a dozen files all of 80KB in size takes no less than 30 seconds, I would hate to see how long Mediawiki would take to upload.   I am using FileZilla as an FTP client.
    Sorry to keep adding to this bullet, but the more I use the FTP, the more the delays annoy me.  Just grabbing a file to edit it, is so much slower than my current host.
  • Wow, this is annoying: There are ads on Yellow Error screens!
    Those sly bastards, the free one month hosting which comes with a domain uses ads.  That is just lame.  I understand it, but it’s lame.
  • The file manager is nice.  It allows you to upload files and zip and unzip files on the server, and edit files.  Of course other basic file manager stuff too.
    Screen loads of the file manager have a tendency to be slow.
  • Woot, PHP now on a Windows host.  It’s about time!
  • While in their web manager, clicked on the help/blog link and the generic GoDaddy welcome page showed.  Nice.
  • Having issues with file-level security.  A new app I am writing works with .NET’s System.IO classes, and most of the calls fail under this hosting plan.  If the app is running at a virtual web of http://mydomain.com/myapp, I cannot change directories in the app to the root, it’s not allowed.  I am unable to any System.IO.FileInfo methods on the files at all.  The ones I have tried are throwing a SecurityException.  😦

In a nutshell things aren’t going great.  It’ s just cumbersome to use their hosting.  Perhaps I prefer more control over my settings, I don’t know.  The slow FTP is a huge factor.  30 seconds to upload 12 files with a total size of 80k, is just silly.  Sure it’s only 30 seconds, but there is no room for scaling.

Final word: I’ll stick with iHostasp.net.  They may not offer as many items, but their service is much more solid.  Overall they ihostasp.net wins.  Just started hosting for my programming stuff with Dreamhost.com, for linux hosting, I haven’t found anything better.

For those of you pointing to CrystalTech, yes, I think they are a really good host, a bit expensive for me, for my use.  I have used them in business and they have rock solid hosting and excellent support.  Only one database and having to use code to map to other domains, isn’t great for multiple projects.

In all fairness to GoDaddy’s upload issue, I didn’t realize the website I was using to check out their capabilities was a free website with my domain, not a one month subscription for a website.  So it makes sence that they would throttle the hell out of it.  It would be useful if the would indicate something along those lines.