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

Problem running fabric8 on CDK 2.0 #47

Closed alberttwong closed 8 years ago

alberttwong commented 8 years ago

Trying to run fabric8 on Red Hat Container Developer Kit 2.0.

Alberts-MacBook-Pro:rhel-ose alwong$ vagrant ssh
Last login: Wed May 11 03:10:29 2016
[vagrant@rhel-cdk ~]$ oc login
Authentication required for https://127.0.0.1:8443 (openshift)
Username: admin
Password:
Login successful.

You have access to the following projects and can switch between them with 'oc project <projectname>':

  * default
  * openshift
  * openshift-infra
  * sample-project (current)

Using project "sample-project".
[vagrant@rhel-cdk ~]$ wget
bash: wget: command not found
[vagrant@rhel-cdk ~]$ sudo yum install wget
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-eus-rpms                                                                                                                                                                                                                              | 3.2 kB  00:00:00
rhel-7-server-rpms                                                                                                                                                                                                                                  | 3.7 kB  00:00:00
rhel-7-server-rt-beta-rpms                                                                                                                                                                                                                          | 3.8 kB  00:00:00
rhel-7-server-rt-rpms                                                                                                                                                                                                                               | 4.0 kB  00:00:00
rhel-ha-for-rhel-7-server-eus-rpms                                                                                                                                                                                                                  | 3.1 kB  00:00:00
rhel-ha-for-rhel-7-server-rpms                                                                                                                                                                                                                      | 3.7 kB  00:00:00
rhel-rs-for-rhel-7-server-eus-rpms                                                                                                                                                                                                                  | 3.1 kB  00:00:00
rhel-rs-for-rhel-7-server-rpms                                                                                                                                                                                                                      | 3.7 kB  00:00:00
(1/12): rhel-7-server-rt-beta-rpms/x86_64/updateinfo                                                                                                                                                                                                |  238 B  00:00:00
(2/12): rhel-7-server-rt-beta-rpms/x86_64/group                                                                                                                                                                                                     |  130 B  00:00:00
(3/12): rhel-7-server-rt-rpms/7Server/x86_64/group                                                                                                                                                                                                  |  895 B  00:00:00
(4/12): rhel-7-server-rt-beta-rpms/x86_64/primary_db                                                                                                                                                                                                |  13 kB  00:00:00
(5/12): rhel-7-server-rt-rpms/7Server/x86_64/updateinfo                                                                                                                                                                                             |  26 kB  00:00:00
(6/12): rhel-ha-for-rhel-7-server-eus-rpms/7Server/x86_64/primary_db                                                                                                                                                                                | 130 kB  00:00:00
(7/12): rhel-7-server-rt-rpms/7Server/x86_64/primary_db                                                                                                                                                                                             |  46 kB  00:00:00
(8/12): rhel-ha-for-rhel-7-server-rpms/7Server/x86_64/primary_db                                                                                                                                                                                    | 130 kB  00:00:00
(9/12): rhel-rs-for-rhel-7-server-eus-rpms/7Server/x86_64/primary_db                                                                                                                                                                                | 154 kB  00:00:00
(10/12): rhel-7-server-eus-rpms/7Server/x86_64/primary_db                                                                                                                                                                                           |  20 MB  00:00:02
(11/12): rhel-rs-for-rhel-7-server-rpms/7Server/x86_64/primary_db                                                                                                                                                                                   | 154 kB  00:00:01
(12/12): rhel-7-server-rpms/7Server/x86_64/primary_db                                                                                                                                                                                               |  20 MB  00:00:03
(1/9): rhel-7-server-eus-rpms/7Server/x86_64/updateinfo                                                                                                                                                                                             | 122 kB  00:00:00
(2/9): rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                                                                                                                 | 1.1 MB  00:00:00
(3/9): rhel-ha-for-rhel-7-server-eus-rpms/7Server/x86_64/updateinfo                                                                                                                                                                                 | 6.0 kB  00:00:00
(4/9): rhel-ha-for-rhel-7-server-rpms/7Server/x86_64/group_gz                                                                                                                                                                                       | 3.4 kB  00:00:00
(5/9): rhel-7-server-rpms/7Server/x86_64/group_gz                                                                                                                                                                                                   | 134 kB  00:00:00
(6/9): rhel-ha-for-rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                                                                                                     |  37 kB  00:00:00
(7/9): rhel-rs-for-rhel-7-server-rpms/7Server/x86_64/group_gz                                                                                                                                                                                       | 4.9 kB  00:00:00
(8/9): rhel-rs-for-rhel-7-server-eus-rpms/7Server/x86_64/updateinfo                                                                                                                                                                                 |  11 kB  00:00:00
(9/9): rhel-rs-for-rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                                                                                                     |  52 kB  00:00:01
Resolving Dependencies
--> Running transaction check
---> Package wget.x86_64 0:1.14-10.el7_0.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================================================================================================================================
 Package                                                  Arch                                                       Version                                                              Repository                                                                  Size
===========================================================================================================================================================================================================================================================================
Installing:
 wget                                                     x86_64                                                     1.14-10.el7_0.1                                                      rhel-7-server-eus-rpms                                                     546 k

Transaction Summary
===========================================================================================================================================================================================================================================================================
Install  1 Package

Total download size: 546 k
Installed size: 2.0 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/rhel-7-server-eus-rpms/packages/wget-1.14-10.el7_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY                                                                           ]  0.0 B/s |    0 B  --:--:-- ETA
Public key for wget-1.14-10.el7_0.1.x86_64.rpm is not installed
wget-1.14-10.el7_0.1.x86_64.rpm                                                                                                                                                                                                                     | 546 kB  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0xFD431D51:
 Userid     : "Red Hat, Inc. (release key 2) <security@redhat.com>"
 Fingerprint: 567e 347a d004 4ade 55ba 8a5f 199e 2f91 fd43 1d51
 Package    : redhat-release-server-7.2-9.el7.x86_64 (@anaconda/7.2)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Importing GPG key 0x2FA658E0:
 Userid     : "Red Hat, Inc. (auxiliary key) <security@redhat.com>"
 Fingerprint: 43a6 e49c 4a38 f4be 9abf 2a53 4568 9c88 2fa6 58e0
 Package    : redhat-release-server-7.2-9.el7.x86_64 (@anaconda/7.2)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : wget-1.14-10.el7_0.1.x86_64                                                                                                                                                                                                                             1/1
rhel-7-server-eus-rpms/7Server/x86_64/productid                                                                                                                                                                                                     | 1.7 kB  00:00:00
rhel-7-server-rpms/7Server/x86_64/productid                                                                                                                                                                                                         | 1.7 kB  00:00:00
rhel-7-server-rt-rpms/7Server/x86_64/productid                                                                                                                                                                                                      | 2.1 kB  00:00:00
rhel-ha-for-rhel-7-server-eus-rpms/7Server/x86_64/productid                                                                                                                                                                                         | 1.8 kB  00:00:00
rhel-ha-for-rhel-7-server-rpms/7Server/x86_64/productid                                                                                                                                                                                             | 1.7 kB  00:00:00
rhel-rs-for-rhel-7-server-eus-rpms/7Server/x86_64/productid                                                                                                                                                                                         | 1.8 kB  00:00:00
rhel-rs-for-rhel-7-server-rpms/7Server/x86_64/productid                                                                                                                                                                                             | 1.7 kB  00:00:00
  Verifying  : wget-1.14-10.el7_0.1.x86_64                                                                                                                                                                                                                             1/1

Installed:
  wget.x86_64 0:1.14-10.el7_0.1

Complete!
[vagrant@rhel-cdk ~]$ wget https://github.com/fabric8io/gofabric8/releases/download/v0.4.11/gofabric8-0.4.11-linux-amd64.tar.gz
--2016-05-11 03:35:38--  https://github.com/fabric8io/gofabric8/releases/download/v0.4.11/gofabric8-0.4.11-linux-amd64.tar.gz
Resolving github.com (github.com)... 192.30.252.130
Connecting to github.com (github.com)|192.30.252.130|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/39738994/9a882502-0b9f-11e6-84f5-d61981c8ae18.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160511%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160511T073541Z&X-Amz-Expires=300&X-Amz-Signature=d6ddf92ec4708df22ff2da5e72a44e25a68de5af55b8553f70c6bfc179722912&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dgofabric8-0.4.11-linux-amd64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2016-05-11 03:35:39--  https://github-cloud.s3.amazonaws.com/releases/39738994/9a882502-0b9f-11e6-84f5-d61981c8ae18.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160511%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160511T073541Z&X-Amz-Expires=300&X-Amz-Signature=d6ddf92ec4708df22ff2da5e72a44e25a68de5af55b8553f70c6bfc179722912&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dgofabric8-0.4.11-linux-amd64.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 54.231.82.130
Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|54.231.82.130|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8890714 (8.5M) [application/octet-stream]
Saving to: ‘gofabric8-0.4.11-linux-amd64.tar.gz’

100%[=================================================================================================================================================================================================================================>] 8,890,714   2.08MB/s   in 5.5s

2016-05-11 03:35:45 (1.54 MB/s) - ‘gofabric8-0.4.11-linux-amd64.tar.gz’ saved [8890714/8890714]

[vagrant@rhel-cdk ~]$ ls
gofabric8-0.4.11-linux-amd64.tar.gz
[vagrant@rhel-cdk ~]$ tar zxvf gofabric8-0.4.11-linux-amd64.tar.gz
gofabric8
README.md
LICENSE
[vagrant@rhel-cdk ~]$ ./gofabric8 -s https://10.1.2.2:8443 --domain=rhel-cdk.10.1.2.2.xip.io deploy
             ▄▄▄▄▄▄▄
             ███████
     ▄▄▄▄▄▄▄ ▄▄▄▄▄▄█
     ███████ ▀▀▀▀▀▀▀ ▄▄▄▄▄▄
     ▄▄▄▄▄▄▄         ██████
   ▄▄▄▄▄             ▄▄▄▄▄▄
   ▀▄▄▄▄▄      ▄▄▄       ▄▄▄
    ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▀
      ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▄▄▀
        ▀▀▄█▄▄▄▄▄▄▄▄▄▄▄▄▄▀
          ▄█▄▄▄█▄▄▄█▄▄▄
          ▄█▄▄▄▄▄▄▄▄▄▄▄
           ▄▄█▄▄▄▄▄▄▄▄
            ▄▄▄▄▀▀▄█▄
         ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
         ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Deploying fabric8 to your OpenShift installation at https://10.1.2.2:8443 in namespace sample-project

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

Starting fabric8 console deployment using 2.2.130...

SecurityContextConstraints restricted is updated to enable fabric8
SecurityContextConstraints restricted.........................................✔
SecurityContextConstraints fabric8-sample-project is setup correctly
SecurityContextConstraints fabric8............................................✔
addClusterRoleToUser cluster-admin system:serviceaccount:sample-project:fabric8✔
addClusterRoleToUser cluster-admin system:serviceaccount:sample-project:jenkins✔
addClusterRoleToUser cluster-reader system:serviceaccount:sample-project:metrics✔
addClusterRoleToUser cluster-reader system:serviceaccount:sample-project:fluentd✔
addServiceAccount fluentd.....................................................✔
addServiceAccount router......................................................✔
Creating fabric8 console resources
fabric8 console...............................................................✔
Created fabric8 console
Installing templates!
Downloading templates for version 2.2.171
Loading template main/metrics-2.2.167.json
Loading template main/chat-letschat-2.2.167.json
Loading template microservices/git-collector-2.2.167.json
Loading template main/chat-irc-2.2.167.json
Loading template microservices/fabric8-docker-registry-2.2.167.json
Loading template microservices/gogs-2.2.167.json
Loading template microservices/letschat-2.2.167.json
Loading template microservices/fabric8-forge-2.2.171.json
Loading template main/chat-slack-2.2.167.json
Loading template microservices/gitlab-2.2.167.json
Loading template main/cd-pipeline-2.2.171.json
Loading template microservices/chaos-monkey-2.2.167.json
Loading template main/social-2.2.167.json
Loading template microservices/gerrit-2.2.167.json
Loading template main/management-2.2.167.json
Loading template microservices/artifactory-2.2.167.json
Loading template main/logging-2.2.167.json
Loading template microservices/kiwiirc-2.2.167.json
Loading template microservices/jenkins-2.2.167.json
Loading template microservices/nexus-2.2.167.json
Install DevOps templates......................................................✔
Downloading templates for version 2.2.117
Loading template microservices/message-broker-2.2.117.json
Loading template microservices/example-message-consumer-2.2.117.json
Loading template microservices/example-message-producer-2.2.117.json
Loading template main/messaging-2.2.117.json
Loading template microservices/kafka-2.2.117.json
Loading template main/apiman-2.2.117.json
Loading template microservices/zookeeper-2.2.117.json
Loading template microservices/message-gateway-2.2.117.json
Install iPaaS templates.......................................................✔
Downloading templates for version 1.0.16
Loading template main/kubeflix-1.0.16.json
Loading template microservices/hystrix-dashboard-1.0.16.json
Loading template microservices/turbine-server-1.0.16.json
Install Kubeflix templates....................................................✔
Create routes.................................................................✔
./gofabric8 secrets -y
./gofabric8 pull cd-pipeline

Expecting fabric8 console at http://fabric8.rhel-cdk.10.1.2.2.xip.io/ or https://fabric8.rhel-cdk.10.1.2.2.xip.io/ but it doesn't seem to work.

rawlingsj commented 8 years ago

@alberttwong what's the issue you're hitting as the console output above looks like it's installed correctly?

alberttwong commented 8 years ago

@rawlingsj isn't there a UI like the videos? Used to be at fabric8.cdk.vm

alberttwong commented 8 years ago

So... here's more... it seems like the service isn't starting.

[vagrant@rhel-cdk ~]$ oc get pods
NAME            READY     STATUS    RESTARTS   AGE
fabric8-bkgc7   0/1       Pending   0          12m
[vagrant@rhel-cdk ~]$ oc logs fabric8-bkgc7
Error from server: Internal error occurred: Pod "fabric8-bkgc7" in namespace "sample-project" : pod is not in 'Running', 'Succeeded' or 'Failed' state - State: "Pending"

It seems like it's stuck... let me try to kill it.

alberttwong commented 8 years ago

screen shot 2016-05-11 at 12 53 07 am

alberttwong commented 8 years ago

There is something wrong but I don't enough to understand how to get more info on debugging the issue.

rawlingsj commented 8 years ago

does oc describe pod fabric8-bkgc7 or oc describe rc fabric8 give any clue why the pod's not starting?

alberttwong commented 8 years ago

restarted by vagrant halt and up and provision

vagrant@rhel-cdk ~]$ oc describe pod fabric8-lc588
Name:               fabric8-lc588
Namespace:          sample-project
Image(s):           fabric8/fabric8-console:2.2.130
Node:               rhel-cdk/10.0.2.15
Start Time:         Wed, 11 May 2016 03:56:34 -0400
Labels:             group=io.fabric8.apps,project=console,provider=fabric8,version=2.2.130
Status:             Running
Reason:
Message:
IP:             172.17.0.2
Replication Controllers:    fabric8 (1/1 replicas created)
Containers:
  fabric8-container:
    Container ID:   docker://79432828b804606dbb5c1f9fff3e371743357b886f5db94895b8cfbae5b80d28
    Image:      fabric8/fabric8-console:2.2.130
    Image ID:       docker://cb332a0944585b04cfb5281deb325aa0d55d8b1af9aa40a917de19164c59a60b
    QoS Tier:
      cpu:      BestEffort
      memory:       BestEffort
    State:      Running
      Started:      Wed, 11 May 2016 03:57:28 -0400
    Ready:      True
    Restart Count:  0
    Environment Variables:
      GOOGLE_OAUTH_SCOPE:       profile
      OAUTH_AUTHORIZE_PORT:     8443
      GOOGLE_OAUTH_CLIENT_ID:
      OAUTH_AUTHORIZE_URI:      https://rhel-cdk.10.1.2.2.xip.io:8443/oauth/authorize
      GOOGLE_OAUTH_AUTHENTICATION_URI:  https://accounts.google.com/o/oauth2/auth
      GOOGLE_OAUTH_CLIENT_SECRET:
      OAUTH_CLIENT_ID:          fabric8
      OAUTH_PROVIDER:           openshift
      GOOGLE_OAUTH_REDIRECT_URI:    https://fabric8.rhel-cdk.10.1.2.2.xip.io
      GOOGLE_OAUTH_TOKEN_URL:       https://www.googleapis.com/oauth2/v3/token
      KUBERNETES_NAMESPACE:     sample-project (v1:metadata.namespace)
Conditions:
  Type      Status
  Ready     True
Volumes:
  default-token-edcsw:
    Type:   Secret (a secret that should populate this volume)
    SecretName: default-token-edcsw
Events:
  FirstSeen LastSeen    Count   From            SubobjectPath               Reason      Message
  ─────────   ────────    ───── ────            ─────────────             ──────      ───────
  7m        7m      1   {kubelet rhel-cdk}  implicitly required container POD   Pulled      Container image "openshift3/ose-pod:v3.1.1.6" already present on machine
  7m        7m      1   {scheduler }                            Scheduled   Successfully assigned fabric8-lc588 to rhel-cdk
  7m        7m      1   {kubelet rhel-cdk}  implicitly required container POD   Created     Created with docker id bcfda9ae1be9
  7m        7m      1   {kubelet rhel-cdk}  implicitly required container POD   Started     Started with docker id bcfda9ae1be9
  1m        1m      1   {kubelet rhel-cdk}  implicitly required container POD   Pulled      Container image "openshift3/ose-pod:v3.1.1.6" already present on machine
  1m        1m      1   {kubelet rhel-cdk}  implicitly required container POD   Created     Created with docker id 7f4d66b98d98
  1m        1m      1   {kubelet rhel-cdk}  spec.containers{fabric8-container}  Pulling     pulling image "fabric8/fabric8-console:2.2.130"
  1m        1m      1   {kubelet rhel-cdk}  implicitly required container POD   Started     Started with docker id 7f4d66b98d98
  1m        1m      1   {kubelet rhel-cdk}  implicitly required container POD   Pulled      Container image "openshift3/ose-pod:v3.1.1.6" already present on machine
  1m        1m      1   {kubelet rhel-cdk}  implicitly required container POD   Created     Created with docker id f7669e61aaea
  1m        1m      1   {kubelet rhel-cdk}  implicitly required container POD   Started     Started with docker id f7669e61aaea
  1m        1m      1   {kubelet rhel-cdk}  spec.containers{fabric8-container}  Pulling     pulling image "fabric8/fabric8-console:2.2.130"
  10s       10s     1   {kubelet rhel-cdk}  spec.containers{fabric8-container}  Pulled      Successfully pulled image "fabric8/fabric8-console:2.2.130"
  9s        9s      1   {kubelet rhel-cdk}  spec.containers{fabric8-container}  Created     Created with docker id 79432828b804
  9s        9s      1   {kubelet rhel-cdk}  spec.containers{fabric8-container}  Started     Started with docker id 79432828b804
alberttwong commented 8 years ago
[vagrant@rhel-cdk ~]$ oc describe rc fabric8
Name:       fabric8
Namespace:  sample-project
Image(s):   fabric8/fabric8-console:2.2.130
Selector:   group=io.fabric8.apps,project=console,provider=fabric8,version=2.2.130
Labels:     group=io.fabric8.apps,project=console,provider=fabric8,version=2.2.130
Replicas:   1 current / 1 desired
Pods Status:    1 Running / 0 Waiting / 0 Succeeded / 0 Failed
No volumes.
Events:
  FirstSeen LastSeen    Count   From                SubobjectPath   Reason          Message
  ─────────   ────────    ───── ────                ───────────── ──────          ───────
  21m       21m     1   {replication-controller }           SuccessfulCreate    Created pod: fabric8-bkgc7
  8m        8m      1   {replication-controller }           SuccessfulCreate    Created pod: fabric8-lc588
  8m        8m      1   {replication-controller }           SuccessfulCreate    Created pod: fabric8-56v43
rawlingsj commented 8 years ago

So that looks like the pod started ok?

alberttwong commented 8 years ago

yeah.. that was weird.... I get a restart worked... thanks!

rawlingsj commented 8 years ago

It might have been that it took a while to pull the fabric8 console docker image, glad it's sorted.

alberttwong commented 8 years ago

https://github.com/fabric8io/gofabric8/pull/51

alberttwong commented 8 years ago

related. https://github.com/fabric8io/gofabric8/issues/54