Documentation ¶
Index ¶
- Constants
- func GetDockerExecCmd(globalContainerSpec, serviceContainerSpec ContainerCfg, containerName string, ...) []string
- type AlertManagerSpec
- type ComponentsSpec
- func (c *ComponentsSpec) GetAlertManagerAddr() []string
- func (c *ComponentsSpec) GetHServerEndpoint() string
- func (c *ComponentsSpec) GetHServerUrl() string
- func (c *ComponentsSpec) GetHStreamExporterAddr() []string
- func (c *ComponentsSpec) GetHosts() []string
- func (c *ComponentsSpec) GetHttpServerUrl() []string
- func (c *ComponentsSpec) GetMetaStoreUrl() (string, MetaStoreType, error)
- func (c *ComponentsSpec) GetPrometheusAddr() []string
- func (c *ComponentsSpec) UnmarshalYAML(unmarshal func(interface{}) error) error
- type ContainerCfg
- type ElasticSearchSpec
- type FilebeatSpec
- type GlobalCfg
- type GrafanaSpec
- type HAdminSpec
- type HServerSpec
- type HStoreSpec
- type HStreamConsoleSpec
- type HStreamExporterSpec
- type HttpServerSpec
- type KibanaSpec
- type MetaStoreSpec
- type MetaStoreType
- type MonitorSpec
- type MountPoints
- type PrometheusSpec
- type ServerOpts
- type StoreOps
Constants ¶
View Source
const ( ElasticSearchDefaultContainerName = "deploy_elastic_search" ElasticSearchDefaultImage = "docker.elastic.co/elasticsearch/elasticsearch:8.5.0" ElasticSearchDefaultCfgDir = "/hstream/deploy/elasticsearch" ElasticSearchDefaultDataDir = "/hstream/data/elasticsearch" KibanaDefaultContainerName = "deploy_kibana" KibanaDefaultImage = "docker.elastic.co/kibana/kibana:8.5.0" KibanaDefaultCfgDir = "/hstream/deploy/kibana" KibanaDefaultDataDir = "/hstream/data/kibana" FilebeatDefaultContainerName = "deploy_filebeat" FilebeatDefaultImage = "docker.elastic.co/beats/filebeat:8.5.0" FilebeatDefaultCfgDir = "/hstream/deploy/filebeat" FilebeatDefaultDataDir = "/hstream/data/filebeat" )
View Source
const ( ServerBinConfigPath = "/etc/hstream/config.yaml" ServerDefaultImage = "hstreamdb/hstream" ServerDefaultContainerName = "deploy_hserver" ServerDefaultBinPath = "/usr/local/bin/hstream-server" ServerGrpcHaskellBinPath = "/usr/local/bin/hstream-server-old" ServerDefaultCfgDir = "/hstream/deploy/hserver" ServerDefaultDataDir = "/hstream/data/hserver" )
View Source
const ( StoreDefaultContainerName = "deploy_hstore" StoreDefaultImage = "hstreamdb/hstream" StoreDefaultBinPath = "/usr/local/bin/logdeviced" StoreDefaultCfgDir = "/hstream/deploy/store" StoreDefaultDataDir = "/hstream/data/store" AdminDefaultContainerName = "deploy_hadmin" AdminDefaultImage = "hstreamdb/hstream" AdminDefaultBinPath = "/usr/local/bin/ld-admin-server" AdminDefaultCfgDir = "/hstream/deploy/admin" AdminDefaultDataDir = "/hstream/data/admin" )
View Source
const ( ConsoleDefaultImage = "hstreamdb/hstream-console" ConsoleDefaultContainerName = "deploy_hstream_console" ConsoleDefaultCfgDir = "/hstream/deploy/hstream_console" ConsoleDefaultDataDir = "/hstream/data/hstream_console" )
View Source
const ( HttpServerDefaultContainerName = "deploy_http_server" HttpServerDefaultImage = "hstreamdb/http-server" HttpServerDefaultCfgDir = "/hstream/deploy/http-server" HttpServerDefaultDataDir = "/hstream/data/http-server" )
View Source
const ( MetaStoreDefaultContainerName = "deploy_meta" MetaStoreDefaultImage = "docker.io/zookeeper:3.6" MetaStoreDefaultCfgDir = "/hstream/deploy/metastore" MetaStoreDefaultDataDir = "/hstream/data/metastore" )
View Source
const ( NodeExporterDefaultImage = "prom/node-exporter" NodeExporterDefaultContainerName = "deploy_node_exporter" CadvisorDefaultImage = "gcr.io/cadvisor/cadvisor:v0.39.3" CadvisorDefaultContainerName = "deploy_cadvisor" MonitorDefaultCfgDir = "/hstream/deploy/monitor" MonitorDefaultDataDir = "/hstream/data/monitor" PrometheusDefaultContainerName = "deploy_prom" PrometheusDefaultImage = "prom/prometheus" PrometheusDefaultCfgDir = "/hstream/deploy/prometheus" PrometheusDefaultDataDir = "/hstream/data/prometheus" GrafanaDefaultContainerName = "deploy_grafana" GrafanaDefaultImage = "grafana/grafana-oss:main" GrafanaDefaultCfgDir = "/hstream/deploy/grafana" GrafanaDefaultDataDir = "/hstream/data/grafana" AlertManagerDefaultContainerName = "deploy_alert_manager" AlertManagerDefaultImage = "prom/alertmanager" AlertManagerDefaultCfgDir = "/hstream/deploy/alertmanager" AlertManagerDefaultDataDir = "/hstream/data/alertmanager" HStreamExporterDefaultContainerName = "deploy_hstream_exporter" HStreamExporterDefaultImage = "hstreamdb/hstream-exporter" HStreamExporterDefaultCfgDir = "/hstream/deploy/hstream-exporter" HStreamExporterDefaultDataDir = "/hstream/data/hstream-exporter" )
View Source
const DefaultStoreConfigPath = "/logdevice.conf"
Variables ¶
This section is empty.
Functions ¶
func GetDockerExecCmd ¶
func GetDockerExecCmd(globalContainerSpec, serviceContainerSpec ContainerCfg, containerName string, hostMode bool, mountPoints ...MountPoints) []string
Types ¶
type AlertManagerSpec ¶ added in v0.2.0
type AlertManagerSpec struct { Host string `yaml:"host"` SSHPort int `yaml:"ssh_port" default:"22"` Port int `yaml:"port" default:"9093"` Image string `yaml:"image"` DataDir string `yaml:"data_dir"` RemoteCfgPath string `yaml:"remote_config_path"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*AlertManagerSpec) SetDefaultDataDir ¶ added in v0.2.0
func (a *AlertManagerSpec) SetDefaultDataDir()
func (*AlertManagerSpec) SetDefaultImage ¶ added in v0.2.0
func (a *AlertManagerSpec) SetDefaultImage()
func (*AlertManagerSpec) SetDefaultRemoteCfgPath ¶ added in v0.2.0
func (a *AlertManagerSpec) SetDefaultRemoteCfgPath()
type ComponentsSpec ¶
type ComponentsSpec struct { Global GlobalCfg `yaml:"global"` Monitor MonitorSpec `yaml:"monitor"` HServer []HServerSpec `yaml:"hserver"` HStore []HStoreSpec `yaml:"hstore"` HAdmin []HAdminSpec `yaml:"hadmin"` MetaStore []MetaStoreSpec `yaml:"meta_store"` HStreamConsole []HStreamConsoleSpec `yaml:"hstream_console"` Prometheus []PrometheusSpec `yaml:"prometheus"` Grafana []GrafanaSpec `yaml:"grafana"` AlertManager []AlertManagerSpec `yaml:"alertmanager"` HStreamExporter []HStreamExporterSpec `yaml:"hstream_exporter"` HttpServer []HttpServerSpec `yaml:"http_server"` ElasticSearch []ElasticSearchSpec `yaml:"elasticsearch"` Kibana []KibanaSpec `yaml:"kibana"` Filebeat []FilebeatSpec `yaml:"filebeat"` }
ComponentsSpec map config.yaml to a struct
func (*ComponentsSpec) GetAlertManagerAddr ¶ added in v0.2.0
func (c *ComponentsSpec) GetAlertManagerAddr() []string
func (*ComponentsSpec) GetHServerEndpoint ¶ added in v0.3.1
func (c *ComponentsSpec) GetHServerEndpoint() string
func (*ComponentsSpec) GetHServerUrl ¶ added in v0.2.0
func (c *ComponentsSpec) GetHServerUrl() string
func (*ComponentsSpec) GetHStreamExporterAddr ¶ added in v0.2.0
func (c *ComponentsSpec) GetHStreamExporterAddr() []string
func (*ComponentsSpec) GetHosts ¶
func (c *ComponentsSpec) GetHosts() []string
func (*ComponentsSpec) GetHttpServerUrl ¶ added in v0.2.0
func (c *ComponentsSpec) GetHttpServerUrl() []string
func (*ComponentsSpec) GetMetaStoreUrl ¶
func (c *ComponentsSpec) GetMetaStoreUrl() (string, MetaStoreType, error)
func (*ComponentsSpec) GetPrometheusAddr ¶ added in v0.3.1
func (c *ComponentsSpec) GetPrometheusAddr() []string
func (*ComponentsSpec) UnmarshalYAML ¶
func (c *ComponentsSpec) UnmarshalYAML(unmarshal func(interface{}) error) error
type ContainerCfg ¶
type ContainerCfg struct { Cpu string `yaml:"cpu_limit"` Memory string `yaml:"memory_limit"` RemoveWhenExit bool `yaml:"remove_when_exit"` DisableRestart bool `yaml:"disable_restart"` }
func GetContainerCfg ¶
func GetContainerCfg(i interface{}) ContainerCfg
GetContainerCfg return the "ContainerCfg" filed value
func MergeContainerCfg ¶
func MergeContainerCfg(lhs, rhs ContainerCfg) ContainerCfg
MergeContainerCfg merge two config, use rhs update lhs, and return updated lhs finally.
func (ContainerCfg) GetCmd ¶
func (c ContainerCfg) GetCmd() string
type ElasticSearchSpec ¶ added in v0.3.0
type ElasticSearchSpec struct { Host string `yaml:"host"` SSHPort int `yaml:"ssh_port" default:"22"` Port int `yaml:"port" default:"9200"` Image string `yaml:"image"` DataDir string `yaml:"data_dir"` RemoteCfgPath string `yaml:"remote_config_path"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*ElasticSearchSpec) SetDefaultDataDir ¶ added in v0.3.0
func (es *ElasticSearchSpec) SetDefaultDataDir()
func (*ElasticSearchSpec) SetDefaultImage ¶ added in v0.3.0
func (es *ElasticSearchSpec) SetDefaultImage()
func (*ElasticSearchSpec) SetDefaultRemoteCfgPath ¶ added in v0.3.0
func (es *ElasticSearchSpec) SetDefaultRemoteCfgPath()
type FilebeatSpec ¶ added in v0.3.0
type FilebeatSpec struct { Host string `yaml:"host"` SSHPort int `yaml:"ssh_port" default:"22"` Image string `yaml:"image"` RemoteCfgPath string `yaml:"remote_config_path"` DataDir string `yaml:"data_dir"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*FilebeatSpec) SetDefaultDataDir ¶ added in v0.3.0
func (fb *FilebeatSpec) SetDefaultDataDir()
func (*FilebeatSpec) SetDefaultImage ¶ added in v0.3.0
func (fb *FilebeatSpec) SetDefaultImage()
func (*FilebeatSpec) SetDefaultRemoteCfgPath ¶ added in v0.3.0
func (fb *FilebeatSpec) SetDefaultRemoteCfgPath()
type GlobalCfg ¶
type GlobalCfg struct { User string `yaml:"user"` KeyPath string `yaml:"key_path"` SSHPort int `yaml:"ssh_port" default:"22"` MetaReplica int `yaml:"meta_replica" default:"1"` MetaStoreConfigPath string `yaml:"meta_store_config_path"` HStoreConfigPath string `yaml:"hstore_config_path"` HServerConfigPath string `yaml:"hserver_config_path"` EnableHsGrpc bool `yaml:"enable_grpc_haskell"` DisableStoreNetworkCfgPath bool `yaml:"disable_store_network_config_path"` EsConfigPath string `yaml:"elastic_search_config_path"` EnableDscpReflection bool `yaml:"enable_dscp_reflection"` ContainerCfg ContainerCfg `yaml:"container_config"` }
type GrafanaSpec ¶
type GrafanaSpec struct { Host string `yaml:"host"` SSHPort int `yaml:"ssh_port" default:"22"` Port int `yaml:"port" default:"3000"` Image string `yaml:"image"` DataDir string `yaml:"data_dir"` RemoteCfgPath string `yaml:"remote_config_path"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*GrafanaSpec) SetDefaultDataDir ¶
func (g *GrafanaSpec) SetDefaultDataDir()
func (*GrafanaSpec) SetDefaultImage ¶
func (g *GrafanaSpec) SetDefaultImage()
func (*GrafanaSpec) SetDefaultRemoteCfgPath ¶
func (g *GrafanaSpec) SetDefaultRemoteCfgPath()
type HAdminSpec ¶
type HAdminSpec struct { Host string `yaml:"host"` Image string `yaml:"image"` SSHPort int `yaml:"ssh_port" default:"22"` AdminPort int `yaml:"admin_port" default:"6440"` RemoteCfgPath string `yaml:"remote_config_path"` DataDir string `yaml:"data_dir"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*HAdminSpec) SetDefaultDataDir ¶ added in v0.3.0
func (h *HAdminSpec) SetDefaultDataDir()
func (*HAdminSpec) SetDefaultImage ¶ added in v0.3.0
func (h *HAdminSpec) SetDefaultImage()
func (*HAdminSpec) SetDefaultRemoteCfgPath ¶ added in v0.3.0
func (h *HAdminSpec) SetDefaultRemoteCfgPath()
type HServerSpec ¶
type HServerSpec struct { Host string `yaml:"host"` // AdvertisedAddress only used before hstream v0.10.1 // After v0.10.1, this field will be filled with the internal ip address AdvertisedAddress string `yaml:"advertised_address"` AdvertisedListener string `yaml:"advertised_listener"` Port int `yaml:"port" default:"6570"` InternalPort int `yaml:"internal_port" default:"6571"` Image string `yaml:"image"` SSHPort int `yaml:"ssh_port" default:"22"` RemoteCfgPath string `yaml:"remote_config_path"` DataDir string `yaml:"data_dir"` Opts ServerOpts `yaml:"server_config"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*HServerSpec) SetDefaultDataDir ¶
func (h *HServerSpec) SetDefaultDataDir()
func (*HServerSpec) SetDefaultImage ¶
func (h *HServerSpec) SetDefaultImage()
func (*HServerSpec) SetDefaultRemoteCfgPath ¶
func (h *HServerSpec) SetDefaultRemoteCfgPath()
type HStoreSpec ¶
type HStoreSpec struct { Host string `yaml:"host"` Image string `yaml:"image"` SSHPort int `yaml:"ssh_port" default:"22"` RemoteCfgPath string `yaml:"remote_config_path"` DataDir string `yaml:"data_dir"` Role string `yaml:"role" default:"Both"` EnableAdmin bool `yaml:"enable_admin"` AdminPort int `yaml:"admin_port" default:"6440"` StoreOps StoreOps `yaml:",inline"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*HStoreSpec) SetDefaultDataDir ¶
func (h *HStoreSpec) SetDefaultDataDir()
func (*HStoreSpec) SetDefaultImage ¶
func (h *HStoreSpec) SetDefaultImage()
func (*HStoreSpec) SetDefaultRemoteCfgPath ¶
func (h *HStoreSpec) SetDefaultRemoteCfgPath()
type HStreamConsoleSpec ¶ added in v0.3.1
type HStreamConsoleSpec struct { Host string `yaml:"host"` Port int `yaml:"port" default:"5177"` Image string `yaml:"image"` SSHPort int `yaml:"ssh_port" default:"22"` RemoteCfgPath string `yaml:"remote_config_path"` DataDir string `yaml:"data_dir"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*HStreamConsoleSpec) SetDefaultDataDir ¶ added in v0.3.1
func (h *HStreamConsoleSpec) SetDefaultDataDir()
func (*HStreamConsoleSpec) SetDefaultImage ¶ added in v0.3.1
func (h *HStreamConsoleSpec) SetDefaultImage()
func (*HStreamConsoleSpec) SetDefaultRemoteCfgPath ¶ added in v0.3.1
func (h *HStreamConsoleSpec) SetDefaultRemoteCfgPath()
type HStreamExporterSpec ¶ added in v0.2.0
type HStreamExporterSpec struct { Host string `yaml:"host"` SSHPort int `yaml:"ssh_port" default:"22"` Port int `yaml:"port" default:"9250"` Image string `yaml:"image"` DataDir string `yaml:"data_dir"` RemoteCfgPath string `yaml:"remote_config_path"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*HStreamExporterSpec) SetDefaultDataDir ¶ added in v0.2.0
func (g *HStreamExporterSpec) SetDefaultDataDir()
func (*HStreamExporterSpec) SetDefaultImage ¶ added in v0.2.0
func (g *HStreamExporterSpec) SetDefaultImage()
func (*HStreamExporterSpec) SetDefaultRemoteCfgPath ¶ added in v0.2.0
func (g *HStreamExporterSpec) SetDefaultRemoteCfgPath()
type HttpServerSpec ¶ added in v0.2.0
type HttpServerSpec struct { Host string `yaml:"host"` Image string `yaml:"image"` Port int `yaml:"port" default:"8081"` SSHPort int `yaml:"ssh_port" default:"22"` RemoteCfgPath string `yaml:"remote_config_path"` DataDir string `yaml:"data_dir"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*HttpServerSpec) SetDefaultDataDir ¶ added in v0.2.0
func (h *HttpServerSpec) SetDefaultDataDir()
func (*HttpServerSpec) SetDefaultImage ¶ added in v0.2.0
func (h *HttpServerSpec) SetDefaultImage()
func (*HttpServerSpec) SetDefaultRemoteCfgPath ¶ added in v0.2.0
func (h *HttpServerSpec) SetDefaultRemoteCfgPath()
type KibanaSpec ¶ added in v0.3.0
type KibanaSpec struct { Host string `yaml:"host"` SSHPort int `yaml:"ssh_port" default:"22"` Port int `yaml:"port" default:"5601"` Image string `yaml:"image"` RemoteCfgPath string `yaml:"remote_config_path"` DataDir string `yaml:"data_dir"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*KibanaSpec) SetDefaultDataDir ¶ added in v0.3.0
func (k *KibanaSpec) SetDefaultDataDir()
func (*KibanaSpec) SetDefaultImage ¶ added in v0.3.0
func (k *KibanaSpec) SetDefaultImage()
func (*KibanaSpec) SetDefaultRemoteCfgPath ¶ added in v0.3.0
func (k *KibanaSpec) SetDefaultRemoteCfgPath()
type MetaStoreSpec ¶
type MetaStoreSpec struct { Host string `yaml:"host"` Image string `yaml:"image"` Port int `yaml:"port" default:"4001"` RaftPort int `yaml:"raft_port" default:"4002"` SSHPort int `yaml:"ssh_port" default:"22"` RemoteCfgPath string `yaml:"remote_config_path"` DataDir string `yaml:"data_dir"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*MetaStoreSpec) SetDefaultDataDir ¶
func (m *MetaStoreSpec) SetDefaultDataDir()
func (*MetaStoreSpec) SetDefaultImage ¶
func (m *MetaStoreSpec) SetDefaultImage()
func (*MetaStoreSpec) SetDefaultRemoteCfgPath ¶
func (m *MetaStoreSpec) SetDefaultRemoteCfgPath()
type MetaStoreType ¶
type MetaStoreType uint
const ( ZK MetaStoreType = iota RQLITE Unknown )
func GetMetaStoreType ¶ added in v0.2.0
func GetMetaStoreType(image string) MetaStoreType
GetMetaStoreType check docker image and return the proper meta store type
func (MetaStoreType) String ¶ added in v0.2.0
func (m MetaStoreType) String() string
type MonitorSpec ¶
type MonitorSpec struct { NodeExporterImage string `yaml:"node_exporter_image"` NodeExporterPort int `yaml:"node_exporter_port" default:"9100"` CadvisorImage string `yaml:"cadvisor_image"` CadvisorPort int `yaml:"cadvisor_port" default:"7000"` ExcludedHosts []string `yaml:"excluded_hosts"` RemoteCfgPath string `yaml:"remote_config_path"` DataDir string `yaml:"data_dir"` GrafanaDisableLogin bool `yaml:"grafana_disable_login"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*MonitorSpec) SetDefaultDataDir ¶
func (m *MonitorSpec) SetDefaultDataDir()
func (*MonitorSpec) SetDefaultImage ¶
func (m *MonitorSpec) SetDefaultImage()
func (*MonitorSpec) SetDefaultRemoteCfgPath ¶
func (m *MonitorSpec) SetDefaultRemoteCfgPath()
type MountPoints ¶
type PrometheusSpec ¶
type PrometheusSpec struct { Host string `yaml:"host"` SSHPort int `yaml:"ssh_port" default:"22"` Port int `yaml:"port" default:"9090"` Image string `yaml:"image"` DataDir string `yaml:"data_dir"` RemoteCfgPath string `yaml:"remote_config_path"` ContainerCfg ContainerCfg `yaml:"container_config"` }
func (*PrometheusSpec) SetDefaultDataDir ¶
func (p *PrometheusSpec) SetDefaultDataDir()
func (*PrometheusSpec) SetDefaultImage ¶
func (p *PrometheusSpec) SetDefaultImage()
func (*PrometheusSpec) SetDefaultRemoteCfgPath ¶
func (p *PrometheusSpec) SetDefaultRemoteCfgPath()
type ServerOpts ¶
Click to show internal directories.
Click to hide internal directories.