fabric8io / fabric8

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

Getting started guides - Lack some details about oauth for web console login #4123

Open davsclaus opened 9 years ago

davsclaus commented 9 years ago

I am following the guide and re-create vagrant by destroying the old one, and creating it again.

It all works nicely until the web console, at the bottom of this page. http://fabric8.io/guide/setupLocalHost.html

The web console shows a 503 error page screen shot 2015-06-07 at 11 12 36 am

As I recall its something about oauth not being setup.

When I run

davsclaus:~/workspace/fabric8 (master)/$ osc get oauthclient
NAME                           SECRET                                 WWW-CHALLENGE   REDIRECT URIS
openshift-browser-client       6ff451b2-cf0c-4649-be92-a14e6a80e56d   FALSE           https://172.28.128.4:8443/oauth/token/display
openshift-challenging-client   ce5afd35-3810-441e-9fe2-84d4a7f584d6   TRUE            https://172.28.128.4:8443/oauth/token/display
openshift-web-console          bc7d8c58-9a02-47ee-8edf-cf60d7bb6b62   FALSE           https://172.28.128.4:8443/console/,http://localhost:9000,https://localhost:9000

There is none about fabric8

Also the routes are just for the docker registry

davsclaus:~/workspace/fabric8 (master)/$ osc get routes
NAME                    HOST/PORT                       PATH      SERVICE           LABELS
docker-registry-route   docker-registry.vagrant.local             docker-registry

And the pods are

davsclaus:~/workspace/fabric8 (master)/$ osc get pods
POD                       IP           CONTAINER(S)   IMAGE(S)                                  HOST                                     LABELS                                                                                  STATUS    CREATED      MESSAGE
docker-registry-1-6ey5v   172.17.0.4                                                            fabric8-master.vagrant.local/127.0.0.1   deployment=docker-registry-1,deploymentconfig=docker-registry,docker-registry=default   Running   11 minutes
                                       registry       openshift/origin-docker-registry:v0.5.3                                                                                                                                    Running   11 minutes
router-1-u6e9y            172.17.0.3                                                            fabric8-master.vagrant.local/127.0.0.1   deployment=router-1,deploymentconfig=router,router=router                               Running   11 minutes
                                       router         openshift/origin-haproxy-router:v0.5.3                                                                                                                                     Running   11 minutes

And the services

davsclaus:~/workspace/fabric8 (master)/$ osc get services
NAME              LABELS                                    SELECTOR                  IP(S)            PORT(S)
docker-registry   docker-registry=default                   docker-registry=default   172.30.111.183   5000/TCP
kubernetes        component=apiserver,provider=kubernetes   <none>                    172.30.0.2       443/TCP
kubernetes-ro     component=apiserver,provider=kubernetes   <none>                    172.30.0.1       80/TCP
router            router=router                             router=router             172.30.144.219   80/TCP

I have not used the fabric8:apply or the newer fabric:install commands that James works on.

But it would be great that our getting started guides works and that the user get a basic kubernetes environment up with a working web console at least.

Also we should maybe suggest about creating a new osc project so you work in a different namespace.

And I also think you need to set this ENV variable

export KUBERNETES_TRUST_CERT="true"

Which is not documented or told about in the getting started guide.

davsclaus commented 9 years ago

Yay I think its a matter of using @jstrachan awesome fabric8-installer project next in the guides.

I followed the readme at https://github.com/fabric8io/fabric8-installer

And I chose to use the base install as I just need the web console and being able to run some camel apps on it.

After doing this

davsclaus:~/workspace/fabric8-installer/base (master)/$ mvn install -Dfabric8.version=2.1.10

Then I got the routes and oauthclients and the web console shows a login page, and logging in with admin/admin I see it working now.

webconsole

jstrachan commented 9 years ago

BTW I added docs at the bottom of this page on how to setup the routes: http://fabric8.io/guide/fabric8OnOpenShift.html#creating-routes

but yeah, its kinda clumsy right now! I think for folks who already have maven installed; using the https://github.com/fabric8io/fabric8-installer project is going to be the easiest option; as that can more easily validate that the user has properly configured the various properties (like domain) and that the templates and routes get created properly etc.

@gashcrumb has been doing some awesome work on supporting drag and drop of kubernetes JSON files onto the console to support better installation (including OpenShift templates!); but then the problem is ensuring the fabric8 console is installed ;) which requires the routes to be setup; so we're gonna need a simple installer of some kind to get the basics up and running; right now the fabric8-installer is looking the simplest for folks to use

jstrachan commented 9 years ago

BTW the fabric8-installer is using 2.1.10 now too so no need for the explicit -Dfabric8.version though it never harms to be specific ;) https://github.com/fabric8io/fabric8-installer/blob/master/pom.xml#L31