I have a container application running in a virtual machine. It consists of two docker containers. The first contains a WebSphere Liberty server and web application. The second contains PostgreSQL and DB applications.
In my local virtual machine, I just use docker run to start the two containers, and then I use docker attach to attach to the web server container so that I can edit server.xml to specify the IP address of the public host for the database, and then run the web server in the container. The application is working fine.
Now I'm trying to deploy the application to the Google Cloud Platform.
- I set the gcloud configuration (project, calculate / zone).
- I created a cluster.
- I created a JSON pod configuration file that points to both containers.
- I created a pod.
- I opened the firewall for the port specified in the pod configuration file.
In this moment:
- I look at the container ( gcloud preview container kubectl get pods ), it shows how both containers work.
- I am SSH for the cluster ( gcloud compute ssh xxx-mycluster-node -1 ) and it displays sudo docker ps and it shows how the database container works, but not the web server container. With sudo docker ps -l I see a web server container that doesn't work, but it keeps trying to start and exit every 10 seconds or so.
So, now I need to update server.xml and start the Liberty server, but I do not know how to do this in this area. Can I connect to a web server container like in a local virtual machine? Any help would be greatly appreciated. Thanks.
google-container-engine kubernetes google-cloud-platform
Alex feinberg
source share