spring-petclinic / spring-petclinic-cloud

Fork of the Spring Cloud Microservices project packaged to be deployed on several Cloud platforms: Kubernetes and Cloud Foundry
Apache License 2.0
139 stars 248 forks source link

Docker spring-petclinic-config-server:latest not found #23

Closed patsevanton closed 3 years ago

patsevanton commented 3 years ago

Hello. I try run spring-petclinic-cloud

git clone https://github.com/spring-petclinic/spring-petclinic-cloud.git
docker-compose up
Creating network "spring-petclinic-cloud_default" with the default driver
Pulling config-server (springcommunity/spring-petclinic-config-server:)...
ERROR: manifest for springcommunity/spring-petclinic-config-server:latest not found: manifest unknown: manifest unknown
patsevanton commented 3 years ago

Fix by https://github.com/spring-petclinic/spring-petclinic-cloud/pull/24

arey commented 3 years ago

In DockerHub (but also on local desktop), we may have some name conflict between 2 repositories : spring-petclinic-cloud and spring-petclinic-microservices. See the issue #14 I propose to solve it. @patsevanton I'm pretty sure the one you are referencing come form the spring-petclinic-microservices repository.

arey commented 3 years ago

@odedia docker-compose is using and image build the provided Dockerfile and the dockerize utility.

Yesterday, I've published into Docker Hub images build with the mvn spring-boot:build-image -Pk8s -DREPOSITORY_PREFIX=${REPOSITORY_PREFIX} && ./scripts/pushImages.sh command line (ie. Buildpacks) but they are not including dockerize and are not compatible with docker compose. You may pull them: springcommunity/spring-petclinic-cloud-visits-service (I've added the spring-petclin-cloud prefix to avoid naming conflict)

I'm note sure that we still have to support docker compose (the spring-petclinic-microservices repo still does). Maybe it's confusing.

patsevanton commented 3 years ago

Test k8s and get error

Remove wavefron anywhere and run kubectl apply

kubectl apply -f init-namespace/01-namespace.yaml 
kubectl apply -f init-services/02-config-map.yaml 
kubectl apply -f init-services/03-role.yaml 
kubectl apply -f init-services/05-api-gateway-service.yaml 
kubectl apply -f init-services/06-customers-service-service.yaml 
kubectl apply -f init-services/07-vets-service-service.yaml 
kubectl apply -f init-services/08-visits-service-service.yaml 
kubectl apply -f api-gateway-deployment.yaml 

Error

  Type     Reason         Age               From               Message
  ----     ------         ----              ----               -------
  Normal   Scheduled      32s               default-scheduler  Successfully assigned spring-petclinic/api-gateway-78c649f4df-hb228 to ecse00500c17
  Warning  InspectFailed  4s (x4 over 31s)  kubelet            Failed to apply default image tag "${REPOSITORY_PREFIX}/api-gateway:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/api-gateway:latest": invalid reference format: repository name must be lowercase
  Warning  Failed         4s (x4 over 31s)  kubelet            Error: InvalidImageName
odedia commented 3 years ago

Hi, please see the README: https://github.com/spring-petclinic/spring-petclinic-cloud#deploying-the-application If you don't want to use the script, you can manually replace all occurrences of ${REPOSITORY_PREFIX} with your docker registry endpoint

patsevanton commented 3 years ago

I am sorry. I see now https://github.com/spring-petclinic/spring-petclinic-cloud#deploying-the-application

I will try

export REPOSITORY_PREFIX=antonpatsev
mvn spring-boot:build-image -Pk8s -DREPOSITORY_PREFIX=${REPOSITORY_PREFIX} && ./scripts/pushImages.sh

P.S. Generated and added TOC https://github.com/spring-petclinic/spring-petclinic-cloud/pull/30

patsevanton commented 3 years ago

Build docker iamges in spring-petclinic-cloud and push custom docker registry