ActiveBlog

The New Stackato App Store
by Ingy döt Net

Ingy döt Net, May 9, 2012
Stackato App Store

Platform-as-a-Service is the future for deploying and managing Internet applications. It promises to provide an environment that abstracts the hard stuff (operating system, web server, programming language environment, databases, etc) and leaves you with the joy of just saying "Run this app, please". With ActiveState's Stackato, not only can you do that, but you own the entire PaaS system, and you run it wherever you wish.

How easy is it to install a complete Stackato PaaS? Very. It's just a download and a few clicks. How about deploying popular applications like Drupal or Bugzilla to your new Stackato PaaS? Even simpler. The Stackato App Store makes them a click away. What if you want to install your favorite apps that are not yet in the store? No problem. You can create your own App Store and it's amazingly easy to do.

In this article, I(ngy döt Net) will teach you how to do all three of the simple and exciting exercises above. Let's get started...

Installing Stackato

Stackato can be installed as an enterprise cluster of 1000+ nodes running on Amazon EC2, vSphere, or OpenStack, but it will also run as a single virtual machine (VM) on your laptop. Since deploying Stackato as a single node (we call it Micro Cloud licensing) is completely free of charge (forever), let's do the the latter.

The first thing you'll need to do is download a copy of the Stackato VM. This free download is available here. In a nutshell, Stackato is just a VM image that is ready to boot up as a server. It is packed full of all the system software needed to get your apps running immediately. Stackato VM images are prepared for a bunch of different virtualization hypervisors. Since you are on a laptop, you'll probably want to use VMware Fusion/Player or VirtualBox, which have free versions. Download the Stackato image that matches your hypervisor software.

Note: The Stackato image is 1.2GB, so now is a good time to get a cup of coffee (or a good night's sleep), depending on your bandwidth.

Pro Tip: Start the download now, and hopefully it will be done by the time you finish reading this.

After you unzip the Stackato download, you'll want to get the image into your hypervisor. For VMware you can just "open" and "play" the .vmx file. For VirtualBox, you'll need to "import" and "start" the .ovf file (and also adjust the Network Settings). In either case, you should see a Linux VM booting up in a window. Your Stackato is coming to life...

When the Stackato VM has booted, you will see a URL to a unique local domain. Just type that URL into a web browser. This is where the real fun begins. The (now running) Stackato serves up a web based Stackato Management Console (SMC), which you can use to do most of the common Stackato operations (and all the operations discussed here). For instance you can install apps, stop and start and launch them, view their logs, see pretty system graphs, and many many other things that I encourage you to explore on your own.

Stackato Management Console

The first thing the SMC wants you to do is enter your email address and a password. Your email will be your Stackato id. You are now the administrator of this Stackato. That means you have full control of everything. The password you've entered, is also now the password of the stackato Unix user, should you want to ssh into the actual Stackato VM. This is a real live server, it's yours, and you have the keys to the castle, if you want to dive deep. But let's get back to the fun stuff!

Note: The above process will work on a laptop that is running Mac, Linux or Windows, but with some caveats. For instance, you'll need sufficient RAM, 64-bit capabilites and some network tweaks on Windows. If you have any problems, see the rich Stackato documentation.

The Stackato App Store

If you look at the left side of your SMC, you'll see a link to the App Store. Click it! You'll be presented with a cornucopia of applications written in many programming languages. If you wanted to run all these by setting up your own server, it would likely take you days. With the Stackato app store, it's just a few clicks.

Try it. Click "Install" on an interesting app. You'll be prompted with some basic setup info. Usually the defaults are just fine, so click the "Install App" button. In a few seconds your app will be installed. You should now see your "Applications" page. From here you can start your app. Once it is fully started, you'll see a launch button. This will take you to your brand new running app. Viola!

So what is the App Store exactly? It's not a store in the sense that you have to buy anything. The App Store is simply a collection of links to software that is ready to run on Stackato. Currently these applications are all hosted as GitHub repositories. In fact, the link to "More Information" on each App Store app, points to the GitHub page for that app. Click it to read the app's documentation and instructions. If you are a developer, you can clone the repo, change the source code, and push it to your Stackato VM using the Stackato command line interface.

You can think of the Stackato App Store as the rabbit hole to a PaaS wonderland. The folks at ActiveState are adding new apps to the App Store every day. You may just end up using Stackato to host your favorite off-the-shelf apps, but Stackato strives to be the deployment platform of choice for application developers.

Creating Your Own App Store

I'm not certain that I've conveyed just how ridiculously simple a Stackato App Store is. I said was a collection of links, but let's take a closer look.

If you click on "Settings" in the SMC, you'll see a set of tabs. Click on the Stores tab. You should see a list of URLs hosted by ActiveState. The URLs are links to JSON files. For instance, look at this one. If you understand JSON (which is about as simple as it gets) it's pretty easy to see what's going on. These JSON files just contain meta-data about application sources. The App Store fetches this JSON info and presents it to you in a graphical and interactive manner.

With Stackato 1.2, you can change the JSON sources to whatever URLs you want, as long as they return the proper content. In other words, all you need to do is host a static JSON file, and tell the SMC about it. We call this the "App Store 2.0" and it's a great example of how open ActiveState is making the entire Stackato platorm.

There are many ways to host static files, but here is a really simple and free way to test it out. Go to the link above, and copy the JSON text, then go to https://gist.github.com and paste it into the text box. Make a small change to the JSON text (possibly change an app desc value) and then click the "Create Public Gist" button. Next, find the "raw" link on the page and click that. Now you'll have a hosted static raw JSON file on the Internet! Copy the URL to the SMC's Setting's list of App Store URLs. That's everything. If you go into the App Store now, you'll see your own App Store data.

Conclusion

I started by asserting that PaaS is the future of computer application deployment. Stackato is polishing that future at every level. I hope this gives you a glimpse of the future, and that you try it out today.

Subscribe to ActiveState Blogs by Email

Share this post:

Category: stackato
About the Author: RSS

Ingy is a hacker who started programming in Assembler on punchcards, switched over to Perl and has since become enlightened to the goodness of all the OSDC languages (Perl, Python, Ruby, JavsScript) and the people who hack, support and evangelize them. He is one of the creators of YAML, a major CPAN contributor, the father of Acmeism and is drinking a double Americano as you read this. Ingy is a citizen of the Earth who sometimes relaxes in Seattle but more often is headed to a computer conference near you. He loves to make things DRY.