refactor: *.k3s -> server
parent
1cdc05f352
commit
b06b9ab8a2
@ -1,8 +1,8 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.application
|
||||
package org.domaindrivenarchitecture.provs.desktop.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.workplace.domain.provisionWorkplace
|
||||
import org.domaindrivenarchitecture.provs.workplace.domain.WorkplaceConfig
|
||||
import org.domaindrivenarchitecture.provs.desktop.domain.provisionWorkplace
|
||||
import org.domaindrivenarchitecture.provs.desktop.domain.WorkplaceConfig
|
||||
|
||||
/**
|
||||
* Use case for provisioning a workplace
|
@ -1,8 +1,8 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.application
|
||||
package org.domaindrivenarchitecture.provs.desktop.application
|
||||
|
||||
import kotlinx.serialization.SerializationException
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.createProvInstance
|
||||
import org.domaindrivenarchitecture.provs.workplace.infrastructure.getConfig
|
||||
import org.domaindrivenarchitecture.provs.desktop.infrastructure.getConfig
|
||||
import java.io.FileNotFoundException
|
||||
import kotlin.system.exitProcess
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.application
|
||||
package org.domaindrivenarchitecture.provs.desktop.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.TargetCliCommand
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.application
|
||||
package org.domaindrivenarchitecture.provs.desktop.application
|
||||
|
||||
import kotlinx.cli.ArgType
|
||||
import kotlinx.cli.optional
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.domain
|
||||
package org.domaindrivenarchitecture.provs.desktop.domain
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.keys.KeyPairSource
|
||||
import kotlinx.serialization.Serializable
|
@ -0,0 +1,5 @@
|
||||
package org.domaindrivenarchitecture.provs.desktop.domain
|
||||
|
||||
enum class WorkplaceType {
|
||||
MINIMAL, OFFICE, IDE
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
@ -1,9 +1,9 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import com.charleskorn.kaml.Yaml
|
||||
import kotlinx.serialization.json.Json
|
||||
import org.domaindrivenarchitecture.provs.framework.core.tags.Api
|
||||
import org.domaindrivenarchitecture.provs.workplace.domain.WorkplaceConfig
|
||||
import org.domaindrivenarchitecture.provs.desktop.domain.WorkplaceConfig
|
||||
import java.io.BufferedReader
|
||||
import java.io.FileReader
|
||||
import java.io.FileWriter
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createDir
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.addTextToFile
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
val KEY_MANAGEMENT = "ssh gnupg"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createDir
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
@ -1,13 +0,0 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.domain.installK3sServer
|
||||
|
||||
|
||||
/**
|
||||
* Performs use case of provisioning a k3s server
|
||||
*/
|
||||
fun Prov.provisionK3s() = task {
|
||||
installK3sServer()
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.infrastructure.apple
|
||||
package org.domaindrivenarchitecture.provs.server.apple
|
||||
|
||||
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.framework.extensions.server_software.k3s.domain.applyK3sConfig
|
||||
import org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.domain.installK3sServer
|
||||
import org.domaindrivenarchitecture.provs.server.domain.applyK3sConfig
|
||||
import org.domaindrivenarchitecture.provs.server.domain.installK3sServer
|
||||
|
||||
|
||||
/**
|
@ -0,0 +1,13 @@
|
||||
package org.domaindrivenarchitecture.provs.server.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.server.domain.installK3sServer
|
||||
|
||||
|
||||
/**
|
||||
* Performs use case of provisioning a k3s server
|
||||
*/
|
||||
fun Prov.provisionK3s() = task {
|
||||
installK3sServer()
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.application
|
||||
package org.domaindrivenarchitecture.provs.server.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.createProvInstance
|
||||
import org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.domain.installK3sAsContainers
|
||||
import org.domaindrivenarchitecture.provs.server.domain.installK3sAsContainers
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.application
|
||||
package org.domaindrivenarchitecture.provs.server.application
|
||||
|
||||
import kotlinx.cli.ArgType
|
||||
import kotlinx.cli.default
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.application
|
||||
package org.domaindrivenarchitecture.provs.server.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.cli.TargetCliCommand
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.domain
|
||||
package org.domaindrivenarchitecture.provs.server.domain
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.docker.provideContainer
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.domain
|
||||
package org.domaindrivenarchitecture.provs.server.domain
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
@ -1,5 +0,0 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.domain
|
||||
|
||||
enum class WorkplaceType {
|
||||
MINIMAL, OFFICE, IDE
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import com.charleskorn.kaml.InvalidPropertyValueException
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.secret.SecretSourceType
|
||||
import org.domaindrivenarchitecture.provs.workplace.domain.WorkplaceType
|
||||
import org.domaindrivenarchitecture.provs.desktop.domain.WorkplaceType
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.assertThrows
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.getResourceAsText
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
@ -1,4 +1,4 @@
|
||||
package org.domaindrivenarchitecture.provs.workplace.infrastructure
|
||||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
|
@ -1,5 +1,7 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.application
|
||||
package org.domaindrivenarchitecture.provs.server.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.server.application.CliK3sArgumentsParser
|
||||
import org.domaindrivenarchitecture.provs.server.application.parseServerArguments
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.Assertions.*
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.application
|
||||
package org.domaindrivenarchitecture.provs.server.application
|
||||
|
||||
import org.domaindrivenarchitecture.provs.server.application.main
|
||||
import org.junit.jupiter.api.Disabled
|
||||
import org.junit.jupiter.api.Test
|
||||
|
@ -1,12 +1,12 @@
|
||||
package org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.domain
|
||||
package org.domaindrivenarchitecture.provs.server.domain
|
||||
|
||||
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.framework.extensions.server_software.k3s.infrastructure.apple.appleConfig
|
||||
import org.domaindrivenarchitecture.provs.framework.extensions.server_software.k3s.infrastructure.apple.checkAppleService
|
||||
import org.domaindrivenarchitecture.provs.server.apple.appleConfig
|
||||
import org.domaindrivenarchitecture.provs.server.apple.checkAppleService
|
||||
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
|
||||
import org.domaindrivenarchitecture.provs.test.tags.NonCi
|
||||
import org.junit.jupiter.api.Assertions.assertTrue
|
Loading…
Reference in New Issue