Rayfin

Deploy to Fabric

Enable Fabric apps, sign in, deploy a Rayfin project with rayfin up, and confirm the static hosting URL.

Deploying publishes your Rayfin project as a managed Fabric app. Fabric hosts the AppBackend, data service, auth, Functions when enabled, and static frontend assets.

Prerequisites

  • A Rayfin project with rayfin/rayfin.yml.
  • A Microsoft account with access to a Fabric workspace.
  • Fabric apps enabled in the tenant.
  • A workspace with usable Fabric capacity, or permission to let the CLI prepare one.
  • npx rayfin login completed, unless the deploy command will start interactive sign-in.

Enable Fabric apps in your tenant

A Fabric tenant administrator must enable the workload before users can create App (preview) items.

  1. Open the Fabric admin portal.
  2. Go to Tenant settings.
  3. Under Fabric Apps (preview), switch the setting to Enabled.
  4. Choose whether to enable it for the whole organization or specific security groups.
  5. Click Apply.
  6. Wait a few minutes for the setting to propagate.

If you are not a tenant administrator, send this section to the person who manages Fabric tenant settings.

Create or let Rayfin create the App (preview) item

You can create the Fabric item first, or let the CLI create it during the first deploy.

Create it in the Fabric portal

  1. Open Microsoft Fabric and sign in.
  2. Select a workspace, or create one from Workspaces → New workspace.
  3. Assign Fabric capacity to the workspace if it does not already have one.
  4. In the workspace, select New item.
  5. Search for App (preview).
  6. Enter an item name and click Create.
  7. Open the item in VS Code or deploy a local Rayfin project to the same workspace.

Create it from the CLI

Run rayfin up from an existing Rayfin project. The first deploy creates an App (preview) item in the target workspace and records it in rayfin/.deployments.json.

npx rayfin up --workspace-id <workspace-guid>

Sign in

npx rayfin login
npx rayfin login status

Use service principal auth for CI:

npx rayfin login --service-principal   --client-id <app-registration-client-id>   --client-secret <secret>   --tenant <tenant-id>

Deploy

npx rayfin up

On the first deploy, rayfin up resolves the workspace, checks capacity readiness, creates or reuses a Fabric item, syncs runtime settings, applies the data schema, builds and uploads static content, deploys Functions when enabled, and writes rayfin/.deployments.json plus rayfin/.env.

Override the Fabric item display name without changing rayfin.yml:

npx rayfin up --item-name my-team-app

--item-name is new in Rayfin 1.36. New in 1.36

Prepare workspace capacity

Rayfin 1.36 can prepare a workspace and assign capacity during first deploys. New in 1.36

  • If the workspace already has usable capacity, Rayfin uses it.
  • In an interactive first deploy without a target, Rayfin asks whether to use a new workspace or select an existing workspace.
  • With --capacity-id <id>, Rayfin uses that capacity for the new target when capacity assignment is needed.
  • With --yes, deterministic capacity assignment prompts are approved automatically.
  • In non-interactive deploys, pass explicit workspace targeting, and pass --capacity-id when capacity selection would otherwise require a prompt.

Do not combine --capacity-id with --workspace, --workspace-id, --workspace-uri, or RAYFIN_WORKSPACE_ID.

Preview a deploy

npx rayfin up --dry-run --workspace-id <workspace-guid>

In Rayfin 1.36, dry run validates local inputs and resolves the workspace without creating or modifying resources. Changed in 1.36

Skip static or Functions deployment

rayfin dev is the normal development loop. Use --exclude-services for automation that intentionally runs deployment while skipping selected build/package/deploy phases:

npx rayfin up --exclude-services staticHosting
npx rayfin up --exclude-services functions

Skipping functions is supported in Rayfin 1.36. New in 1.36

Verify the deployment

npx rayfin up status
npx rayfin up status --json

Status verifies management access to the Fabric item. When static content has been deployed, JSON includes deployment.hostingUrl.

Manage recorded deployments

npx rayfin up list
npx rayfin up switch staging
npx rayfin up switch --workspace-id <workspace-guid>

up switch rewrites rayfin/.env for the active deployment and can regenerate .env.local unless --no-emit-env is set.

Sign out

npx rayfin logout
PromptDeploy this Rayfin project to Fabric
Deploy my Rayfin project to Microsoft Fabric. Run `npx rayfin login` if needed, then `npx rayfin up`. If this is the first deploy and no workspace is recorded, choose an appropriate Fabric workspace or use `--capacity-id` if I provided one. After deployment, run `npx rayfin up status --json` and report `deployment.hostingUrl`, the workspace ID, and the Fabric item ID. Do not use `rayfin up --exclude-services staticHosting` as the normal development loop; use `npm run dev` for local iteration.

Next

Something wrong on this page?Report an issueEdit this page

On this page