Create a Tugboat Project

Arguments

  • name - Optional
    A human-readable name to associate with the project.
  • users - Optional
    A list of API Key IDs that should have user-level access to the project, and any repositories in it. This can be a single ID, or an array of IDs.
  • admins - Optional
    A list of API Key IDs that should have admin-level access to the project, and any repositories in it. This can be a single ID, or an array of IDs.
  • quota - Optional
    A disk quota in GB to impose on the project. A quota of 0 means that there is no quota.
  • memory - Optional
    The amount of memory, in MB, allocated to each service container running in the project. Setting this to 0 disables the memory limit, and service containers are allowed to use as much memory as they want. A soft limit of half this value is automatically imposed on every container, so that if the host server starts to run low on memory, service containers can start freeing their memory to hlep prevent a system-wide Out of Memory event. Default: 1024MB.

  • cpus - Optional
    The maximum number of CPU cores that each service container in the project has access to. This value does not need to be in whole numbers. Fractions as small as 0.001 are allowed. 0.000 means no limit. Default: 1.

  • base - Optional
    Whether to enable the base preview feature for the project. Default: false.

  • sleep - Optional
    After this many minutes of inactivity, a preview in this project will be suspended to save resources. A value of 0 means that previews will not be suspended. Default: 30 minutes.

  • agent - Optional
    The Tugboat Agent to use by default when creating repositories in this project. . If not specified, the default agent selection process will be used for repositories created in this project.

Example

socket.emit('tugboat', 'projects', 'create', args, callback);

Output

When a Tugboat Project is successfully created, an object containing that project's details is returned. If an array of names was provided, an array of projects is returned.

single

[
    {
        "updatedAt": "2017-02-14T18:47:18.102Z",
        "createdAt": "2017-02-14T18:47:18.102Z",
        "name": "test",
        "_id": "58a350b6ce7c680001458884",
        "sleep": true,
        "base": false,
        "size": 0,
        "quota": 0,
        "admins": ["58a22d61f405580001b36b84"],
        "users": ["58a22d61f405580001b36b86"],
        "id": "58a350b6ce7c680001458884"
    }
]

array

[
    {
        "updatedAt": "2017-02-14T18:47:18.102Z",
        "createdAt": "2017-02-14T18:47:18.102Z",
        "name": "test",
        "_id": "58a350b6ce7c680001458884",
        "sleep": true,
        "base": false,
        "size": 0,
        "quota": 0,
        "admins": ["58a22d61f405580001b36b84"],
        "users": ["58a22d61f405580001b36b86"],
        "id": "58a350b6ce7c680001458884"
    }
]

Errors

  • 1003: No Projects Found
    Returned if the requested projects could not be created.

results matching ""

    No results matching ""