Configuring your application
Configure the deployment options for your applications

Passing config to run

The run command requires you to provide a toml based configuration file. This file controls the resources that the scheduler uses, how machines are dynamically scaled, and what features are enabled.
The available configuration options are shown in an example configuration file below, which is available in your install as ~/hadean/examples/configs/config.toml
1
args = "test"
2
3
[requirements]
4
# Number of cores each user process uses, affects scheduling and
5
# machine allocation
6
cores = "1/16"
7
# Amount of memory required by each user process, same as above
8
memory = "8 MiB"
9
10
[tools]
11
# These features are not available in the freemium version of the
12
# Hadean SDK
13
tracing_enabled = false
14
debugging_enabled = false
15
16
[cluster]
17
# The number of machines to allocate in preparation for scaling up.
18
# 0 = always allocate just in time
19
# 1 = keep a VM around between runs that makes rapid iteration easier
20
# 2+ = keep n VMs around between runs and always keep n-1 VMs on hand
21
# ready to use while your application is scaling
22
standby_machines = 1
23
# The time (in seconds) after which all standby machines will be
24
# deallocated after an application has stopped.
25
machines_timeout = 3600
Copied!

Application arguments

The args setting controls what arguments are passed to the user binary. For environment variables, see: Hints, Tips, and Troubleshooting

The [requirements] section

The requirements section states what your application needs for it to be launched. In the freemium version, this also controls what resources are needed by each application that is created via the spawn API. However, the full API is capable of using spawn with arbitrary resource requirements.

The [tools] section

The tools section of the configuration controls what features are enabled on the platform. These features are not available in the freemium version of the platform.

The [cluster] section

The cluster section of the configuration controls how the cluster scales:
  • standby_machines controls how many machines are provisioned ahead of time for scaling events.
  • machine_timeout controls how long the system should stay idle running no application before it starts removing standby machines.
For faster dev & test iteration, it's recommended to keep your standby_machines at 1 or above, which will ensure that you don't have to wait to scale up or down every time you use the run command. If your application needs to scale rapidly, you should set standby_machines to at least 2, so that the platform begins creating a new VM once all VMs are in use.

Location

When creating new clusters to deploy your application to, the Hadean Platform needs to know which geographic region to provision them in. Use the --location flag to pass a location from the list below.:
1
hadean cluster --name <cluster-name> create --location="uksouth"
Copied!
You can also set a default for all new clusters by using the configcommand:
1
hadean config --default-location <location>
Copied!
The following locations are available:
  • westeurope
  • uksouth
  • centralus
  • eastus
  • eastus2
  • northcentralus
  • southcentralus
  • westcentralus
  • westus
  • westus2
  • australiaeast
  • southeastasia
  • eastasia

Analytics

You can turn analytics tracking on or off using the hadean config command. Simply specify true or false as follows:
1
# Turn analytics off
2
hadean config --analytics false
3
4
# Turn analytics on
5
hadean config --analytics true
Copied!
The analytics data we collect is minimal. You can see tracing for when we send analytics requests via the --debug flag on any command. Analytics are on by default.
Last modified 2mo ago