[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: starting first container based on centos7 with httpd installed fails



Thanks alot Ben this clears most of my doubts related to platform.

I have one last question specific to the application i am planning to manage with openshift.
                     
i will have a base centos image with all the rpm dependencies of application installed.
But for configuring the application it needs to get code from github which i believe its possible.
After the code pull it needs to make configuration changes using the code like copying the code to different directories,editing config file with user provided values etc.In our existing environment we use ansible to do this on openstack instance.
In short is it possible to do some level of orchestration with openshift on docker images??

Thanks again for your help 


On Tue, Jul 21, 2015 at 6:58 PM, Ben Parees <bparees redhat com> wrote:


On Tue, Jul 21, 2015 at 2:32 AM, kevin parrikar <kevin parker092 gmail com> wrote:
Thanks Ben i will try with runAsUser.Type strategy to RunAsAny. Since "docker logs containeri-d" returns nothing. 
before i do further experiments with openshift could you clarify some of my doubts regarding openshift v3.

1.Is there an admin UI where admin can add users without using "htpasswd" to update "/etc/openshift/openshift-passwd" file manually.

There's no web ui way, if there's a CLI way, I defer to david eads (on CC)

 
2.If i like to create templates similar to the default available templates like mysql/nodejs/cakephp and make it available to all users can i do that.(similar to distro templates in openstack or similar)

yes, just create your template.json and run "oc create -f mynewtemplate.json -n openshift" to install the template into the openshift namespace which all users have visibility into.  (you will need to perform this operation as cluster admin to be able to write into the openshift namespace)

 
3.In the past i have used openshift online for sometime and there i was able to select Gear with RAM sizing which i dont find it here.(similar to flavors in openstack) 

 
4. I am not able to find SSH key pair creation in this.


there is none, you can enter your running containers using "oc exec", authentication is handled by openshift rather than via ssh key pairs:
https://docs.openshift.org/latest/dev_guide/executing_remote_commands.html

 
Followed https://docs.openshift.org/latest/admin_guide/install/overview.html to setup my test environment on 2 vms running on KVM.

Ideally PaaS should be simpler than IaaS ,above 4 can be done in openstack and i am still new to openshift.I have worked extensively on openstack and have some knowledge in docker.

Thanks,
Kevin

 



On Tue, Jul 21, 2015 at 1:48 AM, Ben Parees <bparees redhat com> wrote:
can you get the logs from the actual container?  (docker logs <containerid>)?

likely you are hitting:
https://docs.openshift.org/latest/admin_guide/manage_scc.html#enable-images-to-run-with-user-in-the-dockerfile

On Mon, Jul 20, 2015 at 4:11 PM, kevin parrikar <kevin parker092 gmail com> wrote:
i have created a container base on  centos 7 with httpd and set to start httpd when containers starts by editing /etc/bashrc with "/usr/sbin/httpd -k start" and committed changes to public repo. 
With  "docker run -tid " i can see httpd process starting when the container starts .But with "oc new-app --docker-image=myrepo/httpd" pod is restarting frequently and fails after many restart

 oc get pods
NAME                  READY     REASON    RESTARTS   AGE
cent7-1-deploy      1/1         Running        0                   6m
cent7-1-f7mg5        0/1        Running        13                6m


failed state:

oc get pods
NAME              READY     REASON         RESTARTS   AGE
cent7-1-deploy    0/1       ExitCode:255   0          13m


oc logs cent7-1-deploy
I0720 19:53:32.866377       1 deployer.go:194] Deploying p1/cent7-1 for the first time (replicas: 1)
I0720 19:53:32.873463       1 recreate.go:112] Scaling p1/cent7-1 to 1 before validating first replica
I0720 19:53:34.932469       1 recreate.go:117] Validating first replica of p1/cent7-1
I0720 19:53:34.940913       1 lifecycle.go:283] Waiting for pod p1/cent7-1-f7mg5 container readiness
F0720 20:03:34.941871       1 deployer.go:63] first replica rejected for cent7-1: timed out waiting for pod p1/cent7-1-f7mg5 containers to become ready

Why is the pod failing to stabilise and how can we see more failure logs.

Thanks for any help.


_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users




--
Ben Parees | OpenShift





--
Ben Parees | OpenShift



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]