fabric8io / fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
http://fabric8.io/
1.76k stars 505 forks source link

can not process another domain name properly. #6360

Open minikiller opened 7 years ago

minikiller commented 7 years ago

hi I first create a domain in a namespace, all of router create correctly. But when i create another project and recreate a new domain name,the router name chaos. For example i create a domain like app.kalix.com,then i create new project and run following command: gofabric8 deploy --domain=mytry.kalix.com --no-pvc it show result: `Deploying fabric8 to your OpenShift installation at https://master.sokylin.com.cn:8443 for domain mytry.kalix.com in namespace mytest

Loading fabric8 releases from maven repository:https://repo1.maven.org/maven2/ Continue? [Y/n] y

Starting fabric8 console deployment using 2.2.177...

SecurityContextConstraints restricted is configured correctly SecurityContextConstraints restricted.........................................✔ SecurityContextConstraints fabric8-mytest is setup correctly SecurityContextConstraints fabric8............................................✔ SecurityContextConstraints fabric8-sa-group is setup correctly SecurityContextConstraints fabric8-sa-group...................................✔ addClusterRoleToUser cluster-admin system:serviceaccount:mytest:fabric8.......✔ addClusterRoleToUser cluster-admin system:serviceaccount:mytest:jenkins.......✔ addClusterRoleToUser cluster-admin system:serviceaccount:mytest:exposecontroller✔ addClusterRoleToUser cluster-reader system:serviceaccount:mytest:metrics......✔ addClusterRoleToUser cluster-reader system:serviceaccount:mytest:fluentd......✔ addClusterRoleToGroup cluster-reader system:serviceaccounts...................✔ addServiceAccount fluentd.....................................................✔ addServiceAccount registry....................................................✔ addServiceAccount router......................................................✔ Creating fabric8 console template resources from 4 objects Processing resource kind: ServiceAccount Processing resource kind: OAuthClient Processing resource kind: Service Processing resource kind: ReplicationController fabric8 console...............................................................✔ Adding OAuthClient redirectURL: http://mytry.kalix.com:32334 Created fabric8 console Installing templates! Downloading apps from: https://repo1.maven.org/maven2/io/fabric8/forge/distro/distro/2.3.33/distro-2.3.33-templates.zip Loading template openshift/microservices/hubot-notifier.yml Loading template openshift/microservices/hubot-letschat.yml Loading template openshift/microservices/exposecontroller.yml Loading template openshift/microservices/git-collector.yml Loading template openshift/microservices/elasticsearch.yml Loading template openshift/microservices/prometheus-node-exporter.yml Loading template openshift/microservices/chaos-monkey.yml Loading template openshift/microservices/gogs.yml Loading template openshift/microservices/content-repository.yml Loading template openshift/microservices/hubot-irc.yml Loading template openshift/microservices/hubot-slack.yml Loading template openshift/microservices/gerrit.yml Loading template openshift/microservices/prometheus.yml Loading template openshift/microservices/maven-shell.yml Loading template openshift/microservices/manageiq.yml Loading template openshift/microservices/fabric8-forge.yml Loading template openshift/main/cd-pipeline.yml Loading template openshift/main/social.yml Processing resource of kind: List version: v1 Cannot yet process kind List, kind for social Loading template openshift/main/management.yml Loading template openshift/microservices/kibana.yml Loading template openshift/microservices/prometheus-blackbox-exporter.yml Loading template openshift/microservices/artifactory.yml Loading template openshift/microservices/jenkins.yml Loading template openshift/main/chat-irc.yml Loading template openshift/main/chat-letschat.yml Loading template openshift/main/chat-slack.yml Loading template openshift/main/logging.yml Loading template openshift/main/metrics.yml Loading template openshift/microservices/fabric8-docker-registry.yml Loading template openshift/microservices/gitlab.yml Loading template openshift/microservices/ingress-nginx.yml Loading template openshift/microservices/fluentd.yml Loading template openshift/microservices/grafana.yml Loading template openshift/microservices/kiwiirc.yml Loading template openshift/microservices/letschat.yml Loading template openshift/microservices/nexus.yml Install DevOps templates......................................................✔ Downloading apps from: https://repo1.maven.org/maven2/io/fabric8/ipaas/distro/distro/2.2.153/distro-2.2.153-templates.zip Loading template openshift/microservices/cassandra.yml Loading template openshift/microservices/zookeeper.yml Loading template openshift/microservices/message-broker.yml Loading template openshift/microservices/example-message-consumer.yml Loading template openshift/microservices/example-message-producer.yml Loading template openshift/microservices/message-gateway.yml Loading template openshift/main/messaging.yml Loading template openshift/microservices/kafka.yml Install iPaaS templates.......................................................✔ Downloading apps from: https://repo1.maven.org/maven2/io/fabric8/kubeflix/distro/distro/1.0.20/distro-1.0.20-templates.zip Loading template openshift/main/kubeflix.yml Loading template openshift/microservices/turbine-server.yml Loading template openshift/microservices/hystrix-dashboard.yml Install Kubeflix templates....................................................✔ Downloading apps from: https://repo1.maven.org/maven2/io/fabric8/zipkin/packages/distro/0.0.8/distro-0.0.8-templates.zip Loading template main/zipkin-0.0.8.json Install Zipkin templates......................................................✔

Installing: exposecontroller

Loaded template with 2 objectsCreating exposecontroller template resources from 2 objects Processing resource kind: ServiceAccount Processing resource kind: DeploymentConfig

Installing: cd-pipeline

Loaded template with 29 objectsCreating cd-pipeline template resources from 29 objects Processing resource kind: Secret Failed to create Secret: secrets "gogs-https-admin" already existsProcessing resource kind: Secret Processing resource kind: Secret Processing resource kind: Secret Processing resource kind: Secret Processing resource kind: Secret Processing resource kind: Secret Processing resource kind: Secret Processing resource kind: ServiceAccount Processing resource kind: ServiceAccount Processing resource kind: Service Processing resource kind: Service Processing resource kind: Service Processing resource kind: Service Processing resource kind: Service Processing resource kind: Service Processing resource kind: Service Processing resource kind: ConfigMap Processing resource kind: ConfigMap Processing resource kind: ConfigMap Processing resource kind: DeploymentConfig Processing resource kind: DeploymentConfig Converted DeploymentConfig to avoid the use of PersistentVolumeClaim Processing resource kind: DeploymentConfig Converted DeploymentConfig to avoid the use of PersistentVolumeClaim Processing resource kind: DeploymentConfig Converted DeploymentConfig to avoid the use of PersistentVolumeClaim Processing resource kind: DeploymentConfig


Default GOGS admin username/password = gogsadmin/RedHat$1

Downloading images and waiting to open the fabric8 console...


.......... Opening URL http://fabric8.app.kalix.com`

we should notice http://fabric8.app.kalix.com is old domain name.

jstrachan commented 7 years ago

I wonder if its that there's an old Route object there? Try

oc delete route fabric8

if it doesn't get recreated automatically, try redeploying.

The easiest thing to do if you want to install a different configuration of fabric8 is to just create a new project:

oc new-project cheese
gofabric8 deploy ....

We're working on a clean command in gofabric8 to make it easier to clean down a previous install and install a clean one. Until then its maybe simplest to just use different projects for different installs

minikiller commented 7 years ago

i want to create fabric8 in different project. One as my testing envirnment and other as deployment. Does fabric8 support this?

rawlingsj commented 7 years ago

We used to create routes without the namespace in the hostname which means we run into this issue. This has been fixed but not released yet. Hopefully the release will go out later today. I'll comment on this issue when it's available.

rawlingsj commented 7 years ago

We used to create routes without the namespace in the hostname which means we run into this issue. This has been fixed but not released yet. Hopefully the release will go out later today. I'll comment on this issue when it's available.

rawlingsj commented 7 years ago

We used to create routes without the namespace in the hostname which means we run into this issue. This has been fixed but not released yet. Hopefully the release will go out later today. I'll comment on this issue when it's available.

rawlingsj commented 7 years ago

We used to create routes without the namespace in the hostname which means we run into this issue. This has been fixed but not released yet. Hopefully the release will go out later today. I'll comment on this issue when it's available.

minikiller commented 7 years ago

@jstrachan @rawlingsj Thanks for your reply. Now I have another question need your help: 1.why apiman is removed from fabric8? 2.what is exposecontroller role under fabric8?

rawlingsj commented 7 years ago

The exposecontroller annotates kubernetes services with an external URL. So depending on whether folks have deployed openshift or kubernetes which use routes or ingress rules, or local development where no router is deployed and NodePorts are preferred, users don't have to worry about remembering which URL to access the service on.

Its also then used by the fabric8 console so that toolbar links open up Jenkins, Gogs etc using the correct external URL (and not the internal kubernetes service address) There's a bit more info in this blog https://blog.fabric8.io/accessing-your-applications-on-kubernetes-or-openshift-3e69be0ad3bc

As for APIMan, perhaps @KurtStam can help out here?

minikiller commented 7 years ago

@rajdavies thanks. Now i need to delete project that i created next. I also need to change route name.But now i can not access fabric8 console. It show errors: {"error":"invalid_request","error_description":"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.","state":"http://fabric8.app.kalix.com/"} dear sir,how can i to fixed this error?