Skip to main content

Add a Provider

The DevSpace team maintains providers for popular services such as:

These providers can be installed with the DevSpace CLI in the following form:

devspace provider add docker

You can get a list of available 1st party providers by using the command:

devspace provider list-available

Via DevSpace Desktop Application

Navigate to the 'Providers' view and click on the 'Add' button in the title. Select one of the providers supplied by default, or click on the '+' button to add a custom one.

You will be prompted to fill some additional settings if needed, depending on the provider's needs.

info

Under the hood, the Desktop Application will call a devspace provider add PROVIDER

Adding a custom provider

After you click the Add button in the Providers section, you can click the big + button to add a custom provider, then fill the Source section with either

  • A GitHub link to the provider's project
  • An URL to a provider.yaml
  • A File Path to a provider.yaml

Via DevSpace CLI

The providers in this list can easily be installed like:

devspace provider add docker
devspace provider add kubernetes
devspace provider add ssh
devspace provider add aws
devspace provider add azure
devspace provider add gcloud
devspace provider add digitalocean
Multiple providers at the same time

You can use the --name flag to add multiple providers of the same type with different options, for example devspace provider add aws --name aws-gpu -o AWS_INSTANCE_TYPE=p3.8xlarge

From Github

You can specify a custom provider, directly from GitHub, by using the format my-username/repo, so for example:

devspace provider add khulnasoft-lab/devspace-provider-terraform

DevSpace will search the latest release for a provider.yaml and download that automatically. This should work for private GitHub repositories where DevSpace will use the local https credentials to connect to the GitHub repository.

If you want to install the provider from a different release, you can do the following:

devspace provider add my-org/my-repo@v0.0.1

From Local Path

If you have locally downloaded providers, you can also add them directly to DevSpace, by pointing to the file path of provider.yaml manifest:

devspace provider add ../devspace-provider-mock/provider.yaml

From URL

You can also specify the URL to the provider.yaml file, for example:

devspace provider add https://dev.khulnasoft.com-provider-ssh/releases/download/v0.0.3/provider.yaml

Set Provider Options

Each provider has a set of options, those options can be different for each of them, as they are defined by the provider's developers.

Managing options from DevSpace Desktop Application

To manage options from the app, head over the Providers section, and click Edit on the provider you want to configure.

Managing options from DevSpace CLI

Options for providers can be set during the use or add phase:

devspace provider add <provider-name> -o KEY=value

or

devspace provider use <provider-name> -o KEY=value

Else, to can manage options afterwards from CLI, you can list the table of provider's options by using:

devspace provider options <provider-name>

An example output for the AWS Provider is:

          NAME            | REQUIRED |          DESCRIPTION           |         DEFAULT         |          VALUE
----------------------------+----------+--------------------------------+-------------------------+--------------------------
AGENT_PATH | false | The path where to inject the | /var/lib/toolbox/devspace | /var/lib/toolbox/devspace
| | DevSpace agent to. | |
AWS_ACCESS_KEY_ID | false | The AWS access key id | |
AWS_AMI | false | The disk image to use. | |
AWS_DISK_SIZE | false | The disk size to use. | 40 | 40
AWS_INSTANCE_TYPE | false | The machine type to use. | c5.xlarge | c5.xlarge
AWS_REGION | true | The AWS cloud region to create | | us-west-2
| | the VM in. E.g. us-west-1 | |
AWS_SECRET_ACCESS_KEY | false | The AWS secret access key | |
AWS_VPC_ID | false | The vpc id to use. | |
INACTIVITY_TIMEOUT | false | If defined, will automatically | 10m | 10m
| | stop the VM after the | |
| | inactivity period. | |
INJECT_DOCKER_CREDENTIALS | false | If DevSpace should inject docker | true | true
| | credentials into the remote | |
| | host. | |
INJECT_GIT_CREDENTIALS | false | If DevSpace should inject git | true | true
| | credentials into the remote | |
| | host. | |

You can see this table as an overview, you can change each option using:

devspace provider set-options <provider-name> --option <KEY>=<VALUE>

So for example, to change the default disk size from 40gb to 120gb, you could use:

devspace provider set-options aws --option AWS_DISK_SIZE=120

And check again the options for the provider using devspace provider options aws:

          NAME            | REQUIRED |          DESCRIPTION           |         DEFAULT         |          VALUE
----------------------------+----------+--------------------------------+-------------------------+--------------------------
AGENT_PATH | false | The path where to inject the | /var/lib/toolbox/devspace | /var/lib/toolbox/devspace
| | DevSpace agent to. | |
AWS_ACCESS_KEY_ID | false | The aws access key id | |
AWS_AMI | false | The disk image to use. | |
AWS_DISK_SIZE | false | The disk size to use. | 40 | 120
AWS_INSTANCE_TYPE | false | The machine type to use. | c5.xlarge | c5.xlarge
AWS_REGION | true | The aws cloud region to create | | us-west-2
| | the VM in. E.g. us-west-1 | |
AWS_SECRET_ACCESS_KEY | false | The aws secret access key | |
AWS_VPC_ID | false | The vpc id to use. | |
INACTIVITY_TIMEOUT | false | If defined, will automatically | 10m | 10m
| | stop the VM after the | |
| | inactivity period. | |
INJECT_DOCKER_CREDENTIALS | false | If DevSpace should inject docker | true | true
| | credentials into the remote | |
| | host. | |
INJECT_GIT_CREDENTIALS | false | If DevSpace should inject git | true | true
| | credentials into the remote | |
| | host. | |

Single Machine Provider

By default, DevSpace will use a separate machine for each workspace using the same provider, you can enable Reuse machine in a provider in order to use a single machine for all workspaces.

In the desktop app the option is available in the option management interface for the provider (see section above)

In the CLI you can set this option using:

devspace provider use <provider-name> --single-machine

Default Provider

When adding a provider to DevSpace, you can specify it to be the default provider, this implies that when you create a Workspace, this provider will be used if no other is specified.

In the desktop app, you can set a provider to be default in the option management interface for the provider (see section above)

In the CLI you can set this option using:

devspace provider use <provider-name>

Community Providers

The community maintains providers for additional services.

These providers can be installed with the DevSpace CLI in the following form:

devspace provider add <user/repository>