diff --git a/data/ansible/integration_tests/README.md b/data/ansible/integration_tests/README.md deleted file mode 100644 index 9cd0ae5a6..000000000 --- a/data/ansible/integration_tests/README.md +++ /dev/null @@ -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! diff --git a/data/ansible/integration_tests/elasic.yaml b/data/ansible/integration_tests/elasic.yaml deleted file mode 100644 index 2c84cb90f..000000000 --- a/data/ansible/integration_tests/elasic.yaml +++ /dev/null @@ -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 diff --git a/data/ansible/integration_tests/main.yaml b/data/ansible/integration_tests/main.yaml index 92fa139b6..b1b82ced1 100644 --- a/data/ansible/integration_tests/main.yaml +++ b/data/ansible/integration_tests/main.yaml @@ -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: diff --git a/data/ansible/integration_tests/zookeeper.service.j2 b/data/ansible/integration_tests/zookeeper.service.j2 deleted file mode 100644 index ba37856c0..000000000 --- a/data/ansible/integration_tests/zookeeper.service.j2 +++ /dev/null @@ -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 \ No newline at end of file