fabric8io / gofabric8

CLI used when working with fabric8 running on Kubernetes or OpenShift
https://fabric8.io/
Apache License 2.0
147 stars 72 forks source link

Weird startup when deploying fabric8 #264

Closed MarcSolde closed 8 years ago

MarcSolde commented 8 years ago

So, I'm running gofabric8 using K8s on a AWS cluster created manually (via ./kubernetes/cluster/kube-up.sh) with all the enviroment variables set as in the documentation, the thing is since a few updates of gofabric (Sorry, I can't remember which one) I'm getting this output.

gofabric8 deploy --domain my.domain

Deploying fabric8 to your Kubernetes installation at https://someIP for domain my.domain in namespace default

Loading fabric8 releases from maven repository:https://repo1.maven.org/maven2/
Please note that the --app parameter is now deprecated.
Please use the --package argument to specify a package like `platform`, `console`, `ipaas` or to refer to a URL or file of the YAML package to install
Continue? [Y/n] y
Now about to install package https://repo1.maven.org/maven2/io/fabric8/platform/packages/fabric8-platform/2.2.28/fabric8-platform-2.2.28-kubernetes.yml
Processing resource kind: Namespace in namespace default
Processing resource kind: Namespace in namespace default
Failed to create Namespace: namespaces "user-secrets-source-admin" already existsplatform......................................................................✘ namespaces "user-secrets-source-admin" already exists
Found namespace on kind Secret of user-secrets-source-adminProcessing resource kind: Secret in namespace user-secrets-source-admin
Processing resource kind: Secret in namespace default
Processing resource kind: Secret in namespace default
Processing resource kind: Secret in namespace default
Processing resource kind: Secret in namespace default
Processing resource kind: Secret in namespace default
Processing resource kind: Secret in namespace default
Processing resource kind: Secret in namespace default
Processing resource kind: ServiceAccount in namespace default
Processing resource kind: ServiceAccount in namespace default
Processing resource kind: ServiceAccount in namespace default
Processing resource kind: ServiceAccount in namespace default
Processing resource kind: ServiceAccount in namespace default
Processing resource kind: Service in namespace default
Processing resource kind: Service in namespace default
Processing resource kind: Service in namespace default
Processing resource kind: Service in namespace default
Processing resource kind: Service in namespace default
Processing resource kind: Service in namespace default
Processing resource kind: Service in namespace default
Processing resource kind: Service in namespace default
Processing resource kind: Service in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Failed to create ConfigMap: configmaps "fabric8-environments" already existsplatform......................................................................✘ configmaps "fabric8-environments" already exists
Processing resource kind: ConfigMap in namespace default
Found namespace on kind ConfigMap of user-secrets-source-adminProcessing resource kind: ConfigMap in namespace user-secrets-source-admin
Processing resource kind: ConfigMap in namespace default
Processing resource kind: ConfigMap in namespace default
Processing resource kind: Deployment in namespace default
Processing resource kind: Deployment in namespace default
Processing resource kind: Deployment in namespace default
Processing resource kind: Deployment in namespace default
Processing resource kind: Deployment in namespace default
Converted Deployment to avoid the use of PersistentVolumeClaim
Processing resource kind: Deployment in namespace default
Converted Deployment to avoid the use of PersistentVolumeClaim
Processing resource kind: Deployment in namespace default
Converted Deployment to avoid the use of PersistentVolumeClaim
Processing resource kind: Deployment in namespace default
platform......................................................................✔

Recreating configmap exposecontroller

So now I'm not getting the location of the ingress controller and I since I can't find it, I can't set up my dns. How do I fix this?

PS: I'm not using stackpoint.io since it didn't let me have containers with privileges/I don't know how to do give them said privileges and because lately all the cluster builds fail.

PS 2: Sorry for any gramatical errors, I'm not an english-native speaker

antifragileer commented 8 years ago

I am having basically the same problem I think. Is your exposecontroller crashing? I get hung up with exposecontroller and my output looks identical to yours. But I am on google, so might be different.

https://groups.google.com/forum/#!topic/fabric8/VsvdTr-WNWU

Can you run the folllowing after your deploy?

kubectl get pods

Is the exposecontroller working right? Or are any other pods not working right?

Take note of the name for the pod which exposecontroller or other, if not working, is in then;

kubectl describe pod exposecontroller-XXXXXXXX (replace XX's) kubectl logs exposecontroller-XXXXXXXX (replace XX's)

Paste what you get out of that here. Maybe it is the same issue I am having, but I am having my problem up in google.

antifragileer commented 8 years ago

Oh, to get one of one of those errors regarding the fabric-environment, you can manually gut fabric8 in the cluster with some kubectl commands together with cleanup.

    kubectl delete deploy -l provider=fabric8
    kubectl delete rc -l provider=fabric8
    kubectl delete rs -l provider=fabric8
    kubectl delete svc -l provider=fabric8
    kubectl delete secret -l provider=fabric8
    kubectl delete ing -l provider=fabric8
    kubectl delete cm --all
    kubectl delete sa -l provider=fabric8
    kubectl delete ns -l provider=fabric8
    gofabric8 cleanup -y

Fabric8 struggles to do a proper cleanup of what it deployed using the cleanup command currently.\

The kubectl delete cm --all will get rid of the deployed fabric8 environment configMap. For some reason it is not identified as a fabric8 provider.

antifragileer commented 8 years ago

Marc, if you are still having problems, and are using gofabric8 version 100 or later, there are some problems with deploying. 98 and 99 seem to be relatively ok, except .99 has some cleanup issues which requires some manual kubectl cleanup.

MarcSolde commented 8 years ago

Thanks for the info Jeremy! With the 0.4.103 version everything seems to be working just fine, except by the fact that I'm getting a 504 Gateway Timeout on the server, but this is probably an error triggered by me not setting the DNS properly. Also, since now works, I'm not going back to the 101-102 versions, since I'm scared that I might break something, but as far as I can remember all the pods were deployed correctly.

Btw, thanks for the cleanup sequence :smile:

EDIT: I've fixed the Gateway Timeout error, I just had to open the port 80 on the minion's security group.

rawlingsj commented 8 years ago

Thanks for reporting back. This was the fix https://github.com/fabric8io/gofabric8/commit/bb83c2aeff90302dc51bba235ce34d49a5dd5b20 and related to https://github.com/fabric8io/gofabric8/issues/266 so I think this issue can be closed.