From 655a84a5fc396bd7fd723b65632bcbcfff8a2e05 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 10 Aug 2021 14:34:17 +0200 Subject: [PATCH] first working version --- .gitlab-ci.yml | 28 +++++------ ...PONENT_LICENSE => SUBCOMPONENT_LICENSE.md} | 0 package.json | 8 +-- project.clj | 4 +- public/index.html | 16 +++--- shadow-cljs.edn | 2 +- src/main/cljc/dda/c4k_nextcloud/core.cljc | 3 +- .../cljc/dda/c4k_nextcloud/nextcloud.cljc | 7 +-- .../{cloud => nextcloud}/certificate.yaml | 0 .../{cloud => nextcloud}/configure-as-user.sh | 0 .../{cloud => nextcloud}/deployment.yaml | 4 +- .../{cloud => nextcloud}/ingress.yaml | 0 .../install-as-root.sh.template | 0 .../persistent-volume.yaml | 2 +- .../{cloud => nextcloud}/pod-running.sh | 0 .../resources/{cloud => nextcloud}/pvc.yaml | 2 +- .../{cloud => nextcloud}/secret.yaml | 0 .../{cloud => nextcloud}/service.yaml | 2 +- .../postgres/install-as-root.sh.template | 4 -- .../resources/postgres/postgres-config.yaml | 10 ---- .../postgres/postgres-deployment.yaml | 49 ------------------- .../postgres/postgres-persistent-volume.yaml | 15 ------ src/main/resources/postgres/postgres-pvc.yaml | 16 ------ .../resources/postgres/postgres-secret.yaml | 9 ---- .../resources/postgres/postgres-service.yaml | 10 ---- targets.edn | 3 -- valid-auth.edn | 4 +- valid-config.edn | 3 +- 28 files changed, 44 insertions(+), 157 deletions(-) rename doc/{SUBCOMPONENT_LICENSE => SUBCOMPONENT_LICENSE.md} (100%) rename src/main/resources/{cloud => nextcloud}/certificate.yaml (100%) rename src/main/resources/{cloud => nextcloud}/configure-as-user.sh (100%) rename src/main/resources/{cloud => nextcloud}/deployment.yaml (96%) rename src/main/resources/{cloud => nextcloud}/ingress.yaml (100%) rename src/main/resources/{cloud => nextcloud}/install-as-root.sh.template (100%) rename src/main/resources/{cloud => nextcloud}/persistent-volume.yaml (83%) rename src/main/resources/{cloud => nextcloud}/pod-running.sh (100%) rename src/main/resources/{cloud => nextcloud}/pvc.yaml (83%) rename src/main/resources/{cloud => nextcloud}/secret.yaml (100%) rename src/main/resources/{cloud => nextcloud}/service.yaml (71%) delete mode 100644 src/main/resources/postgres/install-as-root.sh.template delete mode 100644 src/main/resources/postgres/postgres-config.yaml delete mode 100644 src/main/resources/postgres/postgres-deployment.yaml delete mode 100644 src/main/resources/postgres/postgres-persistent-volume.yaml delete mode 100644 src/main/resources/postgres/postgres-pvc.yaml delete mode 100644 src/main/resources/postgres/postgres-secret.yaml delete mode 100644 src/main/resources/postgres/postgres-service.yaml delete mode 100644 targets.edn diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81a9d2d..adca075 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ test-schema: stage: build_and_test script: - lein uberjar - - java -jar target/uberjar/c4k-cloud-standalone.jar valid-config.edn valid-auth.edn | kubeconform --kubernetes-version 1.19.0 --strict --skip Certificate - + - java -jar target/uberjar/c4k-nextcloud-standalone.jar valid-config.edn valid-auth.edn | kubeconform --kubernetes-version 1.19.0 --strict --skip Certificate - artifacts: paths: - target/uberjar @@ -68,9 +68,9 @@ test-schema: script: - mkdir -p target/frontend-build - shadow-cljs release frontend - - cp public/js/main.js target/frontend-build/c4k-cloud.js - - sha256sum target/frontend-build/c4k-cloud.js > target/frontend-build/c4k-cloud.js.sha256 - - sha512sum target/frontend-build/c4k-cloud.js > target/frontend-build/c4k-cloud.js.sha512 + - cp public/js/main.js target/frontend-build/c4k-nextcloud.js + - sha256sum target/frontend-build/c4k-nextcloud.js > target/frontend-build/c4k-nextcloud.js.sha256 + - sha512sum target/frontend-build/c4k-nextcloud.js > target/frontend-build/c4k-nextcloud.js.sha512 artifacts: paths: - target/frontend-build @@ -79,8 +79,8 @@ package-uberjar: <<: *clj stage: package script: - - sha256sum target/uberjar/c4k-cloud-standalone.jar > target/uberjar/c4k-cloud-standalone.jar.sha256 - - sha512sum target/uberjar/c4k-cloud-standalone.jar > target/uberjar/c4k-cloud-standalone.jar.sha512 + - sha256sum target/uberjar/c4k-nextcloud-standalone.jar > target/uberjar/c4k-nextcloud-standalone.jar.sha256 + - sha512sum target/uberjar/c4k-nextcloud-standalone.jar > target/uberjar/c4k-nextcloud-standalone.jar.sha512 artifacts: paths: - target/uberjar @@ -117,20 +117,20 @@ release: - apk --no-cache add curl - | release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \ - --assets-link "{\"name\":\"c4k-cloud-standalone.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/uberjar/c4k-cloud-standalone.jar\"}" \ - --assets-link "{\"name\":\"c4k-cloud-standalone.jar.sha256\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/uberjar/c4k-cloud-standalone.jar.sha256\"}" \ - --assets-link "{\"name\":\"c4k-cloud-standalone.jar.sha512\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/uberjar/c4k-cloud-standalone.jar.sha512\"}" \ - --assets-link "{\"name\":\"c4k-cloud.js\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-cloud.js\"}" \ - --assets-link "{\"name\":\"c4k-cloud.js.sha256\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-cloud.js.sha256\"}" \ - --assets-link "{\"name\":\"c4k-cloud.js.sha512\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-cloud.js.sha512\"}" \ + --assets-link "{\"name\":\"c4k-nextcloud-standalone.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/uberjar/c4k-nextcloud-standalone.jar\"}" \ + --assets-link "{\"name\":\"c4k-nextcloud-standalone.jar.sha256\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/uberjar/c4k-nextcloud-standalone.jar.sha256\"}" \ + --assets-link "{\"name\":\"c4k-nextcloud-standalone.jar.sha512\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/uberjar/c4k-nextcloud-standalone.jar.sha512\"}" \ + --assets-link "{\"name\":\"c4k-nextcloud.js\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-nextcloud.js\"}" \ + --assets-link "{\"name\":\"c4k-nextcloud.js.sha256\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-nextcloud.js.sha256\"}" \ + --assets-link "{\"name\":\"c4k-nextcloud.js.sha512\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud/-/jobs/${CI_JOB_ID}/artifacts/file/target/frontend-build/c4k-nextcloud.js.sha512\"}" \ -cloud-image-test-publish: +nextcloud-image-test-publish: image: domaindrivenarchitecture/devops-build:latest stage: image rules: - if: '$CI_COMMIT_TAG != null' script: - - cd infrastructure/docker-cloud && pyb image test publish + - cd infrastructure/docker-nextcloud && pyb image test publish backup-image-test-publish: image: domaindrivenarchitecture/devops-build:latest diff --git a/doc/SUBCOMPONENT_LICENSE b/doc/SUBCOMPONENT_LICENSE.md similarity index 100% rename from doc/SUBCOMPONENT_LICENSE rename to doc/SUBCOMPONENT_LICENSE.md diff --git a/package.json b/package.json index f29d34b..a79ac7d 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,18 @@ { - "name": "c4k-cloud", + "name": "c4k-nextcloud", "description": "Generate c4k yaml for a nextcloud deployment.", "author": "meissa GmbH", "version": "0.1.3-SNAPSHOT", "homepage": "https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud#readme", "repository": "https://www.npmjs.com/package/c4k-nextcloud", "license": "APACHE2", - "main": "c4k-cloud.js", + "main": "c4k-nextcloud.js", "bin": { - "c4k-cloud": "./c4k-cloud.js" + "c4k-nextcloud": "./c4k-nextcloud.js" }, "keywords": [ "cljs", - "cloud", + "nextcloud", "k8s", "c4k", "deployment", diff --git a/project.clj b/project.clj index f5a8d48..538f3ce 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject meissa/meissa-cloud "1.0.2-SNAPSHOT" +(defproject org.domaindrivenarchitecture/c4k-nextcloud "1.0.2-SNAPSHOT" :description "nextcloud c4k-installation package" :url "https://domaindrivenarchitecture.org" :license {:name "Apache License, Version 2.0" @@ -35,7 +35,7 @@ "native-image" "--report-unsupported-elements-at-runtime" "--initialize-at-build-time" - "-jar" "target/uberjar/c4k-jira-standalone.jar" + "-jar" "target/uberjar/c4k-nextcloud-standalone.jar" "-H:ResourceConfigurationFiles=graalvm-resource-config.json" "-H:Log=registerResource" "-H:Name=target/graalvm/${:name}"]}) \ No newline at end of file diff --git a/public/index.html b/public/index.html index 1e2614d..0f0d145 100644 --- a/public/index.html +++ b/public/index.html @@ -14,24 +14,24 @@
- +

       
- - + +
-

+        

       
-

+        

       
-

+        

       

@@ -42,8 +42,8 @@