install

package
v0.7.16-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const PruneDockerShell = `` /* 382-byte string literal not displayed */
View Source
const PruneRedisShell = `` /* 263-byte string literal not displayed */

Variables

This section is empty.

Functions

func Docker

func Docker(item command.OperationItem) (err command.RunErr)

Docker 安装部署docker-ce

func Redis

func Redis(item command.OperationItem) (err command.RunErr)

Redis 部署redis

func RedisCluster

func RedisCluster(item command.OperationItem) command.RunErr

RedisCluster 部署redis集群

Types

type DockerExternalConfig

type DockerExternalConfig struct {
	Server []struct {
		Host     string `yaml:"host"`
		Username string `yaml:"username"`
		Password int    `yaml:"password"`
		Port     int    `yaml:"port"`
	} `yaml:"server"`
	Excludes []string `yaml:"excludes"`
	Docker   struct {
		Package            string   `yaml:"package"`
		PreserveDir        string   `yaml:"preserveDir"`
		InsecureRegistries []string `yaml:"insecureRegistries"`
		RegistryMirrors    []string `yaml:"registryMirrors"`
	} `yaml:"docker"`
}

type DockerInternalConfig

type DockerInternalConfig struct {
	Servers            []runner.ServerInternal
	Package            string
	PreserveDir        string
	Logger             *logrus.Logger
	ConfigContent      []byte
	Executor           runner.ExecutorInternal
	IgnoreErr          bool // UnitTest
	InsecureRegistries []string
	Mirrors            []string
	BootCommand        string
	// contains filtered or unexported fields
}

DockerInternalConfig 内部对象

func (*DockerInternalConfig) Boot

func (config *DockerInternalConfig) Boot() (err command.RunErr)

func (*DockerInternalConfig) CloseFirewall

func (config *DockerInternalConfig) CloseFirewall() (err command.RunErr)

func (*DockerInternalConfig) Config

func (config *DockerInternalConfig) Config() (err command.RunErr)

Config 配置/etc/docker/daemon.json

func (*DockerInternalConfig) Detect

func (config *DockerInternalConfig) Detect() (err command.RunErr)

Detect 调用运行时检测依赖

func (*DockerInternalConfig) HandPackage

func (config *DockerInternalConfig) HandPackage() (err command.RunErr)

HandPackage 分发安装包

func (*DockerInternalConfig) Init

func (config *DockerInternalConfig) Init() (err command.RunErr)

func (*DockerInternalConfig) Install

func (config *DockerInternalConfig) Install() (err command.RunErr)

Install 编译&安装

func (*DockerInternalConfig) Parse

func (config *DockerInternalConfig) Parse() command.RunErr

func (*DockerInternalConfig) Print

func (config *DockerInternalConfig) Print() command.RunErr

func (*DockerInternalConfig) Prune

func (config *DockerInternalConfig) Prune() (err command.RunErr)

Prune 清理历史文件

func (*DockerInternalConfig) SetService

func (config *DockerInternalConfig) SetService() (err command.RunErr)

func (*DockerInternalConfig) SetUpRuntime

func (config *DockerInternalConfig) SetUpRuntime() (err command.RunErr)

SetUpRuntime docker运行时配置

func (*DockerInternalConfig) SetValue

func (config *DockerInternalConfig) SetValue() command.RunErr

type Interface

type Interface interface {
	Parse() command.RunErr
	SetValue() command.RunErr
	Detect() command.RunErr
	Prune() command.RunErr
	HandPackage() command.RunErr
	Install() command.RunErr
	SetUpRuntime() command.RunErr
	Config() command.RunErr
	SetService() command.RunErr // 开机自启动
	Boot() command.RunErr
	CloseFirewall() command.RunErr
	Init() command.RunErr
	Print() command.RunErr // 输出安装信息
}

Interface install操作类型接口

type RedisClusterConfig

type RedisClusterConfig struct {
	RedisCluster struct {
		Password    string           `yaml:"password"`
		ClusterType RedisClusterType `yaml:"cluster-type"`
		Package     string           `yaml:"package"`
		ListenPorts []int            `yaml:"listenPorts"`
	} `yaml:"redis-cluster"`
}

RedisClusterConfig redis安装配置反序列化对象

type RedisClusterType

type RedisClusterType int8

RedisClusterType redis cluster部署模式

type RedisExternalConfig

type RedisExternalConfig struct {
	Redis struct {
		Password string `yaml:"password"`
		Port     int    `yaml:"port"`
		Package  string `yaml:"package"`
	} `yaml:"redis"`
}

RedisExternalConfig redis安装配置反序列化对象

type RedisInternalConfig

type RedisInternalConfig struct {
	Servers       []runner.ServerInternal
	Password      string
	Ports         []int
	Package       string
	Logger        *logrus.Logger
	ConfigContent []byte
	Executor      runner.ExecutorInternal
	IgnoreErr     bool     // UnitTest
	PortsNeedOpen []int    // 需要放开的防火墙策略
	EndpointList  []string // 节点列表
	BootCommand   string
	// contains filtered or unexported fields
}

RedisInternalConfig 内部对象

func (*RedisInternalConfig) Boot

func (config *RedisInternalConfig) Boot() (err command.RunErr)

func (*RedisInternalConfig) CloseFirewall

func (config *RedisInternalConfig) CloseFirewall() (err command.RunErr)

func (*RedisInternalConfig) Config

func (config *RedisInternalConfig) Config() (err command.RunErr)

func (*RedisInternalConfig) Detect

func (config *RedisInternalConfig) Detect() (err command.RunErr)

Detect 调用运行时检测依赖

func (*RedisInternalConfig) HandPackage

func (config *RedisInternalConfig) HandPackage() (err command.RunErr)

HandPackage 分发安装包

func (*RedisInternalConfig) Init

func (config *RedisInternalConfig) Init() (err command.RunErr)

func (*RedisInternalConfig) Install

func (config *RedisInternalConfig) Install() (err command.RunErr)

Install 编译

func (*RedisInternalConfig) Parse

func (config *RedisInternalConfig) Parse() command.RunErr

func (*RedisInternalConfig) Print

func (config *RedisInternalConfig) Print() command.RunErr

func (*RedisInternalConfig) Prune

func (config *RedisInternalConfig) Prune() (err command.RunErr)

Prune 清理历史文件

func (*RedisInternalConfig) SetService

func (config *RedisInternalConfig) SetService() (err command.RunErr)

func (*RedisInternalConfig) SetUpRuntime

func (config *RedisInternalConfig) SetUpRuntime() (err command.RunErr)

SetUpRuntime redis运行时配置

func (*RedisInternalConfig) SetValue

func (config *RedisInternalConfig) SetValue() command.RunErr

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL