This tutorial is outdated. This was originally written is for Otter v2, which is not the current version of Otter. Stay tuned, an updated tutorial will be coming soon!
Otter helps you provision and configure your servers automatically, without ever needing to log-in to a command prompt.
This tutorial is also available as a video:
In this tutorial, you will learn how to define reusable sets of configuration called “roles”, and assign those roles to servers to scale your infrastructure.
We’ll start with a completely clean installation of Otter, and we’ll begin by creating a role.
Roles are reusable sets of configuration in Otter.
Navigate to Roles and select Create Server Role.
Roles > Create Server Role
We’ll name the role AccountsWeb because this role will be assigned to any server that needs to have an IIS configuration for the Accounts application. Last, click Save Server Role.
Next add a Configuration Plan to the AccountsWeb role.
We do this by selecting the Create Configuration Plan option on the role overview page. This will open up Otter’s Visual Plan Editor.
Configuration plans in the visual plan editor are created by using the Drag-and-Drop interface.
Simply select the Operation that you want to add to the plan, and drag it to the editing section.
A pop-up will then appear to prompt you for required information and customization options.
Since this is a role used for website applications, we’ll start by creating an Application Pool using the Ensure AppPool Operation.
This Operation has more than three dozen different customization options that can be configured exactly how you need.
For this tutorial, we’ll name our AppPool AccountsWebAppPool, since the name of this application is Accounts.
We’ll use the .NET runtime version 4.0, and select Integrated Pipeline.
When possible, drop-downs are included for customization options.
Next we will create the site, with the EnsureSite Operation.
And again, we’ll fill in the needed information like: Site Name, the Application Pool we just created, where files are on disk, and site bindings.
We’ll save our plan, and we can see on the AccountsWeb role overview page that the role now has configuration associated with it.
Plans can also be viewed and edited with OtterScript by clicking the Switch to Text Mode Button.
Next, we’ll create a server that we can associate with our AccountsWeb role.
We’ll navigate to the Servers page and select Create Server.
Servers > Create Server
We’ll name the server TestWeb1 since it is used for testing web applications, and assign it to the Testing Environment.
We enter in the server details, in this case an Amazon EC2 server, and save.
From the TestWeb1 server overview page we can assign it to the AccountsWeb role, and save by clicking Assign Server Role.
Otter will check the server’s configuration and compare it to its expected configuration as defined by the AccountsWeb role.
As would be expected, the server isn’t correctly configured and is shown in a drift state. We will deploy our configuration to the TestWeb1 server by clicking the Remediate Drift button, and Create Job.
Remediate Drift > Create Job
Otter will now deploy the desired configuration to the server, which is shown in the execution logs.
This server is no longer drifted and in its desired configuration.
The AccountsWeb role that we’ve created can now be scaled as needed by adding any number of servers desired.