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
Is my yaml valid?
The manifest file is YAML formatted. You can check its validity at YAML Validator 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.ymlin 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,Latitude.sh, OVH, Packet, Rackspace, and
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
node: configuration: custom_log_files: ["/tmp/mylog/*/*.log"]
You’ll see that we’re defining several things in this YAML:
- The component type we are configuring (
- The location of our custom log files (
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:
node: configuration: custom_log_files: ["/tmp/mylog/*/*.log"] 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 Node application on Digital Ocean, at their London data centre and on a 2CPU and 2GB cloud server.
- You can find the available values for
regionin our API documentation.
- You can find the
key_namefor your cloud provider(s) listed on your Dashboard.
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.