readerself icon indicating copy to clipboard operation
readerself copied to clipboard

DevOps and Readerself, automating deployment.

Open rvalle opened this issue 7 years ago • 5 comments

I am experimenting to automated the deployment of readerself with puppet.

I can install/configure the LAMP software stack, the readerself distribution and create the configuration files:

database.php
readerself_config.php

From parameters configured in puppet / yaml files

However readerself will not create the database structure on start, but instead fail. It wont enter the setup either on first run.

I am not sure what the criteria is for launching the setup process.

Is there anyway to force-create the database structure?

I also noticed that there are some settings stored in the DB vs configuration files. It would be desirable to have defaults from config files as they are easier to automate.

Same goes for LDAP base roles. would be nice to specify an LDAP group for the administators.

rvalle avatar Jan 17 '17 16:01 rvalle

You can't reach the setup page if the file readerself_config.php is already created, or precisely if the key "salt_password" exists in this file

I suggest you have a look to the Symfony version of this application (but there is no LDAP support). It wiil be easier to make a deployment script https://github.com/readerself/readerself-symfony

stephanediondev avatar Jan 17 '17 16:01 stephanediondev

Yes,

LDAP is a must for us :(

Will keep an eye on it until implemented.



R.

-----Original message----- From: Stéphane Dion [email protected] Sent: Tuesday 17th January 2017 17:19 To: readerself/readerself [email protected] Cc: Rafael del Valle [email protected]; Author [email protected] Subject: Re: [readerself/readerself] DevOps and Readerself, automating deployment. (#86)

You can't reach the setup page if the file readerself_config.php is already created, or precisely if the key "salt_password" exists in this file

I suggest you have a look to the Symfony version of this application (but there is no LDAP support). It wiil be easier to make a deployment script https://github.com/readerself/readerself-symfony

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

rvalle avatar Jan 18 '17 10:01 rvalle

I made a commit on the readerself-symfony version, LDAP is implemented

new parameters

ldap_enabled: false
ldap_server: 'ldap://localhost'
ldap_port: 389
ldap_protocol: 3
ldap_rootdn: 'cn=Manager,dc=my-domain,dc=com'
ldap_rootpw: 'secret'
ldap_basedn: 'dc=my-domain,dc=com'
ldap_search_user: 'mail=[email]'
ldap_search_group_admin: 'cn=admingroup'

stephanediondev avatar Jan 21 '17 07:01 stephanediondev

thanks! I will definitely switch. is the DB compatible?

rvalle avatar Jan 23 '17 15:01 rvalle

No, it's a new fresh database with innodb, utf8mb4, foreign keys ..

I made 2 commands to import all items and starred items It can be heavy if you have a lot of items on your old installation

bin/console readerself:migration:all-items
bin/console readerself:migration:starred-items

In parameters you must set database_*_old to connect to the old version

And the users are not imported yet

stephanediondev avatar Jan 23 '17 16:01 stephanediondev