diff --git a/hosts b/hosts index c838d13..3a29336 100644 --- a/hosts +++ b/hosts @@ -1,4 +1,4 @@ -192.168.0.20 idc20.nodes.fangjia.com +192.168.0.20 idc20.nodes.fangjia.com 192.168.0.38 monitor.jms.db.fangjia.com #线上数据库 192.168.0.43 online.mongo.db.fangjia.com diff --git a/k8s/rabbitmq.yaml b/k8s/rabbitmq.yaml new file mode 100644 index 0000000..f786c14 --- /dev/null +++ b/k8s/rabbitmq.yaml @@ -0,0 +1,67 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: rabbitmq-pod + namespace: fangjia + labels: + app: rabbitmq +spec: + replicas: 1 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + revisionHistoryLimit: 5 + template: + metadata: + labels: + project: rabbitmq-pod + app: rabbitmq + spec: + imagePullSecrets: + - name: nexussecret + containers: + - name: rabbitmq + image: rabbitmq:3-management + imagePullPolicy: Always +--- +apiVersion: v1 +kind: Service +metadata: + name: rabbitmq-http + namespace: fangjia + labels: + project: rabbitmq-pod + app: rabbitmq +spec: + type: NodePort + selector: + project: rabbitmq-pod + app: rabbitmq + ports: + - name: app-http + protocol: TCP + port: 15672 + targetPort: 15672 + nodePort: 35672 +--- +apiVersion: v1 +kind: Service +metadata: + name: rabbitmq-api + namespace: fangjia + labels: + project: rabbitmq-pod + app: rabbitmq +spec: + type: NodePort + selector: + project: rabbitmq-pod + app: rabbitmq + ports: + - name: app-api + protocol: TCP + port: 5672 + targetPort: 5672 + nodePort: 45672 diff --git a/k8s/redis.yaml b/k8s/redis.yaml new file mode 100644 index 0000000..08fe834 --- /dev/null +++ b/k8s/redis.yaml @@ -0,0 +1,45 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: redis-pod + namespace: fangjia + labels: + app: redis +spec: + replicas: 1 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + revisionHistoryLimit: 5 + template: + metadata: + labels: + project: redis-pod + app: redis + spec: + imagePullSecrets: + - name: nexussecret + containers: + - name: redis + image: 192.168.0.19:9012/redis + imagePullPolicy: Always +--- +apiVersion: v1 +kind: Service +metadata: + name: redis-pod + namespace: fangjia + labels: + project: redis-pod + app: redis +spec: + type: NodePort + selector: + project: redis-pod + app: redis + ports: + - port: 6379 + targetPort: 6379 + nodePort: 30000 diff --git a/prod/.gitkeep b/prod/.gitkeep deleted file mode 100644 index e69de29..0000000