Search code examples
javakubernetesspring-batchopenshiftspring-cloud-dataflow

Deploying SCDF with Openshift


I'm trying to deploy the SCDF in Openshift using the Openshift Console. I'm following the instructions given in the following article,

Deploying with kubectl,

here there are 5 steps in order to successfully deploy the scdf in kubernates. My questions are, do we need all those steps to be executed.

Choose a Message Broker:

   When would be this service required exactly? I don't understand it's use completely here in my spring batch app.
  1. Deploy MySQL

    • Instead of executing this step, I plan to add my Oracle driver properties in "src/kubernetes/server/server-config.yaml". Will this affect the application startup anyway?
  2. Deploy Prometheus and Grafana

    • Removed them as it's not needed right now.
  3. Create Data Flow Role Bindings and Service Account
    • Though I executed this step, is it mandatory? I guess admins could add from the console itself, if i'm not wrong.
  4. Deploy Skipper
    • I'm using the Spring batch Application, and not using the streams. In case if its just spring batch application (with just readers, writers and listeners) do we still needs the skipper ?
  5. Deploy the Data Flow Server
    • Deploy this after all odds above.

Update

src/kubernetes/server/server-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: scdf-server
  labels:
    app: scdf-server
data:
  application.yaml: |-
    spring:
      cloud:
        dataflow:
          task:
            platform:
              kubernetes:
                accounts:
                  default:
                    limits:
                      memory: 1024Mi
      **datasource:
        url: jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT}/mysql
        username: root
        password: ${mysql-root-password}
        driverClassName: org.mariadb.jdbc.Driver
        testOnBorrow: true
        validationQuery: "SELECT 1"**

Solution

  • Please take some time to review the concepts and architecture specifics from the docs.

    A message broker is only required when you're using the streaming capabilities in SCDF. Skipper is required only also for streaming use-cases, so you can ignore both.

    On that topic, we have a batch-only recipe to help highlight the differences. While the recipe itself is targeted for local deployment experience, it'd be similar for K8s as far as you're setting the right feature-toggle properties in SCDF.

    1) you can use any of the supported RDBMS options.

    2) If you don't need it, sure.

    3) It is required. An admin or someone with enough privileges can help set it up once for the given SCDF deployment, so the CRUD operations are governed within the cluster boundaries.

    4) You don't need it if you're on batch-only mode.