Fuzzball Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Example 1. Data Ingress using an Ephemeral Volume

This example demonstrates how volume creation, data ingress, and mounts work. We will create an ephemeral volume (called eph_vol_1), accomplish data ingress from a public GitHub repo, mount the volume into a job container, and access the data using the program cat.

This example will work for you without any modification because there are no secrets involved.

version: v1
volumes:
  eph_vol_1:
    reference: volume://user/ephemeral
    ingress:
      - source:
          uri: https://raw.githubusercontent.com/octocat/Hello-World/master/README
        destination:
          uri: file://README
jobs:
  cat-file:
    image:
      uri: docker://alpine
    mounts:
      eph_vol_1:
        location: /data
    command:
      - /bin/sh
      - '-c'
      - cat /data/README
    resource:
      cpu:
        cores: 2
        affinity: NUMA
      memory:
        size: 2GB

The job outputs the following text in the logs.

Hello World!

This pattern works well in situations where you need to access publicly available data (from a public git repo, ftp server, etc) and the result of your analysis can be reasonably obtained from logs instead of saving output data via egress or a persistent volume.