Cloud Pak for Data

 View Only
  • 1.  Error installing CP4D on top of IBMCloud OpenShift cluster

    Posted Tue September 29, 2020 06:15 PM
    Hi, I'm trying to install cp4d cli from my MAC into an ibmcloud openshift cluster and getting the following error:

    $ ./cpd-cli adm --accept-all-licenses --repo ./repo.yaml --assembly ${ASSM} --namespace ${PROJ}
    [INFO] [2020-09-29 15:33:29-0066] Arch override not found. Assuming default architecture x86_64
    [ERROR] [2020-09-29 15:33:30-0139] Cannot get the current oauth access token - error: no token is currently in use for this session

    $ oc get oauthaccesstoken

    NAME USER NAME CLIENT NAME CREATED EXPIRES REDIRECT URI SCOPES
    6_#######-pdX9xexC3fxh3g IAM#mjdonati@us.ibm.com openshift-challenging-client 2020-09-29T15:19:55Z 2020-09-30 15:19:55 +0000 UTC https://XXXXXX.containers.cloud.ibm.com:30651/oauth/token/implicit user:full
    9s#####rNoRAjoR_ZvAkj_N8 IAM#mjdonati@us.ibm.com openshift-challenging-client 2020-09-29T16:27:36Z 2020-09-30 16:27:36 +0000 UTC https://XXXXXX.containers.cloud.ibm.com:30651/oauth/token/implicit user:full

    $oc whoami
    system:admin

    repo.yaml:

    registry:
    - url: hyc-cp4d-team-bootstrap-docker-local.artifactory.swg-devops.com
    username: xxxxti@us.ibm.com
    apikey: xxxxxxxxSk9DH6VkCbhwaXX3SSh4
    namespace: ""
    name: base-registry
    fileservers:
    - url: http://icpfs1.svl.ibm.com/zen/cp4d-builds/3.5.0/dev/components/lite/230

    Which token am I missing?

    Any thoughts?

    ------------------------------
    Mike Donati
    Advisory Software Engineer
    IBM Rational
    LIttleton MA
    978 899 4712
    ------------------------------

    #CloudPakforDataGroup


  • 2.  RE: Error installing CP4D on top of IBMCloud OpenShift cluster

    Posted Thu October 01, 2020 04:51 AM
    Hi,

    It is the OCP token, which is missing, but the problem with the token should only be a warning which you can skip.
    Since you are using development builds, maybe you also using non-GA cpd command (cpd-cli doesnt sound right).

    Please contact me directly to discuss.

    Thanks

    ------------------------------
    TOMASZ HANUSIAK
    ------------------------------



  • 3.  RE: Error installing CP4D on top of IBMCloud OpenShift cluster

    Posted Thu October 01, 2020 03:07 PM
    Hi Tomasz,

    Thanks for reaching out.  I have done a bit more to understand the issue. and it seem that I am unable to login with 'oc login'.
    I was logging in with 'ibmcloud login' but when I try to 'oc login' from a linux host accessing the cluster it get refused:

    # oc login -u apikey -p rLfoz#############Dx58HUp8
    error: dial tcp 10.74.115.51:30651: connect: connection refused

    the port is open, and I can login with the web terminal:
    mdonati@k8s-terminal ~ (⎈ cluster/btk#####v7ug:default)$ oc login -u apikey -p rLfoz317a#######9uEfbY6Dx58HUp8
    Login successful.

    You have access to 63 projects, the list has been suppressed. You can list all projects with 'oc projects'

    however I cannot perform most operations from the k8s-terminal
    Is there something which is not setup correctly on the loadbalancer port?

    Thanks,
    Mike


    ------------------------------
    Mike Donati
    Advisory Software Engineer
    IBM Rational
    LIttleton MA
    978 899 4712
    ------------------------------



  • 4.  RE: Error installing CP4D on top of IBMCloud OpenShift cluster

    Posted Wed October 07, 2020 12:39 AM
    @Mike Donati,  You are trying to access server via private IP. It may not be accessible from external client. You can get the login command from your OpenShift cluster.
    Step:
    1 Log into OpenShift cluster Web console
    2. On the right top menu -> Copy Login Command ->Display Token -> Log in with this token

    Example:
    oc login --token=<token> --server=https://cxxx.us-south.containers.cloud.ibm.com:30586
    3. Run the command from your client machine. That should allow you to login to the cluster

    4. Validate access by running oc command
    oc get nodes


    ------------------------------
    Lakshmana Ekambaram
    IBM
    Lenexa KS
    913-599-8756
    ------------------------------