ReCodEx / utils

Utilities repository for various ReCodEx stuff which does not really fit anywhere else
MIT License
4 stars 1 forks source link

Failed installation on CentOS 7 in Vagrant #1

Closed vhotspur closed 1 year ago

vhotspur commented 7 years ago

Hello,

I was trying to install ReCodEx to CentOS 7 in Vagrant for testing (everything on one machine). I have used the following setup for Vagrant:

Vagrant.configure(2) do |config|
  config.vm.define "recodex" do |recodex|
    recodex.vm.box = "centos/7"
    recodex.vm.hostname = "recodex"
    recodex.vm.provision "ansible" do |ansible|
        ansible.playbook = "recodex.yml"
        ansible.inventory_path = 'vagrant_hosts'
        ansible.extra_vars = {
          ansible_ssh_user: 'vagrant',
        }
        ansible.verbose = ''
      end
  end
end

with following vagrant_hosts file:

[workers]
recodex ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='.vagrant/machines/recodex/virtualbox/private_key'

[broker]
recodex ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='.vagrant/machines/recodex/virtualbox/private_key'

[monitor]
recodex ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='.vagrant/machines/recodex/virtualbox/private_key'

[database]
recodex ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='.vagrant/machines/recodex/virtualbox/private_key'

[fileserver]
recodex ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='.vagrant/machines/recodex/virtualbox/private_key'

[webapi]
recodex ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='.vagrant/machines/recodex/virtualbox/private_key'

[webapp]
recodex ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='.vagrant/machines/recodex/virtualbox/private_key'

[all:children]
workers
broker
monitor
database
fileserver
webapi
webapp

with slightly modified ansible.cfg:

[defaults]
allow_world_readable_tmpfiles=True
remote_tmp=/tmp/ansible
inventory = ./vagrant_hosts
remote_user = root

I ended up with following problem when installing the broker RPM:

Transaction check error:
  file /lib from install of recodex-broker-1.0.0-1.x86_64 conflicts with file from package filesystem-3.2-21.el7.x86_64

I bypassed that with --replacefiles (and calling rpm directly) and did the same for the worker RPM. But then it fails when installing dependencies via composer:

  Problem 1
    - This package requires php >=7.1 but your PHP version (7.0.24) does not satisfy that requirement.
  Problem 2
    - Installation request for doctrine/annotations v1.5.0 -> satisfiable by doctrine/annotations[v1.5.0].
    - doctrine/annotations v1.5.0 requires php ^7.1 -> your PHP version (7.0.24) does not satisfy that requirement.
  Problem 3
    - Installation request for doctrine/cache v1.7.1 -> satisfiable by doctrine/cache[v1.7.1].
    - doctrine/cache v1.7.1 requires php ~7.1 -> your PHP version (7.0.24) does not satisfy that requirement.
  Problem 4
    - Installation request for doctrine/collections v1.5.0 -> satisfiable by doctrine/collections[v1.5.0].
    - doctrine/collections v1.5.0 requires php ^7.1 -> your PHP version (7.0.24) does not satisfy that requirement.
  Problem 5
    - Installation request for nette/mail 3.0.x-dev -> satisfiable by nette/mail[3.0.x-dev].
    - nette/mail 3.0.x-dev requires php >=7.1 -> your PHP version (7.0.24) does not satisfy that requirement.
  Problem 6
    - Installation request for nette/mail dev-master -> satisfiable by nette/mail[dev-master].
    - nette/mail dev-master requires php >=7.1 -> your PHP version (7.0.24) does not satisfy that requirement.
  Problem 7
    - doctrine/annotations v1.5.0 requires php ^7.1 -> your PHP version (7.0.24) does not satisfy that requirement.
    - kdyby/annotations v2.4.0 requires doctrine/annotations ~1.2 -> satisfiable by doctrine/annotations[v1.5.0].
    - Installation request for kdyby/annotations v2.4.0 -> satisfiable by kdyby/annotations[v2.4.0].

Is this a setup that shall work? I also noticed that I had to re-run the Ansible scripts several times as often some of the mirrors timed-out. Thanks!

SemaiCZE commented 7 years ago

Ansible may be a bit outdated, we don't use it any more. The way to go now is my COPR. The API and web-app are deployed without packages now (don't install recodex-web, it's outdated, but I think I can make a state-of-art version). I hope this will help you. If not, write me a mail and we can manage an appointment :).

Edit: Or Martin Krulis can clone you our development vSphere VM, which is ready to use.

SemaiCZE commented 7 years ago

Was my answer helpful? If you really want to try the Ansible installer, changing the PHP version to 7.1 should be easy (both old and new are from the same third-party repository). The error with RPMs is because packages generated by Cmake are not ideal, so then I switched to custom *.spec files and COPR builds.

vhotspur commented 7 years ago

Petr, your answer was very helpful, I already started the installation via COPR. I hope I will finish it over weekend. Thanks for the help!