Thursday, July 31, 2014

A Tour of Azure Storage Explorer 6 Preview 1

I recently announced that work had resumed Azure Storage Explorer and that a new version (v6) was in the works. In this post, we'll take a tour of Preview 1, which is available now at AzureStorageExplorer.codeplex.com.

Let's start by reminding ourselves how important the Storage Service is. The Storage Service was one of the first services available in Microsoft Azure, and it remains a core, vital part of the platform. Even though a wealth of new services have been added to Azure over the years, a great many of them are built on top of the Storage Service. For example, it's where VHD images reside for the Compute Service.

Let's begin with broad strokes. Azure Storage Explorer 6 isn't finished yet, but we have much of the blob support in place. Since blob storage is arguably the most-used part of Microsoft Azure Storage, this seemed useful enough to make available in a preview release, and that's what you'll get if you download Preview 1. That means you'll have to wait on Table and Queue support, which still need to be implemented. Stay tuned to this blog for updates. It also should go without saying that incomplete software in preview should be treated as new and untested; early adopters should exercise caution and take care not to endanger critical or non-replaceable data.

The User Interface
When we created the predecessor version of Azure Storage Explorer, version 5, we worked to match the then-new styling of the Windows Azure portal. We've decided to stop doing that and return to a simpler look reminiscent of Windows File Explorer. You'll see a refinement of the styling as we iterate through the next few preview releases.

When you first launch Azure Storage Explorer 6, the main window won't show much other than a header that contains a combo box for selecting a storage account to view. To the right are buttons to add a  new storage account or remove the selected one. We'll see how to add and work with storage accounts in the next two sections. The remainder of the main window is a tab control, in which you can open tabs for one or more storage accounts.

Main window header for selecting, adding, or removing a storage account

Once you have your storage account(s) defined, selecting one will open a tab in the main window. The left pane is a tree of blob containers, queues, and tables. Selecting an item in the left pane opens its contents in the main window (only blobs at present).

Main window with a storage account tab open

At the top right is a gear icon. Click or right-click here for a tools menu with options to visit web sites (Microsoft Azure Management Portal, Azure Storage Explorer home on CodePlex) or see an About dialog with version information. As we add settings in subsequent updates, additional menu items will appear here.

Top-right Tools Menu

Adding a New Storage Account
To add a new storage account, click the Add Account button in the header and a New Storage Account dialog will appear.

Add Storage Account dialog

If you're wanting to access a local developer emulator account, select Local Developer Account. Otherwise, you'll need to know some things about your Microsoft Azure Storage account in order to complete the dialog, which you can get from the Microsoft Azure Management Portal:

• The storage account name
• The storage account key (this can be either the primary key or the secondary key)
• Whether the storage account uses a standard endpoint (US, Europe, Asia, Brazil, Japan), a China endpoint (Beijing, Shanghai), or a custom endpoint

Then, it's just a matter of entering the name and key and selecting the endpoint. If you want SSL communication, click Use HTTPS.

Next, click Test Access to verify the storage account is accessible (if you're working with local developer storage, launch the storage emulator first).

Verifying a New Storage Account

Once you've verified the account is accessible, click Save to add the new account, which will now appear in the main window's account list. The storage account information is written to a local file for your Windows user, and is encrypted.

Working with Storage Accounts
Once you've defined some storage accounts, simply select an account name from the list to open up a tab for it. You can open more than one tab.

Several Storage Account Tabs Open

If you want to open up a tab for every one of your storage account, select (all) from the account list. You'll likely experience a slight delay as storage accounts load; we're working to make this smoother and take place in the background so it doesn't tie up the user interface.

All Storage Account Tabs Open

To close an open tab, either click the close box next to its name, or select Storage Account > Close Tab from the menu.

Working with Blob Containers
When you have a storage account tab open, there are operations you can perform on both blob containers and the blobs within those containers.

Blob containers are listed in the left pane, under the outline item named "Blob Containers".

Blob Service Operations
When you select the "Blob Containers" item in the left pane, you have toolbar buttons for operations on the blob service: Refresh, New Container, and CORS Settings.

Blob Containers Outline Item and Toolbar

Refresh Container List button
The Refresh toolbar button refreshes the list of containers.

New Container button
The New toolbar button creates a new blob container. Specify a name for the container.

New Blob Container Dialog

CORS Rules button
The CORS toolbar button allows you to view or modify the Cross-Origin Resource Sharing (CORS) settings for the entire storage account. CORS is powerful in that it permits authorized web clients to directly access blob storage without having to go through a server, which is normally a security requirement. Add one or more rules, specifying allowed origin(s), allowed HTTP method(s), allowed headers, exposed headers, and max age in seconds. If you need to specify multiple values in a field, separate them with commas. You can add, edit, and delete rules in this dialog.

CORS Rules Dialog

Blob Container Operations
When you select a container, the right pane lists the blobs in the container and the left pane toolbar offers buttons for container actions: Refresh, New, Delete, and Security. We've already covered what Refresh and New do.


Delete a Container
The Delete toolbar button displays a confirmation dialog and deletes the selected container and all blobs within it.

Delete Blob Container Confirmation Dialog

Container Security
The Security toolbar button displays a dialog with two tabs, one for controlling the container's access security and the other for generating shared access signature URIs.

On the Access Level tab, you can view of modify the container's access level. There are 3 levels: Off means the container and its blobs can only be accessed by API with account credentials. Public Blob means the container's blobs can be read anonymously via URIs. Public Container means the blobs can be read anonymously and the container metadata can be accessed anonymously.

Container Security - Access Level Tab

On the Shared Access Signatures tab, you can generate ad-hoc Shared Access Signature URIs. This is a way of giving some parties a custom level of access to your blob container for a period of time. First specify the date range and allowable actions, then click Generate Signature. If you had a blob selected in the main pane, its name will be entered in the dialog automatically for you and included in the URI. The generated URI is copied to your clipboard, and you can test access in a browser by clicking the Test in Browser button. Note there isn't support yet for creating and using saved SAS policies; that will be coming in a future update.

Container Security - Shared Access Signatures Tab

Working with Blobs
When you select a container in the left pane, you can work with its blobs in the main pane. You can click on columns to sort by that column, in ascending or descending order. Unlike some prior versions, this view is not paged so you will see all blobs. We're currently thinking through how we will make this work well for containers that contain many thousands of blobs, and what kind of search and filtering controls we should add.

Blob List for a Selected Container

The main pane has a toolbar for blob operations, which provides these actions: Refresh Blob List, Select All, Clear All, Upload, Download, View, New Blob, Copy Blob, and Delete Blob.

Blob Toolbar

Refresh Blob List
The Refresh toolbar button reloads the list of blobs for the container and refreshes the list of blobs.

Selecting Blobs
You can select a blob by clicking its row, or deselect it by clicking it again. You can select a range of blobs by shift-click, or add/remove additional blobs by control-click. To select all blobs, click the Select All toolbar button. To clear all selections, click the Clear All toolbar button.

Uploading Files to Blob Storage
To upload one or more files to the selected container, click the Upload button. Select one or more files in the Open Files dialog and click Open to start the upload, or cancel to abort the action. Blobs are uploaded in the background without tying up the user interface; when the upload is complete, the blob list will refresh automatically.

Open Files Dialog for Uploading

In a future update the software will have an editable table of file types and MIME types that will be used to auto-assign the ContentType property of an uploaded  blob based on its name (for example, assigning a .jpeg file a content type of "image/jpeg"). In the meantime, you can manually set a blob's ContentType with the View toolbar button.

Downloading Blobs to Local File Storage
To download the selected blob(s) to your local file system, click the Download toolbar button. In the Folder Selection dialog, select the target folder and click Select Folder to begin the download, or Cancel to abort the action. Blobs are downloaded in the background without tying up the user interface.

Choose Blob Download Folder Dialog

As you perform uploads, downloads, or other long-running tasks, you'll see a status message on the bottom of the main window. If there are several tasks in progress, multiple status messages will stack vertically. There currently isn't any way to abort these tasks once you kick them off, but we'll be providing a way to cancel tasks in a future update.

Viewing Blobs
You can view or modify a selected blob's properties and content, either by clicking the View toolbar button or double-clicking the blob name. You'll see a Properties tab, a Content tab (block blobs only), and a Pages tab (page blobs only).


Viewing Blobs - Properties Tab
On the Properties tab, you'll see the blob's many properties listed, including Blob Type, Name, Length, Uri, Last Modified, and much more. Most of these values are read-only, but several of them are modifiable such as Content Type and Content Encoding (marked with an asterisk). Click the Update Properties button to apply updates to properties.

View Blob - Properties Tab

Viewing Blobs - Content Tab
For block blobs, the Content tab allows content to be viewed in a variety of formats including Image, Text, Video, and Web. 

Use Image View to view images, and Video View to view video content. If the blob is not in a valid format for these views, you'll receive an error message.

Image View

In the Text View, you can also edit the blob text and save changes.

Text View

Web View shows content via a web browser control, which can accommodate many kinds of content, from PDF documents to image files to HTML markup to XML data. Note that to use the Web viewer, as well as the Video viewer, your blob container access level must be Public.

Web View

Editing Page Blobs
For page blobs, there is a Pages tab which allows you to read and write pages of the blob. The list box at left shows pages currently allocated in storage for the blob; select a page to see its content at right as hex bytes. You can also read pages by entering a page number and clicking Read Page, or use the Prev / Next buttons to move through the blob's pages. 

To write data, enter up to 512 bytes of hex data in the text box and click Write Page. If you enter less than 512 bytes, the sequence you entered will repeat to fill a 512-byte page. So, just entering 00 and clicking Write will write a full page of 512 0's.

View Blob - Pages Tab

Creating a New Blob
Click the New toolbar button to create a new blob. In the dialog, specify a type and name for the blob. For a block blob, you can optionally enter text to store in the blob.

Create New Blob Dialog - Block Blob

For page blobs, specify a size for the blob in bytes, kilobytes, megabytes, or gigabytes. Creating a page blob does not initialize its pages; in Microsoft Azure, only the pages you specifically write to consume storage.

Create New Blob Dialog - Page Blob

Copying a Blob
The Copy toolbar button copies the selected blob. This is a very powerful facility, which can copy the blob into the same container (under a different name); to a different container; or even to a different storage account that may be in a different data center.

Copy Blob Dialog

Down the road, we'd like to add some bulk copy capabilities that would allow you to copy a collection of blobs or containers in one easy operation.

Deleting Blobs
The Delete toolbar button permanently displays a confirmation dialog and deletes the selected blob(s).

Delete Blob Confirmation Dialog

Summary
Well, that ends our tour of Azure Storage Explorer 6 Preview 1. We've taken a peek into every corner. The majority of core blob support is in place, with a few additional operations and refinements needed as we've noted. The new code base and user interface is underway, and we'll be refining that as well.

What's next for Azure Storage Explorer 6? As we start our next phase of work, we'll be focusing on adding table storage support. We'll be posting articles here as new updates become available, and you can also subscribe to automatic notifications about new updates on CodePlex.

Lastly, if you're interested in being a contributor please contact me. We've gone through a lot of work to put together an updated code base, and part of the reason for that is to enable community collaboration.

 I hope you find Azure Storage Explorer 6 useful.

Wednesday, July 30, 2014

The Phoenix is Rising: Azure Storage Explorer 6

I'm very excited to announce that, after a long hiatus, work is progressing rapidly on the next version of Azure Storage Explorer and Preview 1 is now available on CodePlex. In this post I want to provide some background context on why the long wait and what you can look forward to in version 6 of Azure Storage Explorer, the "Phoenix" release. In my next post, we'll review Preview 1.



Where We've Been: Azure Storage Explorer versions 1 through 5
I've been involved with Windows Azure from the very beginning, and was honored to be selected as one of the inaugural MVPs by Microsoft. One of my first year contributions was Azure Storage Explorer, a tool for working with Storage Service accounts (blobs/queues/tables). Although there are multiple storage tools available today (both free and commercial), I believe Azure Storage Explorer was the first such tool for Microsoft's cloud platform.

Over the next few years, as the platform grew and extended, we periodically revised or rewrote Azure Storage Explorer, adding support for things like Shared Access Signatures and Logging Policy. By 2012, we were up to a beta of version 5. At that time, the Windows Azure portal had just undergone a major UI change and we styled ASE v5 to match. It looked like this:


Despite some pauses in regular upkeep, Azure Storage Explorer has become pretty popular. If you visit the Azure Storage Explorer CodePlex site, you'll see that there have been, as of this writing, a whopping 184,000+ downloads overall. That's pretty inspiring and humbling. I've been writing software for 35 years, of all varieties, but this has to be the one thing I've done with the broadest adoption.


The Pause
Over the last two years, however, there haven't been any updates to Azure Storage Explorer. If you work in software, then you know time is the enemy of software. The mere passing of time can turn a useful tool into a limited one as platforms change.

So why the pause? Well, I didn't stop working on the Microsoft cloud platform, and I didn't leave Neudesic, and I didn't stop being a software engineer, and I didn't stop valuing community work. But I did have some things going on that made it very difficult to work on Azure Storage Explorer or even to blog.

The pause in upkeep has been due to a combination of medical problems and a very busy project schedule on my part. I've had to work through some challenging orthopedic problems. In 2012 I suffered a tendon tear in my right arm that put me in a lot of pain and made it difficult and painful to do many everyday activities (such as getting dressed!). It took months to get diagnosed and then more months of treatment and therapy to restore use of my right arm. That was bad enough, but I'm now going through the same thing all over again with my left arm! Combine all of that with some ultra-busy projects at work (you know, the kind where you and your team are working around the clock to meet deadlines), and there just hasn't been any bandwidth for Azure Storage Explorer. Or blogging. Or speaking.

But wait a minute, you say. This is the era of open source and community software development. Surely there are others who would like to help work on Azure Storage Explorer. Indeed there are, and a number of talented folks have offered to assist. However, we weren't in a good position for that with version 5 because a lot had changed:

• The Microsoft Storage Client library had changed significantly, now up to version 4, with breaking changes.
• The MSI setup project we used for installation is no longer supported in Visual Studio.
• The way local developer storage is accessed has changed in the platform.
• New data centers in China require tools to use a different set of storage service endpoints.
• Even the name of the platform has changed, now known as Microsoft Azure.
• Our source tree had branched and fragmented a bit too much, and some reconciliation was needed.

All of the above amounted to this: we didn't have a very good starting point that would build with modern tools/frameworks or function well with the current cloud platform. I felt we needed a fresh start with an updated code base if we were going to be able to run this well as an open source project.

Azure Storage Explorer version 6
And so, that brings us to Azure Storage Explorer version 6. I've been able to carve out some time here and there, and we now have a good start on a new code base. Enough to release Preview 1, which is now on CodePlex.

These are some of our objectives for Azure Storage Explorer 6:

• A Visual Studio 2013 WPF solution.
• Uses the latest .NET Storage Client Library, v4.0.
• Uses InstallShield LE (included with Visual Studio)
• The WPF solution uses the Task Parallel Library (TPL) to handle asynchronous tasks
• Has an updated user interface.
• Source code online.
• Set up as an open source project to allow for collaborative contributions.
• Updated for the latest cloud platform.
• Supports configurable storage service endpoints, for example to support data centers in China.
• Has support for newer platform features, such as CORS.


A lot of the improvements in version 6 are subtle and have to do with small improvements that add up to a lot of usability. For example, we've previously had Copy Blob operations, but in version 6 you can copy to any container you want, even in another storage account in another data center. You were previously able to edit block blobs, but now you can also edit page blobs.

With this new code base, we're well-poised to take Azure Storage Explorer places. Once we match the basic feature set past versions have provided, we'd like to add some compelling new capabilities and also take advantage of new Microsoft Azure features (stay tuned for details). Most importantly, we can have multiple contributors involved which means my personal availability won't be a bottleneck in keeping the tool maintained.

The just-released Preview 1 supports blob operations only. Table and queue support will be coming in subsequent updates. Should you upgrade to version 6? If some of the pain points mentioned earlier have been affecting you and you don't mind being an early adopter, yes. If you need table or queue support, or prefer not to be on the bleeding edge with new software, then you might to wait for a later update.

In my next post, we'll take a tour of Preview 1.