Service Deployer
class ServiceDeployer(keyPair: Set<KeyPair>, proxyJump: String? = null, sshPrepareWork: (session: ClientSession, node: ServiceNode, service: Service) -> Unit? = null, clientSessionFetcher: (SshClient, ServiceNode) -> ClientSession = { sshClient, node ->
sshClient
.let {
if (proxyJump != null) {
it.connect(HostConfigEntry("", node.ip, 22, "root", proxyJump))
} else
it.connect("root", node.ip, 22)
}
.verify(10000)
.session
})
负责在阿里云上部署或者升级服务
Author
CJ
Constructors
Link copied to clipboard
constructor(keyPair: Set<KeyPair>, proxyJump: String? = null, sshPrepareWork: (session: ClientSession, node: ServiceNode, service: Service) -> Unit? = null, clientSessionFetcher: (SshClient, ServiceNode) -> ClientSession = { sshClient, node ->
sshClient
.let {
if (proxyJump != null) {
it.connect(HostConfigEntry("", node.ip, 22, "root", proxyJump))
} else
it.connect("root", node.ip, 22)
}
.verify(10000)
.session
})
Functions
Link copied to clipboard
fun deploy(service: Service, entrances: Collection<IngressEntrance>, deployment: Deployment, restart: Boolean = false)