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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3c2d65cb66c8a89ffc58b797ccef1f404d81056f912d98f7e656ea63271e5c7
4
- data.tar.gz: b8d089767fa6fff1c092fa570fcf730fdf77e83a656669ad71204a67585345e5
3
+ metadata.gz: ca8b3f228a70fa12fad3f4c813354ec41e924c78786044da97804c00c1766404
4
+ data.tar.gz: 48dde9ca6f70a0a161451173ab9014398ddde0f0eebd9982b0c2c4f35461e3c7
5
5
  SHA512:
6
- metadata.gz: aa66e24ec0a0027136ebcd4d329f2b4fa3c7ee1347343d002b5e9d875040e7cfaf894bdd595060dfbacc43e0f102a760bcbf9177871cb4814e1c98bc5be1865c
7
- data.tar.gz: 37d7f64a4417a6544a8f9f3faca2f700dfdf7489de03c4f3321de1e359edc903281402b1ada1f8c31fc349756a900f0a796760b339193d46aac34da48a148f85
6
+ metadata.gz: 2ebec6b4e01a88a4c8ebda46aaaa850874425d7fdb577f1cfa4657f992fd2f182236e3548ab513bb4f8d27ae8e86940ae1cf38e77963d35188645cc717719578
7
+ data.tar.gz: dee2ad020e8b54d91b2713da3fd407236857c796ae1b02d0b77a3ff6c9f8b9883678764cfa84e0a30c9588fed619dfc9b1b72f2694f77f0ce2192cb50165a879
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'rubypitaya', '1.6.0'
3
+ gem 'rubypitaya', '1.6.1'
4
4
 
5
5
  group :development do
6
6
  gem 'pry', '0.12.2'
@@ -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.0)
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.0)
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,11 @@
1
+ apiVersion: v1
2
+ kind: PersistentVolumeClaim
3
+ metadata:
4
+ name: postgres-pvc
5
+ spec:
6
+ accessModes:
7
+ - ReadWriteOnce
8
+ resources:
9
+ requests:
10
+ storage: 5Gi
11
+ storageClassName: standard
@@ -0,0 +1,12 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: connector
5
+ spec:
6
+ selector:
7
+ app: connector
8
+ ports:
9
+ - protocol: TCP
10
+ port: 3250
11
+ targetPort: 3250
12
+ type: LoadBalancer
@@ -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,12 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: nats
5
+ spec:
6
+ selector:
7
+ app: nats
8
+ ports:
9
+ - protocol: TCP
10
+ port: 4222
11
+ targetPort: 4222
12
+ type: LoadBalancer
@@ -0,0 +1,12 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: postgres
5
+ spec:
6
+ selector:
7
+ app: postgres
8
+ ports:
9
+ - protocol: TCP
10
+ port: 5432
11
+ targetPort: 5432
12
+ type: LoadBalancer
@@ -0,0 +1,13 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: redis
5
+ spec:
6
+ selector:
7
+ app: redis
8
+ ports:
9
+ - protocol: TCP
10
+ port: 6379
11
+ targetPort: 6379
12
+ name: redis
13
+ type: LoadBalancer
@@ -0,0 +1,12 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: rubypitaya
5
+ spec:
6
+ selector:
7
+ app: rubypitaya
8
+ ports:
9
+ - protocol: TCP
10
+ port: 80
11
+ targetPort: 4567
12
+ 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
@@ -1,3 +1,3 @@
1
1
  module RubyPitaya
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  end
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.0
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"