Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

How to manually install the service

David Cohen edited this page Sep 9, 2019 · 12 revisions

note: We are having success using Fyre to set up our Clusters: https://github.ibm.com/was-aas/wasdevaas/wiki/Kabanero-Fyre

Run the kabanero foundation script ( https://kabanero.io/docs/#scripted-kabanero-foundation-setup.html )

The URL of the service will be https://yourFyreDomainName/v1/login

e.g. https://kabanero-cli-kabanero.thills1.fyre.ibm.com/v1/login

The following is now automated via the Operator and is no longer necessary:

******************* No longer needed *******************

The Kabanero Operator will install the kabanero-cli service in the near future. For now you can follow these instructions to install.

We assume that Kabanero Operator has already been installed. We use the Kabanero Operator's Service Account

Deploy the service

deployment.yaml:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "2"
  creationTimestamp: 2019-08-06T19:39:45Z
  generation: 2
  name: kabanero-cli
  namespace: kabanero
  resourceVersion: "4827076"
  selfLink: /apis/extensions/v1beta1/namespaces/kabanero/deployments/kabanero-cli
  uid: f15b5628-b881-11e9-9286-005056a2efe6
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: kabanero-cli
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: kabanero-cli
    spec:
      containers:
      - image:  my-docker-image
        imagePullPolicy: Always
        name: kabanero-api
      - env:
          - name: groupsForTeam_test_roles_kabanero_io
            valueFrom:
              configMapKeyRef:
                key: groupsForTeam_test_roles_kabanero_io
                name: role-config1
          - name: KABANERO_CLI_NAMESPACE
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.namespace
        ports:
        - containerPort: 9080
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: kabanero-operator
      serviceAccountName: kabanero-operator
      terminationGracePeriodSeconds: 30

run oc apply deployment.yaml

service.yaml:

apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2019-08-06T19:43:43Z
    name: kabanero-cli
    namespace: kabanero
    resourceVersion: "1668337"
    selfLink: /api/v1/namespaces/kabanero/services/test-kab-collections
    uid: 7f6f9c15-b882-11e9-9286-005056a2efe6
  spec:
    externalTrafficPolicy: Cluster
    ports:
    - nodePort: 31000
      port: 9080
      protocol: TCP
      targetPort: 9080
    selector:
      app: kabanero-cli
    sessionAffinity: None
    type: NodePort

run oc apply service.yaml

run oc create configmap role-config1 --from-literal=groupsForTeam_test_roles_kabanero_io=admin

Access the Service

run oc describe pod <your pod> and check which node its running on. Add an /etc/hosts entry for the IP of the host where the service is running. You also need the nodePort from the service.yaml above. In this example: 31000

The URL of the service will be http://your-node:31000/KabCollections/v1/collections

Clone this wiki locally