NomadClient.Api.Deployments (nomad_client v0.12.4)
API calls for all endpoints tagged Deployments
.
Link to this section Summary
Functions
mark a deployment as failed. This should be done to force the scheduler to stop creating allocations as part of the deployment or to cause a rollback to a previous job version. This endpoint only triggers a rollback if the most recent stable version of the job has a different specification than the job being reverted
lists the allocations created or modified for the given deployment
reads information about a specific deployment by ID
lists all deployments
pause or unpause a deployment. This is done to pause a rolling upgrade or resume it
promote task groups that have canaries for a deployment. This should be done when the placed canaries are healthy and the rolling upgrade of the remaining allocations should begin
set the health of an allocation that is in the deployment manually In some use cases, automatic detection of allocation health may not be desired. As such those task groups can be marked with an upgrade policy that uses health_check = "manual". Those allocations must have their health marked manually using this endpoint. Marking an allocation as healthy will allow the rolling upgrade to proceed. Marking it as failed will cause the deployment to fail. This endpoint only triggers a rollback if the most recent stable version of the job has a different specification than the job being reverted
Link to this section Functions
fail_deployment(connection, deployment_id, opts \\ [])
Specs
fail_deployment(Tesla.Env.client(), String.t(), keyword()) :: {:ok, NomadClient.Model.DeploymentUpdateResponse.t()} | {:error, Tesla.Env.t()}
mark a deployment as failed. This should be done to force the scheduler to stop creating allocations as part of the deployment or to cause a rollback to a previous job version. This endpoint only triggers a rollback if the most recent stable version of the job has a different specification than the job being reverted
Parameters
- connection (NomadClient.Connection): Connection to server
- deployment_id (String.t): Specifies the UUID of the deployment. This must be the full UUID, not the short 8-character one. This is specified as part of the path
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure
get_allocations_for_deployment(connection, deployment_id, opts \\ [])
Specs
get_allocations_for_deployment(Tesla.Env.client(), String.t(), keyword()) :: {:ok, [NomadClient.Model.AllocationListStub.t()]} | {:error, Tesla.Env.t()}
lists the allocations created or modified for the given deployment
Parameters
- connection (NomadClient.Connection): Connection to server
- deployment_id (String.t): Specifies the UUID of the deployment. This must be the full UUID, not the short 8-character one. This is specified as part of the path
- opts (KeywordList): [optional] Optional parameters
, ...]} on success {:error, Tesla.Env.t} on failure
get_deployment(connection, deployment_id, opts \\ [])
Specs
get_deployment(Tesla.Env.client(), String.t(), keyword()) :: {:ok, NomadClient.Model.Deployment.t()} | {:error, Tesla.Env.t()}
reads information about a specific deployment by ID
Parameters
- connection (NomadClient.Connection): Connection to server
- deployment_id (String.t): Specifies the UUID of the deployment. This must be the full UUID, not the short 8-character one. This is specified as part of the path
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure
get_deployments(connection, opts \\ [])
Specs
get_deployments(Tesla.Env.client(), keyword()) :: {:ok, [NomadClient.Model.Deployment.t()]} | {:error, Tesla.Env.t()}
lists all deployments
Parameters
- connection (NomadClient.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :namespace (String.t):
- :region (String.t): Make a request across regions to the given region
- :index (integer()): index used for blocking requests
- :wait (String.t): wait time used for blocking requests
- :prefix (String.t): Specifies a string to filter jobs on based on an index prefix. This is specified as a query string parameter
Returns
, ...]} on success {:error, Tesla.Env.t} on failure
pause_deployment(connection, deployment_id, deployment_pause_request, opts \\ [])
Specs
pause_deployment( Tesla.Env.client(), String.t(), NomadClient.Model.DeploymentPauseRequest.t(), keyword() ) :: {:ok, NomadClient.Model.DeploymentUpdateResponse.t()} | {:error, Tesla.Env.t()}
pause or unpause a deployment. This is done to pause a rolling upgrade or resume it
Parameters
- connection (NomadClient.Connection): Connection to server
- deployment_id (String.t): Specifies the UUID of the deployment. This must be the full UUID, not the short 8-character one. This is specified as part of the path
- deployment_pause_request (DeploymentPauseRequest):
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure
promote_deployment(connection, deployment_id, deployment_promote_request, opts \\ [])
Specs
promote_deployment( Tesla.Env.client(), String.t(), NomadClient.Model.DeploymentPromoteRequest.t(), keyword() ) :: {:ok, NomadClient.Model.DeploymentUpdateResponse.t()} | {:error, Tesla.Env.t()}
promote task groups that have canaries for a deployment. This should be done when the placed canaries are healthy and the rolling upgrade of the remaining allocations should begin
Parameters
- connection (NomadClient.Connection): Connection to server
- deployment_id (String.t): Specifies the UUID of the deployment. This must be the full UUID, not the short 8-character one. This is specified as part of the path
- deployment_promote_request (DeploymentPromoteRequest):
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure
set_allocation_health_in_deployment(connection, deployment_id, deployment_alloc_health_request, opts \\ [])
Specs
set_allocation_health_in_deployment( Tesla.Env.client(), String.t(), NomadClient.Model.DeploymentAllocHealthRequest.t(), keyword() ) :: {:ok, NomadClient.Model.DeploymentUpdateResponse.t()} | {:error, Tesla.Env.t()}
set the health of an allocation that is in the deployment manually In some use cases, automatic detection of allocation health may not be desired. As such those task groups can be marked with an upgrade policy that uses health_check = "manual". Those allocations must have their health marked manually using this endpoint. Marking an allocation as healthy will allow the rolling upgrade to proceed. Marking it as failed will cause the deployment to fail. This endpoint only triggers a rollback if the most recent stable version of the job has a different specification than the job being reverted
Parameters
- connection (NomadClient.Connection): Connection to server
- deployment_id (String.t): Specifies the UUID of the deployment. This must be the full UUID, not the short 8-character one. This is specified as part of the path
- deployment_alloc_health_request (DeploymentAllocHealthRequest):
- opts (KeywordList): [optional] Optional parameters
on success {:error, Tesla.Env.t} on failure