diff --git a/build.gradle b/build.gradle index c39b1fb..ffbea9e 100644 --- a/build.gradle +++ b/build.gradle @@ -14,12 +14,11 @@ apply plugin: 'org.jetbrains.kotlin.jvm' apply plugin: 'java-library' apply plugin: 'java-test-fixtures' apply plugin: 'maven-publish' -//apply plugin: 'kotlin' apply plugin: 'kotlinx-serialization' group = 'io.provs' -version = '0.8.13' +version = '0.8.14-SNAPSHOT' repositories { mavenCentral() diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/demos/HelloWorld.kt b/src/main/kotlin/io/provs/ubuntu/extensions/demos/HelloWorld.kt deleted file mode 100644 index fdf4b6e..0000000 --- a/src/main/kotlin/io/provs/ubuntu/extensions/demos/HelloWorld.kt +++ /dev/null @@ -1,14 +0,0 @@ -package io.provs.ubuntu.extensions.demos - -import io.provs.core.Prov -import io.provs.core.local - - -fun Prov.helloWorld() = def { - cmd("echo Hello world!") -} - - -fun main() { - local().helloWorld() -} diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionMonitoring.kt b/src/main/kotlin/io/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionMonitoring.kt deleted file mode 100644 index 3e6e926..0000000 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionMonitoring.kt +++ /dev/null @@ -1,18 +0,0 @@ -package io.provs.ubuntu.extensions.server_compounds.monitoring - -import io.provs.core.Prov -import io.provs.ubuntu.extensions.server_software.nginx.base.NginxConf -import io.provs.ubuntu.extensions.server_software.nginx.base.nginxHttpConf -import io.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone -import io.provs.ubuntu.extensions.server_software.prometheus.base.configurePrometheusDocker -import io.provs.ubuntu.extensions.server_software.prometheus.base.runPrometheusDocker - - -@Suppress("unused") // used externally -fun Prov.provisionMonitoring() = requireAll { - configurePrometheusDocker() - runPrometheusDocker() - provisionNginxStandAlone(NginxConf.nginxHttpConf()) -} - - diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionNginxAndMonitoring.kt b/src/main/kotlin/io/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionNginxAndMonitoring.kt deleted file mode 100644 index 03b7e5d..0000000 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionNginxAndMonitoring.kt +++ /dev/null @@ -1,20 +0,0 @@ -package io.provs.ubuntu.extensions.server_compounds.monitoring - -import io.provs.core.Prov -import io.provs.ubuntu.extensions.server_software.nginx.base.NginxConf -import io.provs.ubuntu.extensions.server_software.nginx.base.nginxAddLocation -import io.provs.ubuntu.extensions.server_software.nginx.base.nginxCreateSelfSignedCertificate -import io.provs.ubuntu.extensions.server_software.nginx.base.nginxHttpsConfWithLocationFiles -import io.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone -import io.provs.ubuntu.extensions.server_software.prometheus.base.prometheusNginxConfig -import io.provs.ubuntu.extensions.server_software.prometheus.provisionPrometheusDocker - - -@Suppress("unused") // used externally -fun Prov.provisionNginxMonitoring(nginxHost: String = "localhost") = def { - provisionPrometheusDocker(nginxHost) - nginxCreateSelfSignedCertificate() - provisionNginxStandAlone(NginxConf.nginxHttpsConfWithLocationFiles()) - nginxAddLocation("443", nginxHost, "/prometheus", prometheusNginxConfig) -} - diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/BasicAuth.kt b/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/BasicAuth.kt deleted file mode 100644 index 9b88ad7..0000000 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/BasicAuth.kt +++ /dev/null @@ -1,12 +0,0 @@ -package io.provs.ubuntu.extensions.server_software.nginx.base - -import io.provs.core.Prov -import io.provs.core.Secret -import io.provs.ubuntu.install.base.aptInstall - -fun Prov.nginxAddBasicAuth(user: String, password: Secret) = requireAll { - aptInstall("apache2-utils") - val passwordFile = "/etc/nginx/.htpasswd" - cmdNoLog("sudo htpasswd -b -c $passwordFile $user ${password.plain()}") -} - diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Docker.kt b/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Docker.kt deleted file mode 100644 index 66a4998..0000000 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Docker.kt +++ /dev/null @@ -1,12 +0,0 @@ -package io.provs.ubuntu.extensions.workplace.base - -import io.provs.core.Prov -import io.provs.ubuntu.install.base.aptInstall - -fun Prov.installDocker() = def { - aptInstall("containerd docker.io") - if (!chk("getent group docker")) { - cmd("sudo groupadd docker") - } - cmd("sudo gpasswd -a \$USER docker") -} \ No newline at end of file diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/NoSwappiness.kt b/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/NoSwappiness.kt deleted file mode 100644 index f6d159c..0000000 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/NoSwappiness.kt +++ /dev/null @@ -1,10 +0,0 @@ -package io.provs.ubuntu.extensions.workplace.base - -import io.provs.core.Prov -import io.provs.ubuntu.filesystem.base.addTextToFile -import java.io.File - -fun Prov.configureNoSwappiness() = def { - // set swappiness to 0 - addTextToFile("vm.swappiness=0", File("/etc/sysctl.conf"), sudo = true) -} \ No newline at end of file diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Zim.kt b/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Zim.kt deleted file mode 100644 index 1a8a5a2..0000000 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Zim.kt +++ /dev/null @@ -1,17 +0,0 @@ -package io.provs.ubuntu.extensions.workplace.base - -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.install.base.aptInstallFromPpa -import io.provs.ubuntu.install.base.isPackageInstalled - - -fun Prov.installZimWiki() = def { - if (isPackageInstalled("zim")) { - ProvResult(true, out = "zim already installed.") - } else { - aptInstallFromPpa("jaap.karssenberg", "zim", "zim") - aptInstall("python3-gtkspellcheck") - } -} diff --git a/src/main/kotlin/io/provs/core/Prov.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/Prov.kt similarity index 97% rename from src/main/kotlin/io/provs/core/Prov.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/Prov.kt index 46203d2..ca7d06b 100644 --- a/src/main/kotlin/io/provs/core/Prov.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/Prov.kt @@ -1,10 +1,10 @@ -package io.provs.core +package org.domaindrivenarchitecture.provs.core -import io.provs.core.platforms.SHELL -import io.provs.core.platforms.UbuntuProv -import io.provs.core.platforms.WinProv -import io.provs.core.processors.LocalProcessor -import io.provs.core.processors.Processor +import org.domaindrivenarchitecture.provs.core.platforms.SHELL +import org.domaindrivenarchitecture.provs.core.platforms.UbuntuProv +import org.domaindrivenarchitecture.provs.core.platforms.WinProv +import org.domaindrivenarchitecture.provs.core.processors.LocalProcessor +import org.domaindrivenarchitecture.provs.core.processors.Processor import org.slf4j.LoggerFactory diff --git a/src/main/kotlin/io/provs/core/ProvResult.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/ProvResult.kt similarity index 95% rename from src/main/kotlin/io/provs/core/ProvResult.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/ProvResult.kt index 8975026..e625d68 100644 --- a/src/main/kotlin/io/provs/core/ProvResult.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/ProvResult.kt @@ -1,4 +1,4 @@ -package io.provs.core +package org.domaindrivenarchitecture.provs.core data class ProvResult(val success: Boolean, diff --git a/src/main/kotlin/io/provs/core/Secret.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/Secret.kt similarity index 83% rename from src/main/kotlin/io/provs/core/Secret.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/Secret.kt index a362f11..5772373 100644 --- a/src/main/kotlin/io/provs/core/Secret.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/Secret.kt @@ -1,4 +1,4 @@ -package io.provs.core +package org.domaindrivenarchitecture.provs.core open class Secret(private val value: String) { diff --git a/src/main/kotlin/io/provs/core/Utils.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/Utils.kt similarity index 91% rename from src/main/kotlin/io/provs/core/Utils.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/Utils.kt index 4e741d7..878ea9e 100644 --- a/src/main/kotlin/io/provs/core/Utils.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/Utils.kt @@ -1,10 +1,10 @@ -package io.provs.core +package org.domaindrivenarchitecture.provs.core -import io.provs.core.docker.provideContainer -import io.provs.core.processors.ContainerStartMode -import io.provs.core.processors.ContainerUbuntuHostProcessor -import io.provs.core.processors.RemoteProcessor -import io.provs.core.tags.Api +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 java.io.File import java.net.InetAddress diff --git a/src/main/kotlin/io/provs/core/docker/HostDocker.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/docker/HostDocker.kt similarity index 84% rename from src/main/kotlin/io/provs/core/docker/HostDocker.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/docker/HostDocker.kt index 32e19c8..550234a 100644 --- a/src/main/kotlin/io/provs/core/docker/HostDocker.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/docker/HostDocker.kt @@ -1,11 +1,11 @@ -package io.provs.core.docker +package org.domaindrivenarchitecture.provs.core.docker -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.core.docker.dockerimages.DockerImage -import io.provs.core.docker.platforms.* -import io.provs.core.platforms.UbuntuProv -import io.provs.core.processors.ContainerStartMode +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 /** * Builds a docker image if not yet existing. diff --git a/src/main/kotlin/io/provs/core/docker/dockerimages/DockerImages.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/docker/dockerimages/DockerImages.kt similarity index 91% rename from src/main/kotlin/io/provs/core/docker/dockerimages/DockerImages.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/docker/dockerimages/DockerImages.kt index 8ebb58e..1efbc40 100644 --- a/src/main/kotlin/io/provs/core/docker/dockerimages/DockerImages.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/docker/dockerimages/DockerImages.kt @@ -1,4 +1,4 @@ -package io.provs.core.docker.dockerimages +package org.domaindrivenarchitecture.provs.core.docker.dockerimages interface DockerImage { diff --git a/src/main/kotlin/io/provs/core/docker/platforms/UbuntuHostDocker.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/docker/platforms/UbuntuHostDocker.kt similarity index 80% rename from src/main/kotlin/io/provs/core/docker/platforms/UbuntuHostDocker.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/docker/platforms/UbuntuHostDocker.kt index b10c6b9..db33835 100644 --- a/src/main/kotlin/io/provs/core/docker/platforms/UbuntuHostDocker.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/docker/platforms/UbuntuHostDocker.kt @@ -1,15 +1,15 @@ -package io.provs.core.docker.platforms +package org.domaindrivenarchitecture.provs.core.docker.platforms -import io.provs.core.ProvResult -import io.provs.core.docker.containerRuns -import io.provs.core.docker.dockerImageExists -import io.provs.core.docker.exitAndRmContainer -import io.provs.core.docker.dockerimages.DockerImage -import io.provs.core.escapeSingleQuote -import io.provs.core.fileSeparator -import io.provs.core.hostUserHome -import io.provs.core.platforms.UbuntuProv -import io.provs.core.processors.ContainerStartMode +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.exitAndRmContainer +import org.domaindrivenarchitecture.provs.core.docker.dockerimages.DockerImage +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 fun UbuntuProv.provideContainerPlatform( diff --git a/src/main/kotlin/io/provs/core/entry/Entry.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/entry/Entry.kt similarity index 96% rename from src/main/kotlin/io/provs/core/entry/Entry.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/entry/Entry.kt index e150c08..c329021 100644 --- a/src/main/kotlin/io/provs/core/entry/Entry.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/entry/Entry.kt @@ -1,4 +1,4 @@ -package io.provs.core.entry +package org.domaindrivenarchitecture.provs.core.entry /** * Calls a static method of a class. diff --git a/src/main/kotlin/io/provs/core/platforms/UbuntuProv.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/platforms/UbuntuProv.kt similarity index 69% rename from src/main/kotlin/io/provs/core/platforms/UbuntuProv.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/platforms/UbuntuProv.kt index 080a8ba..67fae5b 100644 --- a/src/main/kotlin/io/provs/core/platforms/UbuntuProv.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/platforms/UbuntuProv.kt @@ -1,11 +1,11 @@ -package io.provs.core.platforms +package org.domaindrivenarchitecture.provs.core.platforms -import io.provs.core.ProgressType -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.core.escapeAndEncloseByDoubleQuoteForShell -import io.provs.core.processors.LocalProcessor -import io.provs.core.processors.Processor +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 const val SHELL = "/bin/bash" diff --git a/src/main/kotlin/io/provs/core/platforms/WinProv.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/platforms/WinProv.kt similarity index 69% rename from src/main/kotlin/io/provs/core/platforms/WinProv.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/platforms/WinProv.kt index 3cb2786..66b787e 100644 --- a/src/main/kotlin/io/provs/core/platforms/WinProv.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/platforms/WinProv.kt @@ -1,10 +1,10 @@ -package io.provs.core.platforms +package org.domaindrivenarchitecture.provs.core.platforms -import io.provs.core.ProgressType -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.core.processors.LocalProcessor -import io.provs.core.processors.Processor +import org.domaindrivenarchitecture.provs.core.ProgressType +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.core.processors.LocalProcessor +import org.domaindrivenarchitecture.provs.core.processors.Processor class WinProv internal constructor(processor : Processor = LocalProcessor(), name: String? = null, progressType: ProgressType) diff --git a/src/main/kotlin/io/provs/core/processors/ContainerUbuntuHostProcessor.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/ContainerUbuntuHostProcessor.kt similarity index 83% rename from src/main/kotlin/io/provs/core/processors/ContainerUbuntuHostProcessor.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/ContainerUbuntuHostProcessor.kt index a06b370..d1e219c 100644 --- a/src/main/kotlin/io/provs/core/processors/ContainerUbuntuHostProcessor.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/ContainerUbuntuHostProcessor.kt @@ -1,11 +1,11 @@ -package io.provs.core.processors +package org.domaindrivenarchitecture.provs.core.processors -import io.provs.core.ProgressType -import io.provs.core.Prov -import io.provs.core.docker.provideContainer -import io.provs.core.escapeAndEncloseByDoubleQuoteForShell -import io.provs.core.platforms.SHELL -import io.provs.core.tags.Api +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 enum class ContainerStartMode { USE_RUNNING_ELSE_CREATE, diff --git a/src/main/kotlin/io/provs/core/processors/LocalProcessor.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/LocalProcessor.kt similarity index 94% rename from src/main/kotlin/io/provs/core/processors/LocalProcessor.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/LocalProcessor.kt index 8b8c3f9..06e245d 100644 --- a/src/main/kotlin/io/provs/core/processors/LocalProcessor.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/LocalProcessor.kt @@ -1,6 +1,6 @@ -package io.provs.core.processors +package org.domaindrivenarchitecture.provs.core.processors -import io.provs.core.escapeNewline +import org.domaindrivenarchitecture.provs.core.escapeNewline import org.slf4j.LoggerFactory import java.io.File import java.io.IOException diff --git a/src/main/kotlin/io/provs/core/processors/PrintOnlyProcessor.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/PrintOnlyProcessor.kt similarity index 88% rename from src/main/kotlin/io/provs/core/processors/PrintOnlyProcessor.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/PrintOnlyProcessor.kt index 481d235..868d0ef 100644 --- a/src/main/kotlin/io/provs/core/processors/PrintOnlyProcessor.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/PrintOnlyProcessor.kt @@ -1,4 +1,4 @@ -package io.provs.core.processors +package org.domaindrivenarchitecture.provs.core.processors @Suppress("unused") // used externally diff --git a/src/main/kotlin/io/provs/core/processors/Processor.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/Processor.kt similarity index 96% rename from src/main/kotlin/io/provs/core/processors/Processor.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/Processor.kt index be6c3e2..c868066 100644 --- a/src/main/kotlin/io/provs/core/processors/Processor.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/Processor.kt @@ -1,4 +1,4 @@ -package io.provs.core.processors +package org.domaindrivenarchitecture.provs.core.processors interface Processor { diff --git a/src/main/kotlin/io/provs/core/processors/RemoteUbuntuProcessor.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/RemoteUbuntuProcessor.kt similarity index 92% rename from src/main/kotlin/io/provs/core/processors/RemoteUbuntuProcessor.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/RemoteUbuntuProcessor.kt index 668e286..eae5792 100644 --- a/src/main/kotlin/io/provs/core/processors/RemoteUbuntuProcessor.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/processors/RemoteUbuntuProcessor.kt @@ -1,9 +1,9 @@ -package io.provs.core.processors +package org.domaindrivenarchitecture.provs.core.processors -import io.provs.core.Secret -import io.provs.core.escapeAndEncloseByDoubleQuoteForShell -import io.provs.core.escapeNewline -import io.provs.core.platforms.SHELL +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 net.schmizz.sshj.SSHClient import net.schmizz.sshj.connection.channel.direct.Session import net.schmizz.sshj.connection.channel.direct.Session.Command diff --git a/src/main/kotlin/io/provs/core/tags/Api.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/tags/Api.kt similarity index 82% rename from src/main/kotlin/io/provs/core/tags/Api.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/core/tags/Api.kt index 9eac2dc..9d9bd08 100644 --- a/src/main/kotlin/io/provs/core/tags/Api.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/core/tags/Api.kt @@ -1,4 +1,4 @@ -package io.provs.core.tags +package org.domaindrivenarchitecture.provs.core.tags @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION) @Retention(AnnotationRetention.SOURCE) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/demos/HelloWorld.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/demos/HelloWorld.kt new file mode 100644 index 0000000..38c17dd --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/demos/HelloWorld.kt @@ -0,0 +1,14 @@ +package org.domaindrivenarchitecture.provs.ubuntu.extensions.demos + +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.local + + +fun Prov.helloWorld() = def { + cmd("echo Hello world!") +} + + +fun main() { + local().helloWorld() +} diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/demos/SystemInfos.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/demos/SystemInfos.kt similarity index 92% rename from src/main/kotlin/io/provs/ubuntu/extensions/demos/SystemInfos.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/demos/SystemInfos.kt index 53537eb..3859fb1 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/demos/SystemInfos.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/demos/SystemInfos.kt @@ -1,6 +1,6 @@ -package io.provs.ubuntu.extensions.demos +package org.domaindrivenarchitecture.provs.ubuntu.extensions.demos -import io.provs.core.* +import org.domaindrivenarchitecture.provs.core.* /** diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionMonitoring.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionMonitoring.kt new file mode 100644 index 0000000..958dea5 --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionMonitoring.kt @@ -0,0 +1,18 @@ +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_compounds.monitoring + +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.NginxConf +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.nginxHttpConf +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.prometheus.base.configurePrometheusDocker +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.prometheus.base.runPrometheusDocker + + +@Suppress("unused") // used externally +fun Prov.provisionMonitoring() = requireAll { + configurePrometheusDocker() + runPrometheusDocker() + provisionNginxStandAlone(NginxConf.nginxHttpConf()) +} + + diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionNginxAndMonitoring.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionNginxAndMonitoring.kt new file mode 100644 index 0000000..b19b98e --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_compounds/monitoring/ProvisionNginxAndMonitoring.kt @@ -0,0 +1,20 @@ +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_compounds.monitoring + +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.NginxConf +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.nginxAddLocation +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.nginxCreateSelfSignedCertificate +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.nginxHttpsConfWithLocationFiles +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.prometheus.base.prometheusNginxConfig +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.prometheus.provisionPrometheusDocker + + +@Suppress("unused") // used externally +fun Prov.provisionNginxMonitoring(nginxHost: String = "localhost") = def { + provisionPrometheusDocker(nginxHost) + nginxCreateSelfSignedCertificate() + provisionNginxStandAlone(NginxConf.nginxHttpsConfWithLocationFiles()) + nginxAddLocation("443", nginxHost, "/prometheus", prometheusNginxConfig) +} + diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/certbot/ProvisionCertbot.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/certbot/ProvisionCertbot.kt similarity index 71% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/certbot/ProvisionCertbot.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/certbot/ProvisionCertbot.kt index 259cb01..edffb3b 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/certbot/ProvisionCertbot.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/certbot/ProvisionCertbot.kt @@ -1,9 +1,9 @@ -package io.provs.ubuntu.extensions.server_software.certbot +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.certbot -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.filesystem.base.fileExists -import io.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileExists +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall /** diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewall.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewall.kt similarity index 94% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewall.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewall.kt index 2b03736..6697463 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewall.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewall.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.extensions.server_software.firewall +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.firewall -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall fun Prov.saveIpTables() = requireAll { diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/firewall/base/FirewallBackup.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/firewall/base/FirewallBackup.kt similarity index 74% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/firewall/base/FirewallBackup.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/firewall/base/FirewallBackup.kt index 9f5c081..558b555 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/firewall/base/FirewallBackup.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/firewall/base/FirewallBackup.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.extensions.server_software.firewall.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.firewall.base -import io.provs.core.Prov -import io.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult import java.time.LocalDateTime import java.time.format.DateTimeFormatter diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nexus/ProvisionNexus.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nexus/ProvisionNexus.kt similarity index 75% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/nexus/ProvisionNexus.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nexus/ProvisionNexus.kt index 8d7c91b..27b1a6b 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nexus/ProvisionNexus.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nexus/ProvisionNexus.kt @@ -1,16 +1,16 @@ -package io.provs.ubuntu.extensions.server_software.nexus +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nexus -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.core.docker.containerRuns -import io.provs.core.remote -import io.provs.ubuntu.filesystem.base.fileExists -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.user.base.createUser -import io.provs.ubuntu.extensions.server_software.certbot.provisionCertbot -import io.provs.ubuntu.extensions.server_software.nginx.base.NginxConf -import io.provs.ubuntu.extensions.server_software.nginx.base.nginxReverseProxyHttpConfig -import io.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone +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.ubuntu.filesystem.base.fileExists +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.user.base.createUser +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.certbot.provisionCertbot +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.NginxConf +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.nginxReverseProxyHttpConfig +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone /** diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nexus/base/NginxConf.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nexus/base/NginxConf.kt similarity index 96% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/nexus/base/NginxConf.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nexus/base/NginxConf.kt index 28e8512..e9adf04 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nexus/base/NginxConf.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nexus/base/NginxConf.kt @@ -1,4 +1,4 @@ -package io.provs.ubuntu.extensions.server_software.nexus.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nexus.base fun reverseProxyConfigHttpPort80(serverName: String): String { // see https://help.sonatype.com/repomanager3/installation/run-behind-a-reverse-proxy diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/ProvisionNginx.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/ProvisionNginx.kt similarity index 58% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/ProvisionNginx.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/ProvisionNginx.kt index a19edb6..0c0e25e 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/ProvisionNginx.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/ProvisionNginx.kt @@ -1,13 +1,13 @@ -package io.provs.ubuntu.extensions.server_software.nginx +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.core.remote -import io.provs.ubuntu.filesystem.base.createFile -import io.provs.ubuntu.filesystem.base.fileExists -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.extensions.server_software.nginx.base.NginxConf -import io.provs.ubuntu.extensions.server_software.nginx.base.createNginxLocationFolders +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.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 +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.NginxConf +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.createNginxLocationFolders import kotlin.system.exitProcess diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/BasicAuth.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/BasicAuth.kt new file mode 100644 index 0000000..ce692c1 --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/BasicAuth.kt @@ -0,0 +1,12 @@ +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base + +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall + +fun Prov.nginxAddBasicAuth(user: String, password: Secret) = requireAll { + aptInstall("apache2-utils") + val passwordFile = "/etc/nginx/.htpasswd" + cmdNoLog("sudo htpasswd -b -c $passwordFile $user ${password.plain()}") +} + diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/Configs.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/Configs.kt similarity index 97% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/Configs.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/Configs.kt index 09d15fa..97199d9 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/Configs.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/Configs.kt @@ -1,4 +1,4 @@ -package io.provs.ubuntu.extensions.server_software.nginx.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base class NginxConf(val conf: String = NGINX_MINIMAL_CONF) { companion object {} diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/Locations.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/Locations.kt similarity index 84% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/Locations.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/Locations.kt index f25f4af..dbe2bc5 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/Locations.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/Locations.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.extensions.server_software.nginx.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.filesystem.base.* +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.* internal const val locationsAvailableDir = "/etc/nginx/locations-available/" diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/SelfSignedCertificate.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/SelfSignedCertificate.kt similarity index 79% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/SelfSignedCertificate.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/SelfSignedCertificate.kt index 6c29cb1..5b6a469 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/SelfSignedCertificate.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/SelfSignedCertificate.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.extensions.server_software.nginx.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base -import io.provs.core.Prov -import io.provs.ubuntu.filesystem.base.createDirs -import io.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDirs +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone internal val certificateName = "selfsigned" diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/ProvisionPrometheus.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/ProvisionPrometheus.kt similarity index 70% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/ProvisionPrometheus.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/ProvisionPrometheus.kt index 76391e5..9f33e83 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/ProvisionPrometheus.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/ProvisionPrometheus.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.extensions.server_software.prometheus +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.prometheus -import io.provs.core.Prov -import io.provs.ubuntu.extensions.server_software.prometheus.base.* +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.prometheus.base.* /** * Provisions prometheus monitoring. diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/base/NodeExporter.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/base/NodeExporter.kt similarity index 79% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/base/NodeExporter.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/base/NodeExporter.kt index 31d5e23..ad7450f 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/base/NodeExporter.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/base/NodeExporter.kt @@ -1,12 +1,12 @@ -package io.provs.ubuntu.extensions.server_software.prometheus.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.prometheus.base -import io.provs.core.Prov -import io.provs.ubuntu.filesystem.base.createDir -import io.provs.ubuntu.filesystem.base.createFile -import io.provs.ubuntu.filesystem.base.fileContainsText -import io.provs.ubuntu.filesystem.base.replaceTextInFile -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.user.base.whoami +import org.domaindrivenarchitecture.provs.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 +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.replaceTextInFile +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.user.base.whoami internal val defaultInstallationDir = "/usr/local/bin/" diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/base/Prometheus.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/base/Prometheus.kt similarity index 84% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/base/Prometheus.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/base/Prometheus.kt index 98165f3..42008c4 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/base/Prometheus.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/base/Prometheus.kt @@ -1,10 +1,10 @@ -package io.provs.ubuntu.extensions.server_software.prometheus.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.prometheus.base -import io.provs.core.Prov -import io.provs.core.docker.containerRuns -import io.provs.ubuntu.filesystem.base.createDirs -import io.provs.ubuntu.filesystem.base.createFile -import io.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.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 internal val configDir = "/etc/prometheus/" diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/base/PrometheusNginxConfig.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/base/PrometheusNginxConfig.kt similarity index 51% rename from src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/base/PrometheusNginxConfig.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/base/PrometheusNginxConfig.kt index c8c8d7b..e4e1b39 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/server_software/prometheus/base/PrometheusNginxConfig.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/prometheus/base/PrometheusNginxConfig.kt @@ -1,4 +1,4 @@ -package io.provs.ubuntu.extensions.server_software.prometheus.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.prometheus.base val prometheusNginxConfig = """ proxy_pass http://localhost:9090/prometheus; diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/ProvisionWorkplace.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/ProvisionWorkplace.kt similarity index 77% rename from src/main/kotlin/io/provs/ubuntu/extensions/workplace/ProvisionWorkplace.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/ProvisionWorkplace.kt index 800661c..2cfb720 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/ProvisionWorkplace.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/ProvisionWorkplace.kt @@ -1,19 +1,19 @@ -package io.provs.ubuntu.extensions.workplace +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace -import io.provs.core.* -import io.provs.core.processors.RemoteProcessor -import io.provs.ubuntu.extensions.workplace.base.* -import io.provs.ubuntu.git.provisionGit -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.install.base.aptInstallFromPpa -import io.provs.ubuntu.install.base.aptPurge -import io.provs.ubuntu.keys.KeyPair -import io.provs.ubuntu.keys.base.gpgFingerprint -import io.provs.ubuntu.keys.provisionKeysCurrentUser -import io.provs.ubuntu.secret.secretSources.PromptSecretSource -import io.provs.ubuntu.user.base.currentUserCanSudo -import io.provs.ubuntu.user.base.makeUserSudoerWithNoSudoPasswordRequired -import io.provs.ubuntu.user.base.whoami +import org.domaindrivenarchitecture.provs.core.* +import org.domaindrivenarchitecture.provs.core.processors.RemoteProcessor +import org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base.* +import org.domaindrivenarchitecture.provs.ubuntu.git.provisionGit +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstallFromPpa +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptPurge +import org.domaindrivenarchitecture.provs.ubuntu.keys.KeyPair +import org.domaindrivenarchitecture.provs.ubuntu.keys.base.gpgFingerprint +import org.domaindrivenarchitecture.provs.ubuntu.keys.provisionKeysCurrentUser +import org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources.PromptSecretSource +import org.domaindrivenarchitecture.provs.ubuntu.user.base.currentUserCanSudo +import org.domaindrivenarchitecture.provs.ubuntu.user.base.makeUserSudoerWithNoSudoPasswordRequired +import org.domaindrivenarchitecture.provs.ubuntu.user.base.whoami import java.net.InetAddress import kotlin.system.exitProcess @@ -112,7 +112,7 @@ fun Prov.provisionWorkplace( * The first argument specifies hostName or IP-Address of the remote machine, * the second argument defines the user on the remote machine for whom the workplace is provisioned; * You can invoke this method e.g. using the jar-file from the project root by: - * java -jar build/libs/provs-extensions-uber.jar io.provs.ubuntu.extensions.workplace.ProvisionWorkplaceKt provisionRemote + * java -jar build/libs/provs-extensions-uber.jar org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.ProvisionWorkplaceKt provisionRemote * You will be prompted for the password of the remote user. * * @param args host and userName of the remote machine as the first resp. second argument diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/WorkplaceConfig.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/WorkplaceConfig.kt similarity index 71% rename from src/main/kotlin/io/provs/ubuntu/extensions/workplace/WorkplaceConfig.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/WorkplaceConfig.kt index 246299a..1dd0c94 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/WorkplaceConfig.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/WorkplaceConfig.kt @@ -1,10 +1,10 @@ -package io.provs.ubuntu.extensions.workplace +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace -import io.provs.ubuntu.keys.KeyPairSource -import io.provs.ubuntu.secret.SecretSource -import io.provs.ubuntu.secret.SecretSourceType -import io.provs.ubuntu.secret.SecretSupplier -import io.provs.ubuntu.secret.secretSources.PlainSecretSource +import org.domaindrivenarchitecture.provs.ubuntu.keys.KeyPairSource +import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource +import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSourceType +import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSupplier +import org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources.PlainSecretSource import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json import java.io.* diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Docker.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Docker.kt new file mode 100644 index 0000000..80fab6f --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Docker.kt @@ -0,0 +1,12 @@ +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base + +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall + +fun Prov.installDocker() = def { + aptInstall("containerd docker.io") + if (!chk("getent group docker")) { + cmd("sudo groupadd docker") + } + cmd("sudo gpasswd -a \$USER docker") +} \ No newline at end of file diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Fakturama.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Fakturama.kt similarity index 65% rename from src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Fakturama.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Fakturama.kt index 00a9077..4f34429 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Fakturama.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Fakturama.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.core.Prov -import io.provs.ubuntu.filesystem.base.createDir -import io.provs.ubuntu.web.base.downloadFromURL +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDir +import org.domaindrivenarchitecture.provs.ubuntu.web.base.downloadFromURL fun Prov.installFakturama() = def { diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Gopass.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Gopass.kt similarity index 80% rename from src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Gopass.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Gopass.kt index 0a651a0..3ec54c3 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Gopass.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Gopass.kt @@ -1,13 +1,13 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.filesystem.base.createDir -import io.provs.ubuntu.filesystem.base.createDirs -import io.provs.ubuntu.filesystem.base.createFile -import io.provs.ubuntu.filesystem.base.userHome -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.install.base.isPackageInstalled +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.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.createFile +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.userHome +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.install.base.isPackageInstalled fun Prov.installGopass(version: String = "1.12.7", enforceVersion: Boolean = false) = def { diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/GopassBridge.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/GopassBridge.kt similarity index 83% rename from src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/GopassBridge.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/GopassBridge.kt index 3223f74..83d4188 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/GopassBridge.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/GopassBridge.kt @@ -1,13 +1,13 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.filesystem.base.createDir -import io.provs.ubuntu.filesystem.base.createDirs -import io.provs.ubuntu.filesystem.base.userHome -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.install.base.isPackageInstalled -import io.provs.ubuntu.web.base.downloadFromURL +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.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 +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.install.base.isPackageInstalled +import org.domaindrivenarchitecture.provs.ubuntu.web.base.downloadFromURL fun Prov.downloadGopassBridge() = def { diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/NoSwappiness.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/NoSwappiness.kt new file mode 100644 index 0000000..23bc485 --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/NoSwappiness.kt @@ -0,0 +1,10 @@ +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base + +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.addTextToFile +import java.io.File + +fun Prov.configureNoSwappiness() = def { + // set swappiness to 0 + addTextToFile("vm.swappiness=0", File("/etc/sysctl.conf"), sudo = true) +} \ No newline at end of file diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/PackageBundles.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/PackageBundles.kt similarity index 87% rename from src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/PackageBundles.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/PackageBundles.kt index abdf162..49997dc 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/PackageBundles.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/PackageBundles.kt @@ -1,4 +1,4 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base val OS_ANALYSIS = "lsof strace ncdu iptraf htop iotop iftop" diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Redshift.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Redshift.kt similarity index 56% rename from src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Redshift.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Redshift.kt index 1bdb1f9..0c8950f 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/Redshift.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Redshift.kt @@ -1,9 +1,9 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.core.Prov -import io.provs.ubuntu.filesystem.base.createDir -import io.provs.ubuntu.filesystem.base.createFile -import io.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.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 fun Prov.installRedshift() = def { diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/VSCode.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/VSCode.kt similarity index 89% rename from src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/VSCode.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/VSCode.kt index 651cd14..1a92d8d 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/VSCode.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/VSCode.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall fun Prov.installVSC(vararg options: String) = requireAll { diff --git a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/VirtualBoxGuest.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/VirtualBoxGuest.kt similarity index 66% rename from src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/VirtualBoxGuest.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/VirtualBoxGuest.kt index e23d36a..6bd96be 100644 --- a/src/main/kotlin/io/provs/ubuntu/extensions/workplace/base/VirtualBoxGuest.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/VirtualBoxGuest.kt @@ -1,9 +1,9 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.user.base.whoami +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.user.base.whoami fun Prov.installVirtualBoxGuestAdditions() = def { // if running in a VirtualBox vm diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Zim.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Zim.kt new file mode 100644 index 0000000..42d3f4a --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/Zim.kt @@ -0,0 +1,17 @@ +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base + +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.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 + + +fun Prov.installZimWiki() = def { + if (isPackageInstalled("zim")) { + ProvResult(true, out = "zim already installed.") + } else { + aptInstallFromPpa("jaap.karssenberg", "zim", "zim") + aptInstall("python3-gtkspellcheck") + } +} diff --git a/src/main/kotlin/io/provs/ubuntu/filesystem/base/Filesystem.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/filesystem/base/Filesystem.kt similarity index 97% rename from src/main/kotlin/io/provs/ubuntu/filesystem/base/Filesystem.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/filesystem/base/Filesystem.kt index 2f04e90..d97e4bd 100644 --- a/src/main/kotlin/io/provs/ubuntu/filesystem/base/Filesystem.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/filesystem/base/Filesystem.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.filesystem.base +package org.domaindrivenarchitecture.provs.ubuntu.filesystem.base -import io.provs.core.* -import io.provs.core.platforms.SHELL +import org.domaindrivenarchitecture.provs.core.* +import org.domaindrivenarchitecture.provs.core.platforms.SHELL import java.io.File diff --git a/src/main/kotlin/io/provs/ubuntu/git/ProvisionGit.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/git/ProvisionGit.kt similarity index 68% rename from src/main/kotlin/io/provs/ubuntu/git/ProvisionGit.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/git/ProvisionGit.kt index a745f51..f96b57a 100644 --- a/src/main/kotlin/io/provs/ubuntu/git/ProvisionGit.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/git/ProvisionGit.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.git +package org.domaindrivenarchitecture.provs.ubuntu.git -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall fun Prov.provisionGit( diff --git a/src/main/kotlin/io/provs/ubuntu/git/base/Git.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/git/base/Git.kt similarity index 84% rename from src/main/kotlin/io/provs/ubuntu/git/base/Git.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/git/base/Git.kt index a2db092..ab127b7 100644 --- a/src/main/kotlin/io/provs/ubuntu/git/base/Git.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/git/base/Git.kt @@ -1,12 +1,12 @@ -package io.provs.ubuntu.git.base +package org.domaindrivenarchitecture.provs.ubuntu.git.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.filesystem.base.addTextToFile -import io.provs.ubuntu.filesystem.base.createDir -import io.provs.ubuntu.filesystem.base.dirExists -import io.provs.ubuntu.keys.base.isHostKnown -import io.provs.ubuntu.utils.printToShell +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.addTextToFile +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDir +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.dirExists +import org.domaindrivenarchitecture.provs.ubuntu.keys.base.isHostKnown +import org.domaindrivenarchitecture.provs.ubuntu.utils.printToShell import java.io.File diff --git a/src/main/kotlin/io/provs/ubuntu/install/base/Install.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/install/base/Install.kt similarity index 90% rename from src/main/kotlin/io/provs/ubuntu/install/base/Install.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/install/base/Install.kt index 1cefe72..83c09af 100644 --- a/src/main/kotlin/io/provs/ubuntu/install/base/Install.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/install/base/Install.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.install.base +package org.domaindrivenarchitecture.provs.ubuntu.install.base -import io.provs.core.Prov -import io.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult private var aptInit = false diff --git a/src/main/kotlin/io/provs/ubuntu/keys/ProvisionKeys.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/ProvisionKeys.kt similarity index 60% rename from src/main/kotlin/io/provs/ubuntu/keys/ProvisionKeys.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/ProvisionKeys.kt index 0dbe250..7b4bf0d 100644 --- a/src/main/kotlin/io/provs/ubuntu/keys/ProvisionKeys.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/ProvisionKeys.kt @@ -1,11 +1,11 @@ -package io.provs.ubuntu.keys +package org.domaindrivenarchitecture.provs.ubuntu.keys -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.core.Secret -import io.provs.ubuntu.keys.base.configureGpgKeys -import io.provs.ubuntu.keys.base.configureSshKeys -import io.provs.ubuntu.secret.SecretSourceType +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.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 import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/provs/ubuntu/keys/base/Gpg.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/Gpg.kt similarity index 75% rename from src/main/kotlin/io/provs/ubuntu/keys/base/Gpg.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/Gpg.kt index 4eb6ac8..701ffd8 100644 --- a/src/main/kotlin/io/provs/ubuntu/keys/base/Gpg.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/Gpg.kt @@ -1,14 +1,14 @@ -package io.provs.ubuntu.keys.base +package org.domaindrivenarchitecture.provs.ubuntu.keys.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.filesystem.base.createDir -import io.provs.ubuntu.filesystem.base.createFile -import io.provs.ubuntu.filesystem.base.createSecretFile -import io.provs.ubuntu.filesystem.base.dirExists -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.keys.KeyPair -import io.provs.ubuntu.utils.printToShell +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.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.ubuntu.utils.printToShell /** diff --git a/src/main/kotlin/io/provs/ubuntu/keys/base/Ssh.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/Ssh.kt similarity index 70% rename from src/main/kotlin/io/provs/ubuntu/keys/base/Ssh.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/Ssh.kt index 92cb2ba..ac84160 100644 --- a/src/main/kotlin/io/provs/ubuntu/keys/base/Ssh.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/Ssh.kt @@ -1,10 +1,10 @@ -package io.provs.ubuntu.keys.base +package org.domaindrivenarchitecture.provs.ubuntu.keys.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.filesystem.base.createDir -import io.provs.ubuntu.filesystem.base.createSecretFile -import io.provs.ubuntu.keys.KeyPair +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.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 /** diff --git a/src/main/kotlin/io/provs/ubuntu/secret/SecretSource.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/SecretSource.kt similarity index 82% rename from src/main/kotlin/io/provs/ubuntu/secret/SecretSource.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/SecretSource.kt index e74ee58..438cf4e 100644 --- a/src/main/kotlin/io/provs/ubuntu/secret/SecretSource.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/SecretSource.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.secret +package org.domaindrivenarchitecture.provs.ubuntu.secret -import io.provs.core.Secret -import io.provs.ubuntu.secret.secretSources.* +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources.* import kotlinx.serialization.Serializable diff --git a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/FileSecretSource.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/FileSecretSource.kt similarity index 65% rename from src/main/kotlin/io/provs/ubuntu/secret/secretSources/FileSecretSource.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/FileSecretSource.kt index 0d08a59..be188d6 100644 --- a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/FileSecretSource.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/FileSecretSource.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.secret.secretSources +package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources -import io.provs.core.Prov -import io.provs.core.Secret -import io.provs.ubuntu.secret.SecretSource +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource /** diff --git a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/GopassSecretSource.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/GopassSecretSource.kt similarity index 63% rename from src/main/kotlin/io/provs/ubuntu/secret/secretSources/GopassSecretSource.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/GopassSecretSource.kt index c28b21f..e05fb52 100644 --- a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/GopassSecretSource.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/GopassSecretSource.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.secret.secretSources +package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources -import io.provs.core.Prov -import io.provs.core.Secret -import io.provs.ubuntu.secret.SecretSource +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource /** diff --git a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/PassSecretSource.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PassSecretSource.kt similarity index 65% rename from src/main/kotlin/io/provs/ubuntu/secret/secretSources/PassSecretSource.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PassSecretSource.kt index 8a15544..ac537de 100644 --- a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/PassSecretSource.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PassSecretSource.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.secret.secretSources +package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources -import io.provs.core.Prov -import io.provs.core.Secret -import io.provs.ubuntu.secret.SecretSource +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource /** diff --git a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/PlainSecretSource.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PlainSecretSource.kt similarity index 53% rename from src/main/kotlin/io/provs/ubuntu/secret/secretSources/PlainSecretSource.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PlainSecretSource.kt index 1bf4f64..cf6f795 100644 --- a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/PlainSecretSource.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PlainSecretSource.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.secret.secretSources +package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources -import io.provs.core.Secret -import io.provs.ubuntu.secret.SecretSource +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource class PlainSecretSource(plainSecret: String) : SecretSource(plainSecret) { diff --git a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/PromptSecretSource.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PromptSecretSource.kt similarity index 89% rename from src/main/kotlin/io/provs/ubuntu/secret/secretSources/PromptSecretSource.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PromptSecretSource.kt index 5eca317..a2ab4cd 100644 --- a/src/main/kotlin/io/provs/ubuntu/secret/secretSources/PromptSecretSource.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PromptSecretSource.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.secret.secretSources +package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources -import io.provs.core.Secret -import io.provs.ubuntu.secret.SecretSource +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSource import java.awt.FlowLayout import javax.swing.* diff --git a/src/main/kotlin/io/provs/ubuntu/user/UserConfig.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/user/UserConfig.kt similarity index 88% rename from src/main/kotlin/io/provs/ubuntu/user/UserConfig.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/user/UserConfig.kt index e4bed8e..746dc46 100644 --- a/src/main/kotlin/io/provs/ubuntu/user/UserConfig.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/user/UserConfig.kt @@ -1,6 +1,6 @@ -package io.provs.ubuntu.user +package org.domaindrivenarchitecture.provs.ubuntu.user -import io.provs.ubuntu.keys.KeyPairSource +import org.domaindrivenarchitecture.provs.ubuntu.keys.KeyPairSource import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json import java.io.BufferedReader diff --git a/src/main/kotlin/io/provs/ubuntu/user/base/User.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/user/base/User.kt similarity index 87% rename from src/main/kotlin/io/provs/ubuntu/user/base/User.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/user/base/User.kt index 13e43b5..4d80dc3 100644 --- a/src/main/kotlin/io/provs/ubuntu/user/base/User.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/user/base/User.kt @@ -1,15 +1,15 @@ -package io.provs.ubuntu.user.base +package org.domaindrivenarchitecture.provs.ubuntu.user.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.core.Secret -import io.provs.core.processors.RemoteProcessor -import io.provs.ubuntu.filesystem.base.createDirs -import io.provs.ubuntu.filesystem.base.fileExists -import io.provs.ubuntu.git.provisionGit -import io.provs.ubuntu.keys.base.gpgFingerprint -import io.provs.ubuntu.keys.provisionKeysCurrentUser -import io.provs.ubuntu.user.UserConfig +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.ubuntu.filesystem.base.createDirs +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileExists +import org.domaindrivenarchitecture.provs.ubuntu.git.provisionGit +import org.domaindrivenarchitecture.provs.ubuntu.keys.base.gpgFingerprint +import org.domaindrivenarchitecture.provs.ubuntu.keys.provisionKeysCurrentUser +import org.domaindrivenarchitecture.provs.ubuntu.user.UserConfig import java.net.InetAddress diff --git a/src/main/kotlin/io/provs/ubuntu/utils/Utils.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/utils/Utils.kt similarity index 54% rename from src/main/kotlin/io/provs/ubuntu/utils/Utils.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/utils/Utils.kt index 1221cf5..bad65f7 100644 --- a/src/main/kotlin/io/provs/ubuntu/utils/Utils.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/utils/Utils.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.utils +package org.domaindrivenarchitecture.provs.ubuntu.utils -import io.provs.core.escapeBackslash -import io.provs.core.escapeDoubleQuote +import org.domaindrivenarchitecture.provs.core.escapeBackslash +import org.domaindrivenarchitecture.provs.core.escapeDoubleQuote // todo: investigate to use .escapeAndEncloseByDoubleQuoteForShell() or similar instead (?) diff --git a/src/main/kotlin/io/provs/ubuntu/web/base/Web.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/web/base/Web.kt similarity index 62% rename from src/main/kotlin/io/provs/ubuntu/web/base/Web.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/web/base/Web.kt index cd36afe..5336d9d 100644 --- a/src/main/kotlin/io/provs/ubuntu/web/base/Web.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/ubuntu/web/base/Web.kt @@ -1,9 +1,9 @@ -package io.provs.ubuntu.web.base +package org.domaindrivenarchitecture.provs.ubuntu.web.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.install.base.isPackageInstalled +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.ProvResult +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.install.base.isPackageInstalled /** diff --git a/src/test/kotlin/io/provs/core/ProvTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/ProvTest.kt similarity index 97% rename from src/test/kotlin/io/provs/core/ProvTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/core/ProvTest.kt index 2b94412..365cf31 100644 --- a/src/test/kotlin/io/provs/core/ProvTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/ProvTest.kt @@ -1,9 +1,9 @@ -package io.provs.core +package org.domaindrivenarchitecture.provs.core -import io.provs.core.docker.provideContainer -import io.provs.test.tags.ContainerTest -import io.provs.test.tags.NonCi -import io.provs.test.testLocal +import org.domaindrivenarchitecture.provs.core.docker.provideContainer +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.test.tags.NonCi +import org.domaindrivenarchitecture.provs.test.testLocal import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/core/UtilsKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/UtilsKtTest.kt similarity index 84% rename from src/test/kotlin/io/provs/core/UtilsKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/core/UtilsKtTest.kt index 1a551e2..a0f7865 100644 --- a/src/test/kotlin/io/provs/core/UtilsKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/UtilsKtTest.kt @@ -1,7 +1,7 @@ -package io.provs.core +package org.domaindrivenarchitecture.provs.core -import io.provs.test.defaultTestContainer -import io.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/core/docker/platforms/UbuntuHostDockerKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/docker/platforms/UbuntuHostDockerKtTest.kt similarity index 59% rename from src/test/kotlin/io/provs/core/docker/platforms/UbuntuHostDockerKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/core/docker/platforms/UbuntuHostDockerKtTest.kt index ad6927e..c5bb42b 100644 --- a/src/test/kotlin/io/provs/core/docker/platforms/UbuntuHostDockerKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/docker/platforms/UbuntuHostDockerKtTest.kt @@ -1,11 +1,11 @@ -package io.provs.core.docker.platforms +package org.domaindrivenarchitecture.provs.core.docker.platforms -import io.provs.core.ProvResult -import io.provs.core.docker.containerRuns -import io.provs.core.docker.exitAndRmContainer -import io.provs.core.docker.runContainer -import io.provs.test.tags.NonCi -import io.provs.test.testLocal +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.test.tags.NonCi +import org.domaindrivenarchitecture.provs.test.testLocal import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.condition.EnabledOnOs diff --git a/src/test/kotlin/io/provs/core/entry/EntryTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/entry/EntryTest.kt similarity index 77% rename from src/test/kotlin/io/provs/core/entry/EntryTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/core/entry/EntryTest.kt index 96de239..fca7e30 100644 --- a/src/test/kotlin/io/provs/core/entry/EntryTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/entry/EntryTest.kt @@ -1,4 +1,4 @@ -package io.provs.core.entry +package org.domaindrivenarchitecture.provs.core.entry import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertEquals @@ -41,7 +41,7 @@ internal class EntryKtTest { @Test fun test_without_method_argument() { // when - main("io.provs.core.entry.EntryTestKt") + main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt") // then assertEquals("main is fun \n", outContent.toString()) @@ -50,7 +50,7 @@ internal class EntryKtTest { @Test fun test_method_main_without_args() { // when - main("io.provs.core.entry.EntryTestKt", "main") + main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt", "main") // then assertEquals("main is fun \n", outContent.toString()) @@ -59,7 +59,7 @@ internal class EntryKtTest { @Test fun test_named_method_without_args() { // when - main("io.provs.core.entry.EntryTestKt", "testfun") + main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt", "testfun") // then assertEquals("test is fun \n", outContent.toString()) @@ -68,7 +68,7 @@ internal class EntryKtTest { @Test fun test_method_main_with_args() { // when - main("io.provs.core.entry.EntryTestKt", "main", "arg1", "arg2") + main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt", "main", "arg1", "arg2") // then assertEquals("main is fun arg1 arg2\n", outContent.toString()) @@ -77,7 +77,7 @@ internal class EntryKtTest { @Test fun test_named_method_with_args() { // when - main("io.provs.core.entry.EntryTestKt", "testfun", "arg1", "arg2") + main("org.domaindrivenarchitecture.provs.core.entry.EntryTestKt", "testfun", "arg1", "arg2") // then assertEquals("test is fun arg1 arg2\n", outContent.toString()) diff --git a/src/test/kotlin/io/provs/core/platformTest/UbuntuProvTests.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/platformTest/UbuntuProvTests.kt similarity index 89% rename from src/test/kotlin/io/provs/core/platformTest/UbuntuProvTests.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/core/platformTest/UbuntuProvTests.kt index 18889d0..b7f5bf0 100644 --- a/src/test/kotlin/io/provs/core/platformTest/UbuntuProvTests.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/platformTest/UbuntuProvTests.kt @@ -1,8 +1,8 @@ -package io.provs.core.platformTest +package org.domaindrivenarchitecture.provs.core.platformTest -import io.provs.core.Prov -import io.provs.test.tags.NonCi -import io.provs.test.testLocal +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.test.tags.NonCi +import org.domaindrivenarchitecture.provs.test.testLocal import org.junit.jupiter.api.Test import org.junit.jupiter.api.condition.EnabledOnOs import org.junit.jupiter.api.condition.OS diff --git a/src/test/kotlin/io/provs/core/platformTest/WinProvTests.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/platformTest/WinProvTests.kt similarity index 84% rename from src/test/kotlin/io/provs/core/platformTest/WinProvTests.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/core/platformTest/WinProvTests.kt index 8c66f8a..9ed2d6d 100644 --- a/src/test/kotlin/io/provs/core/platformTest/WinProvTests.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/platformTest/WinProvTests.kt @@ -1,7 +1,7 @@ -package io.provs.core.platformTest +package org.domaindrivenarchitecture.provs.core.platformTest -import io.provs.core.Prov -import io.provs.test.testLocal +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.test.testLocal import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.condition.EnabledOnOs diff --git a/src/test/kotlin/io/provs/core/processors/ContainerProcessorTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/processors/ContainerProcessorTest.kt similarity index 79% rename from src/test/kotlin/io/provs/core/processors/ContainerProcessorTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/core/processors/ContainerProcessorTest.kt index 2825135..26fd034 100644 --- a/src/test/kotlin/io/provs/core/processors/ContainerProcessorTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/processors/ContainerProcessorTest.kt @@ -1,8 +1,8 @@ -package io.provs.core.processors +package org.domaindrivenarchitecture.provs.core.processors -import io.provs.core.newline -import io.provs.test.defaultTestContainer -import io.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.core.newline +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.condition.EnabledOnOs diff --git a/src/test/kotlin/io/provs/core/processors/ContainerUbuntuHostProcessorTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/processors/ContainerUbuntuHostProcessorTest.kt similarity index 74% rename from src/test/kotlin/io/provs/core/processors/ContainerUbuntuHostProcessorTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/core/processors/ContainerUbuntuHostProcessorTest.kt index eb2ff16..b055d63 100644 --- a/src/test/kotlin/io/provs/core/processors/ContainerUbuntuHostProcessorTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/processors/ContainerUbuntuHostProcessorTest.kt @@ -1,8 +1,8 @@ -package io.provs.core.processors +package org.domaindrivenarchitecture.provs.core.processors -import io.provs.core.platforms.SHELL -import io.provs.test.tags.ContainerTest -import io.provs.test.testDockerWithSudo +import org.domaindrivenarchitecture.provs.core.platforms.SHELL +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.test.testDockerWithSudo import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.condition.EnabledOnOs diff --git a/src/test/kotlin/io/provs/core/processors/LocalProcessorTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/processors/LocalProcessorTest.kt similarity index 86% rename from src/test/kotlin/io/provs/core/processors/LocalProcessorTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/core/processors/LocalProcessorTest.kt index 65284ae..f6e6dc5 100644 --- a/src/test/kotlin/io/provs/core/processors/LocalProcessorTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/core/processors/LocalProcessorTest.kt @@ -1,9 +1,9 @@ -package io.provs.core.processors +package org.domaindrivenarchitecture.provs.core.processors -import io.provs.core.Prov -import io.provs.core.escapeAndEncloseByDoubleQuoteForShell -import io.provs.core.escapeProcentForPrintf -import io.provs.core.escapeSingleQuoteForShell +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.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewallKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewallKtTest.kt similarity index 56% rename from src/test/kotlin/io/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewallKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewallKtTest.kt index 3497df7..05e1327 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewallKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/firewall/ProvisionFirewallKtTest.kt @@ -1,15 +1,15 @@ -package io.provs.ubuntu.extensions.server_software.firewall +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.firewall -import io.provs.core.Prov -import io.provs.core.docker.dockerProvideImage -import io.provs.core.docker.dockerimages.UbuntuPlusUser -import io.provs.core.docker.exitAndRmContainer -import io.provs.core.local -import io.provs.core.processors.ContainerEndMode -import io.provs.core.processors.ContainerStartMode -import io.provs.core.processors.ContainerUbuntuHostProcessor -import io.provs.test.tags.NonCi -import io.provs.ubuntu.install.base.aptInstall +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.test.tags.NonCi +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/server_software/nexus/ProvisionNexusKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nexus/ProvisionNexusKtTest.kt similarity index 66% rename from src/test/kotlin/io/provs/ubuntu/extensions/server_software/nexus/ProvisionNexusKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nexus/ProvisionNexusKtTest.kt index d8b8972..5ea4387 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/server_software/nexus/ProvisionNexusKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nexus/ProvisionNexusKtTest.kt @@ -1,11 +1,11 @@ package nexus -import io.provs.test.defaultTestContainer -import io.provs.ubuntu.extensions.server_software.nexus.provisionNexusWithDocker +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nexus.provisionNexusWithDocker import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test -import io.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.defaultTestContainer internal class ProvisionNexusKtTest { diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/server_software/nginx/ProvisionNginxKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/ProvisionNginxKtTest.kt similarity index 78% rename from src/test/kotlin/io/provs/ubuntu/extensions/server_software/nginx/ProvisionNginxKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/ProvisionNginxKtTest.kt index 060df51..9e47975 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/server_software/nginx/ProvisionNginxKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/ProvisionNginxKtTest.kt @@ -1,11 +1,11 @@ -package io.provs.ubuntu.extensions.server_software.nginx +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx -import io.provs.test.defaultTestContainer -import io.provs.test.tags.NonCi -import io.provs.ubuntu.filesystem.base.replaceTextInFile -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.extensions.server_software.nginx.base.* -import io.provs.ubuntu.filesystem.base.fileExists +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.NonCi +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.replaceTextInFile +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base.* +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileExists import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/LocationsKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/LocationsKtTest.kt similarity index 59% rename from src/test/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/LocationsKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/LocationsKtTest.kt index ebefc8e..a1a387d 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/server_software/nginx/base/LocationsKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/server_software/nginx/base/LocationsKtTest.kt @@ -1,14 +1,14 @@ -package io.provs.ubuntu.extensions.server_software.nginx.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.base -import io.provs.ubuntu.filesystem.base.createFile -import io.provs.ubuntu.filesystem.base.fileContainsText -import io.provs.ubuntu.extensions.server_software.nginx.configFile -import io.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createFile +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileContainsText +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.configFile +import org.domaindrivenarchitecture.provs.ubuntu.extensions.server_software.nginx.provisionNginxStandAlone import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test -import io.provs.test.defaultTestContainer -import io.provs.test.tags.NonCi +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.NonCi internal class LocationsKtTest { diff --git a/src/test/kotlin/io/provs/ubuntu/keys/TestKeys.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/test_keys/TestKeys.kt similarity index 99% rename from src/test/kotlin/io/provs/ubuntu/keys/TestKeys.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/test_keys/TestKeys.kt index 6042307..d85811a 100644 --- a/src/test/kotlin/io/provs/ubuntu/keys/TestKeys.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/test_keys/TestKeys.kt @@ -1,4 +1,4 @@ -package io.provs.ubuntu.keys +package org.domaindrivenarchitecture.provs.ubuntu.extensions.test_keys fun publicGPGSnakeoilKey(): String { diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/ProvisionWorkplaceKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/ProvisionWorkplaceKtTest.kt similarity index 87% rename from src/test/kotlin/io/provs/ubuntu/extensions/workplace/ProvisionWorkplaceKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/ProvisionWorkplaceKtTest.kt index c995867..38f4f6e 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/ProvisionWorkplaceKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/ProvisionWorkplaceKtTest.kt @@ -1,9 +1,9 @@ -package io.provs.ubuntu.extensions.workplace +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace -import io.provs.core.Password +import org.domaindrivenarchitecture.provs.core.Password import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test -import io.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.defaultTestContainer internal class ProvisionWorkplaceKtTest { diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/FakturamaKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/FakturamaKtTest.kt similarity index 60% rename from src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/FakturamaKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/FakturamaKtTest.kt index edba2e2..73e81fe 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/FakturamaKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/FakturamaKtTest.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.test.defaultTestContainer -import io.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/GopassBridgeKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/GopassBridgeKtTest.kt similarity index 79% rename from src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/GopassBridgeKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/GopassBridgeKtTest.kt index f2b0cde..8b8f79f 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/GopassBridgeKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/GopassBridgeKtTest.kt @@ -1,22 +1,22 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.core.Prov -import io.provs.core.ProvResult -import io.provs.core.Secret -import io.provs.core.docker.exitAndRmContainer -import io.provs.core.local -import io.provs.core.processors.ContainerStartMode -import io.provs.test.defaultTestContainer -import io.provs.test.tags.ContainerTest -import io.provs.test.tags.NonCi -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.keys.KeyPair -import io.provs.ubuntu.keys.base.configureGpgKeys +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.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.test.tags.NonCi +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.keys.KeyPair +import org.domaindrivenarchitecture.provs.ubuntu.keys.base.configureGpgKeys import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test -import io.provs.ubuntu.extensions.test_keys.privateGPGSnakeoilKey -import io.provs.ubuntu.extensions.test_keys.publicGPGSnakeoilKey +import org.domaindrivenarchitecture.provs.ubuntu.extensions.test_keys.privateGPGSnakeoilKey +import org.domaindrivenarchitecture.provs.ubuntu.extensions.test_keys.publicGPGSnakeoilKey internal class GopassBridgeKtTest { diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/GopassKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/GopassKtTest.kt similarity index 74% rename from src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/GopassKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/GopassKtTest.kt index 6aeb686..46a62cf 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/GopassKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/GopassKtTest.kt @@ -1,20 +1,20 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.core.Secret -import io.provs.core.remote -import io.provs.test.defaultTestContainer -import io.provs.test.tags.ContainerTest -import io.provs.ubuntu.filesystem.base.* -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.keys.KeyPair -import io.provs.ubuntu.keys.base.configureGpgKeys -import io.provs.ubuntu.keys.base.gpgFingerprint -import io.provs.ubuntu.secret.secretSources.GopassSecretSource +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.core.remote +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.* +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.keys.KeyPair +import org.domaindrivenarchitecture.provs.ubuntu.keys.base.configureGpgKeys +import org.domaindrivenarchitecture.provs.ubuntu.keys.base.gpgFingerprint +import org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources.GopassSecretSource import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test -import io.provs.ubuntu.extensions.test_keys.privateGPGSnakeoilKey -import io.provs.ubuntu.extensions.test_keys.publicGPGSnakeoilKey +import org.domaindrivenarchitecture.provs.ubuntu.extensions.test_keys.privateGPGSnakeoilKey +import org.domaindrivenarchitecture.provs.ubuntu.extensions.test_keys.publicGPGSnakeoilKey internal class GopassKtTest { diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/VSCodeKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/VSCodeKtTest.kt similarity index 72% rename from src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/VSCodeKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/VSCodeKtTest.kt index 35b864e..493cae7 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/workplace/base/VSCodeKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/extensions/workplace/base/VSCodeKtTest.kt @@ -1,10 +1,10 @@ -package io.provs.ubuntu.extensions.workplace.base +package org.domaindrivenarchitecture.provs.ubuntu.extensions.workplace.base -import io.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test -import io.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.defaultTestContainer internal class VSCodeKtTest { diff --git a/src/test/kotlin/io/provs/ubuntu/filesystem/base/FilesystemKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/filesystem/base/FilesystemKtTest.kt similarity index 96% rename from src/test/kotlin/io/provs/ubuntu/filesystem/base/FilesystemKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/filesystem/base/FilesystemKtTest.kt index 52fb46a..df29d52 100644 --- a/src/test/kotlin/io/provs/ubuntu/filesystem/base/FilesystemKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/filesystem/base/FilesystemKtTest.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.filesystem.base +package org.domaindrivenarchitecture.provs.ubuntu.filesystem.base -import io.provs.test.defaultTestContainer -import io.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/git/base/GitKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/git/base/GitKtTest.kt similarity index 78% rename from src/test/kotlin/io/provs/ubuntu/git/base/GitKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/git/base/GitKtTest.kt index 7ec749a..feee9e5 100644 --- a/src/test/kotlin/io/provs/ubuntu/git/base/GitKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/git/base/GitKtTest.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.git.base +package org.domaindrivenarchitecture.provs.ubuntu.git.base -import io.provs.test.defaultTestContainer -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.keys.base.isHostKnown +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.keys.base.isHostKnown import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/install/base/InstallKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/install/base/InstallKtTest.kt similarity index 81% rename from src/test/kotlin/io/provs/ubuntu/install/base/InstallKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/install/base/InstallKtTest.kt index ba695a4..a70853f 100644 --- a/src/test/kotlin/io/provs/ubuntu/install/base/InstallKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/install/base/InstallKtTest.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.install.base +package org.domaindrivenarchitecture.provs.ubuntu.install.base -import io.provs.test.defaultTestContainer -import io.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/keys/ProvisionKeysTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/ProvisionKeysTest.kt similarity index 77% rename from src/test/kotlin/io/provs/ubuntu/keys/ProvisionKeysTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/ProvisionKeysTest.kt index 8480b0b..da62673 100644 --- a/src/test/kotlin/io/provs/ubuntu/keys/ProvisionKeysTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/ProvisionKeysTest.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.keys +package org.domaindrivenarchitecture.provs.ubuntu.keys -import io.provs.core.Secret -import io.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.test.defaultTestContainer import org.junit.jupiter.api.Test import org.junit.jupiter.api.condition.EnabledOnOs import org.junit.jupiter.api.condition.OS diff --git a/src/test/kotlin/io/provs/ubuntu/extensions/test_keys/TestKeys.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/TestKeys.kt similarity index 99% rename from src/test/kotlin/io/provs/ubuntu/extensions/test_keys/TestKeys.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/TestKeys.kt index 9f1617c..1140588 100644 --- a/src/test/kotlin/io/provs/ubuntu/extensions/test_keys/TestKeys.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/TestKeys.kt @@ -1,4 +1,4 @@ -package io.provs.ubuntu.extensions.test_keys +package org.domaindrivenarchitecture.provs.ubuntu.keys fun publicGPGSnakeoilKey(): String { diff --git a/src/test/kotlin/io/provs/ubuntu/keys/base/GpgKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/GpgKtTest.kt similarity index 73% rename from src/test/kotlin/io/provs/ubuntu/keys/base/GpgKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/GpgKtTest.kt index 4799bb7..f76e6e4 100644 --- a/src/test/kotlin/io/provs/ubuntu/keys/base/GpgKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/GpgKtTest.kt @@ -1,14 +1,14 @@ -package io.provs.ubuntu.keys.base +package org.domaindrivenarchitecture.provs.ubuntu.keys.base -import io.provs.core.Prov -import io.provs.core.Secret -import io.provs.core.processors.ContainerStartMode -import io.provs.test.defaultTestContainer -import io.provs.test.tags.ContainerTest -import io.provs.ubuntu.install.base.aptInstall -import io.provs.ubuntu.keys.KeyPair -import io.provs.ubuntu.keys.privateGPGSnakeoilKey -import io.provs.ubuntu.keys.publicGPGSnakeoilKey +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.core.processors.ContainerStartMode +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall +import org.domaindrivenarchitecture.provs.ubuntu.keys.KeyPair +import org.domaindrivenarchitecture.provs.ubuntu.keys.privateGPGSnakeoilKey +import org.domaindrivenarchitecture.provs.ubuntu.keys.publicGPGSnakeoilKey import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/keys/base/SshKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/SshKtTest.kt similarity index 61% rename from src/test/kotlin/io/provs/ubuntu/keys/base/SshKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/SshKtTest.kt index 6eb76ca..88b542c 100644 --- a/src/test/kotlin/io/provs/ubuntu/keys/base/SshKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/keys/base/SshKtTest.kt @@ -1,8 +1,8 @@ -package io.provs.ubuntu.keys.base +package org.domaindrivenarchitecture.provs.ubuntu.keys.base -import io.provs.core.Secret -import io.provs.test.defaultTestContainer -import io.provs.ubuntu.keys.* +import org.domaindrivenarchitecture.provs.core.Secret +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.ubuntu.keys.* import org.junit.jupiter.api.Test import org.junit.jupiter.api.Assertions.* diff --git a/src/test/kotlin/io/provs/ubuntu/secret/secretSources/PromptSecretSourceTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PromptSecretSourceTest.kt similarity index 77% rename from src/test/kotlin/io/provs/ubuntu/secret/secretSources/PromptSecretSourceTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PromptSecretSourceTest.kt index 63800b4..3374435 100644 --- a/src/test/kotlin/io/provs/ubuntu/secret/secretSources/PromptSecretSourceTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/secret/secretSources/PromptSecretSourceTest.kt @@ -1,4 +1,4 @@ -package io.provs.ubuntu.secret.secretSources +package org.domaindrivenarchitecture.provs.ubuntu.secret.secretSources import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/user/ProvisionUserKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/user/ProvisionUserKtTest.kt similarity index 68% rename from src/test/kotlin/io/provs/ubuntu/user/ProvisionUserKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/user/ProvisionUserKtTest.kt index 897d2c9..be3f1db 100644 --- a/src/test/kotlin/io/provs/ubuntu/user/ProvisionUserKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/user/ProvisionUserKtTest.kt @@ -1,9 +1,9 @@ -package io.provs.ubuntu.user +package org.domaindrivenarchitecture.provs.ubuntu.user -import io.provs.test.defaultTestContainer -import io.provs.ubuntu.keys.* -import io.provs.ubuntu.secret.SecretSourceType -import io.provs.ubuntu.user.base.configureUser +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.ubuntu.keys.* +import org.domaindrivenarchitecture.provs.ubuntu.secret.SecretSourceType +import org.domaindrivenarchitecture.provs.ubuntu.user.base.configureUser import org.junit.jupiter.api.Test import org.junit.jupiter.api.condition.EnabledOnOs import org.junit.jupiter.api.condition.OS diff --git a/src/test/kotlin/io/provs/ubuntu/utils/UtilsKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/utils/UtilsKtTest.kt similarity index 74% rename from src/test/kotlin/io/provs/ubuntu/utils/UtilsKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/utils/UtilsKtTest.kt index 429697f..8c39d98 100644 --- a/src/test/kotlin/io/provs/ubuntu/utils/UtilsKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/utils/UtilsKtTest.kt @@ -1,7 +1,7 @@ -package io.provs.ubuntu.utils +package org.domaindrivenarchitecture.provs.ubuntu.utils -import io.provs.core.Prov -import io.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.core.Prov +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/io/provs/ubuntu/web/base/WebKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/web/base/WebKtTest.kt similarity index 63% rename from src/test/kotlin/io/provs/ubuntu/web/base/WebKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/web/base/WebKtTest.kt index 3358f86..07f5879 100644 --- a/src/test/kotlin/io/provs/ubuntu/web/base/WebKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/ubuntu/web/base/WebKtTest.kt @@ -1,9 +1,9 @@ -package io.provs.ubuntu.web.base +package org.domaindrivenarchitecture.provs.ubuntu.web.base -import io.provs.test.defaultTestContainer -import io.provs.test.tags.ContainerTest -import io.provs.ubuntu.filesystem.base.createFile -import io.provs.ubuntu.filesystem.base.fileContent +import org.domaindrivenarchitecture.provs.test.defaultTestContainer +import org.domaindrivenarchitecture.provs.test.tags.ContainerTest +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createFile +import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.fileContent import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test diff --git a/src/testFixtures/kotlin/io/provs/test/TestSetup.kt b/src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/TestSetup.kt similarity index 60% rename from src/testFixtures/kotlin/io/provs/test/TestSetup.kt rename to src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/TestSetup.kt index 6005a76..5cf6261 100644 --- a/src/testFixtures/kotlin/io/provs/test/TestSetup.kt +++ b/src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/TestSetup.kt @@ -1,12 +1,12 @@ -package io.provs.test +package org.domaindrivenarchitecture.provs.test -import io.provs.core.ProgressType -import io.provs.core.Prov -import io.provs.core.docker.dockerImageExists -import io.provs.core.docker.dockerProvideImage -import io.provs.core.docker.dockerimages.UbuntuPlusUser -import io.provs.core.processors.ContainerStartMode -import io.provs.core.processors.ContainerUbuntuHostProcessor +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 val testDockerWithSudo = !"true".equals(System.getProperty("testdockerwithoutsudo")?.toLowerCase()) diff --git a/src/testFixtures/kotlin/io/provs/test/tags/Tags.kt b/src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/tags/Tags.kt similarity index 91% rename from src/testFixtures/kotlin/io/provs/test/tags/Tags.kt rename to src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/tags/Tags.kt index 1720e9a..bc24bc5 100644 --- a/src/testFixtures/kotlin/io/provs/test/tags/Tags.kt +++ b/src/testFixtures/kotlin/org/domaindrivenarchitecture/provs/test/tags/Tags.kt @@ -1,4 +1,4 @@ -package io.provs.test.tags +package org.domaindrivenarchitecture.provs.test.tags import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test