Skip to content

Nextcloud native on NGINX#2255

Merged
holta merged 13 commits intoiiab:masterfrom
holta:nextcloud-native-on-nginx
Feb 17, 2020
Merged

Nextcloud native on NGINX#2255
holta merged 13 commits intoiiab:masterfrom
holta:nextcloud-native-on-nginx

Conversation

@holta
Copy link
Copy Markdown
Member

@holta holta commented Feb 16, 2020

This PR:

Tested on Debian 10.3 & Ubuntu 19.10

@holta holta added this to the 7.1 milestone Feb 16, 2020
@holta
Copy link
Copy Markdown
Member Author

holta commented Feb 16, 2020

TO DO:

  • Try to move /library/www/html/nextcloud/data to /library/nextcloud/data [or perhaps better yet outside of /library -- since personal/private data very likely doesn't belong in a "public library"]
  • Test with a fresh install on RPi

@holta
Copy link
Copy Markdown
Member Author

holta commented Feb 16, 2020

Indeed testing on Debian & Ubuntu was not quite enough, as suspected.

But hopefully this Raspbian issue can be quickly solved Sunday:

TASK [nextcloud : Install ffmpeg + libxml2 + 21 php packages] ******************
fatal: [127.0.0.1]: FAILED! => {"cache_update_time": 1581806445, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'ffmpeg' 'php-bz2' 'php-ctype' 'php-curl' 'php-dom' 'php-exif' 'php-fileinfo' 'php-gd' 'php-gmp' 'php-iconv' 'php-intl' 'php-json' 'php-mbstring' 'php-mysql' 'php-posix' 'php-simplexml' 'php-smbclient' 'php-xmlreader' 'php-xmlwriter' 'php-zip'' failed: E: Package 'php-ctype' has no installation candidate\nE: Package 'php-dom' has no installation candidate\nE: Package 'php-exif' has no installation candidate\nE: Package 'php-fileinfo' has no installation candidate\nE: Package 'php-iconv' has no installation candidate\nE: Package 'php-posix' has no installation candidate\nE: Package 'php-simplexml' has no installation candidate\nE: Package 'php-xmlreader' has no installation candidate\nE: Package 'php-xmlwriter' has no installation candidate\n", "rc": 100, "stderr": "E: Package 'php-ctype' has no installation candidate\nE: Package 'php-dom' has no installation candidate\nE: Package 'php-exif' has no installation candidate\nE: Package 'php-fileinfo' has no installation candidate\nE: Package 'php-iconv' has no installation candidate\nE: Package 'php-posix' has no installation candidate\nE: Package 'php-simplexml' has no installation candidate\nE: Package 'php-xmlreader' has no installation candidate\nE: Package 'php-xmlwriter' has no installation candidate\n", "stderr_lines": ["E: Package 'php-ctype' has no installation candidate", "E: Package 'php-dom' has no installation candidate", "E: Package 'php-exif' has no installation candidate", "E: Package 'php-fileinfo' has no installation candidate", "E: Package 'php-iconv' has no installation candidate", "E: Package 'php-posix' has no installation candidate", "E: Package 'php-simplexml' has no installation candidate", "E: Package 'php-xmlreader' has no installation candidate", "E: Package 'php-xmlwriter' has no installation candidate"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nPackage php-ctype is a virtual package provided by:\n php7.3-common 7.3.11-1deb10u1\n php7.2-common 7.2.9-1+b2\n php7.1-common 7.1.20-1+b2\n\nPackage php-exif is a virtual package provided by:\n php7.3-common 7.3.11-1deb10u1\n php7.2-common 7.2.9-1+b2\n php7.1-common 7.1.20-1+b2\n\nPackage php-fileinfo is a virtual package provided by:\n php7.3-common 7.3.11-1deb10u1\n php7.2-common 7.2.9-1+b2\n php7.1-common 7.1.20-1+b2\n\nPackage php-iconv is a virtual package provided by:\n php7.3-common 7.3.11-1deb10u1\n php7.2-common 7.2.9-1+b2\n php7.1-common 7.1.20-1+b2\n\nPackage php-posix is a virtual package provided by:\n php7.3-common 7.3.11-1deb10u1\n php7.2-common 7.2.9-1+b2\n php7.1-common 7.1.20-1+b2\n\nPackage php-dom is a virtual package provided by:\n php7.3-xml 7.3.11-1deb10u1\n php7.2-xml 7.2.9-1+b2\n php7.1-xml 7.1.20-1+b2\n\nPackage php-simplexml is a virtual package provided by:\n php7.3-xml 7.3.11-1deb10u1\n php7.2-xml 7.2.9-1+b2\n php7.1-xml 7.1.20-1+b2\n\nPackage php-xmlreader is a virtual package provided by:\n php7.3-xml 7.3.11-1deb10u1\n php7.2-xml 7.2.9-1+b2\n php7.1-xml 7.1.20-1+b2\n\nPackage php-xmlwriter is a virtual package provided by:\n php7.3-xml 7.3.11-1deb10u1\n php7.2-xml 7.2.9-1+b2\n php7.1-xml 7.1.20-1+b2\n\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Package php-ctype is a virtual package provided by:", " php7.3-common 7.3.11-1deb10u1", " php7.2-common 7.2.9-1+b2", " php7.1-common 7.1.20-1+b2", "", "Package php-exif is a virtual package provided by:", " php7.3-common 7.3.11-1deb10u1", " php7.2-common 7.2.9-1+b2", " php7.1-common 7.1.20-1+b2", "", "Package php-fileinfo is a virtual package provided by:", " php7.3-common 7.3.11-1deb10u1", " php7.2-common 7.2.9-1+b2", " php7.1-common 7.1.20-1+b2", "", "Package php-iconv is a virtual package provided by:", " php7.3-common 7.3.11-1deb10u1", " php7.2-common 7.2.9-1+b2", " php7.1-common 7.1.20-1+b2", "", "Package php-posix is a virtual package provided by:", " php7.3-common 7.3.11-1deb10u1", " php7.2-common 7.2.9-1+b2", " php7.1-common 7.1.20-1+b2", "", "Package php-dom is a virtual package provided by:", " php7.3-xml 7.3.11-1deb10u1", " php7.2-xml 7.2.9-1+b2", " php7.1-xml 7.1.20-1+b2", "", "Package php-simplexml is a virtual package provided by:", " php7.3-xml 7.3.11-1deb10u1", " php7.2-xml 7.2.9-1+b2", " php7.1-xml 7.1.20-1+b2", "", "Package php-xmlreader is a virtual package provided by:", " php7.3-xml 7.3.11-1deb10u1", " php7.2-xml 7.2.9-1+b2", " php7.1-xml 7.1.20-1+b2", "", "Package php-xmlwriter is a virtual package provided by:", " php7.3-xml 7.3.11-1deb10u1", " php7.2-xml 7.2.9-1+b2", " php7.1-xml 7.1.20-1+b2", ""]}

@holta
Copy link
Copy Markdown
Member Author

holta commented Feb 17, 2020

@m-anish please take a closer look (this is looking a whole heckuva lot better). I'd like to merge this very soon, and then we can build on Nextcloud-on-NGINX from there.

Do you see any immediate fixes needed herein?

And going forward...which Nextcloud-on-NGINX improvements are most needed & most attainable to make our community materially open to newcomers?

e.g. in addition to some of the things you mentioned at the top of #2119, here's one ugly little bug we should try to nail soon if you (or @pdey!) have ideas?

(Here's the latest nextcloud-nginx.conf in question if you have ideas!)

@holta
Copy link
Copy Markdown
Member Author

holta commented Feb 17, 2020

Smoke-tested & functionality-tested with a fresh install onto Ubuntu 18.04.

In addition to testing on the 3 other OS's mentioned above (Ubuntu 19.10, Debian 10.3, Raspbian Lite).

@holta holta merged commit da87951 into iiab:master Feb 17, 2020
- php-xmlwriter
state: present
when: is_debuntu | bool
when: not is_raspbian
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given you are seeing
php-exif is a virtual package provided by:\n php7.3-common 7.3.11-1deb10u1\n
php-fileinfo is a virtual package provided by:\n php7.3-common 7.3.11deb10u1\n
php-ctype is a virtual package provided by:\n php7.3-common 7.3.11-1deb10u1\n
as those modules are now part of common?? Perhaps that could be
when: not {{ php_version }}| int < 7.3
or php_version is defined in os.yml so you could use the vars that are available there.
Strange raspbian is not seeing the virtual depends correctly, pity.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

php_version is definitely 7.3 on Raspbian Stretch on RPi, as I've reconfirmed in places like:
https://github.com/iiab/iiab/blob/master/vars/raspbian-10.yml#L29

Does it make sense to add in php-common to the list at https://github.com/iiab/iiab/blob/master/roles/nextcloud/tasks/install.yml#L43-L72 to be safe?

Also...is it likely that most all 9 php-* packages at https://github.com/iiab/iiab/blob/master/roles/nextcloud/tasks/install.yml#L74-L88 are gratuitous, having been installed anyway by larger superset php-* packages...such that many or all of these 9 lines can be yanked?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pi@raspberrypi:~ $ sudo apt install php-ctype
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-ctype is a virtual package provided by:
php7.3-common 7.3.11-1~deb10u1
php7.2-common 7.2.9-1+b2
php7.1-common 7.1.20-1+b2
You should explicitly select one to install.

pi@raspberrypi:~ $ sudo apt install php-dom
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-dom is a virtual package provided by:
php7.3-xml 7.3.11-1~deb10u1
php7.2-xml 7.2.9-1+b2
php7.1-xml 7.1.20-1+b2
You should explicitly select one to install.

Think you went the wrong way in trying to unify the package names by dropping the use of php_version in the package name of the apt install request.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well maybe not, php(7.3)-common does get dragged in.

pi@raspberrypi:~ $ sudo apt install php-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
php-common php7.3-common php7.3-mysql
The following NEW packages will be installed:
php-common php-mysql php7.3-common php7.3-mysql
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 635 kB of archives.
After this operation, 6,878 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

I think that list you have is a stale apt listing from an older php version.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi this helpful discussion is moving / has moved to #2258.

@holta
Copy link
Copy Markdown
Member Author

holta commented Mar 9, 2020

PR #2280 implements these 2 for now:

  • www_base
  • www_options

Done. If further renaming is truly necessary, that's OK too!

But for now both names conveniently correspond to their parent roles {3-base-server, 4-server-options} which can't hurt...unless/until they adopt new parents at some future date :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants