This commit is contained in:
root 2023-06-19 14:15:26 +08:00
parent c4da1fc1e6
commit 6fb9a0ff7e
9 changed files with 283 additions and 14 deletions

View File

@ -5,14 +5,14 @@ set -x
image_list_file=image_list
#docker_registry_desc=dockerhub.ccyunchina.com
#docker_registry_desc=registry.cn-hangzhou.aliyuncs.com
docker_registry_desc=docker.io
docker_registry_desc=dev-docker-registry.ccyunchina.com
#docker login $docker_registry_desc -u 153307747@qq.com -pyd880309
docker login $docker_registry_desc -u toyangdon -pyd880309
if [ $? != 0 ];then
echo "error:docker registry login fail! please check username or password is correct"
exit 1
fi
#docker login $docker_registry_desc -u toyangdon -pyd880309
#if [ $? != 0 ];then
# echo "error:docker registry login fail! please check username or password is correct"
# exit 1
# fi
while read line
do

View File

@ -2,7 +2,7 @@ prometheus_image: prom/prometheus:v2.11.0
alertmanager_image: prom/alertmanager:v0.18.0
grafana_image: grafana/grafana:6.6.2
kube_rbac_proxy_image: toyangdon/kube-rbac-proxy:v0.4.1
kube_state_metrics_image: toyangdon/kube-state-metrics:arm64-1.8
kube_state_metrics_image: toyangdon/kube-state-metrics-arm64:v1.9.0
node_exporter_image: prom/node-exporter:v0.18.1
prometheus_adapter_image: toyangdon/k8s-prometheus-adapter:v0.5.0
config_reloader_image: toyangdon/configmap-reload-arm64:v0.1

View File

@ -13,7 +13,6 @@ k8s_heketi_image: toyangdon/heketi:8-arm64
#非必选镜像
k8s_metrics_server_image: "toyangdon/metrics-server-arm64:v0.3.4"
kube_state_metrics_image: toyangdon/kube-state-metrics-arm64:v1.9.0
#openvpn
openvpn_image: toyangdon/openvpn-arm:20191120

View File

@ -84,12 +84,6 @@
- name: 部署 openvpn.yaml
shell: "{{bin_dir}}/kubectl apply -f {{ base_dir }}/manifests/openvpn.yaml"
- name: 创建 kube-state-metrics.yaml文件
template: src=kube-state-metrics.yaml dest={{ base_dir }}/manifests/kube-state-metrics.yaml
- name: 部署 kube-state-metrics.yaml
shell: "{{bin_dir}}/kubectl apply -f {{ base_dir }}/manifests/kube-state-metrics.yaml"
- name: 导入gfs tasks
include_tasks : glusterfs.yml
when: deploy_gfs

View File

@ -47,3 +47,8 @@ bbs_api_image: uat/pumpkin-bbs-api-uat:RC-V2.5.20210629.33583.19
campaigns_api_image: uat/pumpkin-campaigns-api-uat:RC-V2.5.20210629.35404.40
app_api_image: uat/pumpkin-app-api-uat:RC-V2.5.20210629.33815.197
adapter_api_image: uat/pumpkin-adapter-api-uat:RC-V2.5.20210629.33648.199
alpine_image: library/alpine:3.6
elasticsearch_image: toyangdon/elasticsearch:6.8.23-fix
fastdfs_image: hknaruto/fastdfs-arm64:V6.07

View File

@ -0,0 +1,5 @@
- name: 创建elasticsearch.yaml文件
template: src=elasticsearch/elasticsearch.yaml dest={{ base_dir }}/manifests/proprietary-cloud/elasticsearch.yaml
- name: 部署elasticsearch.yaml
shell: "{{bin_dir}}/kubectl apply -f {{ base_dir }}/manifests/proprietary-cloud/elasticsearch.yaml -n {{namespace}}"

View File

@ -0,0 +1,5 @@
- name: 创建fastdfs.yaml文件
template: src=fastdfs/fastdfs.yaml dest={{ base_dir }}/manifests/proprietary-cloud/fastdfs.yaml
- name: 部署fastdfs.yaml
shell: "{{bin_dir}}/kubectl apply -f {{ base_dir }}/manifests/proprietary-cloud/fastdfs.yaml -n {{namespace}}"

View File

@ -0,0 +1,129 @@
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: elasticsearch6
labels:
k8s-app: elasticsearch6
version: 6.8.14
spec:
replicas: 1
selector:
matchLabels:
k8s-app: elasticsearch6
version: 6.8.14
template:
metadata:
labels:
k8s-app: elasticsearch6
version: 6.8.14
spec:
initContainers:
- name: elasticsearch6-init
image: '{{BASE_IMAGE_URL}}/{{ alpine_image }}'
command:
- /sbin/sysctl
- '-w'
- vm.max_map_count=262144
resources: {}
securityContext:
privileged: true
containers:
- name: elasticsearch6
image: '{{BASE_IMAGE_URL}}/{{elasticsearch_image}}'
ports:
- name: manage
containerPort: 9300
protocol: TCP
- name: api
containerPort: 9200
protocol: TCP
env:
- name: TZ
value: Asia/Shanghai
- name: JAVA_OPTIONS
value: >-
-XX:+UseNUMA -XX:+PrintGC -XX:+PrintGCTimeStamps
-XX:MaxRAMFraction=1
- name: ES_JAVA_OPTS
value: >-
-XX:+UseNUMA -XX:+PrintGC -XX:+PrintGCTimeStamps
-XX:MaxRAMFraction=1 -Xmx6g -Xms6g -XX:NewRatio=5
resources:
limits:
cpu: '4'
memory: 8Gi
requests:
cpu: '4'
memory: 8Gi
volumeMounts:
- name: elasticsearch6-data
mountPath: /opt/elasticsearch/data
livenessProbe:
httpGet:
path: /_cat
port: 9200
scheme: HTTP
initialDelaySeconds: 120
timeoutSeconds: 91
periodSeconds: 5
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /_cat
port: 9200
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 90
periodSeconds: 1
successThreshold: 1
failureThreshold: 100
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
volumeClaimTemplates:
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: elasticsearch6-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
volumeMode: Filesystem
serviceName: elasticsearch6
podManagementPolicy: OrderedReady
updateStrategy:
type: RollingUpdate
rollingUpdate:
partition: 0
revisionHistoryLimit: 10
---
kind: Service
apiVersion: v1
metadata:
name: elasticsearch6
labels:
k8s-app: elasticsearch6
spec:
ports:
- name: manage
protocol: TCP
port: 9300
targetPort: 9300
- name: api
protocol: TCP
port: 9200
targetPort: 9200
selector:
k8s-app: elasticsearch6
type: ClusterIP

View File

@ -0,0 +1,132 @@
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: fastdfs
labels:
k8s-app: fastdfs
version: v6.07
spec:
replicas: 1
selector:
matchLabels:
k8s-app: fastdfs
version: v6.07
template:
metadata:
creationTimestamp: null
labels:
k8s-app: fastdfs
version: v6.07
spec:
volumes:
- name: config-volume
configMap:
name: fastdfs-config-v6.07
defaultMode: 420
containers:
- name: fastdfs
image: 'registry.cn-hangzhou.aliyuncs.com/hknaruto/fastdfs-arm64:V6.07'
ports:
- name: trackerd
containerPort: 22122
protocol: TCP
- name: storaged
containerPort: 23000
protocol: TCP
env:
- name: TZ
value: Asia/Shanghai
resources:
limits:
cpu: '2'
requests:
cpu: 100m
volumeMounts:
- name: config-volume
mountPath: /etc/fdfs
- name: fastdfs-base
mountPath: /home/yuqing/fastdfs
- name: fastdfs-m0
mountPath: /data/fastdfs/M0
- name: fastdfs-m1
mountPath: /data/fastdfs/M1
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
serviceAccountName: fastdfs
serviceAccount: fastdfs
securityContext: {}
schedulerName: default-scheduler
volumeClaimTemplates:
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: fastdfs-base
creationTimestamp: null
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
volumeMode: Filesystem
status:
phase: Pending
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: fastdfs-m0
creationTimestamp: null
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
volumeMode: Filesystem
status:
phase: Pending
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: fastdfs-m1
creationTimestamp: null
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
volumeMode: Filesystem
---
kind: Service
apiVersion: v1
metadata:
name: fastdfs
labels:
k8s-app: fastdfs
kubernetes.io/name: fastdfs
spec:
ports:
- name: trackerd
protocol: TCP
port: 22122
targetPort: 22122
nodePort: 20381
- name: storaged
protocol: TCP
port: 23000
targetPort: 23000
nodePort: 29957
- name: nginx
protocol: TCP
port: 80
targetPort: 80
nodePort: 11726
selector:
k8s-app: fastdfs
type: NodePort