How to persist data across OCIS updates

Steps to reproduce

  1. Get new image from docker pull owncloud/ocis:latest
  2. Run it with docker run
  3. Get error: The service account id has not been configured for ocm. Make sure your /etc/ocis config contains the proper values (e.g. by running ocis init or setting it manually in the config/corresponding environment variable).
  4. Run it with init → docker run --rm -it -v $(pwd):/etc/ocis/ owncloud/ocis:latest init
  5. Cannot log in with prev creds since data and user accounts are wiped

Expected behaviour

Would expect to still have user and data after updating OCIS via Docker

I’d like to try rolling updates of 6.x.x but having to delete data every time is a hassle.

No need to delete Data.

Just set the missing config variables.

We have some well maintained deployment examples which are deployed daily in our CI/CD.

They should serve everybody as a starting point.

I your case, you seem to not persist your ocis data and config volumes.

Hey Andres,

Yeah, data persistence is key! Check the official guide on volume mounts for docker - it should help you keep your data safe during updates.

Sorry, here’s my docker-compose.yaml file:

services:
  ocis:
    image: owncloud/ocis-rolling:6.1.0
    container_name: ocis_runtime
    ports:
      - "9200:9200"
    volumes:
      - "/efs-mount:/var/lib/ocis"
      - "./ocis/ocis-config:/etc/ocis"
      - "./web-config/:/config"
      - "./web/dist:/dist"
      - "./ocis/logs:/logs"
    environment:
      OCIS_LOG_FILE: "/logs/output.log"
      STORAGE_USERS_DRIVER: "s3ng"
      STORAGE_USERS_S3NG_ROOT: "/var/lib/ocis/metadata"
      STORAGE_SYSTEM_DRIVER: "ocis"
      STORAGE_USERS_S3NG_ENDPOINT: "https://s3.us-east-2.amazonaws.com"
      STORAGE_USERS_S3NG_REGION: "us-east-2"
      STORAGE_USERS_S3NG_ACCESS_KEY: "XXXXXXXX"
      STORAGE_USERS_S3NG_SECRET_KEY: XXXXXXXX"
      STORAGE_USERS_S3NG_BUCKET: "ocisbucket"
      OCIS_INSECURE: "false"
      PROXY_ENABLE_BASIC_AUTH: "false"
      PROXY_HTTP_ADDR: "0.0.0.0:9200"
      WEB_UI_THEME_SERVER: "https://example.com"
      WEB_UI_THEME_PATH: "/ocis/theme/theme.json"
      WEB_ASSET_CORE_PATH: "/dist"
      WEB_UI_CONFIG_FILE: "/config/config.json"
      WEB_OIDC_CLIENT_ID: "web"
      OCIS_URL: "https://ocis.example.com"
      PROXY_AUTOPROVISION_ACCOUNTS: "true"
      PROXY_ROLE_ASSIGNMENT_DRIVER: "oidc"
      OCIS_OIDC_ISSUER: "https://example.com"
      PROXY_OIDC_REWRITE_WELLKNOWN: "true"
      PROXY_USER_OIDC_CLAIM: "preferred_username"
      PROXY_USER_CS3_CLAIM: "username"
      PROXY_OIDC_SKIP_USER_INFO: "true"
      OCIS_ADMIN_USER_ID: ""
      OCIS_EXCLUDE_RUN_SERVICES: "idp"
      GRAPH_ASSIGN_DEFAULT_USER_ROLE: "false"
      GRAPH_USERNAME_MATCH: "none"
      PROXY_CSP_CONFIG_FILE_LOCATION: "/etc/ocis/csp.yaml"

I see users are stored on S3, so perhaps I’m not updating correctly?

Looking at ocis/deployments/continuous-deployment-config at master · owncloud/ocis · GitHub, what config variables am I looking for?

Is this the official guide oCIS - ownCloud Infinite Scale | ownCloud?

That is not correct. STORAGE_USERS is ths file storage.

Nevermind, my config was fine, all I had to do was these 4 steps Container Setup