Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghost install doesn't run system checks early enough / ghost doctor is incomplete #312

Closed
ErisDS opened this issue Jul 7, 2017 · 8 comments · Fixed by #318
Closed

ghost install doesn't run system checks early enough / ghost doctor is incomplete #312

ErisDS opened this issue Jul 7, 2017 · 8 comments · Fixed by #318

Comments

@ErisDS
Copy link
Member

ErisDS commented Jul 7, 2017

The move towards extensions has broken from the original intention of the cli single ghost install command & ghost doctor commands. In terms of doing full stack checks up front.

When I run ghost doctor I expect it to perform all system checks, and tell me whether it's safe to run ghost install & perhaps even early indicate I should use ghost install local. It currently only checks the node version and folder permissions.

If ghost doctor says everything is A-OK, that should be a sign that ghost install will complete using the standard recommended flow (e.g. including mysql, nginx, etc).

When I run ghost install, I expect ghost doctor to happen first, running all the checks and giving me the option to proceed if at all possible.

Here's what happens if you try to install Ghost on a mac:

Note: everything starts of green and shiny and then gets yellower and scarier and suddenly we're talking about nginx.

My expectation would be that this message:

System Stack checks failed with message: 'Platform is not Linux'.
Some features of Ghost-CLI may not work without additional configuration.\
? Continue anyways? Yes

Would appear before ghost-cli attempted to do a download and install, and then got stuck into trying to do stuff with MySQL.

The reason is, people don't know how to use ghost-cli yet. It's a brand new tool, I anticipate many people installing it on their mac or windows box to try it out and getting started with ghost install, not realising that ghost install local is for them.

The ideal situation would be that this message would appear before the download, install and prompts, with an additional indicator to use ghost install local:

System Stack checks failed with message: 'Platform is not Linux'.
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
? Continue anyways? Yes

I realise this will take a bit of a rejig, and prob needs to happen post 1.0 now, however I do believe we need to work toward this.

@acburdine
Copy link
Member

FWIW there's no difference in the functionality of ghost install regardless of whether or not you run ghost install local. So, what if we put the setup (e.g. system stack) checks at the beginning of ghost setup instead of ghost install? That way Ghost would still be installed and the user could be prompted to just run ghost setup --local.

@ErisDS
Copy link
Member Author

ErisDS commented Jul 8, 2017

IMO we shouldn't be installing Ghost if it isn't going to work. That's the point of doing the checks first. If you do the checks after, then you end up waiting for ages for a bunch of files you don't want.

@acburdine
Copy link
Member

acburdine commented Jul 8, 2017

Sorry should clarify a bit more.

ghost install -> downloads and installs dependencies for Ghost, then runs ghost setup
ghost install local -> downloads and installs dependencies for Ghost, then runs ghost setup --local. Take the ghost setup part away, and ghost install === ghost install local.

What I was suggesting is to move the doctor checks to the beginning of the ghost setup method. This also makes it so that if you run ghost install --no-setup, you don't get an error about the system stack.

@ErisDS
Copy link
Member Author

ErisDS commented Jul 8, 2017

The point is that nothing should happen until we're sure about the environment. Downloading and installing dependencies takes ages. It's not a good UX to execute that command on a machine and then get errors afterwards.

ghost doctor should happen first, verify the environment, and then the install steps can happen.

@acburdine
Copy link
Member

So if a user specifies --no-setup for ghost install, should we skip system stack checks?

@ErisDS
Copy link
Member Author

ErisDS commented Jul 8, 2017

No we should still do the checks. --no-stack skips the stack checks, I believe?

@acburdine
Copy link
Member

acburdine commented Jul 8, 2017

my only concern is that if a user runs ghost install --no-setup --no-stack, and then tries to run ghost setup later on, it won't run the same checks, and then we run into the same UX issues as are in the original issue description. Probably an edge case though.

@ErisDS
Copy link
Member Author

ErisDS commented Jul 8, 2017

Yes, definitely an edge case. Everyone has to run ghost install of some description, not everyone has to run ghost setup. If someone intentionally skips the stack checks during install we can assume they know what they are doing. If they then get themselves into trouble, that's their own problem.

If it turns out this is common, we can look at it again, but to me the most logical answer is, if a stack-related thing throws an error in ghost setup, it can spit out a message telling people to run ghost doctor.

acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jul 8, 2017
closes TryGhost#312, TryGhost#314
- move setup checks into install checks
- add checks for mysql
- improve doctor messaging
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 a pull request may close this issue.

2 participants