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

add nginx-php-fpm-apb as an example #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oatakan
Copy link

@oatakan oatakan commented Aug 17, 2017

Please review. Thanks.

* 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`
Copy link
Contributor

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.

`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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor

@dymurray dymurray left a 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.

@oatakan
Copy link
Author

oatakan commented Aug 17, 2017

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.

@oatakan
Copy link
Author

oatakan commented Aug 17, 2017

@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?

@dymurray
Copy link
Contributor

@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.

@oatakan
Copy link
Author

oatakan commented Aug 19, 2017

@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.

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.

None yet

2 participants