Skip to main content

Arbitrium TOML specifications

Project#

In the Project section of the arbitrium.toml, you need to set the basic information for the CLI to work with your project.

Project.ApiToken#

string The API token generated for your chosen environment. To generate a new API token, click here

Project.Path#

string The full path to your directory containing your Dockerfile and all your sub directories. To build your application, you need to have the Dockerfile at the root of this directory.

Project.Staging#

bool If you are using staging.edgegap.com as your testing environment, put this variable to true otherwise, keep it to false to manage your applications with on console.edgegap.com

[Project]
ApiToken = "token MY_TOKEN_FOR_ARBITRIUM_API"
Path = "C:\\Users\\user1\\myproject"
Staging = false

Registry#

In the registry part of this TOML, specify where your image will be pushed and the credentials needed. Those credentials need push and pull permissions since they will be uploaded to Arbitrium and used to deploy your application.

For more information on registry or to create a place to push your image click here

Registry.DockerImage#

string Name of your docker image (ex: edgegap-public/tutorial)

Registry.Repository#

string Name of the repository you want to use. From the init command, you can specify only 3 options (docker.io, gcr.io or harbor.edgegap.net). If you are not using any of these, feel free to change it to your repository of choice here.

Registry.Token#

string The password of your user or robot to push and pull your image from the repository.

Registry.User#

string The username of your user or robot to push and pull your image from the repository. If using harbor.edgegap.net as your repository, the Registry.User will start with robot$.

Registry Exemple#

[Registry]
DockerImage = "secret-repo/my-awesome-app"
Repository = "harbor.edgegap.net"
Token = "SUPER_SECRET_TOKEN"
User = "robot$my-awesome-app-robot-account"

Application#

In the Application part of the TOML, we define what it takes to create an application.

Application.Name#

string The name of your application.

Application Exemple#

[Application]
Name = "my-awesome-app"

Envs#

list List of environment variables that your application uses.

[Envs].Key#

string Key of the environment variables

[Envs].Value#

string Value of the environment variables

[Envs].Secret#

bool If the environment variable values contains critical information put this to true

Envs Exemple#

[[Envs]]
Key = "Key1"
Secret = false
Value = "Value1"
[[Envs]]
Key = "Key2"
Secret = true
Value = "super_secret_value"

Ports#

list List of ports of your application version.

[Ports].Name#

string Name of your port, used to be easily identifiable.

[Ports].PortNumber#

integer Port number that your server is exposed to (ex: 80, 443, 22)

[Ports].ToCheck#

bool If enabled, Arbitrium will try to check if the port is open before putting your deployment.

[Ports].Tls#

bool (Beta) Enables TLS upgrade. For more information (click here)

Port Examples#

[[Ports]]
Name = "webapp"
PortNumber = 80
Protocol = "HTTP"
Tls = false
ToCheck = true
[[Ports]]
Name = "Game Port"
PortNumber = 5000
Protocol = "TCP"
Tls = false
ToCheck = true

Version#

In the Version part of the arbitrium.toml, you will specify your application version specifications.

Version.Vcpu#

integer How much units of CPU your application version needs.

Version.Memory#

integer How much Memory your application needs in Megabytes

Version.Context#

bool If your application is using a context injector. More information about context injection here

Version.Caching#

bool If your application needs to be cached in every available location. More information about caching

Version.Name#

string Application version name. If left empty and Versioning.SemanticVersioning = true the version name will be the versioning current version. Otherwise, it will generate a random name for you finishing with a UUID

Version Exemple#

[Version]
Caching = false
Context = false
Memory = 128
Vcpu = 128
Name = ""

Versioning#

In the Version part of the arbitrium.toml, you can decide how an application version name is generated. More information about semantic versioning here

Versioning.SemanticVersioning#

bool If using semantic versioning for your application, enable it. Otherwise, update your application name each time you need to push.

Versioning.Prefix#

string Prefix of the version name. A versioning with a prefix v will look like: v1.0.0.

Versioning.Suffix#

string Suffix of the version name. A versioning with a suffix x will look like: 1.0.0x.

Versioning.Major#

integer Major release version

Versioning.Minor#

integer Minor release version

Versioning.Patch#

integer Patch release version

Versioning Exemple#

[Versioning]
Major = 1
Minor = 0
Patch = 0
Prefix = "v"
SemanticVersioning = true
Suffix = ""

arbitrium.toml exemple using semantic versioning#

[Application]
Name = "cli-application"
[[Envs]]
Key = "Key1"
Secret = false
Value = "Value1"
[[Envs]]
Key = "Key2"
Secret = false
Value = "Value2"
[[Ports]]
Name = "web"
PortNumber = 5000
Protocol = "HTTP"
Tls = false
ToCheck = true
[Project]
ApiToken = "YOUR API TOKEN"
Path = "FULL PATH TO YOUR PROJECT"
Staging = false
[Registry]
DockerImage = "REPOSITORY/IMAGE"
Repository = "harbor.edgegap.net"
Token = "HARBOR ROBOT TOKEN"
User = "HARBOR ROBOT NAME"
[Version]
Caching = false
Context = false
Memory = 128
Vcpu = 128
[Versioning]
Major = 1
Minor = 0
Patch = 0
Prefix = "v"
SemanticVersioning = true
Suffix = ""