Set up your own personal private PaaS in six easy steps

Deploying and configuring your own single instance private PaaS on EC2 with Stackato is almost as easy as downloading a micro cloud virtual machine (VM) to your desktop. The ActiveState team has created an Amazon Machine Image (AMI) with Stackato installed that is ready to run on EC2, with a few minor configuration tweaks that even a Newbie to the cloud can figure out. The Stackato AMI is available for free subject to the terms and conditions of the Stackato Micro Cloud License Agreement.

How simple is it?

To get Stackato up and running on EC2, all you need to do is launch an EC2 AMI, configure an IP address and domain name, SSH into the instance, perform a few simple stackato-admin commands, and then launch the Stackato Web Management Console to complete your setup and configuration. Download the Stackato Client and you'll be able to push your applications directly to the cloud from your desktop.

Getting Access

Before you can get started, you must first have valid AWS credentials so that you can use Amazon's web services. You can either sign up for a new AWS account or use your existing AWS credentials. If you're creating a new Amazon account, you will need to provide a credit card to complete the sign-up process. At the end of each month, Amazon will charge your credit card for the cloud-related usage costs associated with your AWS account.

You'll also need to send an email request to the ActiveState Stackato Support team with your AWS Account Number (shown in the upper-right corner of the AWS "Manage Your Account" page).

Once you have received your email confirmation from ActiveState that you've been granted access - you can spin up your own private PaaS on a small EC2 instance in a few quick steps.

Launch an AWS Instance of Stackato

Associate your Domain Name with your Stackato Instance’s Elastic IP Address

Log in to your Stackato Instance with SSH/PuTTY

Adding your domain to /etc/hosts

Use the "stackato-admin" Command Basics

Sign in to the Stackato Web Management Console

Step 1: Launch an AWS Instance of Stackato

The AWS Management Console provides a web interface for Amazon Web Services. You can start and stop EC2 instances, view and perform actions on running instances, set configurations (e.g. security groups, key pairs, and Elastic IPs) and modify them using interactive controls.

Log in using your AWS account name and password. Navigate to the "Amazon EC2 Console Dashboard" and click on the "Launch Instance". This will launch the "Request Instances Wizard" for you.

From your AWS console, search the Amazon "Private Images" catalog for the latest Stackato AMI using the string "stackato". Select the Stackato AMI ID.

Choose the Instance Type "(m1.small, 1.7 GB)". This is the least expensive option and a good one for testing purposes. For a production environment, you will need to deploy a cluster of instances and assign different roles to each of them to spread the workload more efficiently. The Stackato AMI is currently only available for use in the "us-east-1a" EC2 Availability Zone, so select that zone at this point.

Click on "Continue" and accept all the defaults on the Advanced Instance Options for now.

Next, give your AMI a user-friendly name or "key". This makes it easy to identify later if you deploy more than one instance.

There is a default password for the Stackato AMI. You will be prompted to change it when you launch the Stackato Web Management Console for the first time. Click "Continue" on the "Create Key Pair" page and go directly to "Configure Firewall" to set up a Security Group.

Using the "Create a new rule" drop-down list, select each of the following rules: SSH, HTTP, HTTPS and DNS. This security configuration will allow you to securely shell into your instance using SSH/PuTTY and configure your instance so that it can be accessed using a domain name of your choice.

Review your choices and hit "Launch". Be patient as it may take a few minutes for Amazon to fulfill your request. When the instance is available it will appear in your AWS Console as a "running instance" with the name you chose earlier.

You have a live Stackato Instance. Now you just have to make it "yours" by mappng your domain name to the instance.

Step 2: Associate your Domain Name with your Stackato Instance's Elastic IP Address

The Public DNS and your Private IP Address assigned automatically by AWS are ephemeral. They do not persist when an instance is restarted.

To map a DNS entry to Stackato, you need a persistent IP address. Amazon EC2 provides Elastic IP addresses, which do persist through reboots. Any Elastic IP addresses that you associate with your account remain associated with your account until you explicitly release them.

To allocate a new Elastic IP address for use with your PaaS

Click Elastic IPs in the Navigation pane. The console displays a list of Elastic IP addresses assigned to your account.

Click Allocate New Address.

In the confirmation dialog box, ensure the value for EIP used in is set to EC2, and click Yes, Allocate.

To associate the Elastic IP address with an instance

Click Instances in the Navigation pane. The console displays a list of instances.

Write down the instance ID to associate with the Elastic IP address.

Click Elastic IPs in the Navigation pane. The console displays a list of Elastic IP addresses assigned to your account.

Select an address and click Associate Address.

In the Associate Address dialog box, select the instance from the Instance list box and click Yes, Associate.

For this example, I registered the domain "gorilla-mgmt.com" through Dreamhost.com, so I use Dreamhost's domain management console to make the DNS changes to point to the AWS instance. In this example, I am using a subdomain called "paas" to associate with the Stackato PaaS running on the AWS instance.

Type in your "AWS Elastic IP" in to the "Value" field of the CNAME Record. You'll need to add add a "." at the end and then save your changes. Depending on your domain hosting provider, it may take awhile for this change to take effect.

Step 3: Log in to your Stackato Instance with SSH/PuTTY

You need to tell Stackato about your instance's "Private IP address" and your chosen domain name.

Log in to your machine via ssh as user "stackato" with default password "stackato". Note: Do not change the unix user password in this step - it will happen in a later step.

While Secure Shell or "ssh" may sound daunting, it really is just a secure way to log into a remote computer as an authenticated user. If you're using Linux or Mac OS X, use the 'ssh' client that comes with the OS, if you're using Windows get a copy of PuTTY.

Launch PuTTY from your desktop and type in your AWS Public DNS address in the Host field, then click "Open".

Click the "Open" button and you'll be prompted to login to your instance for the first time.

This first time, you'll login as the user "stackato" using the default password which is also "stackato". Do not change the password yet, this will be done in a later step.

Step 4: Adding your domain to /etc/hosts

You'll need to add a line in the '/etc/hosts' file to resolve the domain name added above to localhost via the loopback address.

To make these edits, you'll need to use a console text editor like "Vim", which is already installed on your EC2 instance (if you don't know how to use it, here's a useful cheatsheet).

To edit the /etc/hosts files, you'll have to run vim with the "sudo" command - which allows you to run programs and commands with the security privileges of another user (in this case, the superuser, or root):

You'll need to add one line to the top of the /etc/hosts file, substituting your domain name for the one used in this example.

When you save the file, you may get an error message such as the following: "unable to resolve host stackato-xxxx". This message can be ignored.

When you are finished editing your /etc/hosts file should look something like this:

Step 5: Becoming Stackato: the "stackato-admin" command basics

While still logged in with PuTTY to your instance, you'll need to type in the final configuration using a few stackato-admin commands and then reboot your instance.

The email address used in this step should be the same as for the user who will become the first admin user of the system in Step 6.

The "private instance IP" is the one noted as Private IP Address for your EC2 instance.

From the command line, type in the following stackato-admin commands substituting your domain information :

Now reboot so all the changes take effect.

When you do the "reboot" from PuTTY, your session will automatically end and disconnect.

Step 6: Sign in to the Stackato Web Management Console

Direct your browser to https://api.
/. In this example, you would go to https://api.paas.gorilla-mgmt.com.

This will take you to the initial console setup welcome page. Use the same email address here that was granted admin permission in the previous step. The password that you provide here will also become the stackato system password, replacing the default password that you used to do your first login.

After that, you are ready to deploy apps to Stackato, your own single instance personal Private Paas on EC2!

To learn more about deploying applications to Stackato and navigating the Stackato Web Management console, watch this short YouTube video.

Thinking about setting-up a cluster for to scale for production use? Be sure to contact our sales team to learn how Stackato Enterprise can help your business.


Trackback URL for this post:


Show more