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:
- Defining sizes and data center region for your servers
- Installing extra packages
- Specifying the version of a component
- Configuring application components to share a server
- Customizing component-specific configurations
How do I use a manifest file?
Manifest settings are defined in a file called manifest.yml
. For Rails/Rack applications the path for manifest.yml
is:
<application-root>/.cloud66/manifest.yml
To get started:
- Add this file to your code
- Populate it with appropriate values (see below for examples)
- Commit your changes to your repository
- Build your application
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:
- A Cloud 66 Account — If you don’t already have one, sign up for a Cloud 66 account. You’ll get free unlimited access to all products for 4 weeks.
- Application code — Application code should be hosted in a (secure) publicly accessible git repository and pre-built images should be hosted in image publicly accessible repositories.
- A manifest file - Create a file named
manifest.yml
in a folder named.cloud66
, that is in turn located in the root of your source code and checked into your repository. - A Cloud account linked to Cloud 66 or your own servers set up — See below.
An account with your cloud provider of choice. Cloud 66 supports AWS, Google Cloud, Microsoft Azure, DigitalOcean, Hetzner, Linode, 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.
Registered servers are a great way for operations teams to manage and allocate physical server resources for consumption by dev teams. Registered servers are a pool of your own servers (on a private or public cloud) that can be used for any application and configuration. For more information on how to add your own registered servers, we recommend this tutorial.
Setting up your first manifest file
To populate the manifest.yml
for your application:
- Follow the steps in the Getting Started guide but stop before the Defining your application step.
- Add the YAML below to your
manifest.yml
file:
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:
- You can find the available values for
size
andregion
in our API documentation. - You can find the
key_name
for your cloud provider(s) listed on your Dashboard.
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?
- Understand the structure of manifest files.
- Learn more about the power of manifest files with our detailed how-to guide.
- Learn how to use CustomConfig - a powerful tool for configuring the components of your application.