8 Aug 2016

1 Comment

A Raspberry Pi3 VSTS Build Light-Part 4, some finishing touches

In this fourth and final blog post on the Codify VSTS build light, I’d like to share some finishing touches I have applied to the build light to make it more robust for demonstrations as well as a little more portable.

If you’ve not read my previous posts in this series you can find them here.

A Raspberry Pi3 VSTS Build Light–Part 1, the hardware

A Raspberry Pi3 VSTS Build Light-Part 2, installing Windows 10 IoT Core

A Raspberry Pi3 VSTS Build Light-Part 3, installing the Codify VSTS Build Light software

After completing the first three blog posts and taking the Codify VSTS build light to a few user groups to demonstrate, I realised I need a more durable case as well as a way to plug and unplug the lights and power for travel.

The stock cases I could find from the usual Raspberry Pi online stores didn’t really protect the Codify board so I went looking on Thingiverse to see if someone had a suitable design for a case that I could 3D print. I found a design by UltiArjan which was a remake of a design by 0110-M-P. The case looked promising so I did a remake of this case to suit the two wire terminal blocks on the Codify board and also added a thin cover over the micro USB port usually used to power the Raspberry Pi.

I then loaded up my 3D printer with purple filament (for Visual Studio of course) and went to work. The result is a custom fit case that can survive both office environments and travel for demonstrations.

28 VSTS Build Light Cases

One of my other issues was the inconvenience of having to use a screwdriver if I wanted to remove the power of the light strip for travel. That was solved with the addition of two pigtails – one for the pwoer and another for the light strip.

29 Case including pigtails

I’m sending a few of these cases out to friends and people who have asked for them. If you would like a case, please contact me through the contact form on this blog. I can send you the STL files if you want to print your own or for the price of a roll of filament + postage, I’ll send you one.

Here are the steps to assembling the Codify VSTS build light in this case.

Step one, we start with the case, the Raspberry Pi and the Codify board. I’m including all the necessary screws and spacers in the case when I send them out.

30 Getting Started

The next step involves placing the Raspberry Pi board into the white part of the case and securing the board with a single screw in the back corner. (Diagonally opposite the ethernet port)

31 Installing RPi

You then need to add the Codify board. Don’t push it all the way down onto the pins yet.

32 Add Codify Board

Now you need to gently add the white plastic spacers between the Raspberry Pi board and the Codify board. Once these are in place you can screw the board down into the white case.

33 Add Spacers

In this close up below you can see where I have put a thin cover over the micro USB port port that is usually used to power the Raspberry Pi. You may recall from a previous blog post in this series that the Raspberry Pi is powered by the 12 volts going into the Codify board. As a result you should not connect the Micro USB port to a power supply.

34 notice USB Cover

You’re now ready to sit the white case onto the purple wall plate. The wall plate serves three purposes. Firstly it provides a convenient way to mount the case on a screw in any of four orientations. Secondly, it provides extra space between the white case and the wall or table to help with airflow/cooling of the Raspberry Pi. Thirdly, it has the nuts embedded in the wall plate to allow you to screw everything together.

35 Place on to of wallplate

Now you’re ready to put the largest part of the case on top and screw it all together.

36 Add top case

Once it’s all together here is the key to help you insert the appropriate wires into the terminal block.

37 Easy access to terminal blocks

I’ve added holes in the top of the case to allow you to get a small screwdriver into the terminal blocks to secure the wires.

38 Easy access to screws

Here’s a photo showing the nuts embedded into the wall plate.

39 Nuts are embedded in wallplate

Congratulations!  You’re Codify VSTS Build Light is in its new home ready to give you the good or bad news about your latest builds.

40 All finished

20 Jul 2016

0 Comments

Deleting a TFS workspace from the command line

Today I had need to explicitly remove a TFS 2015 workspace. I was troubleshooting a build and wanted to completely remove any workspace the build service might be using.

I did this from a new TFS 2015 Build Agent machine (non-XAML) that had VS2015 installed as well. The process I used to do this was as follows.

1. Open a developer command prompt

2. Get a list of all workspaces (you can refine further if needed)

tf workspaces /server:http://{TFSServername}:8080/tfs/{CollectionName} /owner:*

This will return a list of all workspaces including the Owner of the workspace. Find the name of the workspace you want to delete and also pay attention to the owner name.

3. Use the following command to delete the specific workspace. (NOTE: The command above uses “workspaces” while this command uses “workspace” not the plural form)

tf workspace /server:http://{TFSServername}:8080/tfs/{CollectionName} /delete “{workspacename};{owner}”

In my case, I was looking for a workspace used by the new TFS 2015 Build Agent. This meant I could specify the workspace owner as “Project Collection Build Service” which was the scope I was using. This reduced the list of workspaces significantly which made it easy to find the workspaces I wanted to delete.

This was the exact command line I used as an example.

tf workspace /server:http://TFS:8080/tfs/DefaultCollection
/delete “ws_1_2;Project Collection Build Service”

If I had been scoping the build to just the Team Project, I would have used the “Project Build Service” instead.

25 Jun 2016

1 Comment

A Raspberry Pi3 VSTS Build Light-Part 3, installing the Codify VSTS Build Light software

In this third blog post in this series, I’ll walk you through getting the Codify VSTS Build light software installed and configured.

I’m running Visual Studio 2015 Enterprise edition with Update 2 on my laptop but you can download and install  Visual Studio Code if you prefer. (It’s FREE)

You’ll need the Universal Windows Platform Tools and Windows 10 SDK installed. If you don’t have this installed on your machine, you will be prompted to install it when you open the Codify Build Light solution.

VSTS Build Light - Addins for VS2015

Getting the software

I’m going to head over to https://github.com/Codify/build-light to download the software for the VSTS Build Light.  We’re going to choose fork the repository so that we have our own personal copy that we can use to maintain our own version of the code and/or submit pull requests with fixes and/or enhancements. I’m sure the Codify guys would absolutely love any updates and enhancements you’d like to contribute.

Folk Repository

Now we want to access the solution locally using Visual Studio. I already have the GitHub Extension for Visual Studio already installed in Visual Studio. Installing this extension provides the capability to connect to your GitHub account from the Connect Hub in Visual Studio.

1. Start Visual Studio
2. In the Team Explorer window, click the Manage Connections button in the toolbar.
3. In the GitHub section, click Clone
4. Sign into your GitHub account if prompted.
5. Select the fork from the list, optionally specify a path, then click Clone

You now have a copy of the repository locally.

6. At the top of the Connect hub you can click the hyperlink to Open an existing project or solution.
7. Locate the Codify.VisualStudioOnline.BuildLight.sln file and click Open.

At the time of writing, the solution contained two projects. This may change over time.
* The Codify.VisualStudioOnline.BuildLight project is “version 1” and can monitor a single build in VSTS.
* The Codify.Vsts.BuildLight project is a new WORK IN PROGRESS version of the project that can monitor multiple builds in VSTS.

For this project, I’m going to go ahead and install the Codify.VisualStudioOnline.BuildLight application onto the Raspberry Pi. Leave Visual Studio and the solution open for now and move onto the next section.

Getting the Raspberry Pi ready

1. Get your Raspberry Pi (with the Codify board) turned on and on the same network as the computer you’re running Visual Studio on.
2. On my laptop, I’m going to start the Windows 10 IoT Core Dashboard. This will allow us to find the Raspberry Pi device.
3. In the IoT Dashboard you should see your Raspberry Pi device. Take note of the IP address for your device.

VSTS Build Light - Shown in IoT Dashboard

Deploying the code from Visual Studio

1. Return to Visual Studio where you should still have the Codify solution open
2. In Solution Explorer, right-click the Codify.VisualStudioOnline.BuildLight project and click Properties from the context menu.
3. Click the Debug tab and look in the Start Options section.
4. Set the Target Device to Remote Machine
5. Enter the IP Address of your Raspberry Pi
6. Set the Authentication Mode to Universal.
7. Save the changes you have made.
8. In the standard toolbar, make sure Codify.VisualStudioOnline.BuildLight (Universal Windows)  is selected.

Deploy BuildLight software from VS

9. Click the Remote Machine button to build and deploy the application code to your device. You should notice that the deployment automatically downloads any missing frameworks that area required.

AppDeployed

Once the application has been deployed to the Raspberry Pi, you can set it as the default application so that it starts every time you tur on your device.

Configuring security for the connection to VSTS

The first thing we need to do is setup Alternate authentication credentials in our VSTS account. Hopefully the application will be updated to use Personal Access Tokens (PATs) soon as the Alternate authentication credentials is being phased out.

1. Open your browser and navigate to your VSTS account. Eg. yourname.visualstudio.com
2. Log into your account if requested.
3. Click your username in the top right-corner of the window and choose My Security.

Click My Security in VSTS

4. Click Alternate authentication credentials in the panel on the left.
5. You will need to check the checkbox to enable alternate access credentials and then provide a username and password. This access will have your user rights so make sure you use a strong password.

ConfigureAltCredentials

6. Click Save

Now you’re ready to go back to your Raspberry Pi.  This next step requires you to plug in a USB mouse, Keyboard and monitor using the HDMI port.  If you’re using a Raspberry Pi 3 you could also use the remote desktop experience to do this remotely which is much more convenient.

Configuring application settings and starting to monitor

Now that we have the application on the Raspberry Pi and permissions configured we’re ready to configure the application to connect to Visual Studio Team Services and select the build we want to monitor.

When you boot up the RPi with an HDMI monitor, you’ll see the configuration settings screen. If you don’t see this you can click the 3-cogs icon in the top left corner to display the dialog you see below.

1. Enter your VSTS account alias. This is the URL you use without the .visualstudio.com on the end.
2. Enter the username and password you chose when you enabled alternate access credentials.
3. Enter the Team Project name and the name of the Build definition you want to monitor.
4. You should leave the pin values the same as you see them below in the screenshot. (Red:18, Green:22, Blue:24)
5. Click Save and then click the Start button on the right. (Not shown in screenshot)

VSTS Build Light - CodifyAppSettings

CONGRATULATIONS!  You should now have a working VSTS Build monitor.

Other post in this four part series include

15 Jun 2016

0 Comments

DevOps using Visual Studio 2015 training in full swing

Some of the most exciting new features to arrive in Visual Studio Team Services and TFS 2015 have been the completely new Build system and the new Release Management capabilities built using the same technology. These are critical pieces to the DevOps puzzle for teams using VSTS or TFS as their ALM suite of choice.

To help educate teams on how to adopt DevOps best practices using Visual Studio, I have written a course focused specifically on this outcome.  The new 3-day DevOps using Visual Studio TFS 2015 course has already been delivered several times and has received very positive feedback.

We usually use electronic manuals where possible but for a client in Virginia this week, they requested printed hardcopy manuals. It was the first time I had the chance to “see” all my hard work in hard copy.

WP_20160614_07_34_10_Rich (2)

This is what 603 pages of DevOps knowledge and hands on exercises looks like

 

If this course is something you or your team may benefit from, there are scheduled courses coming up in the United States and Australia over the coming months. You can also just AskShane about onsite training or customised versions of the course.

There are two courses you may want to consider.

1. DevOps using Visual Studio TFS 2015 (3-day course)

2. Build and Release Management using TFS 2015 (2-day course which is a subset of the 3-day DevOps)

UNITED STATES (Online or in-person in Kirkland, WA)

* August 15-16: Build and Release Management using TFS 2015  [Register link]

* September 12-14:  DevOps using Visual Studio TFS 2015  [Register link]

* October 17-18: Build and Release Management using TFS 2015  [Register link]

* November 28-30: DevOps using Visual Studio TFS 2015  [Register link]

* December 12-13: Build and Release Management using TFS 2015  [Register link]

AUSTRALIA

* August 1-2: Sydney: Build and Release Management using TFS 2015 [Register link]

* August 3-5: Sydney: DevOps using Visual Studio TFS 2015  [Register link]

* August 8-9: Melbourne: Build and Release Management using TFS 2015 [Register link]

* August 10-12: Melbourne: DevOps using Visual Studio TFS 2015 [Register link]

 

13 May 2016

5 Comments

A Raspberry Pi3 VSTS Build Light-Part 2, installing Windows 10 IoT Core

In this second part of this blog series, I’ll walk through setting up Windows 10 IoT Core on your Raspberry Pi 3.  Technically it’s more like setting up Windows 10 IoT Core on a MicroSD but that’s beside the point Smile

If you missed part 1 you can find it here.

At the moment, the version of Windows IoT core for Raspberry Pi3 that includes the drivers for the on-board WiFi is only available to Windows Insiders. If you’re not already an insider, you can go and sign up. (It’s free.)   I am writing this in early May 2016, so this may not be the case at the time you’re reading this.

For this exercise, I am using a Sandisk Ultra Class 10 8Gb MicroSD card to install Windows IoT Core and the Codify Build light software on. If you’re considering purchasing one, I’d go for a 16Gb MicroSD as the price is almost the same as the 8Gb ones.

The first thing I’m going to download is the March 2016 Insider Preview for Windows 10 IoT Core. The latest one I can download at the moment is build 14322. If there’s a more recent one available, I’d go ahead and get that one. Save the ISO file somewhere convenient for now then double-click it to mount the ISO.

Open Windows Explorer and navigate to the mounted ISO image. You should find a single MSI installer in the root of the mounted image. In my case the file is named “Windows_10_IoT_Core_for_RPi2.msi” which is misleading as I definitely selected the Raspberry Pi 3 image.

Double-click the MSI file and follow the prompt to install the program. This will give us easy access to the FFU file we’ll need in the next section.

The next thing I’m going to do is download and install the Windows 10 IoT Core Dashboard from the Microsoft website. This makes getting started much easier.

After the dashboard has been installed, it automatically runs and gives you the option to setup a new device. Go ahead and click “Set up a new device”.

VSTS Build Light - IoT Dashboard

On the setup new device screen, the Raspberry Pi 3 is not currently listed. I expect this to change soon. For now, I will select “Custom” for the device type and then point to the FFU file that was created when you ran the installer in the previous step. You should be able to find it at  C:\Program Files (x86)\Microsoft IoT\FFU\RaspberryPi2\flash.ffu.

You need to have access to the MicroSD card now. When prompted to select the drive, select the drive letter corresponding to your Micros SD card.

You will need to accept the licensing terms and click Install. A command window will be displayed and you’ll see the Deployment Image Servicing and Management Tool displayed as well as a progress indicator as it sets up Windows 10 IoT core on your MicroSD card.

VSTS Build Light -DISM

Once the image has been extracted into your MicroSD card, you should see a message to let you know the MicroSD card is ready. Remove the card from your PC and insert it into the MicroSD card slot in the Raspberry Pi 3. In my case, I’m going to choose to connect the Raspberry Pi 3 via an Ethernet cable before I look at the Wireless drivers and configuration.

Connect the power supply to your Raspberry Pi 3 and turn on the power.

In the IoT Dashboard, click “My Devices”. If everything is working you should see you device appear as shown in the following screenshot.

VSTS Build Light - IoT Dashboard New Device

In the list of My Devices, I’m going to click the pencil icon in the settings column to change the settings for my Raspberry Pi 3. Specially, I am going to set the name of my device to “RPiVSTSBuild” but you can choose a suitable name for yourself. You should also set a device password for the Administrator account on this screen. The default password is p@ssw0rd. Once you rename, you will be prompted to reboot your device. Click OK.

Once your Raspberry Pi has rebooted, click the VSTS Build Light - Global iconicon to display the device portal in your browser. You will be prompted to enter the username (administrator) and the password you have selected.

VSTS Build Light - Device Home page

I have configured the Time zone to match my current time zone and I’ve configured my Wireless settings to connect to my local wireless network.

That’s about it for getting Windows 10 IoT Core ready. In the third and final part of this blog series, we’ll get our computer configured to use Visual Studio 2015 to build the Codify build light software . We’ll then deploy it to the Raspberry Pi and configure it to connect to our VSTS account.

Other post in this four part series include

More Posts