A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/nomad/tutorials/get-started/gs-stop-nomad below:

Stop Nomad and clean up | Nomad

In this tutorial, you will clean up the Nomad jobs that are running in the cluster and stop or destroy the cluster.

Stop and clean up the employee job. You can remove the -purge flag from the following commands if you want to keep the job data around for debugging or further investigation.

$ nomad job stop -purge pytechco-employee

Then, do the same with the webapp job.

$ nomad job stop -purge pytechco-web
==> 2023-03-10T12:24:45-05:00: Monitoring evaluation "d4079a21"
    2023-03-10T12:24:45-05:00: Evaluation triggered by job "pytechco-web"
    2023-03-10T12:24:45-05:00: Evaluation within deployment: "cdb7d282"
    2023-03-10T12:24:45-05:00: Evaluation status changed: "pending" -> "complete"
==> 2023-03-10T12:24:45-05:00: Evaluation "d4079a21" finished with status "complete"
==> 2023-03-10T12:24:45-05:00: Monitoring deployment "cdb7d282"
  ✓ Deployment "cdb7d282" successful
    
    2023-03-10T12:24:45-05:00
    ID          = cdb7d282
    Job ID      = pytechco-web
    Job Version = 0
    Status      = successful
    Description = Deployment completed successfully
    
    Deployed
    Task Group  Desired  Placed  Healthy  Unhealthy  Progress Deadline
    ptc-web     1        1       1        0          2023-03-10T17:26:57Z

Then, the database job.

$ nomad job stop -purge pytechco-redis
==> 2023-03-10T12:25:00-05:00: Monitoring evaluation "25608f76"
    2023-03-10T12:25:00-05:00: Evaluation triggered by job "pytechco-redis"
    2023-03-10T12:25:00-05:00: Evaluation within deployment: "0ea05651"
    2023-03-10T12:25:00-05:00: Evaluation status changed: "pending" -> "complete"
==> 2023-03-10T12:25:00-05:00: Evaluation "25608f76" finished with status "complete"
==> 2023-03-10T12:25:00-05:00: Monitoring deployment "0ea05651"
  ✓ Deployment "0ea05651" successful
    
    2023-03-10T12:25:00-05:00
    ID          = 0ea05651
    Job ID      = pytechco-redis
    Job Version = 0
    Status      = successful
    Description = Deployment completed successfully
    
    Deployed
    Task Group  Desired  Placed  Healthy  Unhealthy  Progress Deadline
    ptc-redis   1        1       1        0          2023-03-10T17:26:23Z

Finally, stop and clean up the setup job.

$ nomad job stop -purge pytechco-setup

Clean up the resources in use by stopping Nomad if you are running a local cluster or by destroying the cloud infrastructure with Terraform.

Open the terminal tab running the Nomad dev agent and press CTRL+C to stop it.

Navigate back to the directory from where you ran the Terraform apply command.

Destroy the resources. Respond yes to the prompt to confirm the operation.

In this collection, you learned about Nomad, installed the Nomad CLI, created a cluster locally and in the cloud, and deployed and updated Nomad jobs.

There are many directions you can go next to continue your learning so check out some of the tutorials and documentation below.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4