Skip to content
Crow CI

OVHcloud Public Cloud

The OVHcloud provider starts Linux agent VMs as OVHcloud Public Cloud instances through the OpenStack API. OVHcloud VPS products and dedicated servers aren’t supported.

The autoscaler uses existing resources and doesn’t create any of them. Prepare the following in one Public Cloud project:

  • a credential for that project, see Authentication
  • a flavor (instance size), an Ubuntu image with cloud-init, and a network with outbound internet access, usually Ext-Net
  • one or more security groups for the agents
  • optionally, an SSH key pair for debugging

With the OpenStack CLI configured for the project, these commands list the IDs to use:

openstack flavor list
openstack image list
openstack network list
openstack security group list

This example uses an application credential in the GRA11 region. Add it to the environment of the autoscaler service from the complete example, in place of the Hetzner settings.

environment:
  - CROW_PROVIDER=ovhcloud
  - CROW_OVHCLOUD_AUTH_TYPE=v3applicationcredential
  - CROW_OVHCLOUD_AUTH_URL=https://auth.cloud.ovh.net/v3
  - CROW_OVHCLOUD_APPLICATION_CREDENTIAL_ID=${OVH_APP_CREDENTIAL_ID}
  - CROW_OVHCLOUD_APPLICATION_CREDENTIAL_SECRET_FILE=/run/secrets/ovh-app-credential-secret
  - CROW_OVHCLOUD_PROJECT_ID=0123456789abcdef0123456789abcdef
  - CROW_OVHCLOUD_REGION=GRA11
  - CROW_OVHCLOUD_FLAVOR_ID=<flavor ID>
  - CROW_OVHCLOUD_IMAGE_ID=<image ID>
  - CROW_OVHCLOUD_NETWORK_ID=<network ID>
  - CROW_OVHCLOUD_SECURITY_GROUPS=crow-agents
Variable Required Description
CROW_OVHCLOUD_AUTH_TYPE yes Authentication method, see Authentication
CROW_OVHCLOUD_AUTH_URL yes Keystone v3 endpoint: https://auth.cloud.ovh.net/v3, or https://auth.cloud.ovh.us/v3 for OVHcloud US
CROW_OVHCLOUD_PROJECT_ID yes Public Cloud project ID
CROW_OVHCLOUD_REGION yes Region, such as GRA11 or US-EAST-VA-1
CROW_OVHCLOUD_FLAVOR_ID yes Flavor ID (not the name)
CROW_OVHCLOUD_IMAGE_ID yes Image ID, the default agent setup expects Ubuntu
CROW_OVHCLOUD_NETWORK_ID yes Network ID, the agents need to reach the Crow server and container registries
CROW_OVHCLOUD_SECURITY_GROUPS yes Comma-separated security group names
CROW_OVHCLOUD_KEYPAIR no SSH key pair name

The autoscaler checks the configuration at startup and exits with an error if a value is missing or the credential belongs to another project.

Set CROW_OVHCLOUD_AUTH_TYPE to one of these methods and provide its variables. Variables of the other methods must stay unset.

CROW_OVHCLOUD_AUTH_TYPE Variables
v3applicationcredential CROW_OVHCLOUD_APPLICATION_CREDENTIAL_ID, CROW_OVHCLOUD_APPLICATION_CREDENTIAL_SECRET
v3oidcclientcredentials CROW_OVHCLOUD_CLIENT_ID, CROW_OVHCLOUD_CLIENT_SECRET, CROW_OVHCLOUD_DISCOVERY_ENDPOINT, CROW_OVHCLOUD_IDENTITY_PROVIDER
v3password CROW_OVHCLOUD_USERNAME, CROW_OVHCLOUD_PASSWORD, CROW_OVHCLOUD_USER_DOMAIN_NAME

Use an application credential unless your account works with OVHcloud service accounts. Use a password only if neither is available. Whichever you choose, give it access to this project only. The autoscaler deletes only the VMs it created, but the credential itself can manage everything in the project.

Each credential variable also accepts a _FILE suffix that points to a mounted secret, for example CROW_OVHCLOUD_CLIENT_SECRET_FILE. The autoscaler reads these files at startup, so restart it after rotating a credential.

If a variable isn’t set, the autoscaler falls back to the matching OS_* variable from an OpenStack RC file, such as OS_AUTH_URL or OS_PASSWORD. A leftover OS_* variable from another method stops the autoscaler at startup, and the error names the variable.

For OVHcloud US, use these values with a service account’s client ID and secret:

export CROW_OVHCLOUD_AUTH_TYPE=v3oidcclientcredentials
export CROW_OVHCLOUD_AUTH_URL=https://auth.cloud.ovh.us/v3
export CROW_OVHCLOUD_IDENTITY_PROVIDER=ovhcloud-us
export CROW_OVHCLOUD_DISCOVERY_ENDPOINT=https://iam.ovh.us/role-adapter/urn:v1:us:resource:publicCloudProject:pci/.well-known/openid-configuration
export CROW_OVHCLOUD_CLIENT_ID=your-service-account-client-id
export CROW_OVHCLOUD_CLIENT_SECRET_FILE=/run/secrets/ovhcloud-client-secret

For other OVHcloud regions, take the identity provider and discovery endpoint from the service-account guide of your OVHcloud subsidiary. The autoscaler renews the session on its own when it expires.

The autoscaler names each VM after its agent and tags it with the pool ID, the provider and the region. It only lists and deletes VMs with these tags, so it finds its VMs again after a restart. Keep CROW_POOL_ID unchanged while VMs from the pool still exist.

A VM counts as removed once OVHcloud no longer returns it. If that takes longer than five minutes, the autoscaler reports an error and tries again on its next run.

If the autoscaler stops, its VMs keep running and OVHcloud keeps billing them. Check the project for leftover VMs after an outage.

Each VM receives its agent token through user-data. If you use a custom --provider-user-data template, follow the agent secret guidance.