Manifest settings for web components

Overview

This reference doc details all the Manifest settings for webserver, proxy and framework components. If you’re unfamiliar with Manifest files and how they work, please follow our getting started guide and detailed how-to guide.

If you’re looking for the Manifest settings for data, caching & storage components or load balancers, please see our respective reference documents for those components.

Key to table headings

Gateway

Note

The gateway should be defined and open before you can use it in manifest.

The following settings are available via the Manifest file:

Option Applied on Description Clouds
name
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Specify the name of gateway you want to use for your application. All
username
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Specify the username which should be used to connect to Bastion server. All

Example YAML for gateway

gateway:
  name: aws_bastion
  username: ec2-user

Nginx

Nginx is the default webserver & reverse proxy for applications managed by Cloud 66.

The following settings are available via the Manifest file:

Option Applied on Description Clouds
cors
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Enable Cross Origin Resource Sharing All
nginx/precompiled_url
Build-only ⓘThis setting only applies when the app is first built (or cloned) or when new servers are added.
A URL pointing to a file in tar.gz format that contains a custom version of Nginx that will be used with your application. This Nginx package MUST be compiled using our Cloud 66 compiler. Please read the docs on the Github page for more details. All
extra_build_arguments (deprecated)
Build-only ⓘThis setting only applies when the app is first built (or cloned) or when new servers are added.
Extra build argument string that will be added to the nginx build command. If you require additional modules that themselves require specific source to be present, you should use a BEFORE_NGINX deploy hook to ensure that source is present. You can use the cloud66/download snippet to achieve this easily. The following build arguments are currently always added: --with-http_realip_module --with-ipv6 --with-http_v2_module regardless of this value. All
perfect_forward_secrecy (deprecated)
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Enable Perfect Forward Secrecy All

Example YAML for Nginx

rails:
  configuration:
    nginx:
      extra_build_arguments: "--add-module=/path/to/module"
      perfect_forward_secrecy: true # deprecated

CORS configuration

If required, you can also specify the allowed origin (as ‘*’ or a single origin) and methods. You can also specify a comma-separated list of origins, headers, and whether to allow credentials for CORS.

rails:
  configuration:
    nginx:
      cors:
        origin: '*'
        methods: 'GET, OPTIONS'
        headers: 'Custom-Header, Another-Header'
        credentials: true

Node version (for Rails applications)

We automatically install the latest release of Node version 6.x.x when we set up your Rack/Rails application servers. You can control which version is installed by editing the manifest file for any Rails application as follows:

rails:
  configuration:
    node_version: "12"       # will install latest release of v12.x.x
rails:
  configuration:
    node_version: "12.18.3"  # will install specific v12.18.3

If you need a newer version of Node, you can install one using the same method above. We support any version of Node that is supported by our version manager (which itself supports the Node distribution list).

Applying changes

To apply changes to the Node version you need to update your manifest file, then deploy-with-options and select the Apply Ruby/Node upgrades option.

Post-deployment health checks

You can configure your application to automatically run health checks against an HTTP endpoint each time it is deployed. Results of these checks are available on your Cloud 66 dashboard under ActiveProtect.

Note that all of the Health Check settings must be nested under the configurationactiveprotecthealth_check sub-node.

The following settings are available via the Manifest file:

Option Applied on Description Clouds
endpoint
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The endpoint to that will be queried during the check All
accept
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The set of HTTP codes we will accept as valid from the endpoint (as an array) All
timeout
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The timeout limit in seconds of the endpoint (limit: 10) All
max_redirects
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The number of acceptable HTTP redirects (limit: 10) All
cooldown
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The delay between the end of the deployment process and the start of the test, in seconds. (limit: 1800) All

Example YAML for post-deployment health check

rails:
  configuration:
    activeprotect:
      health_check:
        endpoint: '/' # Default is root '/'
        accept: ["200", "300-399"] # Default is 200
        timeout: 2 # Default is 5
        max_redirects: 5 # Default is 3
        cooldown: 120 # Default is 0 

Rails

A Rails application type in the manifest file gives you fine control over things like the Ruby version or the server the rails application is deployed on.

Option Applied on Description Clouds
activeprotect
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The parent node for ActiveProtect settings (see whitelist and http_ban_rate below) All
activeprotect / whitelist
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
A comma-separated whitelist of IPs that should be ignored by your ActiveProtect configuration. Must be nested under activeprotect. All
activeprotect / http_ban_rate
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Set the threshold of *requests per minute* from a single IP address. The default is 2000. Must be nested under activeprotect. All
asset_pipeline_precompile
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Specify whether to use asset pipeline compilation - this will be taken into account during redeployment. NOTE: Rails only - does not apply to other Rack servers. All
bundler / options
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Customise your bundle install command by specifying options. See below for some example options and defaults. All
do_initial_db_schema_load
Build-only ⓘThis setting only applies the first time the app is built,
Specify whether to perform rake db:schema:load on a new application build. All
firewall / create_web_rules
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Cloud 66 automatically creates firewall rules to expose your web application to the outside world. You can configure this via your Traffic settings, or disable it completely by setting this value to false. Default is true. All
iam_instance_profile_name
Build-only ⓘThis setting only applies when the app is first built (or cloned) or when new servers are added.
The name of the IAM instance profile that should be used when provisioning this server. Read our guide. AWS
include_submodules
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Set this to false to exclude any Git submodules from being pulled during a build. Default is true All
keep_releases
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Specify the number of releases to keep on your server(s). Default is 5. All
locked_passenger_version
Deploy-with-upgrades ⓘChanges to this setting will only be applied if you choose the "Deploy with upgrades" option
Force the app to use a specific version of Passenger. This is not supported on Passenger Enterprise applications. All
memory_allocator
Deploy-with-upgrades ⓘChanges to this setting will only be applied if you choose the "Deploy with upgrades" option
The memory allocation library that will be used for your Ruby installation. Options are malloc or jemalloc. Defaults to malloc. All
nameservers
Build-only ⓘThis setting only applies when the app is first built (or cloned) or when new servers are added.
Set DNS servers for your application. Note that if you specify empty array i.e [ ], it won't add any nameserver to your servers. Default is [ 8.8.8.8, 8.8.4.4 ] All
operating_system
Build-only ⓘThis setting only applies when the app is first built (or cloned) or when new servers are added.
The version of Ubuntu to install on the server that hosts your Rails app. Accepted values: ubuntu1604 or ubuntu1804 All
passenger_process_memory
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
A value (in MB) that Cloud 66 will use for each Passenger process. This is also used to calculate the value of the passenger_pool_max variable in your Nginx configuration which in turn sets passenger_max_pool_size. All
reserved_server_memory
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
A value in MB that Cloud 66 will assume should be left available. This will affect any automatically calculated values. All
root_disk_size
Build-only ⓘThis setting only applies when the app is first built (or cloned) or when new servers are added.
Default size of root disk (in GB) for servers used by application. Default value is 50. AWS, Azure, GCE
root_disk_type
Build-only ⓘThis setting only applies when the app is first built (or cloned) or when new servers are added.
Disk type, accepted values being ssd and magnetic. Default is ssd. AWS, GCE
ruby_version
Deploy-with-upgrades ⓘChanges to this setting will only be applied if you choose the "Deploy with upgrades" option
Specify the version of Ruby to use. Also applies when you want to upgrade your Ruby version. We recommend that you use this and *remove the Ruby version declaration from your Gemfile* to avoid situations where your application will not run on every server during an upgrade. All
vn_name
Build-only ⓘThis setting only applies when the app is first built (or cloned) or when new servers are added.
The name of the Virtual Network in which you would like to create your servers. Azure
vpc_id
Build-only ⓘThis setting only applies when the app is first built (or cloned) or when new servers are added.
ID of the AWS VPC in which you would like to create your servers. Note that you must provide subnet_id for all servers in your application. AWS

Important

In order to use a vpc_id, you must provide subnet_id for all servers used by your application.

Example YAML for Rails

rails:
  configuration:
    ruby_version: 2.7.2
    asset_pipeline_precompile: true
    bundler:
      options:
        without: ["development", "test", "custom"]
    do_initial_db_schema_load: false
    reserved_server_memory: 0 #default value
    passenger_process_memory: 200 #default value
    memory_allocator: jemalloc # malloc is default
    locked_passenger_version: 4.0.59
    activeprotect:
      whitelist: 123.123.123.123,234.234.234.234
      http_ban_rate: 2000 # Default
    vpc_id: vpc-64872001
    root_disk_size: 100
    root_disk_type: ssd
    nameservers: ['8.8.8.8', '8.8.4.4']
    iam_instance_profile_name: rails-perms

Examples of Bundle Install options (Rails/Rack)

This allows you to customise your bundle install command by specifying options in your Manifest. We’ve listed some common examples below.

Note

This is an advanced feature for expert users of Bundler.

Option Applied on Description Clouds
bundler / options / without
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
An array of environments you want to exclude during bundle install e.g. ["development", "test", "custom"] Default: [] if Rails env is development, or ["development", "mock", "test"] otherwise. All
bundler / options / deployment
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Default: true All
bundler / options / quiet
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Default: true All
bundler / options / full-index
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Default: false All
bundler / options / ...
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
Any other valid bundle install options you want to apply All

Example YAML for Bundle Install options in Rails

rails:
    configuration:
      bundler:
        options:
          without: ["development", "test", "custom"]
          deployment: true
          quiet: true

Rack

For Rack you should use the same settings as Rails but the top node in your YAML must be rack (see below). Also note that asset_pipeline_precompile only applies to Rails servers.

Example YAML for Rack

rack:
  configuration:
    ruby_version: 2.7.2
    do_initial_db_schema_load: false
    reserved_server_memory: 0 #default value
    passenger_process_memory: 200 #default value
    memory_allocator: jemalloc # malloc is default
    locked_passenger_version: 4.0.59
    activeprotect:
      whitelist: 123.123.123.123,234.234.234.234
    vpc_id: vpc-64872001
    root_disk_size: 100
    root_disk_type: ssd
    nameservers: ['8.8.8.8', '8.8.4.4']
    iam_instance_profile_name: rack-perms

Rails (Rack) deployment health checks

These checks define tests to confirm whether your application has been successfully deployed, and to mark a deployment as “failed” if any do not pass. For more details on health checks please read our how-to guide. Health Checks have the following Manifest options:

Option Applied on Description Clouds
protocol
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The protocol(s) to use when running the check(s). Acceptable values are http or https. All
host
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The hostname or IP address that will we called during the check. All
port
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The port number that must be used when submitting the request. The default is 80 if you set http as your protocol and 443 if you set it to https All
endpoint
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The URL, path or endpoint that should be checked. This can be any URL in the application. All
accept
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
A comma separated list of the HTTP response codes that should be considered as a "pass" of this check. All values must be enclosed in quotes. Ranges can be defined with dashes and both the first and last port numbers must be included. For example ["200-201", "300-305"] All
timeout
Redeploy ⓘChanges to this setting will be applied when you next deploy your application
The wait, in seconds, before the check will time out. The max is 120. All

Example YAML for Rails Health Checks

  rails:
    configuration:
      health:
        protocol: 'https'
        host: '127.0.0.1'
        port: 4430
        endpoint: '/'
        accept: ["200", "300-399"]
        timeout: 30

Sinatra

For Sinatra use Rack

More on Manifest files