CESNET / LiST

Security Tools as a Service
4 stars 3 forks source link

Installation to Vagrant image #6

Closed Slabimic closed 6 years ago

Slabimic commented 6 years ago

Issue

When trying to deploy local machine with collector-nemea2 configuration using Centos7 minimal vagrant image as a target, installation failed on 2 Ansible tasks (listed below).

  1. TASK [nemea-dashboard : Clone Nemea-Dashboard] Err: "Peer reports incompatible or unsupported protocol version." Solution: yum update -y nss curl libcurl on target system.

  2. TASK [scgui : Download rrdtool archive] Err: "Failed to validate the SSL certificate for oss.oetiker.ch:443. Make sure your managed systems have a valid CA certificate installed." Solution: yum update -y python on target system

How to reproduce this installation/task failure

Vagrant image and configuration

config.vm.box = "minimal/centos7" config.vm.box_version = "7.0" config.vm.hostname="collector-nemea-local" config.vm.provider :virtualbox do |vb| vb.name = "collector-nemea-local" end config.vm.box_url = "https://app.vagrantup.com/minimal/boxes/centos7"

Whole vagrantfile configuration available here Vagrantfile.zip

Host configuration

Target system Ansible configuration file available here collector-test.zip

Installation execution

ansible-playbook -i collector-test.hosts -u vagrant -k ../STaaS/ansible/site.yml --tags install Run from directory with host configuration.

Solution

To solve this, maybe add some system updates before new packages installation with Ansible script.

thorgrin commented 6 years ago

The problem seems to be in the minimal/centos7 image, which is three years old. Could you possibly use more up-to-date version of the centos7 box, such as the centos/7 used in the original vagrant file? Otherwise, just add a shell provision command with yum update, which will bring the box up to date and everything will be fine again.