markt-de / puppet-nextcloud Goto Github PK
View Code? Open in Web Editor NEWA Puppet module to install and manage Nextcloud
A Puppet module to install and manage Nextcloud
Currently nextcloud::config
only supports system configs. Would be great if you could also add config settings into apps using php occ config:app:set
.
Hey there.
I've been managing a bigger nextcloud instance and stumbled upon a problem while migrating data from the native data folder to a symlink of another folder.
In our exact scenario, we want to use another path (for example /mnt/nextcloud) and make a symlink from /opt/nextcloud-data to /mnt/nextcloud.
The problem in this being, that the puppet module doesn't allow me to define another folder or symlink, since that directory is already a defined object:
puppet-nextcloud/manifests/install.pp
Lines 7 to 12 in d5be5c7
It would be great to have a toggle, that allows me to "skip" the automatic creation of the data folder in order to define my own puppet file element with a toggle like manage_datadir => false
.
Hey there,
I've been trying out what happens to this module on a partial or total storage loss.
In my testing, the data dir /opt/nextcloud-data
is located on a different, network attached storage.
When simulating an outage on said external storage server by turning it off, the fstab mount of course get's wanky.
What's interesting in that is what happens when the puppet client tries to make a run during said outage:
Puppet gets stuck on fact checking and (since the datadir with the current puppet-nextcloud status information is missing) assumes that nextcloud is not installed - and then triggers a complete reinstall.
It would be great to implement a stop command which completely skips the complete install/update and housekeeping process if the state files are missing - something like: skip_on_stateless => true,
so that the installation doesn't nuke itself, should storage become available again.
Edit: I know install_enabled
can be set to false
, but this doesn't completely disables the module module in an error state - also it stops you from using the upgrade functionality, when there is no stateloss.
Nextcloud 21 comes with a new "Files High Performance Back-end", packaged in the form of a new notify_push app.
Roughly, the setup works as follows:
/push/
to the new service (the /push/ prefix must be stripped), including /push/ws/
for websocketsocc notify_push:setup
to verify the connection and enable usage of the new backendAt least the first two steps could be done by this module, behind a new $manage_notify_push
flag.
The app comes with a setup-wizard that supports setting this up for systemd+apache/nginx based setups, but I don't think this is a feasible approach for integration into the module. Here is the code that generates the systemd service file. This should probably be done with camptocamp/systemd?
Attached is the rc.d/nextcloud_notify_push I've whipped up for FreeBSD (at least the run user would have to be set by the template)
The $config
system supports setting Arrays and Structs (php associative arrays), but for some config keys, an Array of Structs is required.
The most prominent example is perhaps apps_paths
:
'apps_paths' => [
[
'path'=> '/var/www/nextcloud/apps',
'url' => '/apps',
'writable' => true,
],
],
I expected to be able to use this from hiera yaml as:
nextcloud::config:
app_paths:
- path: /opt/nextcloud/apps
url: /apps
writable: false
- path: /opt/nextcloud-user-apps/
url: /user-apps/
writable: true
This fails with:
parameter 'value' expects a value of type Boolean, Integer, or String, got Struct
parameter 'verify_value' expects a value of type Boolean, Integer, or String, got Struct
Currently, this can be worked around by putting the array indices into the key names:
nextcloud::config:
app_paths 0:
path: /opt/nextcloud/apps
url: /apps
writable: false
app_paths 1:
path: /opt/nextcloud-user-apps/
url: /user-apps/
writable: true
Perhaps the code from nextcloud::config
can be extracted into a recursive function to properly support this?
The passwords here https://github.com/markt-de/puppet-nextcloud/blob/main/manifests/install.pp#L46-L48 aren't escaped properly , so if your password has special shell characters it will try to expand them and the password you think you set probably won't work.
Hello,
it looks like nextcloud::install_enabled is ignored.
I have the following setup in hiera:
---
profile_base::puppetagent::version: 'latest'
nextcloud::install_enabled: false
nextcloud::update_enabled: false
nextcloud::installroot: '/var/www/html/'
However the puppetrun still complains about an error in part of puppet code that should be ignored.
Log from puppet run:
# puppet agent -t
Info: Using environment 'sandbox'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Failed to apply catalog: Could not find dependency File[/var/www/html//nextcloud-26.0.2] for Archive[Extract archive: update to 26.0.2] (file: /etc/puppetlabs/code/environments/sandbox/modules/upstream/nextcloud/manifests/install/distribution.pp, line: 64)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.