diff --git a/src/main/cljc/dda/c4k_nextcloud/cloud.cljc b/src/main/cljc/dda/c4k_nextcloud/nextcloud.cljc similarity index 100% rename from src/main/cljc/dda/c4k_nextcloud/cloud.cljc rename to src/main/cljc/dda/c4k_nextcloud/nextcloud.cljc diff --git a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_generate_infra_for_convention.edn b/test/resources/meissa/pallet/meissa_cloud/convention_test/should_generate_infra_for_convention.edn deleted file mode 100644 index 9b4e226..0000000 --- a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_generate_infra_for_convention.edn +++ /dev/null @@ -1,30 +0,0 @@ -{:input {:user :k8s - :external-ip "95.217.221.140" - :fqdn "cloud.test.meissa-gmbh.de" - :cert-manager :letsencrypt-staging-issuer - :db-user-password "test1234" - :admin-user "root" - :admin-password "test1234" - :storage-size 50 - :restic-repository "test4321" - :aws-access-key-id "10" - :aws-secret-access-key "secret" - :restic-password "test4321"} - :expected {:meissa-cloud - {:user :k8s - :backup {:restic-repository "test4321" - :aws-access-key-id "10" - :aws-secret-access-key "secret" - :restic-password "test4321"} - :cloud {:fqdn "cloud.test.meissa-gmbh.de" - :secret-name "cloud-test-meissa-gmbh-de" - :cluster-issuer "letsencrypt-staging-issuer" - :db-name "cloud" - :db-user-password "test1234" - :db-user-name "cloud" - :admin-user "root" - :admin-password "test1234" - :storage-size "50"} - :postgres {:db-user-password "test1234" - :db-user-name "cloud"}}} - } diff --git a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_generate_k8s_convention.edn b/test/resources/meissa/pallet/meissa_cloud/convention_test/should_generate_k8s_convention.edn deleted file mode 100644 index 0478a77..0000000 --- a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_generate_k8s_convention.edn +++ /dev/null @@ -1,30 +0,0 @@ -{:input {:user :k8s - :external-ip "95.217.221.140" - :fqdn "cloud.test.meissa-gmbh.de" - :cert-manager :letsencrypt-staging-issuer - :db-user-password "test1234" - :admin-user "root" - :admin-password "test1234" - :storage-size 50 - :restic-repository "cloud" - :aws-access-key-id "10" - :aws-secret-access-key "secret" - :restic-password "test4321"} - :expected {:user :k8s, :k8s {:external-ip "95.217.221.140"}, - :cert-manager :letsencrypt-staging-issuer}} - -{:input {:user :k8s - :external-ip "95.217.221.140" - :fqdn "cloud.test.meissa-gmbh.de" - :cert-manager :letsencrypt-staging-issuer - :db-user-password "test1234" - :admin-user "root" - :admin-password "test1234" - :storage-size 50 - :restic-repository "cloud" - :aws-access-key-id "10" - :aws-secret-access-key "secret" - :restic-password "test4321" - :u18-04 true} - :expected {:user :k8s, :k8s {:external-ip "95.217.221.140", :u18-04 true} - :cert-manager :letsencrypt-staging-issuer}} diff --git a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_validate_input.0.edn b/test/resources/meissa/pallet/meissa_cloud/convention_test/should_validate_input.0.edn deleted file mode 100644 index 7dda0b7..0000000 --- a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_validate_input.0.edn +++ /dev/null @@ -1,14 +0,0 @@ -{:input {:user :k8s - :external-ip "95.217.221.140" - :fqdn "cloud.test.meissa-gmbh.de" - :cert-manager :letsencrypt-staging-issuer - :db-user-password "test1234" - :admin-user "root" - :admin-password "test1234" - :storage-size 50 - :restic-repository "test4321" - :aws-access-key-id "10" - :aws-secret-access-key "secret" - :restic-password "test4321"} - :expected true - } diff --git a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_validate_input.1.edn b/test/resources/meissa/pallet/meissa_cloud/convention_test/should_validate_input.1.edn deleted file mode 100644 index b8aec50..0000000 --- a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_validate_input.1.edn +++ /dev/null @@ -1,14 +0,0 @@ -{:input {:user :k8s - :external-ip "95.217.221.140" - :fqdn "cloud.test.meissa-gmbh.de" - :cert-manager :letsencrypt-staging-issuer - :db-user-password "test-1234" - :admin-user "root" - :admin-password "test1234" - :storage-size 50 - :restic-repository "test4321" - :aws-access-key-id "10" - :aws-secret-access-key "secret" - :restic-password "test4321"} - :expected false - } diff --git a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_validate_input.2.edn b/test/resources/meissa/pallet/meissa_cloud/convention_test/should_validate_input.2.edn deleted file mode 100644 index ada2a9e..0000000 --- a/test/resources/meissa/pallet/meissa_cloud/convention_test/should_validate_input.2.edn +++ /dev/null @@ -1,14 +0,0 @@ -{:input {:user :k8s - :external-ip "95.217.221.140" - :fqdn "cloud.test.meissa-gmbh.de" - :cert-manager :letsencrypt-staging-issuer - :db-user-password "test1234" - :admin-user "root" - :admin-password "test1234" - :storage-size 50 - :restic-repository "test4321" - :aws-access-key-id "1$0" - :aws-secret-access-key "secret" - :restic-password "test4321"} - :expected false - } diff --git a/test/src/meissa/pallet/meissa_cloud/app_test.clj b/test/src/meissa/pallet/meissa_cloud/app_test.clj deleted file mode 100644 index 1cbda1b..0000000 --- a/test/src/meissa/pallet/meissa_cloud/app_test.clj +++ /dev/null @@ -1,31 +0,0 @@ -(ns meissa.pallet.meissa-nextcloud.app-test - (:require - [clojure.test :refer :all] - [schema.core :as s] - [meissa.pallet.meissa-nextcloud.app :as sut])) - -(s/set-fn-validation! true) - -(s/def test-convention-conf - {:user :k8s - :external-ip "12.121.111.121" - :fqdn "some.domain.de" - :cert-manager :letsencrypt-staging-issuer - :db-user-password "test1234" - :admin-user "root" - :admin-password "test1234" - :storage-size 50 - :restic-repository "nextcloud" - :aws-access-key-id "10" - :aws-secret-access-key "secret" - :restic-password "test4321"}) - -(deftest app-config - (testing - "test plan-def" - (is (map? (sut/app-configuration-resolved test-convention-conf))))) - -(deftest plan-def - (testing - "test plan-def" - (is (map? sut/with-nextcloud)))) diff --git a/test/src/meissa/pallet/meissa_cloud/convention/bash_php_test.clj b/test/src/meissa/pallet/meissa_cloud/convention/bash_php_test.clj deleted file mode 100644 index 787fd6c..0000000 --- a/test/src/meissa/pallet/meissa_cloud/convention/bash_php_test.clj +++ /dev/null @@ -1,20 +0,0 @@ -(ns meissa.pallet.meissa-cloud.convention.bash-php-test - (:require - [clojure.test :refer :all] - [meissa.pallet.meissa-cloud.convention.bash-php :as sut])) - - -(deftest test-it - (is (= false - (sut/bash-php-env-string? 4))) - (is (= false - (sut/bash-php-env-string? "hal-lo"))) - (is (= false - (sut/bash-php-env-string? "hal--lo"))) - (is (= false - (sut/bash-php-env-string? "hal\\lo"))) - (is (= true - (sut/bash-php-env-string? "test"))) - (is (= true - (sut/bash-php-env-string? "test123"))) - ) \ No newline at end of file diff --git a/test/src/meissa/pallet/meissa_cloud/convention/bash_test.clj b/test/src/meissa/pallet/meissa_cloud/convention/bash_test.clj deleted file mode 100644 index ce51ba6..0000000 --- a/test/src/meissa/pallet/meissa_cloud/convention/bash_test.clj +++ /dev/null @@ -1,22 +0,0 @@ -(ns meissa.pallet.meissa-cloud.convention.bash-test - (:require - [clojure.test :refer :all] - [meissa.pallet.meissa-cloud.convention.bash :as sut])) - - -(deftest test-it - (is (= false - (sut/bash-env-string? 4))) - (is (= false - (sut/bash-env-string? "1$0"))) - (is (= false - (sut/bash-env-string? "'hallo"))) - (is (= false - (sut/bash-env-string? "hallo\""))) - (is (= false - (sut/bash-env-string? "hall$o"))) - (is (= true - (sut/bash-env-string? "test"))) - (is (= true - (sut/bash-env-string? "test123"))) - ) \ No newline at end of file diff --git a/test/src/meissa/pallet/meissa_cloud/convention_test.clj b/test/src/meissa/pallet/meissa_cloud/convention_test.clj deleted file mode 100644 index e5e30c1..0000000 --- a/test/src/meissa/pallet/meissa_cloud/convention_test.clj +++ /dev/null @@ -1,18 +0,0 @@ -(ns meissa.pallet.meissa-cloud.convention-test - (:require - [clojure.test :refer :all] - [data-test :refer :all] - [meissa.pallet.meissa-cloud.convention :as sut] - [clojure.spec.alpha :as sp])) - -(defdatatest should-generate-infra-for-convention [input expected] - (is (= expected - (sut/infra-configuration input)))) - -(defdatatest should-generate-k8s-convention [input expected] - (is (= expected - (sut/k8s-convention-configuration input)))) - -(defdatatest should-validate-input [input expected] - (is (= expected - (sp/valid? sut/cloud-convention-resolved? input)))) diff --git a/uberjar/resources/localhost-target.edn b/uberjar/resources/localhost-target.edn deleted file mode 100644 index d49f818..0000000 --- a/uberjar/resources/localhost-target.edn +++ /dev/null @@ -1,2 +0,0 @@ -{:existing [{:node-name "localhost" - :node-ip "127.0.0.1"}]} diff --git a/uberjar/resources/logback.xml b/uberjar/resources/logback.xml deleted file mode 100644 index 8985f2b..0000000 --- a/uberjar/resources/logback.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - INFO - - - - - logs/pallet.log - - logs/old/pallet.%d{yyyy-MM-dd}.log - 3 - - - %date %level [%thread] %logger{10} %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/uberjar/src/meissa/pallet/meissa_cloud/main.clj b/uberjar/src/meissa/pallet/meissa_cloud/main.clj deleted file mode 100644 index 4ba35d6..0000000 --- a/uberjar/src/meissa/pallet/meissa_cloud/main.clj +++ /dev/null @@ -1,57 +0,0 @@ -(ns meissa.pallet.meissa-nextcloud.main - (:gen-class) - (:require - [clojure.string :as str] - [clojure.tools.cli :as cli] - [dda.pallet.core.main-helper :as mh] - [dda.pallet.core.app :as core-app] - [meissa.pallet.meissa-nextcloud.app :as app])) - -(def cli-options - [["-h" "--help"] - ["-c" "--configure"] - ["-t" "--targets example-targets.edn" "edn file containing the targets to install on." - :default "localhost-target.edn"] - ["-v" "--verbose"]]) - -(defn usage [options-summary] - (str/join - \newline - ["meissa-nextcloud installs & configures a single host kubernetes cluster with nextcloud installed" - "" - "Usage: java -jar meissa-nextcloud-standalone.jar [options] nextcloud.edn" - "" - "Options:" - options-summary - "" - "nextcloud.edn" - " - follows the edn format." - " - has to be a valid nextcloudConventionConfig" - ""])) - -(defn -main [& args] - (let [{:keys [options arguments errors summary help]} (cli/parse-opts args cli-options) - verbose (if (contains? options :verbose) 1 0)] - (cond - help (mh/exit 0 (usage summary)) - errors (mh/exit 1 (mh/error-msg errors)) - (not= (count arguments) 1) (mh/exit 1 (usage summary)) - (:serverspec options) (if (core-app/existing-serverspec - app/crate-app - {:convention (first arguments) - :targets (:targets options) - :verbosity verbose}) - (mh/exit-test-passed) - (mh/exit-test-failed)) - (:configure options) (if (core-app/existing-configure - app/crate-app - {:convention (first arguments) - :targets (:targets options)}) - (mh/exit-default-success) - (mh/exit-default-error)) - :default (if (core-app/existing-install - app/crate-app - {:convention (first arguments) - :targets (:targets options)}) - (mh/exit-default-success) - (mh/exit-default-error)))))