Nomad 集群管理器和调度器 Nomad

blov2015-09-28 16:00:00 • 4526 次点击    
这是一个分享于 2015-09-28 16:00:00 的项目,其中的信息可能已经有所发展或是发生改变。

Nomad 是一个集群管理器和调度器,专为微服务和批量处理工作流设计。Nomad 是分布式,高可用,可扩展到跨数据中心和区域的数千个节点。

Nomad 提供一个常规工作流跨基础设施部署应用。开发者使用一个声明式作业规范来定义应用该如何部署,资源有什么要求(CPU,内存,硬盘)。Nomad 接收这些作业,查找可用的资源来运行应用。调度算法确保所有的约束都满足,尽量在一个主机部署尽可能多的应用,优化资源利用。此外,Nomad 支持在所有主流操作系统运行虚拟化,容器化或者是独立的应用,灵活的支持广泛的工作流负载。

Nomad 已经在生产环境使用,主要特性:

*Docker:Nomad 支持 Docker 作为第一类的工作负载类型

*操作简单

*多个数据中心和多个区域

*灵活的工作负载

*可扩展

代码示例:

# Define the hashicorp/web/frontend job
job "hashicorp/web/frontend" {
    # Run in two datacenters
    datacenters = ["us-west-1", "us-east-1"]

    # Only run our workload on linux
    constraint {
        attribute = "$attr.kernel.name"
        value = "linux"
    }

    # Configure the job to do rolling updates
    update {
        # Stagger updates every 30 seconds
        stagger = "30s"

        # Update a single task at a time
        max_parallel = 1
    }

    # Define the task group
    group "frontend" {
        # Ensure we have enough servers to handle traffic
        count = 10

        task "web" {
            # Use Docker to run our server
            driver = "docker"
            config {
                image = "hashicorp/web-frontend:latest"
            }

            # Ask for some resources
            resources {
                cpu = 500
                memory = 128
                network {
                    mbits = 10
                    dynamic_ports = ["http"]
                }
            }
        }
    }
}

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.Read More

Latest commit to the main branch on 4-2-2025
Download as zip
授权协议:
MPL
开发语言:
Google Go 查看源码»
操作系统:
跨平台
4526 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传