mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update the it_tests playbook to use the newly implemented roles
This commit is contained in:
committed by
Dan Christian Bogos
parent
43128dd3fa
commit
4ea8fac9b7
@@ -1,19 +0,0 @@
|
||||
# Ansible for CGRateS integration tests
|
||||
|
||||
Steps for running this ansible:
|
||||
1. Configure a debian based virtual machine so you can connect to it without needing the password
|
||||
2. Edit your ansible host file with the IP and the user of the machine like so:
|
||||
```
|
||||
[all]
|
||||
local ansible_host=192.168.56.203 ansible_ssh_user=trial97
|
||||
|
||||
[all:vars]
|
||||
user=trial97
|
||||
```
|
||||
|
||||
3. Run the ansible:
|
||||
```
|
||||
ansible-playbook main.yaml
|
||||
```
|
||||
|
||||
4. Done!
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
- name: Add an apt key for elastic
|
||||
become: yes
|
||||
apt_key:
|
||||
url: https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
||||
state: present
|
||||
|
||||
- name: Add apt repository for elastic
|
||||
become: yes
|
||||
apt_repository:
|
||||
repo: "deb https://artifacts.elastic.co/packages/7.x/apt stable main"
|
||||
filename: elastic-7.x
|
||||
update_cache: yes
|
||||
|
||||
- name: Install elastic
|
||||
become: yes
|
||||
apt:
|
||||
name: "elasticsearch"
|
||||
state: present
|
||||
|
||||
- name: Enable elasticsearch service and ensure it is not masked
|
||||
become: yes
|
||||
systemd:
|
||||
name: elasticsearch
|
||||
state: started
|
||||
enabled: yes
|
||||
masked: no
|
||||
|
||||
- name: Install the git
|
||||
become: yes
|
||||
apt:
|
||||
name: curl
|
||||
|
||||
|
||||
- name: create index
|
||||
command: 'curl -X PUT "localhost:9200/cdrs?pretty"'
|
||||
ignore_errors: yes
|
||||
@@ -5,13 +5,21 @@
|
||||
import_role:
|
||||
name: ../roles/install_rabbitmq
|
||||
|
||||
- name: Install nats
|
||||
become: yes
|
||||
apt:
|
||||
deb: https://github.com/nats-io/nats-server/releases/download/v2.3.0/nats-server-v2.3.0-amd64.deb
|
||||
- name: Install NATS
|
||||
import_role:
|
||||
name: ../roles/nats
|
||||
|
||||
- name: Install ElasticSearch
|
||||
include: elasic.yaml
|
||||
import_role:
|
||||
name: ../roles/elasticsearch
|
||||
vars:
|
||||
auto_create_index: ".monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*,cdrs"
|
||||
|
||||
# # Trying for now to overwrite the auto_create_index defaults.
|
||||
# # In case of failure, we will be using the commented task below:
|
||||
# - name: Create 'cdrs' index in Elasticsearch for CGRateS integration tests
|
||||
# command: 'curl -X PUT "localhost:9200/cdrs?pretty"'
|
||||
# ignore_errors: yes
|
||||
|
||||
- name: Install Kafka
|
||||
import_role:
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
[Unit]
|
||||
Requires=network.target remote-fs.target
|
||||
After=network.target remote-fs.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ kafka_user }}
|
||||
ExecStart=/home/{{ kafka_user }}/kafka/bin/zookeeper-server-start.sh /home/{{ kafka_user }}/kafka/config/zookeeper.properties
|
||||
ExecStop=/home/{{ kafka_user }}/kafka/bin/zookeeper-server-stop.sh
|
||||
Restart=on-abnormal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user