-
Notifications
You must be signed in to change notification settings - Fork 26
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
add nginx-php-fpm-apb as an example #110
base: master
Are you sure you want to change the base?
Conversation
nginx-php-fpm-apb/README.md
Outdated
* N/A | ||
|
||
## Running the application | ||
`docker run -e "OPENSHIFT_TARGET=<openshift_target>" -e "OPENSHIFT_USER=<user>" -e "OPENSHIFT_PASS=<password>" ansibleplaybookbundle/nginx-php-fpm-apb provision` |
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.
Small nit: This actually would not work. The correct command here is:
docker run -e "OPENSHIFT_TARGET=<openshift_target>" -e "OPENSHIFT_TOKEN"=<openshift_token>" ansibleplaybookbundle/nginx-php-fpm-apb provision
I apologize if you got this command from another stale doc in our repo, this recently changed and I have tried to make an effort to update them.
nginx-php-fpm-apb/README.md
Outdated
`docker run -e "OPENSHIFT_TARGET=<openshift_target>" -e "OPENSHIFT_USER=<user>" -e "OPENSHIFT_PASS=<password>" ansibleplaybookbundle/nginx-php-fpm-apb provision` | ||
|
||
## Tearing down the application | ||
`docker run -e "OPENSHIFT_TARGET=<openshift_target>" -e "OPENSHIFT_USER=<user>" -e "OPENSHIFT_PASS=<password>" ansibleplaybookbundle/nginx-php-fpm-apb deprovision` |
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.
Same as above.
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.
Hey @oatakan thank you for submitting this pull request! I just tried deploying it onto my catasb environment and the pods both said ready
but when I tried accessing the route I got a 504. The only warnings/errors I could see was in the php app:
[17-Aug-2017 12:37:29] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[17-Aug-2017 12:37:29] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[17-Aug-2017 12:37:29] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[17-Aug-2017 12:37:29] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[17-Aug-2017 12:37:29] NOTICE: fpm is running, pid 1
[17-Aug-2017 12:37:29] NOTICE: ready to handle connections
I think the problem might be that this container is running in the restricted
scc on Openshift. That means that it runs as a random uid. I have added some documentation here to make it easier to understand how to fix this problem.
Can you explain to me the environment you are testing this in? Perhaps there is something wrong on my part.
Hi @dymurray , thanks for checking this PR so quickly. Good catch on the README.md. It was a copy/paste I will fix that. I run this against my OpenShift 3.6 test environment successfully in restricted mode. Let me try with catasb and see if it works there. Will report back. |
@dymurray I just tested with catasb and I get the same 504 error. However when I push the same playbooks against my OpenShift 3.6 environment (v3.6.173.0.5) everything works as expected. Not sure if something in catasb environment is breaking this or some incompatibility issue. Images that I use work with random UID and when I use regular docker images with root privileges it fails on my environment. Do you have another OpenShift 3.6 environment you are able to test with? |
@oatakan I've tried testing with just oc cluster up but I'm still seeing it. I think it's a problem with the pv permissions. I am still investigating. |
@dymurray thanks for the update. Please let me know if I can do something on my end. I'm not using pv but emptyDir volumes. |
Please review. Thanks.