Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

setup.sh for template testing must be adapted #24

Open
rhuss opened this issue Oct 1, 2017 · 2 comments
Open

setup.sh for template testing must be adapted #24

rhuss opened this issue Oct 1, 2017 · 2 comments

Comments

@rhuss
Copy link
Contributor

rhuss commented Oct 1, 2017

Since we switched to image streams for init-containers the script is broken as the init-container's image stream is not available in the CI namespace (they are not build). I.e the missing image stream ot the pemtokeystore image prevents all java based dcs to startup.

Jenkins log:

[INFO] 01 10 2017 - 08:55: Executing environment setup script from:https://raw.githubusercontent.com/syndesisio/syndesis-system-tests/master/src/test/resources/setup.sh
[INFO] 01 10 2017 - 08:55: Installing Syndesis in template-testing-cswkw from: /var/lib/jenkins/workspace/syndesis-templates_PR-102-EH3B2X67PHKOPIHGFKQS36JJDF3AKAJAMKR6ZUDRJIJDAG3B564Q/syndesis-ci.yml
[INFO] 01 10 2017 - 08:55: Now using project "template-testing-cswkw" on server "https://172.30.0.1:443".
[INFO] 01 10 2017 - 08:55: template "syndesis-ci" created
[INFO] 01 10 2017 - 08:56: --> Deploying template "template-testing-cswkw/syndesis-ci" to project template-testing-cswkw
[INFO] 01 10 2017 - 08:56: 
[INFO] 01 10 2017 - 08:56:      syndesis-ci
[INFO] 01 10 2017 - 08:56:      ---------
[INFO] 01 10 2017 - 08:56:      Syndesis is deployed to template-testing-cswkw.b6ff.rh-idev.openshiftapps.com.
[INFO] 01 10 2017 - 08:56:      
[INFO] 01 10 2017 - 08:56:        FYI Keycloak Admin username is 'admin', password 'dBp7lTQtxl6QPDpW2npELpvaykDaSbJtaEosfRCB'.
[INFO] 01 10 2017 - 08:56: 
[INFO] 01 10 2017 - 08:56:      * With parameters:
[INFO] 01 10 2017 - 08:56:         * ROUTE_HOSTNAME=template-testing-cswkw.b6ff.rh-idev.openshiftapps.com
[INFO] 01 10 2017 - 08:56:         * GITHUB_OAUTH_CLIENT_ID=1f9aed02034b230e4ae5
[INFO] 01 10 2017 - 08:56:         * GITHUB_OAUTH_CLIENT_SECRET=422224ef51b3b2d93eee9580c8f04db94a2d4e2a
[INFO] 01 10 2017 - 08:56:         * KEYCLOAK_ADMIN_USERNAME=admin
[INFO] 01 10 2017 - 08:56:         * KEYCLOAK_ADMIN_PASSWORD=dBp7lTQtxl6QPDpW2npELpvaykDaSbJtaEosfRCB # generated
[INFO] 01 10 2017 - 08:56:         * KEYCLOAK_SYNDESIS_REALM_NAME=syndesis
[INFO] 01 10 2017 - 08:56:         * KEYCLOAK_SYNDESIS_REST_CLIENT_SECRET=bc4LgxkasyempwgwcKApr2Lninx4t3UPQrFeE7EK88g6UhTEJ458bHJ3HbfgRpC1 # generated
[INFO] 01 10 2017 - 08:56:         * KEYCLOAK_ALLOW_ANY_HOSTNAME=false
[INFO] 01 10 2017 - 08:56:         * OPENSHIFT_MASTER=https://api.rh-idev.openshift.com:443
[INFO] 01 10 2017 - 08:56:         * OPENSHIFT_OAUTH_CLIENT_ID=template-testing-cswkw
[INFO] 01 10 2017 - 08:56:         * OPENSHIFT_OAUTH_CLIENT_SECRET=u1jveltLRAcUUeBDqO3XbXIooFvLf67Hc5WKBJXLckLdaAXCICQH3SId6MeQtHwT # generated
[INFO] 01 10 2017 - 08:56:         * OPENSHIFT_OAUTH_DEFAULT_SCOPES=user:full
[INFO] 01 10 2017 - 08:56:         * GITHUB_OAUTH_DEFAULT_SCOPES=user:email public_repo
[INFO] 01 10 2017 - 08:56:         * Memory Limit=255Mi
[INFO] 01 10 2017 - 08:56:         * Namespace=openshift
[INFO] 01 10 2017 - 08:56:         * PostgreSQL Connection Username=syndesis
[INFO] 01 10 2017 - 08:56:         * PostgreSQL Connection Password=OU46SecqwP5rFXwA # generated
[INFO] 01 10 2017 - 08:56:         * PostgreSQL Database Name=syndesis
[INFO] 01 10 2017 - 08:56:         * Volume Capacity=1Gi
[INFO] 01 10 2017 - 08:56:         * PostgreSQL SampleDB Connection Password=rFGWioOG13ItLadT # generated
[INFO] 01 10 2017 - 08:56:         * Test Support Enabled=false
[INFO] 01 10 2017 - 08:56:         * Demo Data Enabled=true
[INFO] 01 10 2017 - 08:56:         * Insecure skip verify=false
[INFO] 01 10 2017 - 08:56:         * Syndesis Image Registry=docker.io
[INFO] 01 10 2017 - 08:56:         * Enable Integration Deployment=true
[INFO] 01 10 2017 - 08:56:         * Acess Token Lifespan=300
[INFO] 01 10 2017 - 08:56:         * Idle Session Lifespan=36000
[INFO] 01 10 2017 - 08:56:         * Image Stream Namespace=
[INFO] 01 10 2017 - 08:56: 
[INFO] 01 10 2017 - 08:56: --> Creating resources ...
[INFO] 01 10 2017 - 08:56:     imagestream "syndesis-rest" created
[INFO] 01 10 2017 - 08:56:     imagestream "keycloak-openshift" created
[INFO] 01 10 2017 - 08:56:     imagestream "syndesis-ui" created
[INFO] 01 10 2017 - 08:56:     imagestream "atlasmap" created
[INFO] 01 10 2017 - 08:56:     imagestream "syndesis-verifier" created
[INFO] 01 10 2017 - 08:56:     imagestream "pemtokeystore" created
[INFO] 01 10 2017 - 08:56:     service "syndesis-ui" created
[INFO] 01 10 2017 - 08:56:     route "syndesis-ui" created
[INFO] 01 10 2017 - 08:56:     deploymentconfig "syndesis-ui" created
[INFO] 01 10 2017 - 08:56:     configmap "syndesis-ui-config" created
[INFO] 01 10 2017 - 08:56:     serviceaccount "syndesis-atlasmap" created
[INFO] 01 10 2017 - 08:56:     service "syndesis-atlasmap" created
[INFO] 01 10 2017 - 08:56:     route "syndesis-atlasmap" created
[INFO] 01 10 2017 - 08:56:     deploymentconfig "syndesis-atlasmap" created
[INFO] 01 10 2017 - 08:56:     configmap "syndesis-atlasmap-config" created
[INFO] 01 10 2017 - 08:56:     configmap "syndesis-sampledb-config" created
[INFO] 01 10 2017 - 08:56:     service "syndesis-db" created
[INFO] 01 10 2017 - 08:56:     persistentvolumeclaim "syndesis-db" created
[INFO] 01 10 2017 - 08:56:     deploymentconfig "syndesis-db" created
[INFO] 01 10 2017 - 08:56:     secret "syndesis-keycloak-admin" created
[INFO] 01 10 2017 - 08:56:     service "syndesis-keycloak" created
[INFO] 01 10 2017 - 08:56:     route "syndesis-keycloak-realm-syndesis" created
[INFO] 01 10 2017 - 08:56:     route "syndesis-keycloak-resources" created
[INFO] 01 10 2017 - 08:56:     deploymentconfig "syndesis-keycloak" created
[INFO] 01 10 2017 - 08:56:     configmap "syndesis-keycloak-config" created
[INFO] 01 10 2017 - 08:56:     serviceaccount "syndesis-rest" created
[INFO] 01 10 2017 - 08:56:     serviceaccount "syndesis-integration" created
[INFO] 01 10 2017 - 08:56:     service "syndesis-rest" created
[INFO] 01 10 2017 - 08:56:     route "syndesis-rest" created
[INFO] 01 10 2017 - 08:56:     route "syndesis-rest-mapper" created
[INFO] 01 10 2017 - 08:56:     deploymentconfig "syndesis-rest" created
[INFO] 01 10 2017 - 08:56:     configmap "syndesis-rest-config" created
[INFO] 01 10 2017 - 08:56:     service "syndesis-verifier" created
[INFO] 01 10 2017 - 08:56:     deploymentconfig "syndesis-verifier" created
[INFO] 01 10 2017 - 08:56:     configmap "syndesis-verifier-config" created
[INFO] 01 10 2017 - 08:56:     oauthclient "template-testing-cswkw" created
[INFO] 01 10 2017 - 08:56:     rolebinding "syndesis:viewers" created
[INFO] 01 10 2017 - 08:56: --> Success
[INFO] 01 10 2017 - 08:56:     Run 'oc status' to view your app.
[INFO] 01 10 2017 - 08:56: ImageStreams from CI namespace will be used
[INFO] 01 10 2017 - 08:56: imagestream "jenkins-2-centos7" created
[INFO] 01 10 2017 - 08:56: imagestream "nexus" created
[INFO] 01 10 2017 - 08:56: imagestream "syndesis-datamapper" created
[INFO] 01 10 2017 - 08:56: imagestream "syndesis-jenkins" created
[INFO] 01 10 2017 - 08:56: imagestream "syndesis-keycloak" created
[ERROR] 01 10 2017 - 08:56: Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
[INFO] 01 10 2017 - 08:56: imagestream "syndesis-rest" configured
[INFO] 01 10 2017 - 08:56: imagestream "syndesis-token-rp" created
[ERROR] 01 10 2017 - 08:56: Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
[INFO] 01 10 2017 - 08:56: imagestream "syndesis-ui" configured
[ERROR] 01 10 2017 - 08:56: Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
[INFO] 01 10 2017 - 08:56: imagestream "syndesis-verifier" configured
[WARNING] 01 10 2017 - 08:56: Did not find any kubernetes configuration.
[WARNING] 01 10 2017 - 09:00: There are resources in not ready state:
[ERROR] 01 10 2017 - 09:00: Endpoints name: syndesis-keycloak namespace:template-testing-cswkw
[ERROR] 01 10 2017 - 09:00: Endpoints name: syndesis-rest namespace:template-testing-cswkw
[ERROR] 01 10 2017 - 09:00: Endpoints name: syndesis-verifier namespace:template-testing-cswkw
[WARNING] 01 10 2017 - 09:00: Could not annotate namespace: [template-testing-cswkw] with status: [ERROR].
[INFO] 01 10 2017 - 09:00: Executing environment teardown script from:https://raw.githubusercontent.com/syndesisio/syndesis-system-tests/master/src/test/resources/teardown.sh
[INFO] 01 10 2017 - 09:00: Remove Syndesis from template-testing-cswkw
[INFO] 01 10 2017 - 09:01: Already on project "template-testing-cswkw" on server "https://172.30.0.1:443".
[INFO] 01 10 2017 - 09:01: Displaying the list of Pods in project: template-testing-cswkw
[INFO] 01 10 2017 - 09:01: NAME                  READY     STATUS    RESTARTS   AGE
[INFO] 01 10 2017 - 09:01: syndesis-db-1-4rbjc   1/1       Running   0          4m
[INFO] 01 10 2017 - 09:01: syndesis-ui-1-7qr9j   1/1       Running   0          4m
[INFO] 01 10 2017 - 09:01: Removing Syndesis from template-testing-cswkw
[INFO] 01 10 2017 - 09:01: imagestream "syndesis-rest" deleted
[INFO] 01 10 2017 - 09:01: imagestream "keycloak-openshift" deleted
[INFO] 01 10 2017 - 09:01: imagestream "syndesis-ui" deleted
[INFO] 01 10 2017 - 09:01: imagestream "atlasmap" deleted
[INFO] 01 10 2017 - 09:01: imagestream "syndesis-verifier" deleted
[INFO] 01 10 2017 - 09:01: imagestream "pemtokeystore" deleted
[INFO] 01 10 2017 - 09:01: service "syndesis-ui" deleted
[INFO] 01 10 2017 - 09:01: route "syndesis-ui" deleted
[INFO] 01 10 2017 - 09:01: deploymentconfig "syndesis-ui" deleted
[INFO] 01 10 2017 - 09:01: configmap "syndesis-ui-config" deleted
[INFO] 01 10 2017 - 09:01: serviceaccount "syndesis-atlasmap" deleted
[INFO] 01 10 2017 - 09:01: service "syndesis-atlasmap" deleted
[INFO] 01 10 2017 - 09:01: route "syndesis-atlasmap" deleted
[INFO] 01 10 2017 - 09:01: deploymentconfig "syndesis-atlasmap" deleted
[INFO] 01 10 2017 - 09:01: configmap "syndesis-atlasmap-config" deleted
[INFO] 01 10 2017 - 09:01: configmap "syndesis-sampledb-config" deleted
[INFO] 01 10 2017 - 09:01: service "syndesis-db" deleted
[INFO] 01 10 2017 - 09:01: persistentvolumeclaim "syndesis-db" deleted
[INFO] 01 10 2017 - 09:01: deploymentconfig "syndesis-db" deleted
[INFO] 01 10 2017 - 09:01: secret "syndesis-keycloak-admin" deleted
[INFO] 01 10 2017 - 09:01: service "syndesis-keycloak" deleted
[INFO] 01 10 2017 - 09:01: route "syndesis-keycloak-realm-syndesis" deleted
[INFO] 01 10 2017 - 09:01: route "syndesis-keycloak-resources" deleted
[INFO] 01 10 2017 - 09:01: deploymentconfig "syndesis-keycloak" deleted
[INFO] 01 10 2017 - 09:01: configmap "syndesis-keycloak-config" deleted
[INFO] 01 10 2017 - 09:01: serviceaccount "syndesis-rest" deleted
[INFO] 01 10 2017 - 09:01: serviceaccount "syndesis-integration" deleted
[INFO] 01 10 2017 - 09:01: service "syndesis-rest" deleted
[INFO] 01 10 2017 - 09:01: route "syndesis-rest" deleted
[INFO] 01 10 2017 - 09:01: route "syndesis-rest-mapper" deleted
[INFO] 01 10 2017 - 09:01: deploymentconfig "syndesis-rest" deleted
[INFO] 01 10 2017 - 09:01: configmap "syndesis-rest-config" deleted
[INFO] 01 10 2017 - 09:01: service "syndesis-verifier" deleted
[INFO] 01 10 2017 - 09:01: deploymentconfig "syndesis-verifier" deleted
[INFO] 01 10 2017 - 09:01: configmap "syndesis-verifier-config" deleted
[INFO] 01 10 2017 - 09:01: oauthclient "template-testing-cswkw" deleted
[INFO] 01 10 2017 - 09:01: rolebinding "syndesis:viewers" deleted
java.lang.IllegalStateException: Environment not initialized in time.
1.0.1 
· Core 2.46.3 
· 9b77619 
· (no branch) 
· 11th April 2017 11:17 PM

It would be awesome if the scripts could print out the logs of the deployer pods and/or pods, too, in case of an error.

This is where it should be ensured that the pemtokeystore imagestream gets imported.

@iocanel
Copy link
Contributor

iocanel commented Oct 2, 2017

Yeah, it would be awesome if we had build logs too (pod logs and events are already displayed), so I created: arquillian/arquillian-cube#813.

Now, regarding the copying of the images. We need two things:

  1. To have a namespace that will be used as a source.
  2. To do the actual copy from the source.

Currently we are implicitly copying everything that lives in the syndesis-ci namespace to the test project. Maybe we should continue to do so and just created additional builds for those images? Or maybe we should update pipelines so that we also build those images each time (the later might be an overkill).

@rhuss
Copy link
Contributor Author

rhuss commented Oct 2, 2017

I think the missing images are quite static, there's no need to build them again. Actually, these are:

  • syndesis/pemtokeystore
  • syndesis/keycloak-openshift
  • postgresql

The imagesstreams for those (syndesis-pemtokeystore, syndesis-keycloak and postgresql (but postgres is already present I guess, from OpenShift directly) need to be created explicitely (once).

However, as we currently can't use imagestreams in init-containers on 3.5, we are a bit borked on our dedicated platform. Our templates uses these. We could (and should) switch back to plain images for the syndesis-ci.yml file. Let me do a PR for this one, so there should be no need for a change here (as we then use images instead of image streams for the init-containers).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants