mgmt

下一代分布式、事件驱动、并行配置管理。(Next generation distributed, event-driven, parallel config management!)

Github stars Tracking Chart

mgmt:下一代配置管理!

关于:

Mgmt 是一个实时自动化工具。它对现有的配置管理软件很熟悉,但是功能强大得多,因为它可以让您以非常安全的方式构建实时的闭环反馈系统,并且我们的mcl代码非常小。 例如,以下代码将确保您的文件服务器在星期五时设置为只读。

import "datetime"
$is_friday = datetime.weekday(datetime.now()) == "friday"
file "/srv/files/" {
    state => "exists",
    mode => if $is_friday { # this updates the mode, the instant it changes!
        "0550"
    } else {
        "0770"
    },
}

它可以连续、间歇或按需运行,在第一种情况下,它将确保您的系统始终处于所需的状态!在这种模式下,它可以作为分散的代理集群跨网络运行,每个代理都与其他代理实时交换信息,以响应不断变化的需求。例如,如果您希望确保某些资源最多在集群中的两台主机上运行,您还可以指定这一点:

import "sys"
import "world"

# we'll set a few scheduling options:
$opts = struct{strategy => "rr", max => 2, ttl => 10,}

# schedule in a particular namespace with options:
$set = world.schedule("xsched", $opts)

if sys.hostname() in $set {
    # use your imagination to put something more complex right here...
    print "i got scheduled" {} # this will run on the chosen machines
}

当您从集群中添加和删除主机时,实时调度函数将动态地从可用池中获取最多两台主机。这些特定的功能并不是核心设计固有的,而且可以很容易地添加新的功能。

如果你想了解更多,请继续读下去。

状态:

Mgmt 是下一代自动化工具。它与配置管理空间中的其他工具有相似之处,但是它有一种快速、现代、分布式的系统方法。该项目包含一个引擎和一种语言。请看看介绍视频或博客文章

Mgmt 是一个相当新的项目。它现在可用,但功能还不完整。在您的帮助下,您将能够影响我们的设计,并使我们尽快达到1.0 !有兴趣的用户应该阅读快速入门指南

文档:

请阅读,享受并帮助改进我们的文档!

Documentation Additional Notes
quick start guide for everyone
frequently asked questions for everyone
general documentation for everyone
language guide for everyone
function guide for mgmt developers
resource guide for mgmt developers
style guide for mgmt developers
godoc API reference for mgmt developers
prometheus guide for everyone
puppet guide for puppet sysadmins
development for mgmt developers

问题:

请在社区中询问! 如果您有一个可能对其他人有益的措辞问题,请考虑通过向 FAQ 部分发送补丁来询问。 我将合并你的问题,以及答案的补丁!

(First edition: vz edited at 2019.08.18)

Main metrics

Overview
Name With Ownerpurpleidea/mgmt
Primary LanguageGo
Program languageMakefile (Language Count: 11)
PlatformLinux, Mac
License:GNU General Public License v3.0
所有者活动
Created At2015-09-25 05:15:41
Pushed At2025-10-07 19:30:24
Last Commit At2025-10-07 01:35:35
Release Count28
Last Release Name1.0.0 (Posted on 2025-09-25 00:27:20)
First Release Name0.0.1 (Posted on )
用户参与
Stargazers Count4k
Watchers Count98
Fork Count330
Commits Count2.4k
Has Issues Enabled
Issues Count288
Issue Open Count135
Pull Requests Count221
Pull Requests Open Count33
Pull Requests Close Count279
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

mgmt: next generation config management!

mgmt!

Go Report Card
Build Status
GoDoc
IRC
Patreon
Liberapay

About:

Mgmt is a real-time automation tool. It is familiar to existing configuration
management software, but is drastically more powerful as it can allow you to
build real-time, closed-loop feedback systems, in a very safe way, and with a
surprisingly small amout of our mcl code. For example, the following code will
ensure that your file server is set to read-only when it's friday.

import "datetime"
$is_friday = datetime.weekday(datetime.now()) == "friday"
file "/srv/files/" {
	state => $const.res.file.state.exists,
	mode => if $is_friday { # this updates the mode, the instant it changes!
		"0550"
	} else {
		"0770"
	},
}

It can run continuously, intermittently, or on-demand, and in the first case, it
will guarantee that your system is always in the desired state for that instant!
In this mode it can run as a decentralized cluster of agents across your
network, each exchanging information with the others in real-time, to respond to
your changing needs. For example, if you want to ensure that some resource runs
on a maximum of two hosts in your cluster, you can specify that as well:

import "sys"
import "world"

# we'll set a few scheduling options:
$opts = struct{strategy => "rr", max => 2, ttl => 10,}

# schedule in a particular namespace with options:
$set = world.schedule("xsched", $opts)

if sys.hostname() in $set {
	# use your imagination to put something more complex right here...
	print "i got scheduled" {} # this will run on the chosen machines
}

As you add and remove hosts from the cluster, the real-time schedule function
will dynamically pick up to two hosts from the available pool. These specific
functions aren't intrinsic to the core design, and new ones can be easily added.

Please read on if you'd like to learn more...

Community:

Come join us in the mgmt community!, Medium, Link, ---, ---, IRC, #mgmtconfig on Freenode, Twitter, @mgmtconfig & #mgmtconfig, Mailing list, mgmtconfig-list@redhat.com, Patreon, purpleidea on Patreon, Liberapay, purpleidea on Liberapay, ## Status:

Mgmt is a next generation automation tool. It has similarities to other tools in
the configuration management space, but has a fast, modern, distributed systems
approach. The project contains an engine and a language.
Please have a look at an introductory video or blog post.

Mgmt is a fairly new project. It is usable today, but not yet feature complete.
With your help you'll be able to influence our design and get us to 1.0 sooner!
Interested users should read the quick start guide.

Documentation:

Please read, enjoy and help improve our documentation!, Documentation, Additional Notes, ---, ---, quick start guide, for everyone, frequently asked questions, for everyone, general documentation, for everyone, language guide, for everyone, function guide, for mgmt developers, resource guide, for mgmt developers, style guide, for mgmt developers, godoc API reference, for mgmt developers, prometheus guide, for everyone, puppet guide, for puppet sysadmins, development, for mgmt developers, ## Questions:

Please ask in the community!
If you have a well phrased question that might benefit others, consider asking
it by sending a patch to the FAQ section. I'll merge your
question, and a patch with the answer!

Get involved:

Feel free to grab one of the straightforward #mgmtlove
issues if you're a first time contributor to the project or if you're unsure
about what to hack on! Please get involved by working on one of these items or
by suggesting something else! There are some lower priority issues and harder
issues available in our TODO file. Please have a look.

Bugs:

Please set the DEBUG constant in main.go
to true, and post the logs when you report the issue.
Feel free to read my article on debugging golang programs.

Patches:

We'd love to have your patches! Please send them by email, or as a pull request.

On the web:

Read what people are saying and publishing about mgmt!

Happy hacking!