-
Notifications
You must be signed in to change notification settings - Fork 124
Conversation
This is a direct copy-paste from one section of the guide to another, without any edits. When someone is installing buildkit, these steps are easy to miss if they're located in the civibuild file.
This was in the general "buildkit" page, and I think it fits better in the specific "civibuild" page.
- General formatting improvements. - Change "Ubuntu 12.04 or 14.04" to "Ubuntu 12.04 or later" because the buildkit install script is clearly designed to work for later versions of Ubuntu. - Relocate troubleshoot steps to after configuration steps (so the reader doesn't stop reading when they see "troubleshooting". - Higlight post-installation steps. - New instructions for manually ading webserver settings after running `amp config`. - More troubleshooting help.
BTW, one other thing I got hung up on was thinking that I had some sort of problem with MySQL packages when actually the real culprit was that I never ran
I made this PR which attempts to mitigate this pitfall by removing that warning message. |
docs/tools/buildkit.md
Outdated
|
||
!!! tip "tips" | ||
* Run this as a non-`root` user who has `sudo` permission. This will ensure that new files are owned by a regular user, and (if necessary) it enables `civibuild` to restart Apache or edit `/etc/hosts`. | ||
* Pay close attention to any instructions given in the output of this command. They may involve adding a line to your Apache configuration file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also mention nginx perhaps change to "Pay close attention to any instructions given in the output of this command. They may involving adding a line to your web-server configuration (apache or nginx)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in bb27c6e
docs/tools/buildkit.md
Outdated
|
||
* For nginx: | ||
|
||
Create a new file `/etc/nginx/conf.d/buildkit.conf` with the following contents: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I get this path correct @xurizaemon ? /etc/nginx/conf.d/buildkit.conf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"It depends" ... For Debian, the path above is correct assuming they're using the Debian NginX packages yes. But maybe not all ... eg Debian and CentOS differ on Apache (/etc/apache2
vs /etc/httpd
), for my OSX with homebrew it's /usr/local/etc/nginx/servers/buildkit.conf
, and that's before you get into the madness of things like CPanel and their ilk, or people installing to /usr/local/nginx
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Do you think it's okay to merge this as-is and assume that people will figure it out? Or do you have something better to propose here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, you should only document amp
with apache
. nginx
doesn't read .htaccess
, and amp
doesn't have enough plumbing to handle bespoke nginx
config files. Basically, civibuild
/amp
needs a way to pass through per-application templates for the nginx config.
Without that, it's easier to (a) just tell people to use apache or (b) turn off amp's httpd integration and do that stuff manually.
docs/tools/buildkit.md
Outdated
|
||
!!! failure "Troubleshooting errors from `amp test`" | ||
|
||
* Try manually adding settings to your sebserver, as described below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webserver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tschuettler. Fixed in 3485d72
docs/tools/buildkit.md
Outdated
|
||
#### Manually adding settings to your webserver {:#amp-webserver} | ||
|
||
During one of the steps in the `amp config` process, `amp` will *attempt to* alter the system-wide settings for your local webserver (apache or nginx). On some platforms, `amp` is not able to perform the necessary configuration and you must do it manually by following these steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a misunderstanding -- amp
makes no attempt to modify the system-wide httpd configuration. Rather, it tells the user to do it (and tries to give some pointers in the right direction). Of course, half the users ignore those instructions, so it's a recurring pain-point.
Random:
- Guess: there's confusion because the vagrant and docker builds do that part automatically.
- But as far as
amp config
and manual setup are concerned, these aren't automated. (And it can't be totally automated because there are too many edge-cases around different builds -- one might not appreciate that from a Debian/Ubuntu perspective, but from a MAMP/XAMPP/Bitnami/brew perspective it's more salient.) - It would be patch-welcome for
amp config
to put up a better prompt. - It would be patch-welcome for
amp config
to try to apply the needful interactively. - It would be patch-welcome for
civi-download-tools --full
to try to apply the needful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that it doesn't alter apache or nginx it does modify the hostfile which is http related, I suppose the most sensible thing i can think amp doing would be is to write out the include as a new file in the right directory. But as Chris pointed out finding that correct directory maybe tricky
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Currently the amp config
wizard just displays a handful of possibilities and moves on to the next step -- https://github.com/amp-cli/amp/blob/master/src/Amp/Command/ConfigCommand.php#L139
In an ideal world, that script would stop and ask the user what to do. Depending on what config files/directories are around, it would present a menu like:
[1] Include amp in /etc/apache2/httpd.conf
[2] Include amp in /etc/apache2/conf.d/amp.conf
[3] Include amp in /opt/xampp/etc/httpd.conf
[4] Skip this step. I'll configure it manually.
If they choose 1-3, it would call sudo
and try to update the selected file.
This way, it's harder for a user to ignore the step, but we still rely on their judgment for where/how to make the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made adjustments to this PR which I think addresses feedback from @totten @tschuettler and @seamuslee001. Will merge in 2 days if no further comment. I recognize that the issue of "whether (and if so, how much) to document |
Agree with you Sean, my argument for including nginx is that it seems to me from the line that Tim linked to earlier we are actively potentially supporting nginx for httpd as also evidenced by https://github.com/amp-cli/amp/blob/master/src/Amp/Command/ConfigCommand.php#L329 so to me it feels like we should document how to potentially set that up but noting it is still WIP for nginx but more solid for apache and apache is included in the download tools command |
@seamuslee001 I've been tempted to rip that code out. ;) In my mind, it's harmful/misleading because there is no good way to setup IMHO, it's really a waste of time to document a broken design. If you want to put energy into
|
@totten i would be ok with removing the documentation if we also removed the nginx option (could we comment it out) until we get buildkit ready for nginx (for some reason i thought @xurizaemon had done exactly that), Just figured that if it was a live option in the app we should have documentation for it if its really a half arsed set up we should pull it out of the app until its properly sorted IMHO |
I added a "caution" admonition which recommends that users choose Apache over nginx. I will stick to my deadline of merging this PR tomorrow if there are no further concerns. Then, if we get more support nginx we can remove this word of caution. Or if we drop support for nginx altogether we can update the docs to reflect. |
I installed buildkit on a new machine today and got hung up on some things. I hope these docs improvements will help others avoid the pitfalls I encountered today.
@xurizaemon @seamuslee001 care to take a look at this?