TryGhost / docs

Ghost's official documentation
https://docs.ghost.org
MIT License
112 stars 79 forks source link

Add Debian Installation guide to the Ghost docs. #46

Closed trpapp closed 5 years ago

trpapp commented 5 years ago

Created the necessary guide, uploaded the Debian logo (found at https://www.debian.org/logos/) and added the link from the https://docs.ghost.org/setup/ page.

JohnONolan commented 5 years ago

Thanks @trpapp!

The point of the new /setup/ area was to make room for things like this to be contributed by the community, so there's definitely a precedent for adding it. My original thinking was on the line of making our setup guides look/work in a similar fashion to https://about.gitlab.com/install/

@ErisDS how do you feel about this? I don't see any reason why we couldn't allow for a community-driven (and labelled as such) guides to live in one central location. It's not like they don't exist if we don't document them, they just end up as scattered guides around the web.

My main questions are around:

How do we structure these in a way which is change-resistant? It's fine if a guide needs to be updated when there's a new [OS] version, but we really don't want to have to update every single guide if there's a new Ghost version

ErisDS commented 5 years ago

I am very much in favour of having these guides be contributed and contributed-to, agreeing on the caveat that they should be labelled-as-such.

The restriction to one recommended stack exists only because our core team is too small to realistically do a good job of supporting more than one distro. I do not want to stand in the way of any community contributions that expand our ability to support other environments, either in docs or in the cli itself, without significantly increasing our support & maintenance burden.


Regarding change-resistance, I think it would only need updating when we change our recommended Node.js version, rather than for any new Ghost versions, this happens 2x per year. Don't think we need to optimise it just yet, maybe if we get a lot of guides?

From a style perspective, I think this guide needs a tweak such that the stack listing doesn't include the word "recommended" and just say something like "This guide will walk you through installation and configuration of the following software stack".


I have a couple of technical notes/questions specifically on this guide:

  1. I don't know anything about it, but at first glance "Debian Testing" doesn't sound like the right stream for a production-ready guide? I could be totally wrong though.
  2. The guide appears to explicitly say not to use MySQL 8 and then have install instructions for that exact version?
trpapp commented 5 years ago

Hey Ghost team! Thanks for the feedback and discussion on my pull request. I'll address/comment on every concern starting with the technical notes/questions and work my way up.

(2). The guide installs the MySQL 8 Debian REPOSITORY but upon selection of the software stack the MySQL 5.7 option is available (see the note in the guide where it says 'add the newest MySQL version found in the prerequisites section of this guide' - it looks like this when selecting: https://tecadmin.net/wp-content/uploads/2018/03/mysql-select-version-on-debian.png)

(1). The guide is meant for a so-called STAGING/STAGED environment that isn't production quality (but close to it) and definitely isn't local development (because it's designed to imitate production). It's typically NOT recommended to run Debian Testing in production but I (personally) enjoy the rolling release model (instead of point releases) and use Debian Testing to run production WordPress deployments. I'm planning on doing the same with Ghost, so I decided to undertake the task of making this guide (it was my motivation for doing so).

I will change the guide to follow the suggestion of: "This guide will walk you through installation and configuration of the following software stack" - I think this is better wording/terminology to contributed guides.

Change-resistance is a good goal and stabilizes the stack for production level deployments but the guide is geared more towards change-RESILIENT goals. The fact that the rolling stream is suggested means the Debian OS can change constantly (when new packages are continuously updated) while still having a working Ghost installation. My hopes for Ghost, on a rolling deployment, is to just install say - the MariaDB stack without having to worry about what version it requires (this is how WordPress does it - no point release requirements, just newest software available or anything above a point release requirement - see the requirements section of: https://wordpress.org/download/)

As far as community documentation, the gitlab example (https://about.gitlab.com/install/) is a fairly good one - have a 'community contributed' section and put them under there? Up to you guys!

aileen commented 5 years ago

Hey @trpapp

Just to let you know, the build is currently failing with this error:

10:14:41 PM: See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
10:14:41 PM:   55 |     <meta name="generator" content={`Gatsby ${gatsbyVersion}`} />
10:14:41 PM:   56 |   ]
10:14:41 PM: > 57 |   let htmlAttributes = {}
10:14:41 PM:      |       ^
10:14:41 PM:   58 |   let bodyAttributes = {}
10:14:41 PM:   59 |   let preBodyComponents = []
10:14:41 PM:   60 |   let postBodyComponents = []
10:14:41 PM: 
10:14:41 PM:   WebpackError: Module build failed (from ./node_modules/svg-react-loader/lib/lo  ader.js):
trpapp commented 5 years ago

I've seen this on Netlify but I'm not sure why. I'm just trying to contribute the guide. Seems like a CI/CD setup issue?

JohnONolan commented 5 years ago

Only need to cover technical details here. Any style adjustments will be up to Ghost core team to refine language for consistency.

@AileenCGN I don't know what that test is but it seems pretty clear to me from the changeset that it's not related and there's nothing OP can do about it.

@trpapp On to the specifics:

It sounds like this approach, at least from how you describe it here, is somewhat of a hack to use a staging env for production? Unfortunately that's not something we'd be comfortable recommending in an official install guide.

If we're going to publish any Debian guide then it would definitely need to be one which is written from the perspective of how the majority of users would use (or expect to use) the environment in question.

trpapp commented 5 years ago

@JohnONolan - I'm not sure it would be a hack because it still uses the stack that Ubuntu recommends (specific MySQL version / specific Node.js version). Nginx, systemd and the OS kernel (with its tools) are the only 'culprits' of the hack. They get streamed with new updates all the time but shouldn't effect the Ghost installation (they retain any configuration you setup).

I do understand the perspective of publishing a Debian guide that the majority of users would expect to use. Maybe I can write one up for that too! I guess this is more of an unofficial guide of how I'd setup Ghost.

JohnONolan commented 5 years ago

NP - makes sense - so if you do feel like writing a more generic guide then I think that's definitely something we'd accept :) I'll close this PR for now but feel free to open another one any time