Skip to content

Instantly share code, notes, and snippets.

@gitschaub
Last active December 9, 2016 23:08
Show Gist options
  • Save gitschaub/1acd75162e92e6244be2e256464108b4 to your computer and use it in GitHub Desktop.
Save gitschaub/1acd75162e92e6244be2e256464108b4 to your computer and use it in GitHub Desktop.
apiVersion: v1
id: service-textindexservice
kind: Template
metadata:
name: service-textindexservice
objects:
- apiVersion: v1
id: textindexservice
kind: Service
metadata:
name: textindex-<YOUR ID>
spec:
ports:
- name: http
port: 9111
selector:
name: textindexservice
user: <YOUR ID>
- apiVersion: v1
id: textindexservice-controller
kind: ReplicationController
metadata:
name: textindexservice-<YOUR ID>
spec:
replicas: 1
selector:
name: textindexservice
user: <YOUR ID>
template:
metadata:
labels:
name: textindexservice
user: <YOUR ID>
spec:
containers:
- image: adamschaub/textindexservice:alpha
imagePullPolicy: Always
name: textindexservice
env:
- name: REDIS_HOST
value: "redis"
- name: REDIS_PORT
value: "6379"
- name: DISCOVERY_URL
value: "http://consul:8500"
- name: DISCOVERY_HOSTNAME
value: textindex-<YOUR ID>
- name: RABBIT_HOST
value: "rabbitmq"
- name: RABBIT_PORT
value: "5672"
- name: COUCHBASE_HOST
value: "couchbase"
ports:
- containerPort: 9111
volumeMounts:
- mountPath: /tmp/logs
name: logs
- image: adamschaub/hekad:latest
imagePullPolicy: Always
name: hekad
env:
- name: LOG_DIRECTORY
value: "/heka/log"
- name: SUBSYSTEM
value: "TextIndex-Microservice"
- name: COMPONENT
value: "textindex-<YOUR ID>"
- name: INSTANCE_NUMBER
value: "01"
- name: DATA_CENTRE
value: "dc1"
- name: NODE_TYPE
value: "nodetype"
- name: NODE_ID
value: "node-1"
volumeMounts:
- mountPath: /heka/log
name: logs
- mountPath: /heka/config
name: config
volumes:
- name: logs
source:
emptyDir: {}
- name: config
configMap:
name: hekad-config
items:
- key: hekad-output
path: hekad.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment