Skip to content

local.ini sourced from tree on installation#38

Merged
wohali merged 22 commits intoapache:masterfrom
sklassen:snap_instructions
Nov 30, 2018
Merged

local.ini sourced from tree on installation#38
wohali merged 22 commits intoapache:masterfrom
sklassen:snap_instructions

Conversation

@sklassen
Copy link
Copy Markdown
Contributor

@sklassen sklassen commented Nov 7, 2018

Overview

Changed the install hook to source from the tree. Subsequent upgrades will copy from previous revisions

Updated the documentation files

Testing recommendations

Built couchdb snap locally and tested fresh installation

Related Pull Requests

Makes enhancements to previous PR #37

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

@wohali
Copy link
Copy Markdown
Member

wohali commented Nov 7, 2018

@sklassen I'm confused. I thought we agreed that your configure hook would put its 10-<section>.ini files in etc/default.d. This still seems to be putting them in local.d. Which is it?

@sklassen
Copy link
Copy Markdown
Contributor Author

sklassen commented Nov 8, 2018

I thought we agreed that your configure hook would put its 10-<section>.ini files in etc/default.d. This still seems to be putting them in local.d. Which is it?

snapcraft.yaml is writing to /snap/couchdb/current/rel/couchdb/etc/default.d once and only with one file couchdb.ini and only specifying the data and index directory which is specific to a ubuntu snap installation. For this reason /etc/default.d is mounted read-only.

the install and config hooks are user-generated changes and sit in /var/snap/couchdb/current/etc/local.d on the writtable /var mount

/snap/couchdb/current/rel/couchdb/etc/default.ini and /var/snap/couchdb/current/etc/local.ini are both per usually, but the former read-only and the latter writable.

I think this is consistent with the /snap/couchdb/current/rel/couchdb/etc/default.d/README. "snap set" are user changes and should be in local.d.

I'll add a number to default.d/couchdb.ini so that it looks like local.d

Another perspective is that 'snap set' is a configuration tool (just like puppet, chef, ansible, or salt) and so should be in local.d

@sklassen
Copy link
Copy Markdown
Contributor Author

@wohali , If you're uncomfortable with the 'snap set' for couchdb configuration files then I can remove it. (I will leave 'snap set' for vm.args). CouchDB configure can be modified manually or via HTTP configure.

@wohali
Copy link
Copy Markdown
Member

wohali commented Nov 15, 2018

Hi @sklassen , sorry I haven't had time to look at this. I'm moving into 2.3.0 release activities and don't have much time free for other issues. I am going to do my best to get this sorted and merged before then, but I'm still not 100% sure I want to promote a snap as an official thing for 2.3.0 - more likely it'll be a beta channel snap until we're sure we have all the issues ironed out.

The soonest I'll be able to look at this ticket again is Saturday. Sorry about that.

@sklassen
Copy link
Copy Markdown
Contributor Author

sklassen commented Nov 16, 2018 via email

@wohali
Copy link
Copy Markdown
Member

wohali commented Nov 16, 2018

@sklassen Let's do that then - that mirrors the Docker approach more closely.

@sklassen
Copy link
Copy Markdown
Contributor Author

Okay, that's now done. Far simpler configure hook now.

@wohali
Copy link
Copy Markdown
Member

wohali commented Nov 30, 2018

@sklassen FYI see apache/couchdb-docker#117 - we discussed this previously - may be a better way forward for the snap.

I'll merge this now, but you should consider updating this.

We are about to release CouchDB 2.3.0 - once the other builds are done (packages, Docker, Windows, Mac) I will turn my attention back to this issue. If you've got a PR up by then (probably in 10 days or so) to just install from our .deb file, that'd be fantastic - will save a ton of work, keep the snapfile definition fairly static across releases, and would make me much more comfortable moving future snap releases into the stable category on the snap store.

@wohali wohali merged commit 04a7874 into apache:master Nov 30, 2018
@sklassen sklassen deleted the snap_instructions branch December 2, 2018 12:43
@sklassen
Copy link
Copy Markdown
Contributor Author

sklassen commented Dec 3, 2018 via email

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants