This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathdeploy.yaml
109 lines (103 loc) · 2.46 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
apiVersion: v1
kind: Template
metadata:
name: openstack-cassandra-poc
annotations:
description: Cassandra cqlsh deploy
tags: logs,poc,openstack,cassandra
parameters:
- name: OBJECT_NAME_PREFIX
description: Name prefix for each object created
required: true
value: cassandra-openstack-poc
objects:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cassandra-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
volumeName: app3-pv
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: ${OBJECT_NAME_PREFIX}
spec:
replicas: 1
template:
metadata:
labels:
app: ${OBJECT_NAME_PREFIX}
volumes:
- name: cassandra-data
persistentVolumeClaim:
claimName: cassandra-claim
spec:
containers:
- name: cassandra-cql
image: ${OBJECT_NAME_PREFIX}
command:
- "/opt/apache-cassandra/bin/docker-entrypoint.sh"
- "--cluster_name=openstack-cluster"
env:
- name: PEER_DISCOVERY_SERVICE
value: cassandra-peers
- name: CASSANDRA_CLUSTER_NAME
value: OpenStack cluster
- name: CASSANDRA_DC
value: DC1
- name: CASSANDRA_RACK
value: OpenStack rac
ports:
- name: cql-port
containerPort: 9042
- name: thift-port
containerPort: 9160
- name: intra-node
containerPort: 7000
- name: tls-intra
containerPort: 7001
volumeMounts:
- name: cassandra-data
mountPath: "/var/lib/cassandra/data"
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- cassandra-cql
from:
kind: ImageStream
name: ${OBJECT_NAME_PREFIX}
- apiVersion: v1
kind: Service
metadata:
labels:
name: cassandra-peers
name: cassandra-peers
spec:
clusterIP: None
ports:
- port: 7000
name: intra-node
- port: 7001
name: tls-intra
selector:
app: ${OBJECT_NAME_PREFIX}
- apiVersion: v1
kind: Service
metadata:
name: cassandra-cql
spec:
type: LoadBalancer
ports:
- port: 9042
name: cql-port
nodePort: 31105
selector:
app: ${OBJECT_NAME_PREFIX}