Note: If you cannot find a topic, go to docs.rightscale.com where all RightScale documentation will soon be located. Also, feel free to Chat with us!
Home > Partners > Varnish > Documentation > Varnish ServerTemplate

Varnish ServerTemplate

The "Varnish Cache" 3.0 and 2.1 ServerTemplate can be imported from the MultiCloud Marketplace

Note: "Varnish Software" is the publisher of the ServerTemplate.

Table of Contents

Description and Inputs

The following inputs and descriptions apply to the Varnish Cache ServerTemplate, which includes an input from a RightScript and attributes from Chef Cookbooks and Recipes.

RightScripts

RightScript:  Varnish:update VCL
  • VS_VCL_URL: This allows you to specify the URL to a new VCL file.

Chef Cookbook and Recipes

The Chef Cookbook and Recipe names will be listed in parentheses after the attribute description. (e.g. cookbook/recipe)  Some attributes will inherit default values that are already defined in the ServerTemplate.  However some attributes are left 'unset' and do require user-defined values. 

  • Administrative interface address - Varnish has an authenticated administrative interface. This input tells Varnish which address to listen for connections. It can usually be left blank.  (varnish/admin_address)
  • Administrative interface port - This input is for the port where Varnish should listen for adminstrative connections. It must be different from the port which Varnish uses for HTTP traffic. (varnish/admin_port)
  • Address to listen on for HTTP traffic - This is the address Varnish uses for receiving HTTP traffic. It can generally be left blank, which means to listen on all interfaces.  (varnish/listen_address)
  • Port to listen on for HTTP traffic - This is the port Varnish uses to listen for HTTP traffic. It should generally be 80.  (varnish/listen_port)
  • Maximum number of threads - This sets an upper bound for the number of threads Varnish will start.  (varnish/max_threads)
  • Minimum number of threads - This sets a lower bound for the number of threads Varnish will start.  (varnish/min_threads)
  • Extra parameters - If you need to give Varnish any extra parameters you can give them here.  (varnish/parameters)
  • VCL URL - There are two ways of getting the VCL configuration file into Varnish. One is to upload it manually, the other is to specify the URL in this input field.  (varnish/remote_vcl)
  • Authentication secret - The Varnish administration interface is protected by a secret. Please create a random one and put it in this field. It is required.  (varnish/secret)
  • Storage specification - You can customise the storage Varnish uses here.  (varnish/storage_spec)
  • Varnish version - This cookbook supports multiple Varnish versions. Select the version you want to use here. Make sure you select a version which is compatible with your VCL file.  (varnish/version)

Common Runbook Operations

Configuring and Testing a Sample VCL

This simple configuration test will verify that Varnish Cache is running correctly on your server. The end result of running this test should be that when visiting the public IP address of your instance, you are redirected to www.rightscale.com --thus verifying that Varnish Cache interpreted your request and that the VCL logic worked correctly.

  1. Create a .vcl file that contains the following configurations:
    • backend default {
      .host = "www.rightscale.com";
      .port = "80";
      }
      
      sub vcl_recv {
      set req.http.host = "www.rightscale.com";
      }
      
  2. Upload your .vcl file to a publicly accessible repository (i.e. S3).
  3. When launching a server from the Varnish Cache ServerTemplate, point the VCL URL input to the path of the .vcl file you created.
  4. Try loading the front page of your instance. You should be redirected to www.rightscale.com.
You must to post a comment.
Last modified
23:44, 16 May 2013

Tags

This page has no custom tags.

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.