lightbend / reactive-cli

https://developer.lightbend.com/docs/lightbend-orchestration/current/
Apache License 2.0
23 stars 16 forks source link

Reactive cli prepends https://registry.hub.docker.com/v2/ to my private AWS ECR registry #160

Closed OguzhanSaltik closed 5 years ago

OguzhanSaltik commented 6 years ago

When I executed this command; $ rp generate-kubernetes-resources "123456789000.dkr.ecr.eu-west-1.amazonaws.com/example-microservice-api-implementation:2.0-SNAPSHOT" --generate-pod-controllers --generate-services --pod-controller-image-pull-policy Always --env JAVA_OPTS="-Dplay.http.secret.key=secret_for_example-microservice -Dplay.filters.hosts.allowed.0=." --pod-controller-replicas 2 --external-service "cas_native=cassandra.default.svc.cluster.local" --external-service "kafka_native=ulterior-guppy-kafka-headless.default.svc.cluster.local" -l trace

I got this:

[debug, com.lightbend.rp.reactivecli.Main$] Attempting to pull manifest while unauthenticated

[debug, com.lightbend.rp.reactivecli.docker.DockerRegistry$] Image: Image(registry.hub.docker.com,Some(123456789000.dkr.ecr.eu-west-1.amazonaws.com),example-microservice-api-implementation,ImageTag(2.0-SNAPSHOT),None,Some(123456789000.dkr.ecr.eu-west-1.amazonaws.com),example-microservice-api-implementation,Some(ImageTag(2.0-SNAPSHOT)))

[debug, com.lightbend.rp.reactivecli.docker.DockerRegistry$] Request URL: https://registry.hub.docker.com/v2/123456789000.dkr.ecr.eu-west-1.amazonaws.com/example-microservice-api-implementation/tags/list?n=1

[debug, com.lightbend.rp.reactivecli.docker.DockerRegistry$] Received 401 from Registry, attempting to get a token and try again

[debug, com.lightbend.rp.reactivecli.docker.DockerRegistry$] Request URL: https://registry.hub.docker.com/v2/500558841489.dkr.ecr.eu-west-1.amazonaws.com/example-microservice-api-implementation/tags/list?n=1

[debug, com.lightbend.rp.reactivecli.docker.DockerRegistry$] Received 401 from Registry

[debug, com.lightbend.rp.reactivecli.docker.DockerRegistry$] checkRepositoryValid failed: unable to access repository or registry; check authentication [401]

[error, com.lightbend.rp.reactivecli.Main$] Failed to obtain Docker config for 123456789000.dkr.ecr.eu-west-1.amazonaws.com/example-microservice-api-implementation:2.0-SNAPSHOT, unable to access repository or registry; check authentication [401]
OguzhanSaltik commented 6 years ago

When I append --registry-use-local to the request it generates related yaml files. But after this process I executed kubectl apply -f generated.yaml files like deployment, service and ingress, service and ingress successfully applied but while applying deployment.yaml, I got error.

Readiness probe failed: HTTP probe failed with statuscode: 503

and inside of the logs I got error. 2018-06-26T14:49:05.120Z [error] akka.actor.ActorSystemImpl [sourceThread=application-akka.actor.default-dispatcher-3, akkaTimestamp=14:49:05.120UTC, akkaSource=akka.actor.ActorSystemImpl(application), sourceActorSystem=application] - Failed to unmarshal Kubernetes API response status [400 Bad Request]; check RBAC settings

I applied both of the RBAC settings on https://developer.ibm.com/code/2018/03/02/lightbend-orchestration-ibm-cloud/ and https://github.com/kubernetes/kops/issues/3551 but I have same problem, nothing changed...

OguzhanSaltik commented 6 years ago

I downgraded my sbt-reactive-app from 1.2.2 to 1.0.0 like the answer on https://github.com/lagom/online-auction-scala/issues/78 it solves my problem temporarily.

TimMoore commented 5 years ago

Lightbend Orchestration is no longer actively developed and will reach its End of Life on April 15, 2020.

We recommend Migrating to the Improved Kubernetes Deployment Experience.