Tag Archives: jetbrains

DSE6 + .NET v?

Project Repo: Interoperability Black Box

First steps. Let’s get .NET installed and setup. I’m running Ubuntu 18.04 for this setup and start of project. To install .NET on Ubuntu one needs to go through a multi-command process of keys and some other stuff, fortunately Microsoft’s teams have made this almost easy by providing the commands for the various Linux distributions here. The commands I ran are as follows to get all this initial setup done.

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list

After all this I could then install the .NET SDK. It’s been so long since I actually installed .NET on anything that I wasn’t sure if I just needed the runtime, the SDK, or what I’d actually need. I just assumed it would be safe to install the SDK and then install the runtime too.

sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1

Then the runtime.

sudo apt-get install aspnetcore-runtime-2.1

logoAlright. Now with this installed, I wanted to also see if Jetbrains Rider would detect – or at least what would I have to do – to have the IDE detect that .NET is now installed. So I opened up the IDE to see what the results would be. Over the left hand side of the new solution dialog, if anything isn’t installed Rider usually will display a message that X whatever needs installed. But it looked like everything is showing up as installed, “yay for things working (at this point)!

rider-01

Next up is to get a solution started with the pertinent projects for what I want to build.

dse2

Kazam_screenshot_00001

For the next stage I created three projects.

  1. InteroperationalBlackBox – A basic class library that will be used by a console application or whatever other application or service that may need access to the specific business logic or what not.
  2. InteroperationalBlackBox.Tests – An xunit testing project for testing anything that might need some good ole’ testing.
  3. InteroperationalBlackBox.Cli – A console application (CLI) that I’ll use to interact with the class library and add capabilities going forward.

Alright, now that all the basic projects are setup in the solution, I’ll go out and see about the .NET DataStax Enterprise driver. Inside Jetbrains Rider I can right click on a particular project that I want to add or manage dependencies for. I did that and then put “dse” in the search box. The dialog pops up from the bottom of the IDE and you can add it by clicking on the bottom right plus sign in the description box to the right. Once you click the plus sign, once installed, it becomes a little red x.

dse-adding-package

Alright. Now it’s almost time to get some code working. We need ourselves a database first however. I’m going to setup a cluster in Google Cloud Platform (GCP), but feel free to use whatever cluster you’ve got. These instructions will basically be reusable across wherever you’ve got your cluster setup. I wrote up a walk through and instructions for the GCP Marketplace a few weeks ago. I used the same offering to get this example cluster up and running to use. So, now back to getting the first snippets of code working.

Let’s write a test first.

[Fact]
public void ConfirmDatabase_Connects_False()
{
    var box = new BlackBox();
    Assert.Equal(false, box.ConfirmConnection());
}

In this test, I named the class called BlackBox and am planning to have a parameterless constructor. But as things go tests are very fluid, or ought to be, and I may change it in the next iteration. I’m thinking, at least to get started, that I’ll have a method to test and confirm a connection for the CLI. I’ve named it ConfirmConnection for that purpose. Initially I’m going to test for false, but that’s primarily just to get started. Now, time to implement.

namespace InteroperabilityBlackBox
using System;
using Dse;
using Dse.Auth;

namespace InteroperabilityBlackBox
{
    public class BlackBox
    {
        public BlackBox()
        {}

        public bool ConfirmConnection()
        {
            return false;
        }
    }
}

That gives a passing test and I move forward. For more of the run through of moving from this first step to the finished code session check out this

By the end of the coding session I had a few tests.

using Xunit;

namespace InteroperabilityBlackBox.Tests
{
    public class MakingSureItWorksIntegrationTests
    {
        [Fact]
        public void ConfirmDatabase_Connects_False()
        {
            var box = new BlackBox();
            Assert.Equal(false, box.ConfirmConnection());
        }

        [Fact]
        public void ConfirmDatabase_PassedValuesConnects_True()
        {
            var box = new BlackBox("cassandra", "", "");
            Assert.Equal(false, box.ConfirmConnection());
        }

        [Fact]
        public void ConfirmDatabase_PassedValuesConnects_False()
        {
            var box = new BlackBox("cassandra", "notThePassword", "");
            Assert.Equal(false, box.ConfirmConnection());
        }
    }
}

The respective code for connecting to the database cluster, per the walk through I wrote about here, at session end looked like this.

using System;
using Dse;
using Dse.Auth;

namespace InteroperabilityBlackBox
{
    public class BlackBox : IBoxConnection
    {
        public BlackBox(string username, string password, string contactPoint)
        {
            UserName = username;
            Password = password;
            ContactPoint = contactPoint;
        }

        public BlackBox()
        {
            UserName = "ConfigValueFromSecretsVault";
            Password = "ConfigValueFromSecretsVault";
            ContactPoint = "ConfigValue";
        }

        public string ContactPoint { get; set; }
        public string UserName { get; set; }
        public string Password { get; set; }

        public bool ConfirmConnection()
        {
            IDseCluster cluster = DseCluster.Builder()
                .AddContactPoint(ContactPoint)
                .WithAuthProvider(new DsePlainTextAuthProvider(UserName, Password))
                .Build();

            try
            {
                cluster.Connect();
                return true;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return false;
            }

        }
    }
}

With my interface providing the contract to meet.

namespace InteroperabilityBlackBox
{
    public interface IBoxConnection
    {
        string ContactPoint { get; set; }
        string UserName { get; set; }
        string Password { get; set; }
        bool ConfirmConnection();
    }
}

Conclusions & Next Steps

After I wrapped up the session two things stood out that needed fixed for the next session. I’ll be sure to add these as objectives for the next coding session at 3pm PST on Thursday.

  1. The tests really needed to more resiliently confirm the integrations that I was working to prove out. My plan at this point is to add some Docker images that would provide the development integration tests a point to work against. This would alleviate the need for something outside of the actual project in the repository to exist. Removing that fragility.
  2. The application, in its “Black Box”, should do something. For the next session we’ll write up some feature requests we’d want, or maybe someone has some suggestions of functionality they’d like to see implemented in a CLI using .NET Core working against a DataStax Enterprise Cassandra Database Cluster? Feel free to leave a comment or three about a feature, I’ll work on adding it during the next session.

WebStorm JavaScripting & Noding Workflow Webinar Recording

Today the JetBrains team wrapping up final processing for my webinar from last week. You can check out the webinar via their JetBrains Youtube Channel:

JavaScriptFor even more information be sure to check out the questions and answers on the JetBrain WebStorm IDE blog entry. Some of the questions include:

  • Q: How to enable Node.js support in PhpStorm (PyCharm, IntelliJ IDEA, RubyMine)?
  • Q:How to enable autocompletion for Express, Mocha and other libraries?
  • Q: Is it possible to debug a Node.js application that runs remotely? Is it possible to debug when your node and the rest of the dependencies (database, etc.) are running in a VM environment like Vagrant?
  • Q: Does the debugger support cluster mode?

…and others all here.

I’ve Got a JavaScript & Node.js Webinar, Webstorm Tutorial Videos, Work & Flow With JavaScript Development and More…

Webinar: Node.js Development Workflow in WebStorm

This coming week I’m doing an intro to work and flow with Node.js JavaScript Programming that I’m working with JetBrains on. In the webinar I’ll be covering the following key topics in the webinar:

  • Open an existing project & getting WebStorm configured for running, testing and related working tasks.
  • A quick tour of other IDE features that help with daily work. Some in pretty huge ways.
  • Running WebStorm & debugging Node.js JavaScript applications.
  • Checking out Mocha, how it works and what it gives WebStorm the power to do. Then we’ll write a few tests & implement that code too.

All this will include Q & A throughout and at the end of the webinar. Be sure to register soon!

WebStorm Tutorials: Learning Shortcuts, Customizing Layout and Others

These WebStorm Tutorials have been put together by John Lindquist @johnlindquist for JetBrains. There solid, quick snippets of useful WebStorm usage. Two that I’ve found really useful I’ve included here:

John also has a lot of other great totally kick ass material out there. So check out his blog @ http://johnlindquist.com/ and follow his youtube channel too.

Coming Up in the Near Future, The Work & Flow of JavaScript Development

I have a new course I’m working on right now for Pluralsight, that will take these basic precepts and dive even deeper into the daily workflow of the JavaScript Developer. Whether it’s client side hacking or server side coding, I’ll be diving into a whole lot of JavaScript goodness. If you’d like me to ping you when the course is done, hit me up on Twitter @adron and just let me know. In the meantime get a Pluralsight subscription (free to sign up and at least give it a try) and check out these courses by myself and others.

Junction Two Weeks Bi-weekly Review : Issue #004 Tier 3 Pulls Into the Junction

Like any good open source project, a good continuous integration server is fundamental to a smooth workflow for everyone. I’ve always been a big advocate of Team City from JetBrains. With the versatility of the their build server it could be used for Junction and prospectively more in the future as projects started up and expanded. The only issue I ran into immediately was, where can I get some resources to run Team City on?

Immediately I pinged my friend Jared Wray @jaredwray over at Tier 3 to see if there might be some options. He immediately was into the idea, being interested in the Junction Project itself and an advocate of Riak himself it was a perfect fit. Jared ok’d and the Tier 3 team got some access setup to get a Team City build server running for the Junction Project.

I dove into setting up the build server at Tier 3 and as of this moment have a solid green light showing a good build! Thanks to Jared and the Tier 3 team for helping out, we’re all looking forward to slinging some code and getting a nice open source project in Junction.

Over the next few days I’ll also be providing a number of blog entries (the final touches are getting wrapped up right now!) on how I went about setting up Team City, server issues I ran into and the troubleshooting I did to get .NET 4.5 to work specifically for the Junction Application. In the end I’ve gotten a Windows 8 Store Application, using C# building successfully on Team City using NuGet and other key features.

For a quick how-to of setting up Team City check out “TeamCity Setup for Junction Build, Plus Implosions“.

For more information on the Junction Project check out “Windows 8 Logos, Badges, Splash Screens of Riak“, the “Introducing Junction” and “Junction Two Week on Tuesdays Bi-weekly Review : Issues #001“).

Glassfish, Java, JSF and Explorations of IntelliJ IDEA 13

I recently dove into working with some tooling at Jetbrains. The first thing I needed to take a dive into is the latest EAP of IntelliJ IDEA 13. If you do any sort of Java development you’ve definitely heard of IntelliJ, and if you work in other realms like C#, Node.js & JavaScript, Python or other languages you’ve likely heard of other Jetbrains tools like ReSharper, WebStorm or PHPStorm, Pycharm or a host of the other IDEs that they produce. A few ways to describe their product line; solid, quality, useful and kick ass. But I digress, here’s a run down of the look into IntelliJ IDEA 13.

Getting Something to Serve These Pages

Glassfish 4.0 is the latest and greatest of the Glassfish Server. I downloaded and got the server up and running to use as a base to do local development off of. I had installed Glassfish 3.1.2 but realized rapidly that it just wasn’t a good idea. Thus, a piece of advice, stick to Glassfish 4.

When installing Glassfish 4. I ran into a recurring problem, which is obviously recurring far beyond my use. The installer has the error trapped with an intelligent response.

Click for full size image.

Click for full size image.

So thus the Glassfish doesn’t understand where the default installation location is for the JRE. Thus you’ll likely have to help it out and provide it the path via the -j switch. Your path will likely look like this:

"C:\Users\you\Downloads\glassfish-4.0-windows.exe" -j "C:\Program Files\Java\jre7"

Once that was taken care of Glassfish 4.0 installed just fine and I was on my way to some sample app building. On to that sample app building shortly, for now let’s talk about configuration of IntelliJ IDEA 13 to work with Glassfish as an application server and the respective bits to get going.

IntelliJ IDEA 13 Configuration

Once you have IntelliJ IDEA 13 open, create a new project.

Welcome Screen for IntelliJ IDEA 13. Click for full size image.

Welcome Screen for IntelliJ IDEA 13. Click for full size image.

Once you click that, pending you’ve already configured IntelliJ IDEA you’ll see a screen display as shown below. If you haven’t configured it already, I’ll go through how to configure things after project creation. That way one can double back and configure the applications you might have already started or pulled from git or something without Glassfish or other servers being setup.

Glassfish and other things, already setup, available for options during project creation. Click for full size image.

Glassfish and other things, already setup, available for options during project creation. Click for full size image.

Note the JavaEE Web Module selection, then set a project name, project location (or leave the default, it’ll fill in when you enter the project name), set the Project SDK. If one isn’t available you’ll need to setup the SDK via the New button. This will bring up a dialog that will allow you to point to the SDK path and IntelliJ will know which version is available. You can do this for additional versions also, but for this example I’ve just installed 1.7 and run with it. Next set the Application server to Glassfish 4.0.0. Next click on Finish, then you’re all set.

When setting up Glassfish a few other options I like to set are shown in the dialog below. This is my default Glassfish setup for Local development. I’ve set the default browser to launch after a build to Chrome. Set the application server to GlassFish 4.0.0. It might seem silly to have this selection on the GlassFish Server dialog, but when there are multiple versions available you may need to setup a different version for different configurations. Next, I often run the server locally without security username and password, so be sure to remove the admin username that is there for the default configuration.

Glassfish Local setup. Click for full size image.

Glassfish Local setup. Click for full size image.

One last thing that I do to myself when setting up JSF, is keep forgetting to add the appropriate option to GlassFish to run JSF Workflow Apps. To run these apps open up the application server configuration for glassfish itself and select the JSF framework library.

Selecting JSF. Click for full size image.

Selecting JSF. Click for full size image.

Now with the application created there is a list of files & libraries.

To the left you can view a number of files & libraries listed. Click for full size image.

To the left you can view a number of files & libraries listed. Click for full size image.

Just to make sure everything is wired up right and the application is able to run, double click on the index.jsp file and add some HTML content. I’ve set up my file like this just to get started.

<%-- Created by IntelliJ IDEA. --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Octo Bear!</title>
</head>
<body>
<h1>Bears!</h1>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at iaculis eros. Cras eget aliquam mi, ut suscipit
    arcu. Suspendisse accumsan auctor tellus in condimentum. Integer interdum a neque eget pharetra. Mauris nec dolor
    ipsum. Quisque quis fermentum lorem. Sed tempor egestas dui, sed bibendum justo vulputate eget. Pellentesque tempus
    auctor tellus id aliquam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In erat leo, pharetra eget
    convallis ut, interdum et eros. Morbi in tortor id tellus tristique aliquet at non urna. Pellentesque habitant morbi
    tristique senectus et netus et malesuada fames ac turpis egestas.</p>
</body>
</html>

Now click on the run button in the top right corner of IntelliJ. You might hit this error if you’ve just installed Glassfish and moved straight to creating the project.

Running the new project immediately after installing Glassfish.

Running the new project immediately after installing Glassfish.

Open up a browser and navigate to http://localhost:4848/ to bring up the administration page for Glassfish 4.0.

Glassfish 4.0 Administration site. (click for full size image)

Glassfish 4.0 Administration site. (click for full size image)

Click on the server (Admin server) section that’s pointed to in the image above. A page will display that has a button to stop the Glassfish server. Click on stop and that will enable IntelliJ to take over and run the server instead. You’ll want IntelliJ to do this as it will manage the restart, redeploy, update of classes and resources during coding & running the web application. This is much easier than attempting to attach or otherwise manage the server during development.

That’s just a few of the tips and tricks to getting started with the latest IntelliJ IDEA 13 EAP IDE for Java. In my next article I’m going to dive into a few of IntelliJ IDEA 13’s newest features for JSF Workflow Faces Applications.

TeamCity Setup for Junction Build, Plus Implosions

I wanted to get a continuous delivery process setup for Junction that could help everybody involved get a clear and quick status of the project. The easiest way to do this for a Windows 8 .NET Project is to setup a Team City CI Server.

This article covers what I went through to get the server up and running. In the next part I’ll cover troubleshooting that I went through to get a Visual Studio 2012 Window 8 C# Project building correctly on the server.

Finally, the last part is a small surprise, but suffice it to say I’ll be getting a completely different language and tech stack up and running which you’ll likely not guess (or maybe you will).  😉

Setting up Team City 8.0.3 (build 27540) using Tier 3 and a Windows 2008 Server, or not…

Setting up a Windows 2008 Server with Tier 3 is super easy, as you’d expect with a cloud service provider. Log into your account, click on “Create Server” to bring up the create server dialog.

Create a New Server screen. Click for full size image.

Create a New Server screen. Click for full size image.

Click image for full size.

Click image for full size.

Next enter the information and select a Standard server.

Select how much horsepower you want the build server to have. Click for a full size image.

Select how much horsepower you want the build server to have. Click for a full size image.

Click next and then make the last few selections.

Server Tasks. No need to change the defaults here. Click for full size image.

Server Tasks. No need to change the defaults here. Click for full size image.

Click Create Server and then sit tight for a few while the server is created. Once the server is created navigate back to the server information screen (I’ll leave you to get back to this screen).

Server information screen. Click for full size image.

Server information screen. Click for full size image.

On this screen click on the add public ip button to bring up the IP & port selection screen.

Adding a public IP Address. Click for full size image.

Adding a public IP Address. Click for full size image.

On the public IP screen select the HTTP (80) and RDP (3389) ports to open up. Click the add ip address button and again sit tight for a few. Once the server has the IP set then we can log in using RDP (Remote Desktop or on Mac try CoRD).

Next install the .NET 4.5 SDK. For the latest, it’s best to install the latest windows SDK that is available for Windows Server 2008 also.

Team City install

In the instructions below, you’ll notice everything is now Windows Server 2012. That’s because after installing everything on a Windows 2008 Server I stumbled on a very important fact. I’m working to put a build together for a Windows 8 Store Application, which requires a Windows Server 2012 (or Windows 8) operating system to build on.

I got a sudden flashback to OS-X and iOS land there for a second, but leapt in and wiped out the image I’d just built. Since I’d built it in a cloud environment, it merely meant spending a few seconds to get a new OS instance built up. So after a few clicks, just like the instructions above for building a Windows 2008 Server I had a Windows 2012 Server instead. There are, however a few steps to follow once you have a good Windows Server 2012 install. Once you have a good Windows 2012 Server up and running it should have a public IP, some memory, compute and storage capabilities. In the image below I didn’t give it a huge amount of horsepower for a few reasons.

  1. It’s just doing builds, not computing the singularity.
  2. If it can build on this, I’m doing good keeping the project clean.
  3. I want to keep the build fast, keeping it on a weak machine and still having it fast also reinforces that I have a clean project.
  4. I don’t need a successful build every second, the server gets used only during pushes by devs. If we get up to dozens of devs hacking on this, I can easily spool up and get a faster, more hard core heavier horsepower option up and running.
Windows Server 2012 w/ Public IP, 1 Proc, 1 GB RAM and 40 GB Storage. Click for full size image.

Windows Server 2012 w/ Public IP, 1 Proc, 1 GB RAM and 40 GB Storage. Click for full size image.

When Windows Server 2012 boots up the first thing that will launch is the Server Manager. We don’t really need that yet, so just ignore it, close it or move it to the side.

Windows Server 2012 Server Manager. Click for full size image.

Windows Server 2012 Server Manager. Click for full size image.

The first thing we will need is Internet Explorer, so we can download Chrome or Firefox. Internet Explorer is wired up with high security so the first thing it will do is explode with messages about sites not being in the right zone. It is, hugely annoying. So add each site to the zone and head out to the web to pick up Chrome or Firefox.

Internet Explorer security configuration explosions. Click for full size.

Internet Explorer security configuration explosions. Click for full size.

In the following screenshots I didn’t actually download Chrome or Firefox first, but instead downloaded TeamCity. I advise getting Chrome or Firefox FIRST and then downloading TeamCity with one of those browsers. Life is dramatically simpler that way.

Team City - add another site to the site list for security clearance. Click for full size.

Team City – add another site to the site list for security clearance. Click for full size.

Team City downloading. Click for full size image.

Team City downloading. Click for full size image.

I know one can turn off the security settings in IE, but it’s just dramatically easier to go and use one of the other browsers. Just trust me on this one, if you want to turn off the security features in IE, be my guest, I’d however recommend just getting a different browser to work with.

Once you’ve got your browser of choice and Team City downloaded, run the installer executable.

Installer Downloaded w/ Security Scan in IE. Click for full size image.

Installer Downloaded w/ Security Scan in IE. Click for full size image.

Executable downloaded.

Executable downloaded.

Installing Team City.

Installing Team City.

Leave the components checked unless you have some specific goal for your server and build agents.

Server & Build Agents Options.

Server & Build Agents Options.

In one of the subsequent dialogs there is the option to run the server under the SYSTEM account or under a user account. Since this is a single purpose machine and I don’t really want to manage Windows users, I’m opting for the SYSTEM account.

SYSTEM Account.

SYSTEM Account.

After everything is installed navigate in a browser to http://localhost. This will automatically direct you to the TeamCity First Start page.

TeamCity First Start Page. Click for full size image.

TeamCity First Start Page. Click for full size image.

At this point you’ll be prompted to ok the EULA.

Signing one of those famous EULAs. Click for full size image.

Signing one of those famous EULAs. Click for full size image.

Then you’ll be prompted to create the first Administrator user.

Creating the administrator user.

Creating the administrator user.

From there you’ll be sent to the TeamCity interface, ready to create a new build project.

TeamCity Tools is marked by a giant pink arrow, Great ways to integrate TeamCity into your workflow. Click for full size clarity!

TeamCity Tools is marked by a giant pink arrow, Great ways to integrate TeamCity into your workflow. Click for full size clarity!

Click on Projects at the top left of the screen and you’ll navigate to the Create a Project dialog. Click on the Create a Project link to start the process.

Creating a project. Click for full size image.

Creating a project. Click for full size image.

Once you’ve entered the name, project ID and description click on Create. This will bring you to the next step, and to the general tab of the project. On this screen click on Create build configuration.

Project Setup. Click for full size image.

Project Setup. Click for full size image.

Now create a name, enter the config id, and click the VCS Settings >> button to move on to the next step of the process.

Build Configuration. Click for full size image.

Build Configuration. Click for full size image.

In VCS Settings leave everything as default and click on the Add Build Step >> button.

Click for full size image.

Click for full size image.

Now select the Visual Studio (sln) option from the Runner type and give the dialog a moment to render the options below that. They’ll appear and then enter the Step Name, Visual Studio type needs to be set to Microsoft Visual Studio 2012 and then click on Save.

Setting up the Build Type. Click for full size image.

Setting up the Build Type. Click for full size image.

From there you’ll be navigated back to the Project Build Steps screen. On that page you’ll see the build step listed. We’ll have one more we’ll need to add in a moment, but for now click on Version Control Settings again.

Build Step displaced, click on Version Control Settings Again. Click for full size image.

Build Step displaced, click on Version Control Settings Again. Click for full size image.

On this page click on the Create an attach a new VCS root.

Attach a new VCS root. Click for full size image.

Attach a new VCS root. Click for full size image.

Now select Git from the dialog and wait for the page to populate the form settings and options.

VCS Root Options. Click for full size image.

VCS Root Options. Click for full size image.

Now enter the correct Fetch URL to the Git repo (which on github looks something like https://github.com/username/gitrepo.git and is available to copy and paste from the right hand side of the repo page on github), enter the appropriate default branch to build and an appropriate VCS root name and VCS root ID. Once that is done click on the Test connection button.

Test Connection. Click for full size image.

Test Connection. Click for full size image.

Click save and now navigate back to the Build Triggers screen by click on the #5 option on the right hand side of the page. You’ll be navigated back to the magical Version Control Settings screen where you now have a few more options available and a VCS root available.

Version Control Settings. Click for full size.

Version Control Settings. Click for full size.

Now an Add New Build Trigger dialog appears to add the trigger. I set it to trigger a new build at each new check-in. The TeamCity server checks frequently to see if a commit has been made and will initiate a build. Another way however to setup this is to not add a trigger and instead go to Github (if you’re using Github) and setup a push trigger from Github itself. That way every commit will initiate a build instead of the TeamCity Server, which knows nothing about the actual status of the repo until it checks, giving a more timely build process to your commits & dev workflow.

Build Trigger. Click for full size image.

Build Trigger. Click for full size image.

The added build trigger. Click for full size image.

The added build trigger. Click for full size image.

Now, one more build step. Add the NuGet Installer (which is included with the TeamCity Build Server, check the docs for TeamCity 8.x for NuGet Installer and NuGet for more information). For our purposes once you’ve insured that the NuGet Installer you need is available add a new build step. Select from the Runner Type NuGet Installer and the respective form will populate below.

NuGet Installer. Click for full size image.

NuGet Installer. Click for full size image.

Once the step is added, click on Reorder Build Steps under the Build Steps list and a dialog, specifically for reordering the build steps will appear.

Reordered Build Steps.

Reordered Build Steps. Click for full size image.

Reorder the steps so that Getting NuGetty (the name I’ve give to it, click for a full size image) will be run first.

The NuGet Settings.  Under the NuGet.exe is where to add the Nuget executable if it isn't already installed and available. Click the NuGet settings for options. Click for full size image.

The NuGet Settings. Under the NuGet.exe is where to add the Nuget executable if it isn’t already installed and available. Click the NuGet settings for options. Click for full size image.

At this time you now have all of the steps you actually need. You’ll be able to go back to the main projects screen and built the project.

When you do this however, if you’ve actually set this up to build a Windows 8 Store Project you’ll get a build failure. Which is a total bummer, but that makes for a great follow up blog which I’ll have posted real soon! For now, these are great steps for getting a modern ASP.NET, Java, Maven and a whole host of other builds up and running. For the solution around the Windows 8 Store Project keep reading (subscribe on the top right hand side to the RSS!) and I’ll have that posted up real soon.

Until next entry, Cheers!  > Adron

Somebody Went and Made Node.js All Easy! o_O

I get busy learning some other things and Node.js gets all easy! I’m impressed. 🙂

1. Navigate to the main node.js site, there’s a big “Download” button that you can’t miss.

The Node.js Site, Just Click It And Get It...

The Node.js Site, Just Click It And Get It...

2. Click that download button and you’ll be presented with this crazy easy screen to pick your download.

Node.js Download Link...

Node.js Download Link...

3. Once you get that installed, get nodeunit. You are writing unit tests against your node code right? 😛

npm install nodeunit
Results from loading nodeunit with npm install.

Results from loading nodeunit with npm install.

For more on how to use npm, which stands for Node Package Manager, give a RTFM. 😀  It’s kind of like Nuget for .NETters and Gems for Rubyists.  🙂 …and trust me, I’ll be putting this to use in future blog entries and it’s a big help to have handy.

4. Create a file to code some javascript in. Per the simple example given on the main node site…

var http = require(‘http’);

http.createServer(function (req, res) {    res.writeHead(200, {‘Content-Type’: ‘text/plain’});
res.end(‘Hello World\n’);}).listen(1337, "127.0.0.1");

console.log(‘Server running at http://127.0.0.1:1337/&#8217;);

Now run this. If you have the Webstorm IDE from Jetbrains you can just right click on the js file and select run. It automatically will use Node.js to execute your JavaScript. You can also execute node.js by opening up a shell/terminal and executing this.

node whereverYourPathIsTheFileIsLocated/example.js

Navigate to 127.0.0.1:1337 and you’ll get the classic “Hello World” message.

Running The Node.js Example.js File

Running The Node.js Example.js File

…and all of a sudden you’re using node.js to hack some javascript! Seriously, there aren’t many usable languages out there that are as code ready as javascript with node. Very cool, very very cool.

Happy coding!