25 Jun 2016
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.
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.
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.
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.
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.
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.
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.
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)
CONGRATULATIONS! You should now have a working VSTS Build monitor.
Other post in this four part series include
- TFS 2017 – Adding reports to an existing team project Reporting , TFS2017
- DevOps training in Perth this week DevOps , TFS2015 , Training
- Upgrade your TFS administration skills to TFS 2017 today Uncategorized
- Presenting at the Microsoft Developer Event 2016 in Sydney DevOps , Presentations , TFS2017 , VSTS
- Microsoft Virtual Academy–Applying DevOps to your VSTS Extensions DevOps , Extensions , VSTS
I love sharing my ALM knowledge with my readers. Don’t miss anything by subscribing to my newsletter
- Addons and Extras12
- Application Insights3
- Lab Management3
- Release Management10
- TFS 201214
- User Groups16
- Version Control1
- VSTS 20109