cloudsidedev / appside

Multitenant environment automation.
http://cloudside.ch
GNU Affero General Public License v3.0
38 stars 7 forks source link

Installing on Raspberry Pi #58

Closed grappler closed 6 years ago

grappler commented 7 years ago

As a side project it would be fun to try to set up Appflow on a Raspberry Pi.

I am currently using a Raspberry Pi 2 model B.

If you already have a local setup then the following changes need to be made to the host machine e.g. Mac

There were a few things that I had to manually do on the Pi to get it further.

I am unable to ASSH https://github.com/moul/advanced-ssh-config/issues/226 It could be due to the processor being an ARMv7.

ivomarino commented 7 years ago

great work;) we need to look in the details then, anyway great for now. Is the web stack already running?

ivomarino commented 7 years ago

are you installing ansible itself also on the pi? Should not be necessary.

grappler commented 7 years ago

are you installing ansible itself also on the pi?

Yes, because the Debian method does not work.

Is the web stack already running?

Not yet, I am only running appflow provision and I can't get past the assh install as it is failing.

ivomarino commented 7 years ago

you can try to skip_tags=assh.

ivomarino commented 7 years ago

I don't understand exactly what you mean with the Debian method.

grappler commented 7 years ago

I don't understand exactly what you mean with the Debian method.

This code does not work... https://github.com/ttssdev/appflow/blob/master/playbooks/roles/common/tasks/ansible.yml#L15

Also holding pagespeed does not work as pagespeed can't be install on a system with an ARMv7 processor https://github.com/ttssdev/appflow/blob/master/playbooks/vars/os/distribution/Debian.yml#L18

ivomarino commented 7 years ago

for testing purpose we could run https://www.raspberrypi.org/downloads/raspbian/ in a VM eventually (no idea if this works, @89luca89 suggestions?).

grappler commented 7 years ago

HAProxy needed to be installed manually. https://github.com/ttssdev/appflow/blob/master/playbooks/roles/lb/tasks/haproxy.yml#L66 There was also a problem with the group ssl-cert not existing. I was able to fix it by changing it to root

There were a few issues with installing PHP as some of the packages were not found and the path for PHP was not correct.

There were a few more errors after that.

Has the provision method been tested with Debian?

ivomarino commented 7 years ago

With Debian Jessie, yes. Raspbian no. We need a Raspbian vm to test I would say, anyway great work till now, can you paste further errors? Thanks

ivomarino commented 7 years ago

Main question is: websites are in place at least?

grappler commented 7 years ago

atlantis/lb works but the websites do not load because I can't finish the setup due to the issues.

ivomarino commented 7 years ago

Paste errors or we can try to debug then via tmate.

grappler commented 7 years ago

These are the errors that I have gotten in the last steps.

TASK [web : remove htpasswd entry]
failed: [atlantis] (item={'value': {u'bkup': False, u'db_password': u'xyz', u'servername': u'develop.required.ch', u'bkup_mysql_hosts': None, u'htpasswd_password': False, u'db_prefix': u'skbwb_', u'ssl_haproxy': True, u'ssl_pem': u' ... msg": "This module requires the passlib Python library"

TASK [db : apparmor disable mysqld]
fatal: [atlantis]: FAILED! => {"changed": false, "failed": true, "msg": "Error while linking: [Errno 2] No such file or directory", "path": "/etc/apparmor.d/disable/usr.sbin.mysqld", "state": "absent"}

TASK [db : check to determine if galera is aready installed]
fatal: [atlantis]: FAILED! => {"changed": true, "cmd": "dpkg-query -s percona-xtradb-cluster-galera-3.x", "delta": "0:00:00.116612", "end": "2017-02-22 16:46:00.689977", "failed": true, "rc": 1, "start": "2017-02-22 16:46:00.573365", "stderr": "dpkg-query: package 'percona-xtradb-cluster-galera-3.x' is not installed and no information is available\nUse dpkg --info (= dpkg-deb --info) to examine archive files,\nand dpkg --contents (= dpkg-deb --contents) to list their contents.", "stdout": "", "stdout_lines": [], "warnings": []}

TASK [db : percona repo (Debian family)]
fatal: [atlantis]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "\r\nTraceback (most recent call last):\r\n  File \"/home/pi/.ansible/tmp/ansible-tmp-1487778365.3-209983141859749/apt_repository\", line 3322, in <module>\r\n    main()\r\n  File \"/home/pi/.ansible/tmp/ansible-tmp-1487778365.3-209983141859749/apt_repository\", line 471, in main\r\n    cache.update()\r\n  File \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 443, in update\r\n    raise FetchFailedException(e)\r\napt.cache.FetchFailedException: W:Failed to fetch http://repo.percona.com/apt/dists/jessie/InRelease  Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)\r\n, E:Some index files failed to download. They have been ignored, or old ones used instead.\r\n", "msg": "MODULE FAILURE", "parsed": false}
ivomarino commented 7 years ago

Ok, we need tmate these days.

ivomarino commented 6 years ago

@grappler any progress on this?

ivomarino commented 6 years ago

closed for now, will be reopened in case we can put hands on a pi.