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

OpenShift tests for docker compose v3 #642

Merged
merged 1 commit into from
Aug 29, 2017
Merged

Conversation

ashetty1
Copy link
Contributor

@ashetty1 ashetty1 commented Jun 15, 2017

Adding OpenShift tests for docker compose v3 support on Kompose

Ref: #600

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 15, 2017
@cdrage
Copy link
Member

cdrage commented Jun 16, 2017

LGTM. Unfortunately because of my distro I can't test this. Could someone else do a quick test?

@surajnarwade
Copy link
Contributor

I found following results:

Running tests for docker compose v3


Running kompose up ...

INFO We are going to create OpenShift DeploymentConfigs, Services for your Dockerized application. 
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. 
 
INFO Deploying application in "myproject" namespace 
INFO Successfully created Service: redis          
INFO Successfully created Service: web            
INFO Successfully created DeploymentConfig: redis 
INFO Successfully created ImageStream: redis      
INFO Successfully created DeploymentConfig: web   
INFO Successfully created ImageStream: web        

Your application has been deployed to OpenShift. You can run 'oc get dc,svc,is' for details.

Waiting for the pods to come up ...

FAIL: kompose up has failed to bring the pods up
the server doesn't have a resource type "deploy"

Testing  restart: 'always' in v3 docker-compose file


Running kompose up ...

INFO We are going to create OpenShift DeploymentConfigs, Services for your Dockerized application. 
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. 
 
INFO Deploying application in "myproject" namespace 
INFO Successfully created Service: pival          
INFO Successfully created DeploymentConfig: pival 
INFO Successfully created ImageStream: pival      

Your application has been deployed to OpenShift. You can run 'oc get dc,svc,is' for details.
PASS: restart option set to 'always' is working as expected
NAME            READY     STATUS    RESTARTS   AGE
pival-1-ropod   1/1       Running   1          9s

Running kompose down ...

INFO Deleting application in "myproject" namespace 
INFO Successfully deleted Service: pival          
INFO Successfully deleted DeploymentConfig: pival 
INFO Successfully deleted ImageStream: pival      

Waiting for the pods to go down ...

PASS: All pods are down now. kompose down successful.
NAME            READY     STATUS        RESTARTS   AGE
pival-1-ropod   1/1       Terminating   1          13s
the server doesn't have a resource type "deploy"
Makefile:62: recipe for target 'test-openshift' failed
make: *** [test-openshift] Error 1

@ashetty1
Copy link
Contributor Author

@surajnarwade Buildconfig tests are failing due to #521 changes; the tests added here are working.

@cdrage
Copy link
Member

cdrage commented Jun 20, 2017

@ashetty1 what changes? I don't believe we've updated anything related to buildconfig since then.

@surajnarwade can you try again?

@ashetty1
Copy link
Contributor Author

@cdrage the change in examples/buildconfig/docker-compose.yml

@surajnarwade
Copy link
Contributor

@cdrage okay

@ashetty1 ashetty1 force-pushed the v3_tests branch 2 times, most recently from c16e968 to 606d29d Compare June 21, 2017 14:31
@ashetty1
Copy link
Contributor Author

ashetty1 commented Jun 30, 2017

@cdrage Could you take a look at this too. It is WIP because I am planning to add more tests as new features come in. But if you think it could be merged, I am cool with that too.

@surajnarwade
Copy link
Contributor

@ashetty1 , I just tried this PR, I think kompose down is needed, as it says FATA Error while deploying application: services "redis" already exists
and results:

Running tests for environment variable for docker compose v3


Running kompose up ...

INFO We are going to create OpenShift DeploymentConfigs, Services for your Dockerized application. 
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. 
 
INFO Deploying application in "myproject" namespace 
FATA Error while deploying application: services "redis" already exists 
FAIL: kompose up has failed
the server doesn't have a resource type "deploy"

Running tests for docker compose v3


Running kompose up ...

INFO We are going to create OpenShift DeploymentConfigs, Services for your Dockerized application. 
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. 
 
INFO Deploying application in "myproject" namespace 
FATA Error while deploying application: services "redis" already exists 
FAIL: kompose up has failed
the server doesn't have a resource type "deploy"

@ashetty1
Copy link
Contributor Author

@surajnarwade weird. Works for me. Can you just try:

./script/test_in_openshift/run.sh script/test_in_openshift/tests/v3-redis.sh

@surajnarwade
Copy link
Contributor

change route to nip.io as,

FAIL: Route *.xip.io has not been exposed

@cdrage
Copy link
Member

cdrage commented Aug 14, 2017

What's the status of this @ashetty1 ? Perhaps you can rebase against master? 👍

@ashetty1
Copy link
Contributor Author

@cdrage Apologies. Give me a day. Will follow up on this.

@ashetty1 ashetty1 changed the title [WIP] OpenShift tests for docker compose v3 OpenShift tests for docker compose v3 Aug 18, 2017
@ashetty1
Copy link
Contributor Author

@cdrage @surajnarwade kindly give it a spin. Have rebased and squashed the commits.

@cdrage
Copy link
Member

cdrage commented Aug 18, 2017

Works with the exception of Docker Compose v3 environment variables test not coming up:

Running tests for environment variable for docker compose v3


Running kompose up ...

INFO We are going to create OpenShift DeploymentConfigs, Services for your Dockerized application. 
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. 
 
INFO Deploying application in "myproject" namespace 
INFO Successfully created Service: redis          
INFO Successfully created Service: web            
INFO Successfully created DeploymentConfig: redis 
INFO Successfully created ImageStream: redis      
INFO Successfully created DeploymentConfig: web   
INFO Successfully created ImageStream: web        

Your application has been deployed to OpenShift. You can run 'oc get dc,svc,is' for details.
No resources found.

Waiting for the pods to come up ...

No resources found.
No resources found.
No resources found.
No resources found.
No resources found.
No resources found.
No resources found.
No resources found.
No resources found.
No resources found.
No resources found.

@ashetty1
Copy link
Contributor Author

@cdrage can you try once more and push this?

@cdrage
Copy link
Member

cdrage commented Aug 29, 2017

@ashetty1 works now! Mergin'

@cdrage cdrage merged commit ccb2464 into kubernetes:master Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants