Commit Graph

1969 Commits

Author SHA1 Message Date
DanB
14e3c92cc9 Adding hosts sample ansible inventory for deb_packages 2023-08-09 16:03:29 +02:00
ionutboangiu
fad94ebe5c Add variable to cgrates role to decide whether to clone the repo
Sometimes we want to use the already existing repo without overwriting. Defaults to true (will
clone).
2023-08-09 15:30:27 +02:00
ionutboangiu
e887ad7479 Bump go version 2023-08-09 15:30:27 +02:00
ionutboangiu
189e6d5f6c Resolve permission issue in deb_packages playbook 2023-07-21 09:01:46 +02:00
ionutboangiu
2b0be04b5b Bump go version from 1.20.5 to 1.20.6 2023-07-21 09:01:46 +02:00
ionutboangiu
531c9941fa Add task to postgres role to manage service state 2023-07-18 16:37:06 +02:00
ionutboangiu
df3ae97e57 Comment post install postgres scripts in cgrates ansible role 2023-07-12 17:06:16 +02:00
ionutboangiu
7faab6e0ff Implement postgresql ansible role 2023-07-12 17:06:16 +02:00
ionutboangiu
b6df49fbb6 Bump go version in ansible role 2023-07-12 17:06:16 +02:00
ionutboangiu
765695761a Add github action workflow for integration tests 2023-07-12 17:06:16 +02:00
ionutboangiu
43dd9e0bdd Update kafka download link and bump version 2023-07-12 17:06:16 +02:00
ionutboangiu
d8b747b8a2 Make sure kamailio dependencies are installed in role 2023-07-10 13:58:21 +02:00
ionutboangiu
91fa6675e4 Implement nginx role 2023-07-04 13:19:31 +02:00
ionutboangiu
af1262e3c1 Implement gpg role 2023-07-04 13:19:31 +02:00
ionutboangiu
d10524b46c Add the cgr-* binaries to /usr/bin instead of /usr/local/bin 2023-06-27 11:04:44 +02:00
ionutboangiu
b7d172f78a Fix misspellings 2023-06-21 11:02:39 +02:00
ionutboangiu
262c1bd981 Revise logging .conf files 2023-06-16 10:24:13 +02:00
ionutboangiu
c423d1e81f Remove executable bit from doc files and rename them 2023-06-16 10:24:13 +02:00
ionutboangiu
33a90f4bd6 Add shebang for postgres scripts 2023-06-16 10:24:13 +02:00
ionutboangiu
14bcf00011 Remove executable bit from .md files 2023-06-16 10:24:13 +02:00
ionutboangiu
310876837d Update shebangs for consistency 2023-06-13 20:14:58 +02:00
ionutboangiu
3d8ad41d83 Remove executable bit from .csv files 2023-06-13 20:14:58 +02:00
ionutboangiu
53c51bfe5f Remove executable bit from .conf files 2023-06-13 20:14:58 +02:00
ionutboangiu
a8bdbe33a6 Remove executable bit from .json files 2023-06-13 20:14:58 +02:00
ionutboangiu
1df7b52e17 Add cgr-engine binary to /usr/local/bin instead of /usr/bin 2023-06-12 14:18:37 +02:00
ionutboangiu
a554946162 Make rabbitmq role idempotent by replacing shell commands with apt_key 2023-06-07 10:28:32 +02:00
ionutboangiu
6a6fefd0cd Improve cost formatting and parsing for CDRs
The FormatCost function in cdr.go now accepts an additional parameter of type *config.RSRParser. This is
then used to extract the value from its path as opposed to always using the value of the Cost field directly.

Improved the unit test for the FormatCost function. Now it has become a table-driven test and it handles
cases when the cost is retrieved from different fields other than  from the CDR.
2023-05-22 07:53:47 +02:00
ionutboangiu
f45d33a70b Make use of roles in the it_tests ansible playbook 2023-05-18 19:28:16 +02:00
ionutboangiu
f523cb444a Implement install_kafka role 2023-05-18 19:28:16 +02:00
ionutboangiu
995199e634 Revise install_rebbitmq role 2023-05-18 19:28:16 +02:00
ionutboangiu
0657a9525e Make install_mongodb role idempotent 2023-05-18 19:28:16 +02:00
ionutboangiu
73fa59d32b Implement install_rabbitmq role 2023-05-18 19:28:16 +02:00
ionutboangiu
0743363bb2 Implement install_mongodb role 2023-05-18 19:28:16 +02:00
ionutboangiu
6b4dbbbe24 Change extension of .yml files to .yaml for consistency 2023-05-18 19:28:16 +02:00
ionutboangiu
f3807bc656 Remove go.yaml files in favour of install_go role 2023-05-18 19:28:16 +02:00
ionutboangiu
4bc85329c5 Add ansible role for kamailio 2023-05-07 19:25:19 +02:00
ionutboangiu
41cb903515 Use ansible roles for reusable tasks 2023-05-07 19:25:19 +02:00
DanB
0560fa63f8 Updating tutorial2 sample .csvs and few of the docs for installing with OpenSIPS 2023-04-20 20:07:24 +02:00
ionutboangiu
4cd2dc3de8 Revise CDR rerating
The (*CDRServer).processEvent function is now called processEvents and can
be passed an array of CGREvents instead of only one. This was done because
when calling the RateCDRs API we want to first refund all CDRs before
starting to debit again.

The rerate parameter is now no longer hardcoded to true for the RateCDRs API.If
required, the "*rerate" flag must be provided by the caller.

Now, the refundEventCost function returns an additional boolean, that signals
whether the refund occured or didn't.

If the reRate parameter is set to true, also set refund to true.

In case CostDetails is not populated, retrieve it from StorDB if possible
and add it to the CGREvent before converting to CDRs. Set CostDetails back
to nil once the refund goes through.

Remove the refund logic from within the store block.

Now that the refund happens before the debit, revise the expected values for
the "testV1CDRsProcessEventWithRefund" subtest within the
apier/v1/cdrs_it_test.go file.

Add an integration test for the following scenario:
 -create one account with one balance of 1 free minute and rating for the rest.
 -send one CDR of two minutes with ProcessEvent. This should consume 60s out of
the free balance and charge 60s. The SetupTime in the CDR should be 1 hour after
the second CDR.
 -send the second CDR with an usage of 2m. This should be charged entirely.
 -send a RateCDR API call with OrderBy: "SetupTime". This should rerate the two
CDRs from above and change their order of rating.
2023-04-20 20:05:00 +02:00
ionutboangiu
15b404e8cf Revise randomly failing tests 2023-03-28 17:59:32 +02:00
gezimbll
8a18eb87ec Changed path for git repo 2023-03-21 16:22:50 +01:00
gezimbll
3b64bb4fef Updated paths for copr ansible scripts 2023-03-21 16:22:50 +01:00
gezimbll
7dcbd09a1f replacing non-meta constants for storage types 2023-03-08 19:14:24 +01:00
gezimbll
bc486a0373 updated folder name for copr ansible script 2023-03-01 17:09:47 +01:00
gezimbll
877f726a35 ansible scripts for copr server 2023-03-01 17:09:47 +01:00
ionutboangiu
b52d049219 Revise freeswitch ansible script 2023-02-27 09:10:31 +01:00
ionutboangiu
6a7fde0c99 Add integration tests for amqpv1 exporter 2023-02-20 19:45:08 +01:00
ionutboangiu
c9ec5e53c8 Leave exportPath unprocessed for kafka + tests 2023-02-20 19:45:08 +01:00
ionutboangiu
40943dda09 Add test for *amqp_json_cdr exporter 2023-02-20 19:45:08 +01:00
ionutboangiu
6f91f027c8 Leave exportPath unprocessed for s3&sqs + tests 2023-02-17 12:19:22 +01:00