rubypitaya 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubypitaya/app-template/Gemfile +1 -1
- data/lib/rubypitaya/app-template/Gemfile.lock +2 -2
- data/lib/rubypitaya/app-template/kubernetes/README.md +60 -0
- data/lib/rubypitaya/app-template/kubernetes/deployment-connector.yaml +35 -0
- data/lib/rubypitaya/app-template/kubernetes/deployment-rubypitaya.yaml +48 -0
- data/lib/rubypitaya/app-template/kubernetes/persistent-volume.yaml +11 -0
- data/lib/rubypitaya/app-template/kubernetes/service-connector.yaml +12 -0
- data/lib/rubypitaya/app-template/kubernetes/service-etcd.yaml +17 -0
- data/lib/rubypitaya/app-template/kubernetes/service-nats.yaml +12 -0
- data/lib/rubypitaya/app-template/kubernetes/service-postgres.yaml +12 -0
- data/lib/rubypitaya/app-template/kubernetes/service-redis.yaml +13 -0
- data/lib/rubypitaya/app-template/kubernetes/service-rubypitaya.yaml +12 -0
- data/lib/rubypitaya/app-template/kubernetes/statefulset-etcd.yaml +25 -0
- data/lib/rubypitaya/app-template/kubernetes/statefulset-nats.yaml +23 -0
- data/lib/rubypitaya/app-template/kubernetes/statefulset-postgres.yaml +35 -0
- data/lib/rubypitaya/app-template/kubernetes/statefulset-redis.yaml +23 -0
- data/lib/rubypitaya/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca8b3f228a70fa12fad3f4c813354ec41e924c78786044da97804c00c1766404
|
4
|
+
data.tar.gz: 48dde9ca6f70a0a161451173ab9014398ddde0f0eebd9982b0c2c4f35461e3c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ebec6b4e01a88a4c8ebda46aaaa850874425d7fdb577f1cfa4657f992fd2f182236e3548ab513bb4f8d27ae8e86940ae1cf38e77963d35188645cc717719578
|
7
|
+
data.tar.gz: dee2ad020e8b54d91b2713da3fd407236857c796ae1b02d0b77a3ff6c9f8b9883678764cfa84e0a30c9588fed619dfc9b1b72f2694f77f0ce2192cb50165a879
|
@@ -62,7 +62,7 @@ GEM
|
|
62
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
63
63
|
rspec-support (~> 3.8.0)
|
64
64
|
rspec-support (3.8.3)
|
65
|
-
rubypitaya (1.6.
|
65
|
+
rubypitaya (1.6.1)
|
66
66
|
activerecord (= 6.0.2)
|
67
67
|
etcdv3 (= 0.10.2)
|
68
68
|
eventmachine (= 1.2.7)
|
@@ -85,7 +85,7 @@ DEPENDENCIES
|
|
85
85
|
pry (= 0.12.2)
|
86
86
|
rake (= 10.0)
|
87
87
|
rspec (= 3.8.0)
|
88
|
-
rubypitaya (= 1.6.
|
88
|
+
rubypitaya (= 1.6.1)
|
89
89
|
|
90
90
|
BUNDLED WITH
|
91
91
|
1.17.2
|
@@ -0,0 +1,60 @@
|
|
1
|
+
Kubernetes Configuration
|
2
|
+
========================
|
3
|
+
|
4
|
+
Set namespace
|
5
|
+
-------------
|
6
|
+
|
7
|
+
Open files "deployment-*.yaml" and set the correct namespace on links
|
8
|
+
|
9
|
+
|
10
|
+
Apply sequence
|
11
|
+
--------------
|
12
|
+
|
13
|
+
Run the following command on the listed files.
|
14
|
+
But remember to put your namespace and your KUBECONFIG env var if you need.
|
15
|
+
|
16
|
+
```sh
|
17
|
+
$ kubectl apply -f [file-path]
|
18
|
+
```
|
19
|
+
|
20
|
+
persistent-volume.yaml
|
21
|
+
|
22
|
+
statefulset-etcd.yaml
|
23
|
+
statefulset-nats.yaml
|
24
|
+
statefulset-postgres.yaml
|
25
|
+
statefulset-redis.yaml
|
26
|
+
|
27
|
+
service-etcd.yaml
|
28
|
+
service-nats.yaml
|
29
|
+
service-postgres.yaml
|
30
|
+
service-redis.yaml
|
31
|
+
|
32
|
+
deployment-connector.yaml
|
33
|
+
service-connector.yaml
|
34
|
+
|
35
|
+
|
36
|
+
Create gitlab-registry secret
|
37
|
+
-----------------------------
|
38
|
+
|
39
|
+
Run the following command.
|
40
|
+
But remember to put your namespace and your KUBECONFIG env var if you need.
|
41
|
+
|
42
|
+
```sh
|
43
|
+
$ kubectl create secret docker-registry gitlab-registry --docker-server=[registry-server] --docker-username=[username] --docker-password=[password]
|
44
|
+
```
|
45
|
+
|
46
|
+
If you use a different registry name instead of "gitlab-registry" change the deployment-rubypitaya.yaml imagePullSecrets.name
|
47
|
+
|
48
|
+
|
49
|
+
Apply sequence
|
50
|
+
--------------
|
51
|
+
|
52
|
+
Run the following command on the listed files.
|
53
|
+
But remember to put your namespace and your KUBECONFIG env var if you need.
|
54
|
+
|
55
|
+
```sh
|
56
|
+
$ kubectl apply -f [file-path]
|
57
|
+
```
|
58
|
+
|
59
|
+
deployment-rubypitaya.yaml
|
60
|
+
service-rubypitaya.yaml
|
@@ -0,0 +1,35 @@
|
|
1
|
+
apiVersion: apps/v1
|
2
|
+
kind: Deployment
|
3
|
+
metadata:
|
4
|
+
name: connector
|
5
|
+
labels:
|
6
|
+
app: connector
|
7
|
+
spec:
|
8
|
+
replicas: 1
|
9
|
+
selector:
|
10
|
+
matchLabels:
|
11
|
+
app: connector
|
12
|
+
template:
|
13
|
+
metadata:
|
14
|
+
labels:
|
15
|
+
app: connector
|
16
|
+
spec:
|
17
|
+
containers:
|
18
|
+
- name: connector
|
19
|
+
image: registry.gitlab.com/lucianopc/pitaya-connector:0.2.0
|
20
|
+
ports:
|
21
|
+
- containerPort: 3250
|
22
|
+
name: connector
|
23
|
+
env:
|
24
|
+
- name: PITAYA_CLUSTER_RPC_SERVER_NATS_CONNECT
|
25
|
+
value: "nats://nats.default.svc.cluster.local:4222"
|
26
|
+
- name: PITAYA_CLUSTER_RPC_CLIENT_NATS_CONNECT
|
27
|
+
value: "nats://nats.default.svc.cluster.local:4222"
|
28
|
+
- name: PITAYA_CLUSTER_RPC_CLIENT_NATS_REQUESTTIMEOUT
|
29
|
+
value: "10s"
|
30
|
+
- name: PITAYA_CLUSTER_SD_ETCD_ENDPOINTS
|
31
|
+
value: "etcd.default.svc.cluster.local:2379"
|
32
|
+
- name: PITAYA_CLUSTER_SD_ETCD_PREFIX
|
33
|
+
value: "rubypitaya/"
|
34
|
+
- name: SERVER_ROUTES
|
35
|
+
value: "rubypitaya"
|
@@ -0,0 +1,48 @@
|
|
1
|
+
apiVersion: apps/v1
|
2
|
+
kind: Deployment
|
3
|
+
metadata:
|
4
|
+
name: rubypitaya
|
5
|
+
labels:
|
6
|
+
app: rubypitaya
|
7
|
+
spec:
|
8
|
+
replicas: 1
|
9
|
+
selector:
|
10
|
+
matchLabels:
|
11
|
+
app: rubypitaya
|
12
|
+
template:
|
13
|
+
metadata:
|
14
|
+
labels:
|
15
|
+
app: rubypitaya
|
16
|
+
spec:
|
17
|
+
containers:
|
18
|
+
- name: rubypitaya
|
19
|
+
image: git.topfreegames.com:4567/prestes/tech-prototype/rubypitaya:latest
|
20
|
+
command: ["bundle", "exec", "rubypitaya", "run"]
|
21
|
+
ports:
|
22
|
+
- containerPort: 4567
|
23
|
+
name: rubypitaya
|
24
|
+
env:
|
25
|
+
- name: SERVER_NAME
|
26
|
+
value: "rubypitaya"
|
27
|
+
- name: RUBYPITAYA_ENV
|
28
|
+
value: "production"
|
29
|
+
- name: NATS_URL
|
30
|
+
value: "nats://nats.default.svc.cluster.local:4222"
|
31
|
+
- name: ETCD_URL
|
32
|
+
value: "http://etcd.default.svc.cluster.local:2379"
|
33
|
+
- name: ETCD_PREFIX
|
34
|
+
value: "rubypitaya/"
|
35
|
+
- name: ETCD_LEASE_SECONDS
|
36
|
+
value: "60"
|
37
|
+
- name: REDIS_URL
|
38
|
+
value: "redis://redis.default.svc.cluster.local:6379"
|
39
|
+
- name: DATABASE_HOST
|
40
|
+
value: "postgres.default.svc.cluster.local"
|
41
|
+
- name: DATABASE_USER
|
42
|
+
value: "postgres"
|
43
|
+
- name: DATABASE_PASSWORD
|
44
|
+
value: ""
|
45
|
+
- name: DATABASE_NAME
|
46
|
+
value: "ruby_pitaya"
|
47
|
+
imagePullSecrets:
|
48
|
+
- name: gitlab-registry
|
@@ -0,0 +1,17 @@
|
|
1
|
+
apiVersion: v1
|
2
|
+
kind: Service
|
3
|
+
metadata:
|
4
|
+
name: etcd
|
5
|
+
spec:
|
6
|
+
selector:
|
7
|
+
app: etcd
|
8
|
+
ports:
|
9
|
+
- protocol: TCP
|
10
|
+
port: 2379
|
11
|
+
targetPort: 2379
|
12
|
+
name: etcd-2379
|
13
|
+
- protocol: TCP
|
14
|
+
port: 2380
|
15
|
+
targetPort: 2380
|
16
|
+
name: etcd-2380
|
17
|
+
type: LoadBalancer
|
@@ -0,0 +1,25 @@
|
|
1
|
+
apiVersion: apps/v1
|
2
|
+
kind: StatefulSet
|
3
|
+
metadata:
|
4
|
+
name: etcd
|
5
|
+
labels:
|
6
|
+
app: etcd
|
7
|
+
spec:
|
8
|
+
serviceName: "etcd"
|
9
|
+
replicas: 1
|
10
|
+
selector:
|
11
|
+
matchLabels:
|
12
|
+
app: etcd
|
13
|
+
template:
|
14
|
+
metadata:
|
15
|
+
labels:
|
16
|
+
app: etcd
|
17
|
+
spec:
|
18
|
+
containers:
|
19
|
+
- name: etcd
|
20
|
+
image: appcelerator/etcd:3.0.15
|
21
|
+
ports:
|
22
|
+
- containerPort: 2379
|
23
|
+
name: etcd-2379
|
24
|
+
- containerPort: 2380
|
25
|
+
name: etcd-2380
|
@@ -0,0 +1,23 @@
|
|
1
|
+
apiVersion: apps/v1
|
2
|
+
kind: StatefulSet
|
3
|
+
metadata:
|
4
|
+
name: nats
|
5
|
+
labels:
|
6
|
+
app: nats
|
7
|
+
spec:
|
8
|
+
serviceName: "nats"
|
9
|
+
replicas: 1
|
10
|
+
selector:
|
11
|
+
matchLabels:
|
12
|
+
app: nats
|
13
|
+
template:
|
14
|
+
metadata:
|
15
|
+
labels:
|
16
|
+
app: nats
|
17
|
+
spec:
|
18
|
+
containers:
|
19
|
+
- name: nats
|
20
|
+
image: nats:2.1.4
|
21
|
+
ports:
|
22
|
+
- containerPort: 4222
|
23
|
+
name: nats
|
@@ -0,0 +1,35 @@
|
|
1
|
+
apiVersion: apps/v1
|
2
|
+
kind: StatefulSet
|
3
|
+
metadata:
|
4
|
+
name: postgres
|
5
|
+
labels:
|
6
|
+
app: postgres
|
7
|
+
spec:
|
8
|
+
serviceName: "postgres"
|
9
|
+
replicas: 1
|
10
|
+
selector:
|
11
|
+
matchLabels:
|
12
|
+
app: postgres
|
13
|
+
template:
|
14
|
+
metadata:
|
15
|
+
labels:
|
16
|
+
app: postgres
|
17
|
+
spec:
|
18
|
+
containers:
|
19
|
+
- name: postgres
|
20
|
+
image: postgres:9.6.17
|
21
|
+
env:
|
22
|
+
- name: POSTGRES_HOST_AUTH_METHOD
|
23
|
+
value: "trust"
|
24
|
+
- name: PGDATA
|
25
|
+
value: "/var/lib/postgresql/data/pgdata"
|
26
|
+
ports:
|
27
|
+
- containerPort: 5432
|
28
|
+
name: postgres
|
29
|
+
volumeMounts:
|
30
|
+
- name: postgres
|
31
|
+
mountPath: /var/lib/postgresql/data
|
32
|
+
volumes:
|
33
|
+
- name: postgres
|
34
|
+
persistentVolumeClaim:
|
35
|
+
claimName: postgres-pvc
|
@@ -0,0 +1,23 @@
|
|
1
|
+
apiVersion: apps/v1
|
2
|
+
kind: StatefulSet
|
3
|
+
metadata:
|
4
|
+
name: redis
|
5
|
+
labels:
|
6
|
+
app: redis
|
7
|
+
spec:
|
8
|
+
serviceName: "redis"
|
9
|
+
replicas: 1
|
10
|
+
selector:
|
11
|
+
matchLabels:
|
12
|
+
app: redis
|
13
|
+
template:
|
14
|
+
metadata:
|
15
|
+
labels:
|
16
|
+
app: redis
|
17
|
+
spec:
|
18
|
+
containers:
|
19
|
+
- name: redis
|
20
|
+
image: redis:3.2.5-alpine
|
21
|
+
ports:
|
22
|
+
- containerPort: 6379
|
23
|
+
name: redis
|
data/lib/rubypitaya/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubypitaya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luciano Prestes Cavalcanti
|
@@ -212,6 +212,20 @@ files:
|
|
212
212
|
- "./lib/rubypitaya/app-template/docker/entrypoint.sh"
|
213
213
|
- "./lib/rubypitaya/app-template/docker/prod/Dockerfile"
|
214
214
|
- "./lib/rubypitaya/app-template/docker/prod/Makefile"
|
215
|
+
- "./lib/rubypitaya/app-template/kubernetes/README.md"
|
216
|
+
- "./lib/rubypitaya/app-template/kubernetes/deployment-connector.yaml"
|
217
|
+
- "./lib/rubypitaya/app-template/kubernetes/deployment-rubypitaya.yaml"
|
218
|
+
- "./lib/rubypitaya/app-template/kubernetes/persistent-volume.yaml"
|
219
|
+
- "./lib/rubypitaya/app-template/kubernetes/service-connector.yaml"
|
220
|
+
- "./lib/rubypitaya/app-template/kubernetes/service-etcd.yaml"
|
221
|
+
- "./lib/rubypitaya/app-template/kubernetes/service-nats.yaml"
|
222
|
+
- "./lib/rubypitaya/app-template/kubernetes/service-postgres.yaml"
|
223
|
+
- "./lib/rubypitaya/app-template/kubernetes/service-redis.yaml"
|
224
|
+
- "./lib/rubypitaya/app-template/kubernetes/service-rubypitaya.yaml"
|
225
|
+
- "./lib/rubypitaya/app-template/kubernetes/statefulset-etcd.yaml"
|
226
|
+
- "./lib/rubypitaya/app-template/kubernetes/statefulset-nats.yaml"
|
227
|
+
- "./lib/rubypitaya/app-template/kubernetes/statefulset-postgres.yaml"
|
228
|
+
- "./lib/rubypitaya/app-template/kubernetes/statefulset-redis.yaml"
|
215
229
|
- "./lib/rubypitaya/core/application_files_importer.rb"
|
216
230
|
- "./lib/rubypitaya/core/config.rb"
|
217
231
|
- "./lib/rubypitaya/core/database_config.rb"
|