Example #1
0
func Network(node types.Node) *Unit {
	content := fmt.Sprintf("[Match]\nName=%s\n[Network]\nAddress=%s", node.NodeInterface(), node.NodeIp())

	u := New("static.network")
	u.SetParameter("runtime", true)
	u.SetContent(content)

	return u
}
Example #2
0
func (etcd2 Etcd2) configureMachine(node types.Node) {
	etcd2.parameters["name"] = node.NodeName()
	etcd2.parameters["initial-advertise-peer-urls"] = httpAddress(node.NodeIp(), etcd2.peerPort)
	etcd2.parameters["listen-peer-urls"] = httpAddress(node.NodeIp(), etcd2.peerPort)
	etcd2.parameters["listen-client-urls"] = httpAddress("0.0.0.0", etcd2.clientPort)
	etcd2.parameters["advertise-client-urls"] = httpAddress(node.NodeIp(), etcd2.clientPort)
}
Example #3
0
func (fleet Fleet) configure(node types.Node, cluster types.Cluster) {
	fleet.parameters["public-ip"] = node.NodeIp()
}
Example #4
0
func (flannel Flannel) configure(node types.Node, cluster types.Cluster) {
	flannel.parameters["interface"] = node.NodeIp()
}