From 1bc3fe47ce5dea01ee88093a4bc9dc6eea4b0c15 Mon Sep 17 00:00:00 2001 From: abolfazl1381 Date: Fri, 29 Nov 2024 22:07:51 +0330 Subject: [PATCH] fix(helm prompt): fix helm prompt to not put json in .yaml --- app/directory_generators/helm_generator.py | 190 +++++++------ app/directory_generators/jcasc_generator.py | 37 +++ .../terraform_generator.py | 262 +++++++++--------- app/media/MyHelm/templates/_helpers.tpl | 6 - app/media/MyHelm/templates/deployment.yaml | 17 +- app/media/MyHelm/templates/helpers.tpl | 15 +- app/media/MyHelm/templates/{web => }/pvc.yaml | 4 +- app/media/MyHelm/templates/secrets.yaml | 4 +- app/media/MyHelm/templates/service.yaml | 7 +- app/media/MyHelm/templates/web/helpers.tpl | 4 - app/media/MyHelm/templates/web/ingress.yaml | 17 -- app/media/MyHelm/templates/web/secrets.yaml | 7 - app/media/MyHelm/templates/web/service.yaml | 11 - .../MyHelm/templates/web/statefulset.yaml | 32 --- app/media/MyHelm/values.yaml | 9 +- app/media/MyHelm_zip.zip | Bin 1849 -> 1443 bytes app/media/MyJcasc/jcasc/config.yaml | 27 ++ app/media/MyTerraform/main.tf | 29 +- app/media/MyTerraform/modules/argocd/main.tf | 39 --- .../modules/argocd/terraform.tfvars | 19 -- .../MyTerraform/modules/argocd/variables.tf | 20 -- .../MyTerraform/modules/argocd/versions.tf | 11 - app/media/MyTerraform/modules/docker/main.tf | 18 ++ .../modules/docker/terraform.tfvars | 13 + .../MyTerraform/modules/docker/variables.tf | 38 +++ .../MyTerraform/modules/docker/versions.tf | 10 + app/media/MyTerraform/terraform.tfvars | 35 +-- app/media/MyTerraform/variables.tf | 37 ++- app/media/MyTerraform/versions.tf | 7 +- app/media/MyTerraform_zip.zip | Bin 2682 -> 2104 bytes app/prompt_generators.py | 2 +- 31 files changed, 436 insertions(+), 491 deletions(-) create mode 100644 app/directory_generators/jcasc_generator.py delete mode 100644 app/media/MyHelm/templates/_helpers.tpl rename app/media/MyHelm/templates/{web => }/pvc.yaml (62%) delete mode 100644 app/media/MyHelm/templates/web/helpers.tpl delete mode 100644 app/media/MyHelm/templates/web/ingress.yaml delete mode 100644 app/media/MyHelm/templates/web/secrets.yaml delete mode 100644 app/media/MyHelm/templates/web/service.yaml delete mode 100644 app/media/MyHelm/templates/web/statefulset.yaml create mode 100644 app/media/MyJcasc/jcasc/config.yaml delete mode 100644 app/media/MyTerraform/modules/argocd/main.tf delete mode 100644 app/media/MyTerraform/modules/argocd/terraform.tfvars delete mode 100644 app/media/MyTerraform/modules/argocd/variables.tf delete mode 100644 app/media/MyTerraform/modules/argocd/versions.tf create mode 100644 app/media/MyTerraform/modules/docker/main.tf create mode 100644 app/media/MyTerraform/modules/docker/terraform.tfvars create mode 100644 app/media/MyTerraform/modules/docker/variables.tf create mode 100644 app/media/MyTerraform/modules/docker/versions.tf diff --git a/app/directory_generators/helm_generator.py b/app/directory_generators/helm_generator.py index 4b8dde49..dae15e12 100644 --- a/app/directory_generators/helm_generator.py +++ b/app/directory_generators/helm_generator.py @@ -1,116 +1,122 @@ import os project_name = "app/media/MyHelm" -charts_dir = os.path.join(project_name, "charts") -templates_dir = os.path.join(project_name, "templates") -web_dir = os.path.join(templates_dir, "web") +directories = ["charts", "templates", "templates/web"] +files = ["Chart.yaml", "values.yaml"] +template_files = ["service.yaml", "deployment.yaml", "secrets.yaml", "helpers.tpl"] +ingress_enabled = False +stateless_enabled = True +persistence = True -# Create project directories -os.makedirs(charts_dir, exist_ok=True) -os.makedirs(templates_dir, exist_ok=True) -os.makedirs(web_dir, exist_ok=True) +os.makedirs(project_name, exist_ok=True) + +for directory in directories: + os.makedirs(os.path.join(project_name, directory), exist_ok=True) -# Create Chart.yaml with open(os.path.join(project_name, "Chart.yaml"), "w") as chart_file: chart_file.write("apiVersion: v2\n") chart_file.write("name: MyHelm\n") chart_file.write("description: A Helm chart for Kubernetes\n") chart_file.write("version: 0.1.0\n") -# Create values.yaml with open(os.path.join(project_name, "values.yaml"), "w") as values_file: values_file.write("web:\n") values_file.write(" image: nginx\n") values_file.write(" targetPort: 80\n") values_file.write(" replicas: 1\n") - values_file.write(" persistence:\n") - values_file.write(" size: 1Gi\n") - values_file.write(" accessModes:\n") - values_file.write(" - ReadWriteOnce\n") + if persistence: + values_file.write(" persistence:\n") + values_file.write(" size: 1Gi\n") + values_file.write(" accessModes: \n") + values_file.write(" - ReadWriteOnce\n") + if ingress_enabled: + values_file.write(" ingress:\n") + values_file.write(" enabled: true\n") + values_file.write(" host: www.example.com\n") + values_file.write(" stateless:\n") + values_file.write(" enabled: true\n") values_file.write(" env:\n") values_file.write(" - name: ENV1\n") values_file.write(" value: Hi\n") - values_file.write(" ingress:\n") - values_file.write(" enabled: false\n") - values_file.write(" host: www.example.com\n") - values_file.write(" stateless:\n") - values_file.write(" enabled: false\n") -# Create service.yaml -with open(os.path.join(web_dir, "service.yaml"), "w") as service_file: - service_file.write("apiVersion: v1\n") - service_file.write("kind: Service\n") - service_file.write("metadata:\n") - service_file.write(" name: web-service\n") - service_file.write("spec:\n") - service_file.write(" type: ClusterIP\n") - service_file.write(" ports:\n") - service_file.write(" - port: 80\n") - service_file.write(" targetPort: {{ .Values.web.targetPort }}\n") - service_file.write(" selector:\n") - service_file.write(" app: web\n") +for template in template_files: + with open(os.path.join(project_name, "templates", template), "w") as template_file: + if template == "service.yaml": + template_file.write("apiVersion: v1\n") + template_file.write("kind: Service\n") + template_file.write("metadata:\n") + template_file.write(" name: {{ .Release.Name }}-web\n") + template_file.write("spec:\n") + template_file.write(" ports:\n") + template_file.write(" - port: 80\n") + template_file.write(" targetPort: {{ .Values.web.targetPort }}\n") + template_file.write(" selector:\n") + template_file.write(" app: {{ .Release.Name }}-web\n") + + if stateless_enabled and template == "deployment.yaml": + template_file.write("apiVersion: apps/v1\n") + template_file.write("kind: Deployment\n") + template_file.write("metadata:\n") + template_file.write(" name: {{ .Release.Name }}-web\n") + template_file.write("spec:\n") + template_file.write(" replicas: {{ .Values.web.replicas }}\n") + template_file.write(" selector:\n") + template_file.write(" matchLabels:\n") + template_file.write(" app: {{ .Release.Name }}-web\n") + template_file.write(" template:\n") + template_file.write(" metadata:\n") + template_file.write(" labels:\n") + template_file.write(" app: {{ .Release.Name }}-web\n") + template_file.write(" spec:\n") + template_file.write(" containers:\n") + template_file.write(" - name: web\n") + template_file.write(" image: {{ .Values.web.image }}\n") + template_file.write(" ports:\n") + template_file.write(" - containerPort: {{ .Values.web.targetPort }}\n") + template_file.write(" env:\n") + template_file.write(" - name: {{ .Values.env[0].name }}\n") + template_file.write(" value: {{ .Values.env[0].value }}\n") -# Create statefulset.yaml (since stateless is false) -with open(os.path.join(web_dir, "statefulset.yaml"), "w") as statefulset_file: - statefulset_file.write("apiVersion: apps/v1\n") - statefulset_file.write("kind: StatefulSet\n") - statefulset_file.write("metadata:\n") - statefulset_file.write(" name: web\n") - statefulset_file.write("spec:\n") - statefulset_file.write(" serviceName: web-service\n") - statefulset_file.write(" replicas: {{ .Values.web.replicas }}\n") - statefulset_file.write(" selector:\n") - statefulset_file.write(" matchLabels:\n") - statefulset_file.write(" app: web\n") - statefulset_file.write(" template:\n") - statefulset_file.write(" metadata:\n") - statefulset_file.write(" labels:\n") - statefulset_file.write(" app: web\n") - statefulset_file.write(" spec:\n") - statefulset_file.write(" containers:\n") - statefulset_file.write(" - name: web\n") - statefulset_file.write(" image: {{ .Values.web.image }}\n") - statefulset_file.write(" ports:\n") - statefulset_file.write(" - containerPort: {{ .Values.web.targetPort }}\n") - statefulset_file.write(" env:\n") - statefulset_file.write(" - name: {{ .Values.web.env[0].name }}\n") - statefulset_file.write(" value: {{ .Values.web.env[0].value }}\n") - statefulset_file.write(" volumeClaimTemplates:\n") - statefulset_file.write(" - metadata:\n") - statefulset_file.write(" name: web-pvc\n") - statefulset_file.write(" spec:\n") - statefulset_file.write(" accessModes:\n") - statefulset_file.write(" - {{ .Values.web.persistence.accessModes[0] }}\n") - statefulset_file.write(" resources:\n") - statefulset_file.write(" requests:\n") - statefulset_file.write(" storage: {{ .Values.web.persistence.size }}\n") + if template == "secrets.yaml": + template_file.write("apiVersion: v1\n") + template_file.write("kind: Secret\n") + template_file.write("metadata:\n") + template_file.write(" name: {{ .Release.Name }}-secret\n") + template_file.write("type: Opaque\n") + template_file.write("data:\n") + template_file.write(" # Insert your base64 encoded secrets here\n") -# Create pvc.yaml -with open(os.path.join(web_dir, "pvc.yaml"), "w") as pvc_file: - pvc_file.write("apiVersion: v1\n") - pvc_file.write("kind: PersistentVolumeClaim\n") - pvc_file.write("metadata:\n") - pvc_file.write(" name: web-pvc\n") - pvc_file.write("spec:\n") - pvc_file.write(" accessModes:\n") - pvc_file.write(" - {{ .Values.web.persistence.accessModes[0] }}\n") - pvc_file.write(" resources:\n") - pvc_file.write(" requests:\n") - pvc_file.write(" storage: {{ .Values.web.persistence.size }}\n") + if template == "helpers.tpl": + template_file.write("{{/* Add your helper functions here */}}\n") -# Create secrets.yaml -with open(os.path.join(web_dir, "secrets.yaml"), "w") as secrets_file: - secrets_file.write("apiVersion: v1\n") - secrets_file.write("kind: Secret\n") - secrets_file.write("metadata:\n") - secrets_file.write(" name: web-secrets\n") - secrets_file.write("type: Opaque\n") - secrets_file.write("data:\n") - secrets_file.write(" # Add your base64 encoded secrets here\n") +if persistence: + with open(os.path.join(project_name, "templates", "pvc.yaml"), "w") as pvc_file: + pvc_file.write("apiVersion: v1\n") + pvc_file.write("kind: PersistentVolumeClaim\n") + pvc_file.write("metadata:\n") + pvc_file.write(" name: {{ .Release.Name }}-web-pvc\n") + pvc_file.write("spec:\n") + pvc_file.write(" accessModes:\n") + pvc_file.write(" - {{ .Values.web.persistence.accessModes | first }}\n") + pvc_file.write(" resources:\n") + pvc_file.write(" requests:\n") + pvc_file.write(" storage: {{ .Values.web.persistence.size }}\n") -# Create helpers.tpl -with open(os.path.join(web_dir, "helpers.tpl"), "w") as helpers_file: - helpers_file.write("# Define any helpers here\n") - helpers_file.write("define \"web.fullname\" \n") - helpers_file.write(" {{ .Release.Name }}-{{ .Values.web.name }} \n") - helpers_file.write("end\n") \ No newline at end of file +if ingress_enabled: + with open(os.path.join(project_name, "templates", "ingress.yaml"), "w") as ingress_file: + ingress_file.write("apiVersion: networking.k8s.io/v1\n") + ingress_file.write("kind: Ingress\n") + ingress_file.write("metadata:\n") + ingress_file.write(" name: {{ .Release.Name }}-web-ingress\n") + ingress_file.write("spec:\n") + ingress_file.write(" rules:\n") + ingress_file.write(" - host: {{ .Values.web.ingress.host }}\n") + ingress_file.write(" http:\n") + ingress_file.write(" paths:\n") + ingress_file.write(" - path: /\n") + ingress_file.write(" pathType: Prefix\n") + ingress_file.write(" backend:\n") + ingress_file.write(" service:\n") + ingress_file.write(" name: {{ .Release.Name }}-web\n") + ingress_file.write(" port:\n") + ingress_file.write(" number: 80\n") \ No newline at end of file diff --git a/app/directory_generators/jcasc_generator.py b/app/directory_generators/jcasc_generator.py new file mode 100644 index 00000000..e7e3bf15 --- /dev/null +++ b/app/directory_generators/jcasc_generator.py @@ -0,0 +1,37 @@ +import os +project_name = "app/media/MyJcasc" +jcasc_dir = os.path.join(project_name, "jcasc") +os.makedirs(jcasc_dir, exist_ok=True) + +jcasc_content = """ +systemMessage: "Welcome to Jenkins configured via JCasC" +author: + name: "admin" + password: "password" +allowSignup: true +allowAnonymousRead: true +cache_size: 1 +executors: 1 +required_plugins: + - "string" +views: + - list: + name: "All" +authorizationStrategy: + projectMatrix: + grantedPermissions: + - "Overall/Administer:admin" + - "Job/Read:developer" + - "Job/Build:developer" +tools: + git: + installations: + - name: "Default" + home: "/usr/bin/git" +security: + globalJobDslSecurityConfiguration: + useScriptSecurity: false +""" + +with open(os.path.join(jcasc_dir, "config.yaml"), "w") as f: + f.write(jcasc_content.strip()) \ No newline at end of file diff --git a/app/directory_generators/terraform_generator.py b/app/directory_generators/terraform_generator.py index 6a5a4eb5..f0c511a9 100644 --- a/app/directory_generators/terraform_generator.py +++ b/app/directory_generators/terraform_generator.py @@ -1,210 +1,196 @@ import os project_name = "app/media/MyTerraform" modules_dir = os.path.join(project_name, "modules") -argocd_dir = os.path.join(modules_dir, "argocd") +docker_dir = os.path.join(modules_dir, "docker") # Create project directories -os.makedirs(argocd_dir, exist_ok=True) +os.makedirs(docker_dir, exist_ok=True) # Create main.tf with open(os.path.join(project_name, "main.tf"), "w") as main_file: - main_file.write(''' -provider "argocd" { - server_addr = var.argocd_instance_info["server_addr"] - username = var.argocd_instance_info["username"] - password = var.argocd_instance_info["password"] - insecure = var.argocd_instance_info["insecure"] -} - -module "argocd" { - source = "./modules/argocd" - - repository_create = var.repository_create - argocd_repository_info = var.argocd_repository_info - application_create = var.application_create - argocd_application = var.argocd_application - argocd_sync_options = var.argocd_sync_options + main_file.write('''provider "docker" { + host = "unix:///var/run/docker.sock" } -''') -# Create variables.tf -with open(os.path.join(project_name, "variables.tf"), "w") as vars_file: - vars_file.write(''' -variable "argocd_instance_info" { - type = object({ - server_addr = string - username = string - password = string - insecure = bool - }) +module "docker" { + source = "./modules/docker" + + create_image = var.create_image + image_name = var.image_name + image_force_remove = var.image_force_remove + image_build = var.image_build + + create_container = var.create_container + container_image = var.container_image + container_name = var.container_name + container_hostname = var.container_hostname + container_restart = var.container_restart } +''') -variable "repository_create" { +# Create variables.tf +with open(os.path.join(project_name, "variables.tf"), "w") as variables_file: + variables_file.write('''variable "create_image" { type = bool } -variable "argocd_repository_info" { - type = map(string) +variable "image_name" { + type = string } -variable "application_create" { +variable "image_force_remove" { type = bool } -variable "argocd_application" { - type = map(string) +variable "image_build" { + type = object({ + context = string + tag = list(string) + }) +} + +variable "create_container" { + type = bool } -variable "argocd_sync_options" { - type = list(string) +variable "container_image" { + type = string } -''') -# Create terraform.tfvars -with open(os.path.join(project_name, "terraform.tfvars"), "w") as tfvars_file: - tfvars_file.write(''' -argocd_instance_info = { - server_addr = "ARGOCD_DOMAIN" - username = "admin" - password = "ARGOCD_ADMIN_PASS" - insecure = true +variable "container_name" { + type = string } -repository_create = false -argocd_repository_info = { - repo = "https://YOUR_REPO.git" - username = "USERNAME" - password = "CHANGE_ME_WITH_TOKEN" +variable "container_hostname" { + type = string } -application_create = true -argocd_application = { - name = "APPLICATION_NAME" - destination_server = "https://kubernetes.default.svc" - destination_namespace = "DESTINATION_NAMESPACE" - source_repo_url = "https://YOUR_REPO.git" - source_path = "SOURCE_PATH" - source_target_revision = "SOURCE_TARGET_REVISION" +variable "container_restart" { + type = string } +''') -argocd_sync_options = ["CreateNamespace=true", "ApplyOutOfSyncOnly=true", "FailOnSharedResource=true"] +# Create terraform.tfvars +with open(os.path.join(project_name, "terraform.tfvars"), "w") as tfvars_file: + tfvars_file.write('''create_image = true +image_name = "my-image" +image_force_remove = true +image_build = { + context = "./" + tag = ["my-image:latest"] +} + +create_container = false +container_image = "my-image" +container_name = "my-container" +container_hostname = "my-host" +container_restart = "always" ''') # Create versions.tf with open(os.path.join(project_name, "versions.tf"), "w") as versions_file: - versions_file.write(''' -terraform { + versions_file.write('''terraform { required_version = ">= 1.0" required_providers { - argocd = { - source = "oboukili/argocd" - version = ">= 6.0.2" + docker = { + source = "kreuzwerker/docker" + version = ">= 2.8.0" } } } ''') # Create module main.tf -with open(os.path.join(argocd_dir, "main.tf"), "w") as module_main_file: - module_main_file.write(''' -resource "argocd_repository" "repository" { - count = var.repository_create ? 1 : 0 - repo = var.argocd_repository_info["repo"] - username = var.argocd_repository_info["username"] - password = var.argocd_repository_info["password"] -} - -resource "argocd_application" "application" { - count = var.application_create ? 1 : 0 - depends_on = [argocd_repository.repository] - - metadata { - name = var.argocd_application["name"] - namespace = "argocd" - labels = { - using_sync_policy_options = "true" - } +with open(os.path.join(docker_dir, "main.tf"), "w") as module_main_file: + module_main_file.write('''resource "docker_image" "image" { + count = var.create_image ? 1 : 0 + name = var.image_name + force_remove = var.image_force_remove + + build { + context = var.image_build.context + tag = var.image_build.tag } +} - spec { - destination { - server = var.argocd_application["destination_server"] - namespace = var.argocd_application["destination_namespace"] - } - source { - repo_url = var.argocd_application["source_repo_url"] - path = var.argocd_application["source_path"] - target_revision = var.argocd_application["source_target_revision"] - } - sync_policy { - automated { - prune = false - self_heal = false - } - sync_options = var.argocd_sync_options - } - } +resource "docker_container" "container" { + count = var.create_container ? 1 : 0 + image = var.container_image + name = var.container_name + hostname = var.container_hostname + restart = var.container_restart } ''') # Create module variables.tf -with open(os.path.join(argocd_dir, "variables.tf"), "w") as module_vars_file: - module_vars_file.write(''' -variable "repository_create" { +with open(os.path.join(docker_dir, "variables.tf"), "w") as module_variables_file: + module_variables_file.write('''variable "create_image" { + type = bool +} + +variable "image_name" { + type = string +} + +variable "image_force_remove" { type = bool } -variable "argocd_repository_info" { - type = map(string) +variable "image_build" { + type = object({ + context = string + tag = list(string) + }) } -variable "application_create" { +variable "create_container" { type = bool } -variable "argocd_application" { - type = map(string) +variable "container_image" { + type = string +} + +variable "container_name" { + type = string +} + +variable "container_hostname" { + type = string } -variable "argocd_sync_options" { - type = list(string) +variable "container_restart" { + type = string } ''') # Create module terraform.tfvars -with open(os.path.join(argocd_dir, "terraform.tfvars"), "w") as module_tfvars_file: - module_tfvars_file.write(''' -repository_create = false -argocd_repository_info = { - repo = "https://YOUR_REPO.git" - username = "USERNAME" - password = "CHANGE_ME_WITH_TOKEN" -} - -application_create = true -argocd_application = { - name = "APPLICATION_NAME" - destination_server = "https://kubernetes.default.svc" - destination_namespace = "DESTINATION_NAMESPACE" - source_repo_url = "https://YOUR_REPO.git" - source_path = "SOURCE_PATH" - source_target_revision = "SOURCE_TARGET_REVISION" -} - -argocd_sync_options = ["CreateNamespace=true", "ApplyOutOfSyncOnly=true", "FailOnSharedResource=true"] +with open(os.path.join(docker_dir, "terraform.tfvars"), "w") as module_tfvars_file: + module_tfvars_file.write('''create_image = true +image_name = "my-image" +image_force_remove = true +image_build = { + context = "./" + tag = ["my-image:latest"] +} + +create_container = false +container_image = "my-image" +container_name = "my-container" +container_hostname = "my-host" +container_restart = "always" ''') # Create module versions.tf -with open(os.path.join(argocd_dir, "versions.tf"), "w") as module_versions_file: - module_versions_file.write(''' -terraform { +with open(os.path.join(docker_dir, "versions.tf"), "w") as module_versions_file: + module_versions_file.write('''terraform { required_version = ">= 1.0" required_providers { - argocd = { - source = "oboukili/argocd" - version = ">= 6.0.2" + docker = { + source = "kreuzwerker/docker" + version = ">= 2.8.0" } } } diff --git a/app/media/MyHelm/templates/_helpers.tpl b/app/media/MyHelm/templates/_helpers.tpl deleted file mode 100644 index 34090fa1..00000000 --- a/app/media/MyHelm/templates/_helpers.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{/* -Common template helpers -*/}} -{{- define "my-helm.fullname" -}} -{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/app/media/MyHelm/templates/deployment.yaml b/app/media/MyHelm/templates/deployment.yaml index cbf7a2f9..055e46c5 100644 --- a/app/media/MyHelm/templates/deployment.yaml +++ b/app/media/MyHelm/templates/deployment.yaml @@ -1,25 +1,22 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "myhelm.fullname" . }} + name: {{ .Release.Name }}-web spec: replicas: {{ .Values.web.replicas }} selector: matchLabels: - app: {{ include "myhelm.name" . }} + app: {{ .Release.Name }}-web template: metadata: labels: - app: {{ include "myhelm.name" . }} + app: {{ .Release.Name }}-web spec: containers: - - name: {{ .Values.web.image }} - image: {{ .Values.web.image }}:latest + - name: web + image: {{ .Values.web.image }} ports: - containerPort: {{ .Values.web.targetPort }} env: - {{- range .Values.web.env }} - - name: {{ .name }} - value: {{ .value }} - {{- end }} - \ No newline at end of file + - name: {{ .Values.env[0].name }} + value: {{ .Values.env[0].value }} diff --git a/app/media/MyHelm/templates/helpers.tpl b/app/media/MyHelm/templates/helpers.tpl index 4bb7cfc7..17772ced 100644 --- a/app/media/MyHelm/templates/helpers.tpl +++ b/app/media/MyHelm/templates/helpers.tpl @@ -1,14 +1 @@ -{{/* -Helper template functions -*/}} -{{- define "myhelm.name" -}} -{{- if .Chart.Name -}} -{{ .Chart.Name | quote }} -{{- else -}} -"" -{{- end -}} -{{- end -}} - -{{- define "myhelm.fullname" -}} -{{- .Release.Name | replace "-" "" }}-{{ include "myhelm.name" . }} -{{- end -}} +{{/* Add your helper functions here */}} diff --git a/app/media/MyHelm/templates/web/pvc.yaml b/app/media/MyHelm/templates/pvc.yaml similarity index 62% rename from app/media/MyHelm/templates/web/pvc.yaml rename to app/media/MyHelm/templates/pvc.yaml index 94f1548e..3a1063e3 100644 --- a/app/media/MyHelm/templates/web/pvc.yaml +++ b/app/media/MyHelm/templates/pvc.yaml @@ -1,10 +1,10 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: web-pvc + name: {{ .Release.Name }}-web-pvc spec: accessModes: - - {{ .Values.web.persistence.accessModes[0] }} + - {{ .Values.web.persistence.accessModes | first }} resources: requests: storage: {{ .Values.web.persistence.size }} diff --git a/app/media/MyHelm/templates/secrets.yaml b/app/media/MyHelm/templates/secrets.yaml index 47303d63..d5f704b8 100644 --- a/app/media/MyHelm/templates/secrets.yaml +++ b/app/media/MyHelm/templates/secrets.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: {{ include "myhelm.fullname" . }}-secret + name: {{ .Release.Name }}-secret type: Opaque data: - # Add your secret data here + # Insert your base64 encoded secrets here diff --git a/app/media/MyHelm/templates/service.yaml b/app/media/MyHelm/templates/service.yaml index 63ab7b76..2440b8f5 100644 --- a/app/media/MyHelm/templates/service.yaml +++ b/app/media/MyHelm/templates/service.yaml @@ -1,11 +1,10 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "myhelm.fullname" . }} + name: {{ .Release.Name }}-web spec: - type: ClusterIP ports: - - port: {{ .Values.web.targetPort }} + - port: 80 targetPort: {{ .Values.web.targetPort }} selector: - app: {{ include "myhelm.name" . }} + app: {{ .Release.Name }}-web diff --git a/app/media/MyHelm/templates/web/helpers.tpl b/app/media/MyHelm/templates/web/helpers.tpl deleted file mode 100644 index 506945bd..00000000 --- a/app/media/MyHelm/templates/web/helpers.tpl +++ /dev/null @@ -1,4 +0,0 @@ -# Define any helpers here -define "web.fullname" - {{ .Release.Name }}-{{ .Values.web.name }} -end diff --git a/app/media/MyHelm/templates/web/ingress.yaml b/app/media/MyHelm/templates/web/ingress.yaml deleted file mode 100644 index e369b50e..00000000 --- a/app/media/MyHelm/templates/web/ingress.yaml +++ /dev/null @@ -1,17 +0,0 @@ - -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: web-ingress -spec: - rules: - - host: 123.com - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: web - port: - number: 80 diff --git a/app/media/MyHelm/templates/web/secrets.yaml b/app/media/MyHelm/templates/web/secrets.yaml deleted file mode 100644 index 4f1b6f8f..00000000 --- a/app/media/MyHelm/templates/web/secrets.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: web-secrets -type: Opaque -data: - # Add your base64 encoded secrets here diff --git a/app/media/MyHelm/templates/web/service.yaml b/app/media/MyHelm/templates/web/service.yaml deleted file mode 100644 index ced154e4..00000000 --- a/app/media/MyHelm/templates/web/service.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: web-service -spec: - type: ClusterIP - ports: - - port: 80 - targetPort: {{ .Values.web.targetPort }} - selector: - app: web diff --git a/app/media/MyHelm/templates/web/statefulset.yaml b/app/media/MyHelm/templates/web/statefulset.yaml deleted file mode 100644 index 6b98c7d2..00000000 --- a/app/media/MyHelm/templates/web/statefulset.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: web -spec: - serviceName: web-service - replicas: {{ .Values.web.replicas }} - selector: - matchLabels: - app: web - template: - metadata: - labels: - app: web - spec: - containers: - - name: web - image: {{ .Values.web.image }} - ports: - - containerPort: {{ .Values.web.targetPort }} - env: - - name: {{ .Values.web.env[0].name }} - value: {{ .Values.web.env[0].value }} - volumeClaimTemplates: - - metadata: - name: web-pvc - spec: - accessModes: - - {{ .Values.web.persistence.accessModes[0] }} - resources: - requests: - storage: {{ .Values.web.persistence.size }} diff --git a/app/media/MyHelm/values.yaml b/app/media/MyHelm/values.yaml index db28af7c..1e6f7cae 100644 --- a/app/media/MyHelm/values.yaml +++ b/app/media/MyHelm/values.yaml @@ -4,13 +4,10 @@ web: replicas: 1 persistence: size: 1Gi - accessModes: + accessModes: - ReadWriteOnce + stateless: + enabled: true env: - name: ENV1 value: Hi - ingress: - enabled: false - host: www.example.com - stateless: - enabled: false diff --git a/app/media/MyHelm_zip.zip b/app/media/MyHelm_zip.zip index 1e5d2815010ef75a24a98fd9803e8e74a8e6149c..fa2387366e0e880cc75743d64accac3997484d4f 100644 GIT binary patch literal 1443 zcmWIWW@Zs#U|`^2*f_a1@@HXEr5BJF0>oTE?3|HURH9dzn49CRbArcPSL@uF^P7V- zjGvtHKI6MJ=)>AC9%oNJ)oS*Xcp>>pvS8^FF?I1&u_+C$GNKM%B9n}Ty1hg$ed-q3 z<2^a3`%{p2Q1?!T02CXa9S`6-0JN!=k%565NS7t%l%^Jgt(-dHAXk%vKwEt3&EgYo zEm99vU%jz)D!YErtR$?=T=YnJ{u+g5y}NDs&;I|IIq~~~AAN;uc=&3LR!mseG$C4? zL%pe^d7D|3+#A{SZE9DVJ|AOu;B`5+JtbbG*CawD@ZT-(TgI#N7BEk4>{Rqio|-pB z>|JEc{ZefX)e z<$}_U4;9~Qp0hOD2Ka1C<&|)nRqkE7vF6GKaS^N7yYpNsg=`ir2xI7(XL4snnC1jc zuSGW^oo_D>OkI8|X~}~%2bU!NbdizFOg_kH(`A{zL2Y^!qgS~+m%@|g(|4JzSL!{s zyJja=e6}D^^75tyPyg(gZX})e{Me_zvI(|k@ktqreZ10=Z|PY}g>`Rtztj65BFNvQ zf$#3tnsbYOHGbOvVpkA9YDD{#H~y;x`g_+x-JWnP_D^+e_=jng#sb%BL|^X=JygTdALD)~GUuGoFG#!Pw7~vtyd1~>>Ra88wfT23 z{?|{_De2`KgL(2%9c-)5$s7T6Xci6!Cl{rbKoY9yDO)}V2NBnY|JFWI%W5sN(hl(W z(!aB_QzE&pK57KJvpfRQ;>I1 z_s&xZY7#FbUr81)G6bMl`E0)8!bL!WQ4=VRw;${5gsdMRQJMKkB%=*)v1)`Pn^J)2^gBKe5V7)YziuBPD!X?B%WFDH+>C z1q>_FBY8q+vAGmZ63|JT>2b&X?W+gVj$Ctka>abYRyC~`Ya-t6+k^^sWT)qmEW@w1mbSbW@A&cDe|?gV?LFY}9-9WURn z^3S}*_N~X~{oGr^;j<*7Q*yKznrBJ3p_S__2hL>?(S!|nZ%XMJZWp8I>Y2Lt*F^)#_21sbZt{QW;*#{ z$RR1W%tvppKa4Gt(NQ&>mr;D+g6!S%PuD#6$qkA5X5(J6_|OagBb-s*6JL5Sycl(` zzj*!j{L(|$m{$HW`7WQzuzt?HReqQEI<1Uf))0Phie>-SBU_92o|s_s;-zfM0s*;P zZ&xSJJq0f=we$G61`tf3m`{fopVufiQ9R8+mv07QDGVPJrxulECZ~dZ;o5r;=nDat_dmP-HnQ#Y zTsLozXv@9pB@+{7wcO3^p7L*ZrijhCJ;!;b83=fvIC-$hZ2bf`_VP!n6-L6EeJft@ zI2`JfS@Y$^6ZfSP>^t^(t6sP07P|lI)|4|^>`X7B3JNT@M&v$G&%A#sm)SaDj%SYS zwtAM|ait4A;*9I3ZA zIh)Nt;P|5MtDHfH=PZ|_+qaACuCt%@XZFq?5;EVG>)6dWd_Z&asZ*<#h0bMg47ZYz znf+<9>#LdjmiYg=sqz0!<2j!6J4SB0Iq?ZI7F{gJpD|NY9Mx%MKc1}xm0c-7ED6M@ zIWQwNry#YcSg)iYNA8-=Hkycq#0jt=2bZGS)s=yD@kJ2qABk-d+Hju=6{&4_{B9Yz?+dt zgc)~X3Um(`Y-t2hh@ur;A9{%h(Z#^9rLh>uL@FQAHKLb42#t2YQVBII&`Tq9v(R%G z!mJfc=w`w48@d_jX&hlj7O;dwa}QFAM>hvO!6D31Wx+HDk^IojK~EhBa}HpbgOpYR Tyjj^mO4)(%1~4GKSwTDia8kME diff --git a/app/media/MyJcasc/jcasc/config.yaml b/app/media/MyJcasc/jcasc/config.yaml new file mode 100644 index 00000000..bbd9e88b --- /dev/null +++ b/app/media/MyJcasc/jcasc/config.yaml @@ -0,0 +1,27 @@ +systemMessage: "Welcome to Jenkins configured via JCasC" +author: + name: "admin" + password: "password" +allowSignup: true +allowAnonymousRead: true +cache_size: 1 +executors: 1 +required_plugins: + - "string" +views: + - list: + name: "All" +authorizationStrategy: + projectMatrix: + grantedPermissions: + - "Overall/Administer:admin" + - "Job/Read:developer" + - "Job/Build:developer" +tools: + git: + installations: + - name: "Default" + home: "/usr/bin/git" +security: + globalJobDslSecurityConfiguration: + useScriptSecurity: false \ No newline at end of file diff --git a/app/media/MyTerraform/main.tf b/app/media/MyTerraform/main.tf index 3deb6501..30e4c065 100644 --- a/app/media/MyTerraform/main.tf +++ b/app/media/MyTerraform/main.tf @@ -1,17 +1,18 @@ - -provider "argocd" { - server_addr = var.argocd_instance_info["server_addr"] - username = var.argocd_instance_info["username"] - password = var.argocd_instance_info["password"] - insecure = var.argocd_instance_info["insecure"] +provider "docker" { + host = "unix:///var/run/docker.sock" } -module "argocd" { - source = "./modules/argocd" - - repository_create = var.repository_create - argocd_repository_info = var.argocd_repository_info - application_create = var.application_create - argocd_application = var.argocd_application - argocd_sync_options = var.argocd_sync_options +module "docker" { + source = "./modules/docker" + + create_image = var.create_image + image_name = var.image_name + image_force_remove = var.image_force_remove + image_build = var.image_build + + create_container = var.create_container + container_image = var.container_image + container_name = var.container_name + container_hostname = var.container_hostname + container_restart = var.container_restart } diff --git a/app/media/MyTerraform/modules/argocd/main.tf b/app/media/MyTerraform/modules/argocd/main.tf deleted file mode 100644 index 38762cdb..00000000 --- a/app/media/MyTerraform/modules/argocd/main.tf +++ /dev/null @@ -1,39 +0,0 @@ - -resource "argocd_repository" "repository" { - count = var.repository_create ? 1 : 0 - repo = var.argocd_repository_info["repo"] - username = var.argocd_repository_info["username"] - password = var.argocd_repository_info["password"] -} - -resource "argocd_application" "application" { - count = var.application_create ? 1 : 0 - depends_on = [argocd_repository.repository] - - metadata { - name = var.argocd_application["name"] - namespace = "argocd" - labels = { - using_sync_policy_options = "true" - } - } - - spec { - destination { - server = var.argocd_application["destination_server"] - namespace = var.argocd_application["destination_namespace"] - } - source { - repo_url = var.argocd_application["source_repo_url"] - path = var.argocd_application["source_path"] - target_revision = var.argocd_application["source_target_revision"] - } - sync_policy { - automated { - prune = false - self_heal = false - } - sync_options = var.argocd_sync_options - } - } -} diff --git a/app/media/MyTerraform/modules/argocd/terraform.tfvars b/app/media/MyTerraform/modules/argocd/terraform.tfvars deleted file mode 100644 index 56d589ee..00000000 --- a/app/media/MyTerraform/modules/argocd/terraform.tfvars +++ /dev/null @@ -1,19 +0,0 @@ - -repository_create = false -argocd_repository_info = { - repo = "https://YOUR_REPO.git" - username = "USERNAME" - password = "CHANGE_ME_WITH_TOKEN" -} - -application_create = true -argocd_application = { - name = "APPLICATION_NAME" - destination_server = "https://kubernetes.default.svc" - destination_namespace = "DESTINATION_NAMESPACE" - source_repo_url = "https://YOUR_REPO.git" - source_path = "SOURCE_PATH" - source_target_revision = "SOURCE_TARGET_REVISION" -} - -argocd_sync_options = ["CreateNamespace=true", "ApplyOutOfSyncOnly=true", "FailOnSharedResource=true"] diff --git a/app/media/MyTerraform/modules/argocd/variables.tf b/app/media/MyTerraform/modules/argocd/variables.tf deleted file mode 100644 index 5d76fdc1..00000000 --- a/app/media/MyTerraform/modules/argocd/variables.tf +++ /dev/null @@ -1,20 +0,0 @@ - -variable "repository_create" { - type = bool -} - -variable "argocd_repository_info" { - type = map(string) -} - -variable "application_create" { - type = bool -} - -variable "argocd_application" { - type = map(string) -} - -variable "argocd_sync_options" { - type = list(string) -} diff --git a/app/media/MyTerraform/modules/argocd/versions.tf b/app/media/MyTerraform/modules/argocd/versions.tf deleted file mode 100644 index c2fa9111..00000000 --- a/app/media/MyTerraform/modules/argocd/versions.tf +++ /dev/null @@ -1,11 +0,0 @@ - -terraform { - required_version = ">= 1.0" - - required_providers { - argocd = { - source = "oboukili/argocd" - version = ">= 6.0.2" - } - } -} diff --git a/app/media/MyTerraform/modules/docker/main.tf b/app/media/MyTerraform/modules/docker/main.tf new file mode 100644 index 00000000..a312214a --- /dev/null +++ b/app/media/MyTerraform/modules/docker/main.tf @@ -0,0 +1,18 @@ +resource "docker_image" "image" { + count = var.create_image ? 1 : 0 + name = var.image_name + force_remove = var.image_force_remove + + build { + context = var.image_build.context + tag = var.image_build.tag + } +} + +resource "docker_container" "container" { + count = var.create_container ? 1 : 0 + image = var.container_image + name = var.container_name + hostname = var.container_hostname + restart = var.container_restart +} diff --git a/app/media/MyTerraform/modules/docker/terraform.tfvars b/app/media/MyTerraform/modules/docker/terraform.tfvars new file mode 100644 index 00000000..033c86d8 --- /dev/null +++ b/app/media/MyTerraform/modules/docker/terraform.tfvars @@ -0,0 +1,13 @@ +create_image = true +image_name = "my-image" +image_force_remove = true +image_build = { + context = "./" + tag = ["my-image:latest"] +} + +create_container = false +container_image = "my-image" +container_name = "my-container" +container_hostname = "my-host" +container_restart = "always" diff --git a/app/media/MyTerraform/modules/docker/variables.tf b/app/media/MyTerraform/modules/docker/variables.tf new file mode 100644 index 00000000..5cf1cd69 --- /dev/null +++ b/app/media/MyTerraform/modules/docker/variables.tf @@ -0,0 +1,38 @@ +variable "create_image" { + type = bool +} + +variable "image_name" { + type = string +} + +variable "image_force_remove" { + type = bool +} + +variable "image_build" { + type = object({ + context = string + tag = list(string) + }) +} + +variable "create_container" { + type = bool +} + +variable "container_image" { + type = string +} + +variable "container_name" { + type = string +} + +variable "container_hostname" { + type = string +} + +variable "container_restart" { + type = string +} diff --git a/app/media/MyTerraform/modules/docker/versions.tf b/app/media/MyTerraform/modules/docker/versions.tf new file mode 100644 index 00000000..255624a3 --- /dev/null +++ b/app/media/MyTerraform/modules/docker/versions.tf @@ -0,0 +1,10 @@ +terraform { + required_version = ">= 1.0" + + required_providers { + docker = { + source = "kreuzwerker/docker" + version = ">= 2.8.0" + } + } +} diff --git a/app/media/MyTerraform/terraform.tfvars b/app/media/MyTerraform/terraform.tfvars index 163075df..033c86d8 100644 --- a/app/media/MyTerraform/terraform.tfvars +++ b/app/media/MyTerraform/terraform.tfvars @@ -1,26 +1,13 @@ - -argocd_instance_info = { - server_addr = "ARGOCD_DOMAIN" - username = "admin" - password = "ARGOCD_ADMIN_PASS" - insecure = true -} - -repository_create = false -argocd_repository_info = { - repo = "https://YOUR_REPO.git" - username = "USERNAME" - password = "CHANGE_ME_WITH_TOKEN" -} - -application_create = true -argocd_application = { - name = "APPLICATION_NAME" - destination_server = "https://kubernetes.default.svc" - destination_namespace = "DESTINATION_NAMESPACE" - source_repo_url = "https://YOUR_REPO.git" - source_path = "SOURCE_PATH" - source_target_revision = "SOURCE_TARGET_REVISION" +create_image = true +image_name = "my-image" +image_force_remove = true +image_build = { + context = "./" + tag = ["my-image:latest"] } -argocd_sync_options = ["CreateNamespace=true", "ApplyOutOfSyncOnly=true", "FailOnSharedResource=true"] +create_container = false +container_image = "my-image" +container_name = "my-container" +container_hostname = "my-host" +container_restart = "always" diff --git a/app/media/MyTerraform/variables.tf b/app/media/MyTerraform/variables.tf index 6cd53c28..5cf1cd69 100644 --- a/app/media/MyTerraform/variables.tf +++ b/app/media/MyTerraform/variables.tf @@ -1,29 +1,38 @@ +variable "create_image" { + type = bool +} + +variable "image_name" { + type = string +} -variable "argocd_instance_info" { +variable "image_force_remove" { + type = bool +} + +variable "image_build" { type = object({ - server_addr = string - username = string - password = string - insecure = bool + context = string + tag = list(string) }) } -variable "repository_create" { +variable "create_container" { type = bool } -variable "argocd_repository_info" { - type = map(string) +variable "container_image" { + type = string } -variable "application_create" { - type = bool +variable "container_name" { + type = string } -variable "argocd_application" { - type = map(string) +variable "container_hostname" { + type = string } -variable "argocd_sync_options" { - type = list(string) +variable "container_restart" { + type = string } diff --git a/app/media/MyTerraform/versions.tf b/app/media/MyTerraform/versions.tf index c2fa9111..255624a3 100644 --- a/app/media/MyTerraform/versions.tf +++ b/app/media/MyTerraform/versions.tf @@ -1,11 +1,10 @@ - terraform { required_version = ">= 1.0" required_providers { - argocd = { - source = "oboukili/argocd" - version = ">= 6.0.2" + docker = { + source = "kreuzwerker/docker" + version = ">= 2.8.0" } } } diff --git a/app/media/MyTerraform_zip.zip b/app/media/MyTerraform_zip.zip index f0cb23965034a0eda29dd0cad0a1d5e81d4824bd..17dbb37ccd57ec05785eb7bce960c520b145c851 100644 GIT binary patch literal 2104 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 str: set stateless in pod based on {status}. - Based on values.yaml, create all necessary Kubernetes templates in the templates directory: + Based on values.yaml (Dont put json in .yaml files), create all necessary Kubernetes templates in the templates directory: if stateless.enabled is true, create deployment.yaml; if stateless.enabled is false, create statefulset.yaml. If a persistence block exists, include pvc.yaml. If the ingress block is defined and ingress.enabled is true, create ingress.yaml. if ingress.enabled is false, do not create ingress.yaml. Always create