Commit Graph

61 Commits

Author SHA1 Message Date
ionutboangiu
48b13c919b Complete monitoring ansible playbook
- add dashboard provisioning for grafana
- add README file
2024-08-06 08:48:36 +02:00
ionutboangiu
cc25eae687 Add node_exporter ansible role 2024-08-05 13:28:33 +02:00
ionutboangiu
76b7be1adc Add grafana ansible role 2024-08-05 13:28:33 +02:00
ionutboangiu
398aa2a2a6 Add prometheus ansible role 2024-08-05 13:28:33 +02:00
ionutboangiu
da4bf0d783 Sync (and update) go version
go.mod had a later version than the one used inside the
role, which caused the deb packaging to fail.

Updated all of them to latest.
2024-07-05 11:20:09 +02:00
ionutboangiu
4d8a2d7bdd Format kafka ansible role files 2024-06-30 16:28:52 +02:00
ionutboangiu
89f97d45e1 Bump version in nats ansible role + formatting 2024-06-06 13:30:14 +02:00
ionutboangiu
448eea3918 Format some ansible roles 2024-06-06 13:30:14 +02:00
ionutboangiu
8be19292aa Implement sipp ansible role 2024-05-16 14:46:30 +02:00
ionutboangiu
8bf2ae0d38 Implement ansible opensips playbook for call tests 2024-05-16 10:29:05 +02:00
DanB
bc3b665187 Updating go toolchain to 1.22.3 inside ansible role 2024-05-08 11:32:28 +02:00
DanB
31935cc995 Updating go checksum in ansible script 2024-05-08 11:15:13 +02:00
DanB
3ac3fc98a5 Bumping go version in ansible 2024-05-08 10:59:05 +02:00
ionutboangiu
9af344aac7 Revise cgrates ansible role 2024-05-05 14:25:14 +02:00
ionutboangiu
16c61eeb9d Implement opensips ansible role 2024-05-05 14:25:14 +02:00
ionutboangiu
b690f11db7 Implement freediameter ansible role 2024-05-05 14:25:14 +02:00
ionutboangiu
fb19544718 Revise pjsua role
- changed default version to 2.14.1
- ensured that tutorial call scrips still use 2.9
- made role idempotent
- added pjsua_helper_scripts default var that if set to true will deploy
two scripts: pjsua_listen and pjsua_call (defaults to false)
- added option to decide whether we delete the pjsua repo post install
- made binary path configurable (will be used for both pjsua as well as
the helper scripts
- use copy instead of command when copying binary to its final path
- import roles directly instead of through tasks where applicable (call
roles)
2024-05-05 14:25:14 +02:00
ionutboangiu
5391a3f055 Retrieve os distribution from builtin facts in mongo role 2024-04-16 21:10:13 +02:00
arberkatellari
9be32c36da Add CAPs counting to cgr-console status command 2024-03-04 09:50:10 +01:00
ionutboangiu
61bcf48678 Bump go version 2024-02-14 10:15:51 +01:00
ionutboangiu
9f3f4058b2 Bump mongodb version in ansible role 2023-10-26 15:55:54 +02:00
ionutboangiu
6e182f64c1 Update kafka handler to run with sudo 2023-10-19 17:20:00 +02:00
ionutboangiu
5ce0e8dfa5 Update kafka ansible role
- use kraft instead of zookeeper
- add handlers in case of cfg changes
- create a separate user for the kafka service
- bump kafka version
- make the role more configurable
2023-10-17 17:40:43 +02:00
ionutboangiu
36bbcbc2e1 Update rabbitmq role for latest debian/ubuntu compatibility 2023-10-16 18:57:48 +03:00
ionutboangiu
27c6d503a5 Bump go version and update checksum 2023-10-12 11:10:01 +02:00
ionutboangiu
84cdf743bd Bump go version 2023-10-09 21:09:27 +02:00
gezimbll
e18f60cea1 Added nfs server ansible role 2023-09-29 20:28:37 +02:00
gezimbll
0ada2d1d0e Creating roles and playbook for k8s cluster setup 2023-09-29 20:28:37 +02:00
ionutboangiu
b1d68b6cfe Upgrade NATS driver version and implementation
Upgraded NATS server version in ansible role.

upgraded go.mod nats version due to an issue caused by version mismatch
between driver and server (uncertain).

Increased amount of sleep in tests after starting a NATS server with
jetstream enabled from 50ms to 100ms.

## *NatsER.Serve

- Replaced ChanQueueSubscribe with QueueSubscribe for Core NATS consumer
to handle the message processing directly.

- Since QueueSubscribe is now used regardless of jetstream status, the
message handler has been assigned to a separate variable that can be
reused.

-  The message handler is now dealing with the message processing
directly, therefore the select case listening for the channel which is
feeding NATS messages can be removed together with the channel itself
and the select. Currently, the goroutine within Serve only has to block
until the rdrExit chan is closed.

- Moved the resource check inside the handler right before starting the
message processing goroutine.

## ers.getProcessedOptions

- Renamed function from getProcessOptions to getProcessedOptions.

- Initially, the EventExporterOpts struct was always initialized to be
non-nil which meant exporting processed messages by the reader was
always enabled by force. Function has been updated to initialize it
only once when the first Processed option that was set is found.

- Created init function for all types of opts structs to avoid
repetition.

## *NatsEE.parseOpts

- Renamed function from parseOpt to parseOpts.

- Updated function to return early in case of nil opts struct to reduce
nesting.

- The nested jetstream status and maxwait conditions nil verification
have been merged into one condition.

- Handled the error coming from GetNatsOpts function.

- NATS Subject assignment has been removed. It was redundant, since it
had already been set from before this function was called.

## *NatsEE.Connect

- Updated function to return early in case of non-nil nats.Conn value
to reduce nesting.

## *NatsEE.ExportEvent

- Use defer to release resources and RUnlock.

## *NatsEE.Close

- Use defer to Unlock.

- Update function to return early in case of nil nats.Conn value to
reduce nesting.

## ees.GetNatsOpts

- Chose switch over if else when parsing client certificate and keys
opts.

- Updated function to return the errors directly instead of assigning
them to a separate variable right before returning.

## ers.GetNatsOpts

- Passed the NATSROpts struct directly to the function.

- Chose switch over if else when parsing client certificate and keys
opts.

- Updated function to return the errors directly instead of assigning
them to a separate variable right before returning.

Removed tab from commented natsJetStreamMaxWaitProcessed option
value in config_defaults.go under ers section.

Removed redundant NATS prefix from config.NATSROpts type field names.

Added function in ers/lib_test.go to create a config file in /tmp
based on a config string.

Added integration test for ERs NATS.
2023-09-26 21:29:52 +02:00
ionutboangiu
3c7537aa83 Activate privilege escalation for removing go installation
To remove files from /usr/local/go, root privileges are required.
2023-08-29 17:01:31 +02:00
ionutboangiu
353fc05440 Update github workflows
In the integration_tests one, go is now installed using actions, therefore
the ansible go installation will be skipped.
2023-08-28 12:23:28 +02:00
ionutboangiu
2754f1e7d4 Rename ansible roles to be consistent 2023-08-28 12:23:28 +02:00
ionutboangiu
48b375ab99 Revise cgrates ansible role
Removed clone_repository variable from defaults. Now if it's not found
we will assume it's true.

In the cgrates building task we are not forcibly sourcing the /etc/profile
script anymore since it's redundant (we are using bash -lc to execute the
script, where -l will do that automatically).

Make sure we create symbolic links for all binaries we build (not just cgr-engine).
This meant the migrator task environment field could be removed as well.
2023-08-28 12:23:28 +02:00
ionutboangiu
f2a3af6ddf Simplify go ansible role 2023-08-28 12:23:28 +02:00
ionutboangiu
5bea63841b Update it workflow to run tests for PR version of the repo
Before it was running the tests for the latest commit on the main repo instead
of running them for the PR version of it.
2023-08-07 11:38:12 +02:00
ionutboangiu
db5c6cc4b9 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-07 11:38:12 +02:00
ionutboangiu
c65b969e3b Disabled security in elasticsearch default configuration template 2023-08-02 16:48:05 +02:00
ionutboangiu
a9043817b8 Add new task to create symlink to nats-server binary
Based on add_nats_to_path variable (defaults to true).

Modified default service states (service isn't started and enabled by default anymore).
2023-08-02 16:48:05 +02:00
ionutboangiu
c5f97372be Use quotes instead of back ticks in postgresql script
This fixes the SQLSTATE 42601 syntax error.
2023-08-02 16:48:05 +02:00
ionutboangiu
553508d1ff Bump go version from 1.20.5 to 1.20.6 2023-07-21 09:00:46 +02:00
ionutboangiu
afb170734f Implement postgresql ansible role 2023-07-21 09:00:46 +02:00
ionutboangiu
d091ab7d03 Comment systemd masked option for elastic service for now
The ansible role is executing fine the first time executing the tasks, but only the first time.
2023-07-21 09:00:46 +02:00
ionutboangiu
3e06e263ae Update kafka download link and bump version 2023-07-21 09:00:46 +02:00
ionutboangiu
ba27e26161 Make sure kamailio dependencies are installed in role 2023-07-10 13:56:53 +02:00
ionutboangiu
691eef8e43 Update go role to support both apt and dnf 2023-07-05 14:07:22 +02:00
ionutboangiu
b6842a79ad Make small revisions to gpg role 2023-07-05 14:07:22 +02:00
ionutboangiu
915b2fa5d7 Implement gpg role 2023-07-05 14:07:22 +02:00
ionutboangiu
9d964a3e4d Implement nginx role 2023-07-05 14:07:22 +02:00
ionutboangiu
35fee5ccdf Make rabbitmq role idempotent by replacing shell commands with apt_key 2023-06-07 10:31:21 +02:00
ionutboangiu
ef5595ac01 Use keyring with apt_key in elasticsearch role 2023-06-07 10:31:21 +02:00