Getting Started

From $1

    getstarted.pngWelcome to Scalr! Let's get the party started. First, make sure you have access to Scalr either from the source code (installation instructions), from hosted Scalr, or from the pre-packaged image.

    Adding your cloud credentials

    You'll need to input your infrastructure keys so we can manage your infrastructure. Go to Accounting (top right in the menu) and select "Environments" (here's a direct link: https://my.scalr.net/#/environments/view)

    Select the environment you want to add or update keys for (in most cases this is "default"). You can edit this under "Options", then click Configure.

    default environment.png

    Then add your cloud credentials to by clicking the appropriate icon:

    infrastructure clouds.png

    Create a server farm

    To create a server farm for your infrastructure, click Server Farms > Build new:

    build-new-server-farm.png

    Name that sucka, like "ServerTron 2000" or I guess something practical like "My First Farm":

    name-your-farm.png

    Click on the Roles tab to add servers like Apache, MySQL, or Postgres to your farm:

    select-roles-tab.png

    Now we'll add nginx, an excellent software load balancer, from the Load Balancers category. We'll direct web traffic to the servers of this Role, which will spread it out evenly to your applications servers. Click "Add" underneath your desired option:

    add-nginx.png

    Then confirm the IaaS cloud you want to deploy in as well as the location:

    choose-location.png

    Voilà! You have added nginx to your server farm (seen below). No servers are running yet, but we've set up the blueprint for your operations.

    added-nginx.png

    Add Apache from the Application Servers category and MySQL from the Database Servers category, and you now have the standard three-tier infrastructure setup:

    completed-farm.png

    You can click on each role to configure it. Below you can see the scaling options. By editing scaling options, you can set the paramers that tell Scalr when to add or remove servers.

    scaling-options.png

    Certain categories of servers have settings that the others don't. The Database category, for example, has a tab for scheduling backup frequency and snapshot rotations.

    A bundle is a snapshot of the storage volume, like EBS. A backup is the file generated through mysqldump or equivalent.

    mysql-settings.png

    Poke around a bit to familiarize yourself with your options. Good? Click "Save" and you'll get the option to launch your farm, and now Scalr will launch servers with your cloud credentials.

    launch-farm.png

    You can return to this view by clicking Server Farms > View all ...

    servers view all.png

    and then selecting Options > Edit of your farm.

    farm options.png

    Setting DNS

    Once you have your Server Farm running, you'll want to set up DNS, which Scalr manages for you. Log in to your domain name registrar, and change the name servers to point to ns1.scalr.net (the planet - a), ns2.scalr.net (the planet - b), ns3.scalr.net (ec2 eu-west), and ns4.scalr.net (ec2 us-east). This will allow Scalr to create and update DNS records as your infrastructure changes.

    Alternatively, you can skip this step and use subdomains of scalr.ws like yourapp.scalr.ws, if you want to test things out first.

    Once you've done this, running the WHOIS command for your domain (whois example.com) will display this output:

    listed nameservers.png

    You can tell Scalr to create your DNS records (dns zone) by going to Websites > DNS Zones > Add new:

    manage dns.png

    If you don't have a domain to use (or haven't set nameservers to Scalr's), Scalr can create a subdomain of scalr.ws for you. All you other domain fancypants can enter your domain name (or your subdomain). Choose to which role in which farm you want to direct traffic, then click "Next."

    add dns zone.png

    Add any other DNS records you might have (e.g. for Gmail and Google Apps), and click "Create DNS zone." Now your domain is all set up. It's okay; we'll wait while you do a little victory dance.

    create dns zone.png

    Setting Apache virtual hosts

    If you have multiple websites, you may want them to share the same infrastructure. If so, you can use virtual hosts to put them side by side on the same Apache servers. Go to Websites > Apache virtual hosts and click "Add new":

    manage vhosts.png

    Add your domain or subdomain, and choose the farm (and the role if you have multiple Apache roles) that should have the virtual host:

    add vhost.png

    Set the virtual host parameters, such as the directory where your website is located.

    vhost directory.png

    Hit save and you're done. If you want https or SSL, enable the option and upload your key and certificate (CA certificate is not always required):

    add vhost ssl.png

    You can set more options for SSL too:

    vhost directory ssl.png

    Uploading your site and database

    Now you have a farm that scales, is redundant, and brings you coffee1250329740_package.png, but doesn't yet do anything for your website.

    If you use a code repository, you are in luck. Simply use this guide to Scalr-tools to upload your site code.

    Otherwise, select the adequate role (most likely an "app" role like app-apache) and choose an instance from the list. SSH into that instance by clicking the little black terminal icon. (You can also download the private key: farm's Role View link > Options of the role you want to log into. Use your own terminal with the command ssh -i /path/to/private/key root@host). Make all the changes you would like, and when you are done, choose "Create server snapshot" in the dropdown menu corresponding to the instance you just modified. You will get a prompt to rename the role; think of this as the "Save as" option.

    If you need to upload files via FTP, use the FTP install script on a server to enable access, but be prepared to check the logs of the install script under Logs > Scripts to troubleshoot execution.

    To configure your database, or any other role, just do the same, or if you prefer a web-based tool, click "MySQL Status" in your farm's options drop-down, and click "Launch PHPMyAdmin."

    Using scripts

    1250330772_quick_restart.png

    Scripts are cool! You can use scripts to execute commands on instances, or you can trigger scripts in certain events or even periodically to replace cron jobs.

    Pro tip: you can use the SVN or Git script to automate deployment of code from your repository to your servers. Here are the parameters to the SVN script:

    Svn Repo Url: URL to your code repository
    Svn User: user authorized to checkout code
    Svn Password: user's password
    Svn Revision: any particular revision of your code
    Svn Co Dir: directory to checkout code to, for example /var/www/html
    

    To trigger scripts in certain events, go to "Farms View", click Options > Edit for the right farm, then select the role on which you would like events to trigger scripts. One of the tabs on the side shows "Scripting" and allows you to select from a list of events and scripts. You can find more details on scripting here.

    Keeping up to date

    For important announcements and status updates, follow @scalr on Twitter. Scalr also has a Facebook page where you can discuss new features and ask questions with the rest of the Scalr community. You like us, don't you? Don't you?!

    Tags: (Edit tags)
    • No tags
    FileSizeDateAttached by 
     1250329335_starthere.png
    Start here
    23.27 kB09:42, 15 Aug 2009SebastianActions
     1250329399_Startup Wizard.png
    Wizard
    16.59 kB09:44, 15 Aug 2009SebastianActions
     1250329622_package_settings.png
    Settings
    13.78 kB09:47, 15 Aug 2009SebastianActions
     1250329740_package.png
    Components
    12.5 kB09:49, 15 Aug 2009SebastianActions
     1250330772_quick_restart.png
    Scripts
    8.68 kB10:08, 15 Aug 2009SebastianActions
     accessidentifiers.png
    Access Identifiers
    36.49 kB08:34, 20 Aug 2009SebastianActions
     add dns zone.png
    No description
    26.15 kB06:51, 6 Nov 2010SebastianActions
     add vhost ssl.png
    No description
    26.4 kB07:54, 6 Nov 2010SebastianActions
     add vhost.png
    No description
    20.36 kB07:50, 6 Nov 2010SebastianActions
     add-nginx.png
    No description
    17.08 kB12:30, 1 Nov 2010SebastianActions
     added-nginx.png
    No description
    20.77 kB12:30, 1 Nov 2010SebastianActions
     build-new-server-farm.png
    No description
    15.41 kB12:30, 1 Nov 2010SebastianActions
     choose-location.png
    No description
    17.63 kB12:30, 1 Nov 2010SebastianActions
     completed-farm.png
    No description
    31.66 kB12:29, 1 Nov 2010SebastianActions
     create dns zone.png
    No description
    75.28 kB06:51, 6 Nov 2010SebastianActions
     default environment.png
    No description
    17.7 kB04:09, 4 Nov 2010SebastianActions
     farm options.png
    No description
    16.55 kB04:14, 4 Nov 2010SebastianActions
     infrastructure clouds.png
    Infrastructure clouds
    20.92 kB23:01, 3 Sep 2011SebastianActions
    launch-farm.png
    No description
    20.33 kB21:42, 1 Nov 2010SebastianActions
     listed nameservers.png
    No description
    7.95 kB19:00, 4 Nov 2010SebastianActions
     manage dns.png
    No description
    17.88 kB18:30, 4 Nov 2010SebastianActions
     manage environments.png
    No description
    17.71 kB04:09, 4 Nov 2010SebastianActions
     manage vhosts.png
    No description
    18.45 kB18:29, 4 Nov 2010SebastianActions
     mysql-settings.png
    No description
    83.58 kB12:29, 1 Nov 2010SebastianActions
     name-your-farm.png
    No description
    17.2 kB12:30, 1 Nov 2010SebastianActions
     Rackspace.png
    No description
    16.17 kB10:46, 1 Feb 2011SebastianActions
     scaling-options.png
    No description
    87.04 kB12:29, 1 Nov 2010SebastianActions
     Scalr diagram.001.png
    Applications, Farms, Instances, and Roles
    44.09 kB05:09, 15 Aug 2009SebastianActions
     Scalr diagram.png
    No description
    97.43 kB18:41, 18 Mar 2010SebastianActions
     select-roles-tab.png
    No description
    8.26 kB12:30, 1 Nov 2010SebastianActions
     servers view all.png
    No description
    14.59 kB06:55, 4 Nov 2010SebastianActions
     setup ec2.png
    No description
    27.28 kB04:09, 4 Nov 2010SebastianActions
     setup eucalyptus.png
    No description
    40.9 kB04:09, 4 Nov 2010SebastianActions
     SignintoAmazon.png
    Sign in to Amazon
    26.34 kB08:34, 20 Aug 2009SebastianActions
     vhost directory ssl.png
    No description
    82.31 kB07:54, 6 Nov 2010SebastianActions
     vhost directory.png
    No description
    64.52 kB07:50, 6 Nov 2010SebastianActions
    Comments (2)
    Viewing 2 of 2 comments: view all
    When I try to add my AWS 509 certificates the page hangs, constantly displaying the "saving... please wait" screen. I see no error messages in apache or php and my configuration seems to be valid yet my credentials are not being applied. Any ideas?
    Posted 08:59, 7 May 2011
    Just noticed in Firebug it states: unexpected end of XML source
    ) in file /js/extjs-3.3.1/ext-core.js. Is there a work around to this bug?
    Posted 22:41, 7 May 2011
    Viewing 2 of 2 comments: view all
    You must login to post a comment.

     
    Powered by MindTouch Core