carlalexander / debops-wordpress

Your superpowered WordPress server in three commands.
GNU General Public License v3.0
440 stars 65 forks source link

fatal error: ffi.h: No such file or directory #70

Closed ggloveswp closed 8 years ago

ggloveswp commented 8 years ago

Im facing issues during installation and I was wondering if you could take a look at them: http://pastebin.com/dXVBbQt8

ggloveswp commented 8 years ago

Solved this by manually installing libffi-dev package and managed to complete the installation with no issues, except a warning:

warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

any ideas?

carlalexander commented 8 years ago

This was happening on the server or on your computer?

ggloveswp commented 8 years ago

on a newly purchased DO Ubuntu 14.04 TLS VPS (x64)

carlalexander commented 8 years ago

Weird, I'm running the latest debops on a DO droplet right now for tests and I'm not getting this. Do you remember which task caused this error to appear? Are you running Ansible on the DO droplet?

ggloveswp commented 8 years ago

I just created a new droplet and executed these, after apt-get update: apt-get install python-pip python-dev git pip install ansible debops passlib pycrypto debops-update git clone https://github.com/carlalexander/debops-wordpress.git

carlalexander commented 8 years ago

Right, I think I understand what's going on. With Ansible/DebOps, you want to run the debops script from your computer and not the server. You can read more about it in the wiki.

ggloveswp commented 8 years ago

@carlalexander Im interested in using debops mostly for having an automatic install of a perfect hosting combo of WordPress instance on a VPS. Something like LEMP/LAMP automated installation script. Is there any way to do that? Im not interesting in remote functionalities directly from computer.

carlalexander commented 8 years ago

I'm working on a local dev environment with Docker and it runs on the server itself. That said, it's a bit hacky. I'm not sure if it would work in practice. I'm not sure if @drybjed knows a way.

drybjed commented 8 years ago

You can use DebOps "locally" if you want. Let's just define a few terms to properly understand things:

DebOps playbooks and roles are designed by default for this type of environment. But if you want, you can combine the two - this is how I manage my own workstation with DebOps. It requires you to update a few variables.

First, make sure that your Ansible inventory is correct. In ansible/inventory/hosts, add your remote host like this:

[debops_all_hosts]
webserver ansible_connection=local

[debops_service_mariadb_server]
webserver

[debops_service_mariadb]
webserver

Next, in various inventory files, you must point some roles to the correct host. By default MariaDB roles will "shy away" from managing the localhost because in DebOps this means Ansible Controller. But since in this case the remote host and Ansible Controller are one and the same, you need to force them to do it.

# in 'ansible/inventory/host_vars/webserver/mariadb.yml'
mariadb__depegate_to: 'localhost'

# in 'ansible/inventory/host_vars/webserver/mariadb_server.yml'
mariadb_server__delegate_to: 'localhost'

There are some other roles you need to update like this, for example PostgreSQL-related roles.

Another thing is access control to the remote host itself. By default DebOps handles that for you automatically, getting the correct IP address from your SSH session and adding correct firewall/tcpwrappers rules using debops.sshd role. But since you don't connect over SSH anymore, according to Ansible, you need to tell the role a list of subnets or IP addresses to allow SSH connections. Otherwise DebOps will block your access as soon as you run it - you run it locally after all, so SSH access is irrelevant, right? ;-) To do this, add in your inventory:

# in 'ansible/inventory/host_vars/webserver/sshd.yml'
sshd__host_whitelist: [ '192.0.2.0/24', '2001:db8::/32' ]

Of course use your own subnets or IP addresses.

You should make sure that the host has a FQDN set up. To check it, run this command:

hostname --fqdn

You should get a DNS name with preferably two or more dots.

When it's all set up, try running DebOps common playbook against this host:

debops common -l webserver

If it runs without issues, you can run the full DebOps playbook and the rest described in the DebOps for WordPress documentation.

carlalexander commented 8 years ago

Have you been able to get this working @tzitzigr?

ggloveswp commented 8 years ago

@carlalexander thanks for the followup. Unfortunately no. It seems too complex for my needs. I just need an auto LEMP setup script with enchanced functionality. It seems that your project needs also client-work which if client is based on Windows, its really a pain.

carlalexander commented 8 years ago

Yeah, it's harder on Windows :( Will close this.