Skip to content

Instantly share code, notes, and snippets.

@gitschaub
Last active December 9, 2016 23:06
Show Gist options
  • Save gitschaub/eba5defe85e3eb89911bab5b5c949115 to your computer and use it in GitHub Desktop.
Save gitschaub/eba5defe85e3eb89911bab5b5c949115 to your computer and use it in GitHub Desktop.
apiVersion: v1
id: service-wordcloudservice
kind: Template
metadata:
name: service-wordcloudservice
objects:
- apiVersion: v1
id: wordcloudservice
kind: Service
metadata:
name: wordcloud-<YOUR ID>
spec:
ports:
- name: http
port: 9222
selector:
name: wordcloudservice
user: <YOUR ID>
- apiVersion: v1
id: wordcloudservice-controller
kind: ReplicationController
metadata:
name: wordcloudservice-<YOUR ID>
spec:
replicas: 1
selector:
name: wordcloudservice
user: <YOUR ID>
template:
metadata:
labels:
name: wordcloudservice
user: <YOUR ID>
spec:
containers:
- image: adamschaub/wordcloudservice:alpha
imagePullPolicy: Always
name: wordcloudservice
env:
- name: REDIS_HOST
value: "redis"
- name: REDIS_PORT
value: "6379"
- name: DISCOVERY_URL
value: "http://consul:8500"
- name: DISCOVERY_HOSTNAME
value: wordcloud-<YOUR ID>
- name: RABBIT_HOST
value: "rabbitmq"
- name: RABBIT_PORT
value: "5672"
- name: COUCHBASE_HOST
value: "couchbase"
- name: TEXT_INDEX_HOST
value: "textindex-<YOUR ID>"
- name: TEXT_INDEX_PORT
value: "9111"
ports:
- containerPort: 9222
volumeMounts:
- mountPath: /tmp/logs
name: logs
- image: adamschaub/hekad:latest
imagePullPolicy: Always
name: hekad
env:
- name: LOG_DIRECTORY
value: "/heka/log"
- name: SUBSYSTEM
value: "WordCloud-Microservice"
- name: COMPONENT
value: "wordcloud-<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