Microsoft Service Fabric – Setting up a Linux Environment

Service Fabric was officially released about a year ago with the promise that it would be ported to Linux. The first Linux port, which is a preview, is out. You can find the directions on getting it up and running here.

I was able to setup Service Fabric using Ubuntu Server 16.01 LTS running on Virtual Box. A few notes about this Service Fabric release:

  • Allocate plenty of disk space. Running the service fabric cluster and installing everything (Azure CLI, Service Fabric SDK, Cluster Manager, OS) is 6.7 GB on my main user partition.
  • Starting the server cluster does take awhile, about 4-5 minutes on my machine. You have to wait a few minutes after the script finishes setting up.
  • The Yeoman Generator seen in the demo, azuresfcsharp, is in the Service Fabric SDK.

.NET Core – Compiling applications for multiple platforms

Modify project.json

"frameworks": {
  "netcoreapp1.0": {
    "dependencies": {
      "Microsoft.NETCore.App": {
        "version": "1.0.1"
      }
    }
  } 
}
"runtimes": {
     "win10-x64": {},
     "osx.10.10-x64": {},
     "ubuntu.14.04-x64": {}
   }

From the CLI run:

dotnet restore
dotnet build -r win10-x64
dotnet build -r osx.10.10-x64
dotnet build -r ubuntu.14.04-x64

dotnet publish -c release -r win10-x64
dotnet publish -c release -r osx.10.10-x64
dotnet publish -c release -r ubuntu.14.04-x64

Reference: Self-Contained NET Core Applications

Upgrade Mobility Controller / ArubaOS from the CLI

It’s not completely obvious that upgrading the partition means upgrading the OS on the controller. Use this if the Web UI gives you an error about running out of space.

To upgrade partition 0 in enable mode:

copy tftp: <IP ADDRESSS> <FILENAME> system: partition 0

Example:

copy tftp: 1.1.1.1 A800_3.4.2.4_23915 system: partition 0

Other useful commands

dir

show storage

show memory

Airheads Thread

HP 2530 Pro Curve Switch – Exporting and Importing Switch Configuration via SFTP

Import Switch Configuration

copy sftp startup-config user <username> <IP Address> <Path to File>

Example:

copy sftp startup-config user alexkuo 1.1.1.1 /var/home/alexkuo/switch-import.cfg

Export Switch Configuration

copy running-config sftp user <username> <IP Address> <Path to File>

Example: 

copy running-config sftp user alexkuo 1.1.1.1 /var/home/alexkuo/switch-exported.cfg

ASP.NET Web Server Here Context Option

open.asp

You can download here the updated registry entry for opening the ASP.NET Development Web Server using context menu in Explorer. The path has been updated to use Visual Studio 2015’s development web server.

This is used to quickly open a web server in a directory. After merging the registry, just do the following:

  1. Open explorer and navigate to the target directory
  2. Right click and select the ASP.NET Web Server Here option

I have not tested this in Windows 10.

Reference: http://haacked.com/archive/2009/10/27/aspnet4-webserver-here-shell-extension.aspx/

Aruba IAP 4.1.X – Setting up the Guest PreAuth Role in ClearPass 6.5 and Instant

When setting up the guest network between an IAP with ClearPass, the older guides direct the user to setup a PreAuth role for guest and deny all traffic.

It’s assumed a firewall exception or something similar is automatically put into the IAP firewall rules to let the IAP, client, and the ClearPass server communicate, but this isn’t the case currently. In addition to denying traffic to all servers, you need to add additional rules to let the client communicate with ClearPass AND the IAP – or else radius requests will fail.

The PreAuth role looks similar to the following:

IAP

  • 192.168.99.111 is the IAP’s Virtual Controller
  • 192.168.99.103 is the ClearPass server

 

Ubuntu Server – Delete empty directories except parent directory

I needed a bash script to delete empty directories, excluding the parent directory. The following does this:

find /home/alex/target mindepth 1 -maxdepth 1 -type d -empty -print0 | xargs -0 rm -R

And the crontab that does this every few hours

0 */12 1-31/2 * * find /home/alex/target -mindepth 1 -maxdepth 1 -type d -empty -print0 | xargs -0 rm -R >/dev/null 2>&1