alula-ruby 1.0.1 → 1.1.0

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: fcfbf21b9ec674c1661d15592396c68958037cdc9904066df00bb9b193162b4f
4
- data.tar.gz: 258f321a187b373ba1328e0f20bf9fb7d1459c44bc8413ca30f40e452a478a71
3
+ metadata.gz: f16a5d5af860eb10eb005fd515b1f3a5c14054c10f893399311fa265288da01e
4
+ data.tar.gz: 31e9bc85d0883308067b14df4b199813f19eb67a039474bcb263d79a4dc9381d
5
5
  SHA512:
6
- metadata.gz: ab8f0a7cdd828143cbc9aa414df7fb4e9806e5ceab789ad163696b3f334b98946e2bd94016cb43227341e04acc361344f6e2b26875425e31ff15fd48cdfce9b9
7
- data.tar.gz: 247cf81539cf928880e3f19a1ffd34b76e166673b376a0b02cf0d28ae38ac9535a039c444ad35bbe05a99c23b1f34e4f371f0f0ce752b055ac0f97696058f417
6
+ metadata.gz: bea969dc3209e921a2e3f011a9e5186713274ab6071666b4a03ba4f77eeaabd5cf6102f7053fe2e82afdb09c28301dd2313fc6aadec1627dd5deadde5472ec30
7
+ data.tar.gz: 0fba4a8346c91cb940c98739263cba2d73121b8c3045bf49716c1b440b98b7917357ec6fd3a37263b8afafa30c65210f7e50bdd644d089de7428747c4169665a
data/.circleci/config.yml CHANGED
@@ -1,14 +1,37 @@
1
- version: 2
1
+ version: 2.1
2
+
3
+ orbs:
4
+ aws-ecr: circleci/aws-ecr@8.1.2
5
+
6
+ workflows:
7
+ version: 2.1
8
+ build:
9
+ jobs:
10
+ - build:
11
+ context:
12
+ - AWS Shared
13
+ - NPMJS Secrets
14
+
2
15
  jobs:
3
16
  build:
4
- machine: true
17
+ machine:
18
+ image: ubuntu-2004:current
19
+ resource_class: large
5
20
  steps:
6
21
  - checkout
7
- ## Launch ipdapi stack
8
- - run: docker-compose -f alula-docker-compose.yml up -d
9
- ## Prepare ruby container to execute tests
10
- - run: docker-compose build
11
- - run: docker-compose run --name alula-ruby-build alula-ruby bin/setup
12
- - run: docker commit alula-ruby-build alula-ruby
13
- ## Execute tests
14
- - run: docker-compose run alula-ruby bundle exec rspec
22
+ - aws-ecr/ecr-login
23
+ - run:
24
+ name: Set a local .env file
25
+ command: cp .env.example .env
26
+ - run:
27
+ name: Bring up the Core API
28
+ command: make up
29
+ - run:
30
+ name: Install ruby deps
31
+ command: sudo apt update && sudo apt install ruby-full
32
+ - run:
33
+ name: Install gems
34
+ command: bundle install
35
+ - run:
36
+ name: Execute test suite
37
+ command: bundle exec rspec --format documentation
data/.env.example CHANGED
@@ -1,8 +1,9 @@
1
1
  CLIENT_ID=<oauth_id>
2
2
  CLIENT_SECRET=<oauth_secret>
3
- API_URL=<api_url>
3
+ API_URL=http://127.0.0.1:8080
4
+ TEST_SWARM_URL=http://127.0.0.1:8088
4
5
  DEALER_ACCOUNT_UN=<dealer_account>
5
6
  DEALER_ACCOUNT_PW=<dealer_password>
6
7
  ADMIN_ACCOUNT_UN=<admin_username>
7
8
  ADMIN_ACCOUNT_PW=<admin_password>
8
- TEST_ACCESS_TOKEN=<test_access_token>
9
+ TEST_ACCESS_TOKEN=<test_access_token>
data/.gitignore CHANGED
@@ -21,3 +21,5 @@
21
21
  .idea
22
22
  spec/testDataResult.json
23
23
  /Gemfile.lock
24
+
25
+ /container
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:2.6-alpine
1
+ FROM ruby:3.0.6-alpine
2
2
 
3
3
  RUN gem install bundler
4
4
 
data/Makefile ADDED
@@ -0,0 +1,11 @@
1
+ up:
2
+ docker compose --profile app -f alula-docker-compose.yml up -d
3
+
4
+ down:
5
+ docker compose --profile app -f alula-docker-compose.yml down
6
+
7
+ down-clean:
8
+ docker compose --profile app -f alula-docker-compose.yml down -v
9
+
10
+ status:
11
+ docker compose --profile app -f alula-docker-compose.yml ps
data/README.md CHANGED
@@ -8,10 +8,10 @@ Refer to last two sections if you're making changes in alula-ruby to be used as
8
8
 
9
9
  ## Installation
10
10
 
11
- This gem is private, and can be installed via bundler using a Git fetch strategy:
11
+ This gem is public, and can be installed via bundler from Rubygems.
12
12
 
13
13
  ```ruby
14
- gem 'alula-ruby', git: "git@github.com:alula-net/alula-ruby.git", tag: 'v0.2.0'
14
+ gem 'alula-ruby', '~> 1.1'
15
15
  ```
16
16
 
17
17
  If you use `Sidekiq` and plan on using the Alula-Ruby gem in your Sidekiq workers, you should also bundle the `RequestStore-Sidekiq` extension. This extension is used to store client authorization info in `Thread.current` for multithreading support.
@@ -386,19 +386,17 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
386
386
 
387
387
  Alula Ruby runs its unit & integratin tests against a copy of the API running in Docker. The remote API is cleaned up (DB truncated & re-seeded fresh) between every `describe` or `context` block.
388
388
 
389
- 1. Set up local `ipdapi` cluster/swarm using `docker-compose`:
389
+ 1. Set up local Core API cluster/swarm using `make`:
390
390
 
391
- docker-compose -f alula-docker-compose.yml up -d
391
+ make up
392
392
 
393
393
  or use the `alula-docker-compose` approach:
394
394
 
395
395
  alula-docker-compose -I @test-helper --registry '6z1wlx5zf1.execute-api.us-east-1.amazonaws.com/' -- up -d
396
396
 
397
- 1. Configure your shell with some shortcuts. Note: If you don't have these present in your shell nothing will work.
397
+ Note: You do need to be authorized against our private ECR registry. This is manual, talk with an Alula Lead to get pointed in the right direction. TODO: Write out what we need to do for this.
398
398
 
399
- export API_URL=http://127.0.0.1:8800
400
- export ALULA_SWARM_TEST_HELPER_URL=http://127.0.0.1:8850
401
- export ALULA_SWARM_TEST_HELPER_PORT=8850
399
+ 1. Configure your local .env file, you can copy-paste `.env.example` over to `.env`
402
400
 
403
401
  1. Run the complete test suite:
404
402
 
@@ -414,7 +412,7 @@ Alula Ruby runs its unit & integratin tests against a copy of the API running in
414
412
 
415
413
  1. Update all Docker images to the latest images:
416
414
 
417
- `docker-compose -f alula-docker-compose.yml pull`
415
+ `docker compose -f alula-docker-compose.yml pull`
418
416
 
419
417
  Occasionally under heavy use the dockerized API may lose or drop its databases, resulting in the test suite erroring completly and very quickly. To fix this simply restart the API with `docker-compose -f alula-docker-compose.yml down && docker-compose -f alula-docker-compose.yml up -d`
420
418
 
data/VERSION.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  | Version | Date | Description |
4
4
  | ------- | --------- | --------------------------------------------------------------------------- |
5
+ | v1.1.0 | 2023-08-01 | Fixes Ruby 3 argument errors in filter builder. Gets test suite running again in circle |
6
+ | v1.0.2 | 2023-05-30 | Includes v0.69.11 - fix for a field not being underscoreable |
5
7
  | v1.0.1 | 2023-05-30 | Includes v0.69.10 |
6
8
  | v1.0.0 | 2023-05-30 | Ruby 3 support with some breaking changes |
7
9
  | v0.69.10| 2023-06-14 | Dealer phone relationship |
@@ -1,80 +1,170 @@
1
- version: '3.2'
1
+ networks:
2
+ mesh_net:
2
3
  services:
3
4
  alula-swarm-test-helper:
4
- command: ''
5
- image: 6z1wlx5zf1.execute-api.us-east-1.amazonaws.com/alula/alula-swarm-test-helper
5
+ platform: linux/amd64
6
6
  depends_on:
7
- - mariadb
8
- - mongodb
9
- deploy:
10
- replicas: 1
7
+ ipdapi:
8
+ condition: service_healthy
11
9
  environment:
12
- MARIADB_ADDRESS: mariadb
13
- MONGODB_ADDRESS: mongodb
14
- MARIADB_PASS: ''
15
- MARIADB_USER: root
16
- ports:
17
- - published: 8850
18
- target: 80
19
- restart: always
20
- ipdapi:
21
- depends_on:
22
- - mariadb
23
- - mongodb
24
- - rabbitmq
25
- deploy:
26
- replicas: 1
27
- environment:
28
- HFA_ADDRESS: hfa
29
- IPDAPI_AUTO_CREATE_DATABASES: "true"
30
- IPDAPI_AUTO_SCHEMA_MIGRATIONS: "true"
10
+ IPDAPI_BSD_CLIENT_ID: 78989370-1e24-41ac-b86d-bb07feee01f9
11
+ IPDAPI_BSD_CLIENT_SECRET: bsdpass
31
12
  IPDAPI_DFS_CLIENT_ID: 10211607-dd43-464b-8cfb-0d8b78beee1e
32
13
  IPDAPI_DFS_CLIENT_SECRET: dfspass
33
14
  IPDAPI_HFA_CLIENT_ID: c35a00cb-624d-41cc-9528-aac367ecf690
34
15
  IPDAPI_HFA_CLIENT_SECRET: hfapass
16
+ IPDAPI_MAP_CLIENT_ID: 8b3fe43d-b0a3-45f2-b245-ab1986a597fe
17
+ IPDAPI_MAP_CLIENT_SECRET: mappass
18
+ IPDAPI_MNM_CLIENT_ID: 70ae63a8-8791-4fbc-b7ef-46824d71a4f5
19
+ IPDAPI_MNM_CLIENT_SECRET: mnmpass
35
20
  IPDAPI_MPA_CLIENT_ID: 0a98a1dd-1c42-4891-9bb4-d4d8f705b64e
36
21
  IPDAPI_MPA_CLIENT_SECRET: mpapass
22
+ IPDAPI_SCD_CLIENT_ID: 6a2e2df1-ba64-11ec-9605-b516fa27ea87
23
+ IPDAPI_SCD_CLIENT_SECRET: scdpass
24
+ MARIADB_ADDRESS: mariadb
25
+ MARIADB_PASS: ""
26
+ MARIADB_USER: root
27
+ MONGODB_ADDRESS: mongodb
28
+ MONGODB_PASS: ipdpass
29
+ MONGODB_USER: ipd
30
+ RMQ_EPHEMERAL_ADDRESS: rmq-ephemeral
31
+ RMQ_PERSISTENT_ADDRESS: rmq-persistent
32
+ RP_ADMIN_AUTH_ID: 12
33
+ RP_ADMIN_AUTH_KEY: xxxxx
34
+ RP_AUTH_ID: 1234
35
+ RP_AUTH_KEY: xxxxx
36
+ RP_BASE_URL: https://config.alula.net/api
37
+ RP_PARTNER_ID: 12345
38
+ STACKNAME: test
39
+ healthcheck:
40
+ interval: 15s
41
+ retries: 5
42
+ start_period: 30s
43
+ test: |
44
+ test -f healthy.txt || curl --request POST --url http://localhost/populate/default/clients && touch healthy.txt
45
+ timeout: 15s
46
+ image: 613707345027.dkr.ecr.us-east-1.amazonaws.com/alula/alula-swarm-test-helper:master
47
+ networks:
48
+ mesh_net:
49
+ restart: on-failure
50
+ ports:
51
+ - "8088:80"
52
+ ipdapi:
53
+ platform: linux/amd64
54
+ depends_on:
55
+ mariadb:
56
+ condition: service_healthy
57
+ mongodb:
58
+ condition: service_healthy
59
+ rmq-ephemeral:
60
+ condition: service_healthy
61
+ rmq-persistent:
62
+ condition: service_healthy
63
+ entrypoint: /usr/src/app/startup.sh
64
+ environment:
65
+ IPDAPI_AUTO_CREATE_DATABASES: true
66
+ IPDAPI_FEATURES_CONNECT_PLUS_USERPIN: true
67
+ IPDAPI_RL_AUTH_MAX_HITS: ${IPDAPI_RL_AUTH_MAX_HITS:-1000}
68
+ IPDAPI_RL_DEFAULT_MAX_HITS: ${IPDAPI_RL_DEFAULT_MAX_HITS:-10000}
69
+ IPDAPI_RL_LOGIN_MAX_HITS: ${IPDAPI_RL_LOGIN_MAX_HITS:-1000}
70
+ IPDAPI_TRUST_PROXY: loopback
71
+ IPDAPI_WS_WORK_EVENTS_ENABLED: true
72
+ IPDAPI_WS_WORK_VIGILANCE_BATCH_WINDOW_MSEC: ${IPDAPI_WS_WORK_VIGILANCE_BATCH_WINDOW_MSEC:-5000}
73
+ IPDAPI_WS_WORK_VIGILANCE_CANCEL_BATCH_WINDOW_MSEC: ${IPDAPI_WS_WORK_VIGILANCE_CANCEL_BATCH_WINDOW_MSEC:-10000}
74
+ IPDAPI_WS_WORK_VIGILANCE_CANCEL_TERMINATE_DELAY_MSEC: ${IPDAPI_WS_WORK_VIGILANCE_CANCEL_TERMINATE_DELAY_MSEC:-500}
75
+ IPDAPI_WS_WORK_VIGILANCE_TERMINATE_DELAY_MSEC: ${IPDAPI_WS_WORK_VIGILANCE_TERMINATE_DELAY_MSEC:-500}
37
76
  MARIADB_ADDRESS: mariadb
38
- MARIADB_PASS: ''
77
+ MARIADB_PASS: ""
39
78
  MARIADB_USER: root
79
+ MNC_ENABLE: false
40
80
  MONGODB_ADDRESS: mongodb
41
- MPA_ADDRESS: mpa
42
- RMQ_EPHEMERAL_ADDRESS: rabbitmq
43
- RMQ_PERSISTENT_ADDRESS: rabbitmq
44
- REDIS_ADDRESS: redis
45
- image: 6z1wlx5zf1.execute-api.us-east-1.amazonaws.com/alula/ipdapi:latest-staging
81
+ MONGODB_PASS: ipdpass
82
+ MONGODB_USER: ipd
83
+ RMQ_EPHEMERAL_ADDRESS: amqp://rmq-ephemeral
84
+ RMQ_PERSISTENT_ADDRESS: amqp://rmq-persistent
85
+ healthcheck:
86
+ interval: 15s
87
+ retries: 5
88
+ start_period: 30s
89
+ test: curl -s http://localhost/public/v1/healthcheck/default || exit -1
90
+ timeout: 15s
91
+ image: 6z1wlx5zf1.execute-api.us-east-1.amazonaws.com/alula/ipdapi:latest-master
92
+ networks:
93
+ mesh_net:
94
+ profiles:
95
+ - app
96
+ - deps
97
+ volumes:
98
+ - source: ./bin/ipdapi-startup.sh
99
+ target: /usr/src/app/startup.sh
100
+ type: bind
46
101
  ports:
47
- - published: 8800
48
- target: 80
49
- restart: always
102
+ - "8080:80"
50
103
  mariadb:
51
104
  command:
52
- - --wait_timeout=28800
53
- - --max_connections=2048
54
- deploy:
55
- endpoint_mode: dnsrr
56
- replicas: 1
105
+ - --wait_timeout=28800
106
+ - --max_connections=2048
57
107
  environment:
58
108
  MYSQL_ALLOW_EMPTY_PASSWORD: "true"
59
- MYSQL_DATABASES: eacs_v1,aes_v1,api_oauth,ipdt_gm
60
- image: mariadb:10.1.33
61
- restart: always
109
+ healthcheck:
110
+ interval: 15s
111
+ retries: 5
112
+ test: [CMD, mysqladmin, ping, -h, localhost]
113
+ timeout: 15s
114
+ image: mariadb:10.3
115
+ networks:
116
+ mesh_net:
62
117
  volumes:
63
- - target: /var/lib/mysql/
64
- type: tmpfs
118
+ - mariadb_data:/var/lib/mysql
119
+ - ./utils/mariadb/init:/docker-entrypoint-initdb.d
120
+ - ./utils/mariadb/conf:/etc/mysql/conf.d
65
121
  mongodb:
66
- deploy:
67
- replicas: 1
122
+ command: --replSet api0 --bind_ip_all
123
+ environment:
124
+ MONGO_INITDB_ROOT_PASSWORD: ipdpass
125
+ MONGO_INITDB_ROOT_USERNAME: ipd-root
126
+ healthcheck:
127
+ interval: 2s
128
+ start_period: 30s
129
+ test: |
130
+ test -f healthy.txt || test $$(echo 'rs.initiate({"_id" : "api0", "members" : [{"_id" : 0,"host" : "mongodb:27017"}]}).ok || rs.status().ok' | mongo -u ipd-root -p ipdpass --quiet) -eq 1 && echo > healthy.txt
68
131
  image: mongo:4.4.1-bionic
69
- restart: always
70
- rabbitmq:
71
- deploy:
72
- replicas: 1
73
- image: rabbitmq:3-management-alpine
74
- restart: always
75
- redis:
76
- deploy:
77
- replicas: 1
78
- image: redis:6.0.9-alpine
79
- restart: always
80
-
132
+ networks:
133
+ mesh_net:
134
+ ports:
135
+ - "17017:27017/tcp"
136
+ volumes:
137
+ - ./container/mongodb_data:/data/db/
138
+ - ./utils/mongodb/init/:/docker-entrypoint-initdb.d/
139
+ rmq-ephemeral:
140
+ healthcheck:
141
+ interval: 30s
142
+ retries: 5
143
+ test: rabbitmq-diagnostics -q ping
144
+ timeout: 15s
145
+ image: rabbitmq:management
146
+ networks:
147
+ mesh_net:
148
+ rmq-persistent:
149
+ healthcheck:
150
+ interval: 30s
151
+ retries: 5
152
+ test: rabbitmq-diagnostics -q ping
153
+ timeout: 15s
154
+ image: rabbitmq:management
155
+ networks:
156
+ mesh_net:
157
+ version: "3.9"
158
+ volumes:
159
+ dcp-mongo:
160
+ dcp-node-modules:
161
+ dcp-shell-node-modules:
162
+ dcw-node-modules:
163
+ hfa-sess-cache:
164
+ kafka1:
165
+ kafka2:
166
+ kafka3:
167
+ mariadb_data:
168
+ mongodb_data:
169
+ zoodata:
170
+ zoolog:
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ mkdir -p /var/run/alula
3
+ echo "INIT $(date +%s)" > /var/run/alula/ipdapi-status
4
+ cat scripts/npm | grep -v npm | bash
5
+ node app/migrations.js --create --up
6
+ echo "READY $(date +%s)" >> /var/run/alula/ipdapi-status
7
+ npm start
@@ -0,0 +1 @@
1
+ .keep
@@ -0,0 +1 @@
1
+ .keep
@@ -108,7 +108,7 @@ module Alula
108
108
  update_and_return(new_values)
109
109
  end
110
110
 
111
- def or_like(**args)
111
+ def or_like(args = {})
112
112
  new_values = args.each_pair.each_with_object({}) do |(key, value), collector|
113
113
  field_name = validate_field_filterability! key
114
114
  field_value = simple_value! value
@@ -135,7 +135,7 @@ module Alula
135
135
  #
136
136
  # Generate a $not_between query for hash, the values of the hash must be
137
137
  # an array with 2 elements that are JSON-encodable
138
- def not_between(**args)
138
+ def not_between(args = {})
139
139
  new_values = args.each_pair.each_with_object({}) do |(key, range), collector|
140
140
  field_name = validate_field_filterability! key
141
141
  range_start, range_end = validate_range_value! range, field_name
@@ -148,7 +148,7 @@ module Alula
148
148
  #
149
149
  # Generate an $in query for hash, the values of the hash must be
150
150
  # an array that is JSON-encodable
151
- def in(**args)
151
+ def in(args = {})
152
152
  new_values = args.each_pair.each_with_object({}) do |(key, range), collector|
153
153
  field_name = validate_field_filterability! key
154
154
  values = simple_values! range
@@ -160,7 +160,7 @@ module Alula
160
160
  #
161
161
  # Generate an $in query for hash, the values of the hash must be
162
162
  # an array that is JSON-encodable
163
- def not_in(**args)
163
+ def not_in(args = {})
164
164
  new_values = args.each_pair.each_with_object({}) do |(key, range), collector|
165
165
  field_name = validate_field_filterability! key
166
166
  values = simple_values! range
@@ -50,7 +50,7 @@ module Alula
50
50
  self
51
51
  end
52
52
 
53
- def custom_options(**options)
53
+ def custom_options(options = {})
54
54
  @custom_options = Util.deep_merge(@custom_options, {
55
55
  customOptions: options
56
56
  })
data/lib/alula/util.rb CHANGED
@@ -5,7 +5,8 @@ module Alula
5
5
  # Some fields use odd casing (abbreviations mostly) that require a strict mapping
6
6
  # for camelization to work properly
7
7
  CAMELIZE_MAPPING = {
8
- 'ce_arming_supervision_trouble_zones' => 'CEArmingSupervisionTroubleZones'
8
+ 'ce_arming_supervision_trouble_zones' => 'CEArmingSupervisionTroubleZones',
9
+ 'support_url' => 'supportURL'
9
10
  }.freeze
10
11
 
11
12
  # Based on ActiveSupport's underscore method
data/lib/alula/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alula
4
- VERSION = '1.0.1'
4
+ VERSION = '1.1.0'
5
5
  end
@@ -0,0 +1,2 @@
1
+ [mysqld]
2
+ sql_mode = NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
@@ -0,0 +1,154 @@
1
+ #!/usr/bin/env bash
2
+
3
+ mongo -- "helix" <<EOF
4
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
5
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
6
+ var admin = db.getSiblingDB('admin');
7
+ admin.auth(rootUser, rootPassword);
8
+
9
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
10
+ EOF
11
+ mongo -- "helix_test" <<EOF
12
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
13
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
14
+ var admin = db.getSiblingDB('admin');
15
+ admin.auth(rootUser, rootPassword);
16
+
17
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
18
+ EOF
19
+
20
+ mongo -- "ipdt_gm" <<EOF
21
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
22
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
23
+ var admin = db.getSiblingDB('admin');
24
+ admin.auth(rootUser, rootPassword);
25
+
26
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
27
+ EOF
28
+ mongo -- "ipdt_gm_test" <<EOF
29
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
30
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
31
+ var admin = db.getSiblingDB('admin');
32
+ admin.auth(rootUser, rootPassword);
33
+
34
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
35
+ EOF
36
+
37
+ mongo -- "aes_v1" <<EOF
38
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
39
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
40
+ var admin = db.getSiblingDB('admin');
41
+ admin.auth(rootUser, rootPassword);
42
+
43
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
44
+ EOF
45
+ mongo -- "aes_v1_test" <<EOF
46
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
47
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
48
+ var admin = db.getSiblingDB('admin');
49
+ admin.auth(rootUser, rootPassword);
50
+
51
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
52
+ EOF
53
+
54
+ mongo -- "api_oauth" <<EOF
55
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
56
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
57
+ var admin = db.getSiblingDB('admin');
58
+ admin.auth(rootUser, rootPassword);
59
+
60
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
61
+ EOF
62
+ mongo -- "api_oauth_test" <<EOF
63
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
64
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
65
+ var admin = db.getSiblingDB('admin');
66
+ admin.auth(rootUser, rootPassword);
67
+
68
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
69
+ EOF
70
+
71
+ mongo -- "oauth2" <<EOF
72
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
73
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
74
+ var admin = db.getSiblingDB('admin');
75
+ admin.auth(rootUser, rootPassword);
76
+
77
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
78
+ EOF
79
+ mongo -- "oauth2_test" <<EOF
80
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
81
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
82
+ var admin = db.getSiblingDB('admin');
83
+ admin.auth(rootUser, rootPassword);
84
+
85
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
86
+ EOF
87
+
88
+ mongo -- "ratelimit" <<EOF
89
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
90
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
91
+ var admin = db.getSiblingDB('admin');
92
+ admin.auth(rootUser, rootPassword);
93
+
94
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
95
+ EOF
96
+ mongo -- "ratelimit_test" <<EOF
97
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
98
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
99
+ var admin = db.getSiblingDB('admin');
100
+ admin.auth(rootUser, rootPassword);
101
+
102
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
103
+ EOF
104
+
105
+ mongo -- "ipddfs" <<EOF
106
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
107
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
108
+ var admin = db.getSiblingDB('admin');
109
+ admin.auth(rootUser, rootPassword);
110
+
111
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
112
+ EOF
113
+ mongo -- "ipddfs_test" <<EOF
114
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
115
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
116
+ var admin = db.getSiblingDB('admin');
117
+ admin.auth(rootUser, rootPassword);
118
+
119
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
120
+ EOF
121
+
122
+ mongo -- "ipdbsd" <<EOF
123
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
124
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
125
+ var admin = db.getSiblingDB('admin');
126
+ admin.auth(rootUser, rootPassword);
127
+
128
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
129
+ EOF
130
+ mongo -- "ipdbsd_test" <<EOF
131
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
132
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
133
+ var admin = db.getSiblingDB('admin');
134
+ admin.auth(rootUser, rootPassword);
135
+
136
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
137
+ EOF
138
+
139
+ mongo -- "event" <<EOF
140
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
141
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
142
+ var admin = db.getSiblingDB('admin');
143
+ admin.auth(rootUser, rootPassword);
144
+
145
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
146
+ EOF
147
+ mongo -- "event_test" <<EOF
148
+ var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
149
+ var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
150
+ var admin = db.getSiblingDB('admin');
151
+ admin.auth(rootUser, rootPassword);
152
+
153
+ db.createUser({user: "ipd", pwd: "ipdpass", roles: ["readWrite"]});
154
+ EOF
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alula-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Johnson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-21 00:00:00.000000000 Z
11
+ date: 2023-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -181,6 +181,7 @@ files:
181
181
  - Dockerfile
182
182
  - Gemfile
183
183
  - Guardfile
184
+ - Makefile
184
185
  - README.md
185
186
  - Rakefile
186
187
  - VERSION.md
@@ -189,9 +190,12 @@ files:
189
190
  - bin/console
190
191
  - bin/docparse
191
192
  - bin/genresource
193
+ - bin/ipdapi-startup.sh
192
194
  - bin/setup
193
195
  - bin/testauth
194
196
  - bin/testprep
197
+ - container/alula/test/.keep
198
+ - container/mongodb_data/.keep
195
199
  - data/docs/Alula_API_Documentation_2021-04-06.html
196
200
  - docker-compose.yml
197
201
  - lib/alula.rb
@@ -284,6 +288,8 @@ files:
284
288
  - lib/alula/util.rb
285
289
  - lib/alula/version.rb
286
290
  - lib/parser.rb
291
+ - utils/mariadb/conf/custom.cnf
292
+ - utils/mongodb/init/00_users.sh
287
293
  homepage:
288
294
  licenses: []
289
295
  metadata: {}