Browse Source

ADD:CICD模版

lj 1 year ago
parent
commit
da17e5d932
1 changed files with 113 additions and 0 deletions
  1. 113 0
      deploy/app.toml

+ 113 - 0
deploy/app.toml

@@ -0,0 +1,113 @@
+namespace = "xiaoquio"
+appbase = "helloworld-maven-0.1.1.tgz" #0.1.1为nodeport
+pipeline = "jenkins"
+cluster = "rke"
+helmrepo = "CHARTMUSEUM"
+helmversion = "v3"
+
+[jenkins]
+steps = ["git", "build-and-push-new", "save-image-tag-new", "helm3"]
+gitSecret = "" # jenkins git key
+dockerSecret = "" # jenkins docker registry key
+dockerFile = "./Dockerfile" # custom dockerfile in step of build-and-push-new or build-cp-dist
+
+[sync]
+basedir = "" # if use rsync, basedir is workspace
+src = "" # ./dist/
+dest = "" # /data/...
+excludes = []
+hosts = [""] # webserver
+
+[sync1]
+src = "" # if use rsync1
+dest = ""
+excludes = []
+hosts = [""]
+
+[etcd]
+etcdAddr = "" # if use save-image-tag-new
+
+[chart]
+name = "test"
+version = "0.1.1"
+appVersion = "1.0"
+apiVersion = "v1"
+description = "A Helm chart for Kubernetes, Auto generated by jxl"
+
+[git]
+repo = "https://git.xiaoquio.com/anian/test"
+branch = "master"
+
+[docker]
+base = "" #base images
+port = ""
+package = ""
+workdir = ""
+entrypoint = "" # 执行command
+
+[helm]
+replicaCount = 1
+projectid = 2
+imagePullSecrets = "default-registry-secret"
+command =  ["/bin/bash"]
+args = ["-c", "java -javaagent:/opt/app/jmx_prometheus_javaagent.jar=9000:/opt/app/prometheus-jmx-config.yaml -Xms128m -Xmx2048m -Dfile.encoding=UTF-8 -jar /opt/app/app.jar --spring.profiles.active=prod"]
+dnsPolicy = "ClusterFirst"
+
+  [helm.image]
+  repository = "registry-vpc.cn-hangzhou.aliyuncs.com/xiaoquio"
+  name = "test"
+  tag = "latest"
+  pullPolicy = "IfNotPresent"
+
+  [helm.service]
+  serviceName = "test"
+  type = "NodePort"
+  port = 80
+  targetport = 8989
+  nodeport =  40201
+  loadBalancerIP = ""
+  healthCheck = "/test"
+
+  [helm.nodeSelector]
+  hostname = "" #匹配节点名
+  disktype = "" #匹配节点磁盘类型
+  accelerator = "" #匹配显卡特性
+
+  [helm.resources]
+    [helm.resources.requests]
+    memory = "128Mi"
+    cpu = "200m"
+    [helm.resources.limits]
+    memory = "4Gi"
+    cpu = "4"
+
+  [[helm.volumes]]
+    name = "container-log"
+    [helm.volumes.hostPath]
+    path = "/var/log/dockerapp/2/utf8/"
+
+  [[helm.volumeMounts]]
+    name = "container-log"
+    mountPath = "/opt/app/logs"
+
+  [helm.env]
+    [helm.env.podInfo]
+    name = "podInfo"
+      [helm.env.podInfo.data]
+      MY_NODE_NAME = "spec.nodeName"
+      MY_NODE_IP = "status.hostIP"
+      MY_POD_SERVICE_ACCOUNT = "spec.serviceAccountName"
+      MY_POD_NAME = "metadata.name"
+      MY_POD_NAMESPACE = "metadata.namespace"
+      MY_POD_IP = "status.podIP"
+
+    [helm.env.otherInfo]
+    name = "otherInfo"
+      [helm.env.otherInfo.data]
+      LANG = "zh_CN.UTF-8"
+      XMS = "128m"
+      XMX = "2048m"
+
+  [helm.securityContext]
+  runAsUser = 1501
+  fsGroup = 1501