Getting started with manifest files

What is a manifest file?

A manifest files allows you to be more explicit about your application composition and control settings that are not usually available through the user interface or Cloud 66 toolbelt. The file describes the setup of the components that make up your application. If you’re already familiar with manifest files, refer to Building a manifest file.

These are just some examples of the settings you can control with a manifest file:

Is my yaml valid?

The manifest file is YAML formatted. You can check its validity at YAML Lint or with this command:
$ ruby -e "require 'yaml'; YAML.load_file('.cloud66/manifest.yml')"

A working example

In this example we are going to modify the configuration of the simple application we used in our Getting started guide.

What you’ll need

Before you start, please check you have the following:

An account with your cloud provider of choice. Cloud 66 supports AWS, Google Cloud, Microsoft Azure, DigitalOcean, Hetzner, Linode,Maxihost, OVH, Packet, Rackspace, Vultr, and Cloud A.

Click on any of the links above for instructions on linking your cloud provider to your Cloud 66 account.

Setting up your first manifest file

To populate the manifest.yml for your application:

  1. Follow the steps in the Getting Started guide but stop before the Defining your application step.
  2. Add the YAML below to your manifest.yml file:
rails:
  configuration:
    ruby_version: 3.0

You’ll see that we’re defining several things in this YAML:

Once we have the latest version of our Manifest checked in, we can go back to the Getting Started guide and continue from Defining your application step. Now, when you deploy your application, it will use the settings defined in your manifest file.

Defining a server for your component

The Manifest file gives you a lot of control over your components. For example, you can use the server settings to specify the exact size and region for your application server. The YAML below is an example of this in action:

rails:
  configuration:
    ruby_version: 3.0
  servers:
  - server:
      unique_name: master
      size: s-2vcpu-2gb
      region: lon1
      vendor: digitalocean
      key_name: My_DO_Account # the name of your cloud provider in your Cloud66 account

This would install your Rails server on Digital Ocean, at their London data centre and on a 2CPU and 2GB cloud server.

Caution

Editing the manifest file of an existing application may not necessarily result in changes to the deployed instance(s) of that application, even if the application is subsequently redeployed. Read our in-depth guide to understand the complexities around this.

What’s next?