refactor: core -> framework.core
This commit is contained in:
parent
5d3048acb3
commit
d110373f26
96 changed files with 274 additions and 237 deletions
|
@ -50,7 +50,7 @@ Run:
|
|||
|
||||
You'll be prompted for the password of the remote user.
|
||||
|
||||
### Install k3s
|
||||
### Provision k3s
|
||||
|
||||
```bash
|
||||
java -jar provs-server.jar -i -r <ip or hostname> -u <remote_username>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.demos
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.local
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.local
|
||||
|
||||
|
||||
fun Prov.helloWorld() = def {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.demos
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.*
|
||||
import org.domaindrivenarchitecture.provs.framework.core.*
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.k3s.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.extensions.server_software.k3s.domain.installK3sServer
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.k3s.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.cli.createProvInstance
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.createProvInstance
|
||||
import org.domaindrivenarchitecture.provs.extensions.server_software.k3s.domain.installK3sAsContainers
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.domaindrivenarchitecture.provs.extensions.server_software.k3s.applic
|
|||
|
||||
import kotlinx.cli.ArgType
|
||||
import kotlinx.cli.default
|
||||
import org.domaindrivenarchitecture.provs.core.cli.CliTargetParser
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.CliTargetParser
|
||||
|
||||
class CliK3sArgumentsParser(name: String) : CliTargetParser(name) {
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.k3s.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.cli.TargetCliCommand
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.TargetCliCommand
|
||||
|
||||
|
||||
class ServerCliCommand(private val k3sType: String, val target: TargetCliCommand) {
|
||||
|
@ -29,7 +29,8 @@ fun parseServerArguments(
|
|||
parser.sshWithPasswordPrompt,
|
||||
parser.sshWithGopassPath,
|
||||
parser.sshWithKey
|
||||
))
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.k3s.domain
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.core.echoCommandForTextWithNewlinesReplaced
|
||||
import org.domaindrivenarchitecture.provs.core.repeatTaskUntilSuccess
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.echoCommandForTextWithNewlinesReplaced
|
||||
import org.domaindrivenarchitecture.provs.framework.core.repeatTaskUntilSuccess
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.k3s.domain
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.echoCommandForText
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.echoCommandForText
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.k3s.infrastructure.apple
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.remote
|
||||
import org.domaindrivenarchitecture.provs.core.repeatTaskUntilSuccess
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.remote
|
||||
import org.domaindrivenarchitecture.provs.framework.core.repeatTaskUntilSuccess
|
||||
import org.domaindrivenarchitecture.provs.extensions.server_software.k3s.domain.applyK3sConfig
|
||||
import org.domaindrivenarchitecture.provs.extensions.server_software.k3s.domain.installK3sServer
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.certbot
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileExists
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.firewall
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.firewall.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.nexus
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.docker.containerRuns
|
||||
import org.domaindrivenarchitecture.provs.core.remote
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.containerRuns
|
||||
import org.domaindrivenarchitecture.provs.framework.core.remote
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileExists
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.user.base.createUser
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.nginx
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.remote
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.remote
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createFile
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileExists
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.nginx.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
||||
fun Prov.nginxAddBasicAuth(user: String, password: Secret) = requireAll {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.nginx.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.*
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.nginx.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDirs
|
||||
import org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.nginx.provisionNginxStandAlone
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.prometheus
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.prometheus.base.*
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.prometheus.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDir
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createFile
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileContainsText
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.prometheus.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.docker.containerRuns
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.containerRuns
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDirs
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createFile
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.core
|
||||
package org.domaindrivenarchitecture.provs.framework.core
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.core.platforms.UbuntuProv
|
||||
import org.domaindrivenarchitecture.provs.core.processors.LocalProcessor
|
||||
import org.domaindrivenarchitecture.provs.core.processors.Processor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.UbuntuProv
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.LocalProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.Processor
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core
|
||||
package org.domaindrivenarchitecture.provs.framework.core
|
||||
|
||||
|
||||
data class ProvResult(val success: Boolean,
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core
|
||||
package org.domaindrivenarchitecture.provs.framework.core
|
||||
|
||||
import java.util.*
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core
|
||||
package org.domaindrivenarchitecture.provs.framework.core
|
||||
|
||||
|
||||
/**
|
|
@ -1,10 +1,10 @@
|
|||
package org.domaindrivenarchitecture.provs.core
|
||||
package org.domaindrivenarchitecture.provs.framework.core
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerUbuntuHostProcessor
|
||||
import org.domaindrivenarchitecture.provs.core.processors.RemoteProcessor
|
||||
import org.domaindrivenarchitecture.provs.core.tags.Api
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerUbuntuHostProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.RemoteProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.tags.Api
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileContent
|
||||
import java.io.File
|
||||
import java.net.InetAddress
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core.cli
|
||||
package org.domaindrivenarchitecture.provs.framework.core.cli
|
||||
|
||||
|
||||
class TargetCliCommand(
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core.cli
|
||||
package org.domaindrivenarchitecture.provs.framework.core.cli
|
||||
|
||||
import kotlinx.cli.ArgParser
|
||||
import kotlinx.cli.ArgType
|
|
@ -1,9 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.core.cli
|
||||
package org.domaindrivenarchitecture.provs.framework.core.cli
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.core.local
|
||||
import org.domaindrivenarchitecture.provs.core.remote
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.local
|
||||
import org.domaindrivenarchitecture.provs.framework.core.remote
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources.GopassSecretSource
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources.PromptSecretSource
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.user.base.currentUserCanSudo
|
|
@ -1,11 +1,12 @@
|
|||
package org.domaindrivenarchitecture.provs.core.docker
|
||||
package org.domaindrivenarchitecture.provs.framework.core.docker
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerimages.DockerImage
|
||||
import org.domaindrivenarchitecture.provs.core.docker.platforms.*
|
||||
import org.domaindrivenarchitecture.provs.core.platforms.UbuntuProv
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerimages.DockerImage
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.platforms.*
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.UbuntuProv
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.platforms.*
|
||||
|
||||
private const val DOCKER_NOT_SUPPORTED = "docker not yet supported for "
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core.docker.dockerimages
|
||||
package org.domaindrivenarchitecture.provs.framework.core.docker.dockerimages
|
||||
|
||||
|
||||
interface DockerImage {
|
|
@ -1,15 +1,15 @@
|
|||
package org.domaindrivenarchitecture.provs.core.docker.platforms
|
||||
package org.domaindrivenarchitecture.provs.framework.core.docker.platforms
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.docker.containerRuns
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerImageExists
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerimages.DockerImage
|
||||
import org.domaindrivenarchitecture.provs.core.docker.exitAndRmContainer
|
||||
import org.domaindrivenarchitecture.provs.core.escapeSingleQuote
|
||||
import org.domaindrivenarchitecture.provs.core.fileSeparator
|
||||
import org.domaindrivenarchitecture.provs.core.hostUserHome
|
||||
import org.domaindrivenarchitecture.provs.core.platforms.UbuntuProv
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.containerRuns
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerImageExists
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerimages.DockerImage
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.exitAndRmContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.escapeSingleQuote
|
||||
import org.domaindrivenarchitecture.provs.framework.core.fileSeparator
|
||||
import org.domaindrivenarchitecture.provs.framework.core.hostUserHome
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.UbuntuProv
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
|
||||
|
||||
fun UbuntuProv.provideContainerPlatform(
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core.entry
|
||||
package org.domaindrivenarchitecture.provs.framework.core.entry
|
||||
|
||||
/**
|
||||
* Calls a static method of a class.
|
|
@ -1,11 +1,11 @@
|
|||
package org.domaindrivenarchitecture.provs.core.platforms
|
||||
package org.domaindrivenarchitecture.provs.framework.core.platforms
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.ProgressType
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.escapeAndEncloseByDoubleQuoteForShell
|
||||
import org.domaindrivenarchitecture.provs.core.processors.LocalProcessor
|
||||
import org.domaindrivenarchitecture.provs.core.processors.Processor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProgressType
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.escapeAndEncloseByDoubleQuoteForShell
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.LocalProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.Processor
|
||||
|
||||
const val SHELL = "/bin/bash"
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package org.domaindrivenarchitecture.provs.core.processors
|
||||
package org.domaindrivenarchitecture.provs.framework.core.processors
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.ProgressType
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.core.escapeAndEncloseByDoubleQuoteForShell
|
||||
import org.domaindrivenarchitecture.provs.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.core.tags.Api
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProgressType
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.escapeAndEncloseByDoubleQuoteForShell
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.framework.core.tags.Api
|
||||
|
||||
enum class ContainerStartMode {
|
||||
USE_RUNNING_ELSE_CREATE,
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.core.processors
|
||||
package org.domaindrivenarchitecture.provs.framework.core.processors
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.escapeNewline
|
||||
import org.domaindrivenarchitecture.provs.framework.core.escapeNewline
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.io.File
|
||||
import java.io.IOException
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core.processors
|
||||
package org.domaindrivenarchitecture.provs.framework.core.processors
|
||||
|
||||
|
||||
@Suppress("unused") // used externally
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core.processors
|
||||
package org.domaindrivenarchitecture.provs.framework.core.processors
|
||||
|
||||
|
||||
interface Processor {
|
|
@ -1,9 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.core.processors
|
||||
package org.domaindrivenarchitecture.provs.framework.core.processors
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.core.escapeAndEncloseByDoubleQuoteForShell
|
||||
import org.domaindrivenarchitecture.provs.core.escapeNewline
|
||||
import org.domaindrivenarchitecture.provs.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.escapeAndEncloseByDoubleQuoteForShell
|
||||
import org.domaindrivenarchitecture.provs.framework.core.escapeNewline
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.SHELL
|
||||
import net.schmizz.sshj.SSHClient
|
||||
import net.schmizz.sshj.connection.channel.direct.Session
|
||||
import net.schmizz.sshj.connection.channel.direct.Session.Command
|
|
@ -1,4 +1,4 @@
|
|||
package org.domaindrivenarchitecture.provs.core.tags
|
||||
package org.domaindrivenarchitecture.provs.framework.core.tags
|
||||
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
|
@ -1,7 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.filesystem.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.*
|
||||
import org.domaindrivenarchitecture.provs.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.framework.core.*
|
||||
import org.domaindrivenarchitecture.provs.framework.core.getLocalFileContent
|
||||
import java.io.File
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.git
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.git.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.*
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.keys.base.isHostKnown
|
||||
import org.domaindrivenarchitecture.provs.core.echoCommandForText
|
||||
import org.domaindrivenarchitecture.provs.framework.core.echoCommandForText
|
||||
import java.io.File
|
||||
|
||||
val knownHostsFile = "~/.ssh/known_hosts"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.install.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
|
||||
|
||||
private var aptInit = false
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.keys
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.keys.base.configureGpgKeys
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.keys.base.configureSshKeys
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSourceType
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.keys.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDir
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createFile
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createSecretFile
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.dirExists
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.keys.KeyPair
|
||||
import org.domaindrivenarchitecture.provs.core.echoCommandForText
|
||||
import org.domaindrivenarchitecture.provs.framework.core.echoCommandForText
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.keys.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDir
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createSecretFile
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.keys.KeyPair
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.secret
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources.*
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource
|
||||
import java.awt.FlowLayout
|
||||
import javax.swing.*
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.user.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.core.processors.RemoteProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.RemoteProcessor
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDirs
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileExists
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.userHome
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.web.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.tags.Api
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.tags.Api
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDirs
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.deleteFile
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.workplace.domain.provisionWorkplace
|
||||
import org.domaindrivenarchitecture.provs.workplace.domain.WorkplaceConfig
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.application
|
||||
|
||||
import kotlinx.serialization.SerializationException
|
||||
import org.domaindrivenarchitecture.provs.core.cli.createProvInstance
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.createProvInstance
|
||||
import org.domaindrivenarchitecture.provs.workplace.infrastructure.getConfig
|
||||
import java.io.FileNotFoundException
|
||||
import kotlin.system.exitProcess
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.cli.TargetCliCommand
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.TargetCliCommand
|
||||
|
||||
|
||||
class WorkplaceCliCommand(val configFile: String, val target: TargetCliCommand) {
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.domaindrivenarchitecture.provs.workplace.application
|
|||
|
||||
import kotlinx.cli.ArgType
|
||||
import kotlinx.cli.optional
|
||||
import org.domaindrivenarchitecture.provs.core.cli.CliTargetParser
|
||||
import org.domaindrivenarchitecture.provs.core.cli.TargetCliCommand
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.CliTargetParser
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.TargetCliCommand
|
||||
|
||||
|
||||
open class CliWorkplaceParser(name: String) : CliTargetParser(name) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.domain
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.git.provisionGit
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstallFromPpa
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.*
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
import java.io.File
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
|||
|
||||
import com.charleskorn.kaml.Yaml
|
||||
import kotlinx.serialization.json.Json
|
||||
import org.domaindrivenarchitecture.provs.core.tags.Api
|
||||
import org.domaindrivenarchitecture.provs.framework.core.tags.Api
|
||||
import org.domaindrivenarchitecture.provs.workplace.domain.WorkplaceConfig
|
||||
import java.io.BufferedReader
|
||||
import java.io.FileReader
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.local
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.local
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.*
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.web.base.downloadFromURL
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
||||
fun Prov.installDocker() = def {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDir
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.web.base.downloadFromURL
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.*
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.isPackageInstalled
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDir
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDirs
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.userHome
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
|
||||
|
||||
fun Prov.installIntelliJ() = task {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.addTextToFile
|
||||
import java.io.File
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDir
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createFile
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.isPackageInstalled
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.user.base.whoami
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstallFromPpa
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.isPackageInstalled
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package org.domaindrivenarchitecture.provs.core
|
||||
|
||||
import ch.qos.logback.classic.Level
|
||||
import org.domaindrivenarchitecture.provs.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProgressType
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.remote
|
||||
import org.domaindrivenarchitecture.provs.test.setRootLoggingLevel
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.test.tags.NonCi
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.core
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.repeatTaskUntilSuccess
|
||||
import org.domaindrivenarchitecture.provs.test.testLocal
|
||||
import org.junit.jupiter.api.Assertions.*
|
||||
import org.junit.jupiter.api.Test
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.core
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.getCallingMethodName
|
||||
import org.domaindrivenarchitecture.provs.framework.core.getLocalFileContent
|
||||
import org.domaindrivenarchitecture.provs.framework.core.getResourceAsText
|
||||
import org.domaindrivenarchitecture.provs.framework.core.remote
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.junit.jupiter.api.Assertions.*
|
||||
|
|
|
@ -4,11 +4,14 @@ import io.mockk.every
|
|||
import io.mockk.mockkStatic
|
||||
import io.mockk.unmockkStatic
|
||||
import io.mockk.verify
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.core.local
|
||||
import org.domaindrivenarchitecture.provs.core.processors.PrintOnlyProcessor
|
||||
import org.domaindrivenarchitecture.provs.core.remote
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.local
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.PrintOnlyProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.TargetCliCommand
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.createProvInstance
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.retrievePassword
|
||||
import org.domaindrivenarchitecture.provs.framework.core.remote
|
||||
import org.junit.jupiter.api.AfterAll
|
||||
import org.junit.jupiter.api.BeforeAll
|
||||
import org.junit.jupiter.api.Test
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.core.cli
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.parseTarget
|
||||
import org.junit.jupiter.api.Assertions.*
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.core.docker.platforms
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.docker.containerRuns
|
||||
import org.domaindrivenarchitecture.provs.core.docker.exitAndRmContainer
|
||||
import org.domaindrivenarchitecture.provs.core.docker.runContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.containerRuns
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.exitAndRmContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.runContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.NonCi
|
||||
import org.domaindrivenarchitecture.provs.test.testLocal
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
|
|
|
@ -41,7 +41,7 @@ internal class EntryKtTest {
|
|||
@Test
|
||||
fun test_without_method_argument() {
|
||||
// when
|
||||
main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt")
|
||||
org.domaindrivenarchitecture.provs.framework.core.entry.main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt")
|
||||
|
||||
// then
|
||||
assertEquals("main is fun \n", outContent.toString())
|
||||
|
@ -50,7 +50,10 @@ internal class EntryKtTest {
|
|||
@Test
|
||||
fun test_method_main_without_args() {
|
||||
// when
|
||||
main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt", "main")
|
||||
org.domaindrivenarchitecture.provs.framework.core.entry.main(
|
||||
"org.domaindrivenarchitecture.provs.core.entry.EntryTestKt",
|
||||
"main"
|
||||
)
|
||||
|
||||
// then
|
||||
assertEquals("main is fun \n", outContent.toString())
|
||||
|
@ -59,7 +62,10 @@ internal class EntryKtTest {
|
|||
@Test
|
||||
fun test_named_method_without_args() {
|
||||
// when
|
||||
main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt", "testfun")
|
||||
org.domaindrivenarchitecture.provs.framework.core.entry.main(
|
||||
"org.domaindrivenarchitecture.provs.core.entry.EntryTestKt",
|
||||
"testfun"
|
||||
)
|
||||
|
||||
// then
|
||||
assertEquals("test is fun \n", outContent.toString())
|
||||
|
@ -68,7 +74,12 @@ internal class EntryKtTest {
|
|||
@Test
|
||||
fun test_method_main_with_args() {
|
||||
// when
|
||||
main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt", "main", "arg1", "arg2")
|
||||
org.domaindrivenarchitecture.provs.framework.core.entry.main(
|
||||
"org.domaindrivenarchitecture.provs.core.entry.EntryTestKt",
|
||||
"main",
|
||||
"arg1",
|
||||
"arg2"
|
||||
)
|
||||
|
||||
// then
|
||||
assertEquals("main is fun arg1 arg2\n", outContent.toString())
|
||||
|
@ -77,7 +88,12 @@ internal class EntryKtTest {
|
|||
@Test
|
||||
fun test_named_method_with_args() {
|
||||
// when
|
||||
main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt", "testfun", "arg1", "arg2")
|
||||
org.domaindrivenarchitecture.provs.framework.core.entry.main(
|
||||
"org.domaindrivenarchitecture.provs.core.entry.EntryTestKt",
|
||||
"testfun",
|
||||
"arg1",
|
||||
"arg2"
|
||||
)
|
||||
|
||||
// then
|
||||
assertEquals("test is fun arg1 arg2\n", outContent.toString())
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.domaindrivenarchitecture.provs.core.platformTest
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.ProgressType
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerImageExists
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerProvideImage
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerimages.DockerImage
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerUbuntuHostProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProgressType
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerImageExists
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerProvideImage
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerimages.DockerImage
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerUbuntuHostProcessor
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.test.tags.NonCi
|
||||
import org.domaindrivenarchitecture.provs.test.testDockerWithSudo
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.core.processors
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.newline
|
||||
import org.domaindrivenarchitecture.provs.framework.core.newline
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.core.processors
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.framework.core.platforms.SHELL
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerUbuntuHostProcessor
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.test.testDockerWithSudo
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.domaindrivenarchitecture.provs.core.processors
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.escapeAndEncloseByDoubleQuoteForShell
|
||||
import org.domaindrivenarchitecture.provs.core.escapeProcentForPrintf
|
||||
import org.domaindrivenarchitecture.provs.core.escapeSingleQuoteForShell
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.escapeAndEncloseByDoubleQuoteForShell
|
||||
import org.domaindrivenarchitecture.provs.framework.core.escapeProcentForPrintf
|
||||
import org.domaindrivenarchitecture.provs.framework.core.escapeSingleQuoteForShell
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.Test
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.k3s.domain
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.docker
|
||||
import org.domaindrivenarchitecture.provs.core.docker.containerExec
|
||||
import org.domaindrivenarchitecture.provs.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.core.local
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.containerExec
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.provideContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.local
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.extensions.server_software.k3s.infrastructure.apple.appleConfig
|
||||
import org.domaindrivenarchitecture.provs.extensions.server_software.k3s.infrastructure.apple.checkAppleService
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.server_software.standalone_server.firewall
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerProvideImage
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerimages.UbuntuPlusUser
|
||||
import org.domaindrivenarchitecture.provs.core.docker.exitAndRmContainer
|
||||
import org.domaindrivenarchitecture.provs.core.local
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerEndMode
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerUbuntuHostProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerProvideImage
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerimages.UbuntuPlusUser
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.exitAndRmContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.local
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerEndMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerUbuntuHostProcessor
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.test.tags.NonCi
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.workplace.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.core.docker.exitAndRmContainer
|
||||
import org.domaindrivenarchitecture.provs.core.local
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.exitAndRmContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.core.local
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.test.tags.NonCi
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.domaindrivenarchitecture.provs.extensions.workplace.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.core.remote
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.remote
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.keys
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.junit.jupiter.api.Test
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.keys.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.keys.base
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Secret
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.keys.*
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.domaindrivenarchitecture.provs.ubuntu.utils
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.docker
|
||||
import org.domaindrivenarchitecture.provs.core.echoCommandForText
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker
|
||||
import org.domaindrivenarchitecture.provs.framework.core.echoCommandForText
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.test.tags.NonCi
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
|
|
|
@ -6,8 +6,9 @@ import io.mockk.mockkStatic
|
|||
import io.mockk.unmockkStatic
|
||||
import io.mockk.verify
|
||||
import org.domaindrivenarchitecture.provs.core.*
|
||||
import org.domaindrivenarchitecture.provs.core.cli.retrievePassword
|
||||
import org.domaindrivenarchitecture.provs.core.processors.PrintOnlyProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.retrievePassword
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.PrintOnlyProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.*
|
||||
import org.domaindrivenarchitecture.provs.test.setRootLoggingLevel
|
||||
import org.domaindrivenarchitecture.provs.workplace.domain.WorkplaceConfig
|
||||
import org.domaindrivenarchitecture.provs.workplace.domain.WorkplaceType
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.getResourceAsText
|
||||
import org.domaindrivenarchitecture.provs.framework.core.getResourceAsText
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDir
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.domaindrivenarchitecture.provs.test
|
||||
|
||||
import org.domaindrivenarchitecture.provs.core.ProgressType
|
||||
import org.domaindrivenarchitecture.provs.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerImageExists
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerProvideImage
|
||||
import org.domaindrivenarchitecture.provs.core.docker.dockerimages.UbuntuPlusUser
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.core.processors.ContainerUbuntuHostProcessor
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProgressType
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerImageExists
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerProvideImage
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.dockerimages.UbuntuPlusUser
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerStartMode
|
||||
import org.domaindrivenarchitecture.provs.framework.core.processors.ContainerUbuntuHostProcessor
|
||||
|
||||
val testDockerWithSudo = ("true" != System.getProperty("testdockerwithoutsudo")?.lowercase())
|
||||
|
||||
|
|
Loading…
Reference in a new issue