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

Use template with local openshift (oc cluster up) #50

Closed
4 tasks done
SabrinaPloner opened this issue Jul 7, 2017 · 17 comments
Closed
4 tasks done

Use template with local openshift (oc cluster up) #50

SabrinaPloner opened this issue Jul 7, 2017 · 17 comments
Assignees

Comments

@SabrinaPloner
Copy link
Contributor

SabrinaPloner commented Jul 7, 2017

  • Hogajama
  • AMQ
  • Fluentd
  • MongoDb
@SabrinaPloner
Copy link
Contributor Author

SabrinaPloner commented Jul 7, 2017

We are unable to push to local docker registry:

Pushing image 172.30.1.1:5000/hogarama/hogajama:latest ...
error: build error: Failed to push image: unauthorized: authentication required

Possible solution: oc policy add-role-to-user system:image-pusher developer

@hwirnsberger can you please try?

oc cluster up
oc login -u system:admin
oc policy add-role-to-user system:image-pusher developer
oc create -f alltemplates.yaml -n openshift
oc create -f hogaramaimagestreams.yaml -n openshift
oc login -u developer
oc new-project hogarama
oc create is hogajama
oc create is fluentd
oc create is debian
oc process -f hogaramaOhneHost.yaml | oc create -f -

@Montecito
Copy link
Contributor

@hwirnsberger
Copy link
Contributor

it already works. thanks

@ErhardSiegl
Copy link
Contributor

The image streams are missing. Tried to:

 oc create is debian
 oc create is fluentd

Seems to help but build still hangs:

 oc describe build
...
Events:
  FirstSeen     LastSeen        Count   From                    SubObjectPath   Type            Reason          Message
  ---------     --------        -----   ----                    -------------   --------        ------          -------
  1h            1h              1       {default-scheduler }                    Normal          Scheduled       Successfully assigned hogajama-1-build to 192.168.65.2
  1h            13s             436     {kubelet 192.168.65.2}                  Warning         FailedSync      Error syncing pod, skipping: failed to "StartContainer" for "POD" with RunContainerError: "runContainer: docker: failed to parse docker version \"17.03.0-ce\": illegal zero-prefixed version component \"03\" in \"17.03.0-ce\""

Could be a problem with the Mac-Version.

@Montecito
Copy link
Contributor

Montecito commented Jul 7, 2017

This seams to be a bug:
openshift/origin#13281

It should be fixed upstream. The same issue occurs on windows as well ;-)

@ErhardSiegl
Copy link
Contributor

Installed version v3.6.0 of oc. Mongo-DB is up, other pods don't start.
I tried:

oc rollout latest dc/broker-amq -n hogarama
Error from server (BadRequest): cannot trigger a deployment for "broker-amq" because it contains unresolved images

@ErhardSiegl
Copy link
Contributor

Changing

diff --git a/template/hogarama_template_with_routes.yaml b/template/hogarama_template_with_routes.yaml
index 5bcf629..890fe75 100644
--- a/template/hogarama_template_with_routes.yaml
+++ b/template/hogarama_template_with_routes.yaml
@@ -404,7 +404,7 @@ objects:
         - broker-amq
         from:
           kind: ImageStreamTag
-          name: jboss-amq-62:1.3
+          name: jboss-amq-62:latest
           namespace: openshift
       type: ImageChange
     - type: ConfigChange

gets me one step further, but the broker-amq then fails the

Readiness probe failed: rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:262: starting container process caused "process_linux.go:81: executing setns process caused \"exit status 15\"" 

@SabrinaPloner
Copy link
Contributor Author

I moved the templates for the local openshift to template/local_openshift. hogarama_template_with_routes.yaml was intended for the 1024 presentation.

However, the templates in template/local_openshift are not working for me, as the persistent volume claims are stuck in the pending state, but this might be due to my local environment.

@ChrisKofler
Copy link
Contributor

This issue seems to be the same as #48 (Docu: Hogarama CDK Setup Guide) and #46 DEMO: Demo using CDK

@ChrisKofler
Copy link
Contributor

ChrisKofler commented Aug 11, 2017

Regarding the hogajama build problem ("rror resolving ImageStreamTag jboss-eap70-openshift:1.4 in namespace openshift: unable to find latest tagged image")

It seems that there's no version 1.4 in Redhats registry:
oc get imagestream -n openshift -o json | grep -eap70
"name": "jboss-eap70-openshift",
"selfLink": "/oapi/v1/namespaces/openshift/imagestreams/jboss-eap70-openshift",
"dockerImageRepository": "registry.access.redhat.com/jboss-eap-7/eap70-openshift",
"name": "registry.access.redhat.com/jboss-eap-7/eap70-openshift:1.5"
"name": "registry.access.redhat.com/jboss-eap-7/eap70-openshift:1.5-15"
"name": "registry.access.redhat.com/jboss-eap-7/eap70-openshift:1.5-16"
"name": "registry.access.redhat.com/jboss-eap-7/eap70-openshift:1.5-17"
"name": "registry.access.redhat.com/jboss-eap-7/eap70-openshift:latest"

Using "name: 'jboss-eap70-openshift:latest" will at least make the build running ...

@SabrinaPloner
Copy link
Contributor Author

SabrinaPloner commented Aug 11, 2017

Image debian:stretch-slim is not in docker registry. Add it with:

docker pull debian:stretch-slim
OPENSHIFT_TOKEN=$(oc whoami -t)
docker login -u developer -p ${OPENSHIFT_TOKEN} 172.30.1.1:5000
docker tag debian:stretch-slim 172.30.1.1:5000/hogarama/debian:stretch-slim
docker push 172.30.1.1:5000/hogarama/debian:stretch-slim

Another possibility
oc new-app --docker-image=debian:stretch-slim
Here, a deployment is also created, which is unnecessary.

@ErhardSiegl
Copy link
Contributor

ErhardSiegl commented Aug 11, 2017

In /opt/amq/bin/readinessProbe.sh wird mittels parsen von tcp_file = open("/proc/net/tcp6") überprüft ob die Listening-Sockets offen sind. Allerdings wird bei mir /proc/net/tcp verwendet und nicht /proc/net/tcp6

ErhardSiegl added a commit that referenced this issue Aug 11, 2017
…EAP and AMQ. Add file to create everything
ErhardSiegl added a commit that referenced this issue Aug 11, 2017
@ChrisKofler
Copy link
Contributor

regarding the topic "oc cluster up" vs. "CDK": https://developers.redhat.com/blog/2016/10/11/four-creative-ways-to-create-an-openshiftkubernetes-dev-environment/

=> I suppose it does not really matter from a technical perspective right now, but I see that Redhat is investing into this topic (CDK) and thus I think it will be "the offical way". We should come to a conclusion what to recommend to our customers.

@SabrinaPloner
Copy link
Contributor Author

SabrinaPloner commented Aug 16, 2017

Use template/insert-data.sh for inserting test data into mongodb

@SabrinaPloner
Copy link
Contributor Author

If you want to build hogajama from local source instead of the Github-repository, use template/local_openshift/s2i_hogajama.sh

ErhardSiegl added a commit that referenced this issue Aug 22, 2017
@SabrinaPloner
Copy link
Contributor Author

SabrinaPloner commented Aug 25, 2017

Documentation can be found here.

@AdrianFarmadin
Copy link
Contributor

In /opt/amq/bin/readinessProbe.sh wird mittels parsen von tcp_file = open("/proc/net/tcp6") überprüft ob die Listening-Sockets offen sind. Allerdings wird bei mir /proc/net/tcp verwendet und nicht /proc/net/tcp6

@ErhardSiegl : You should enable IPv6 Network in Docker and then the redinessProbe works. You can find more here: https://docs.docker.com/engine/userguide/networking/default_network/ipv6/#how-ipv6-works-on-docker

I'll write documentation for this solution ASAP.

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

No branches or pull requests

6 participants