Voedger Internals
  • Introduction
  • 💡Concepts
    • Event Sourcing & CQRS
    • Editions (deprecated)
      • Community Edition
      • Standart Edition
      • Standart Edition (v1)
  • 🚀Server
    • Overview (Server)
    • Design
      • Query Processor
      • API Gateway implementation
      • N1 Cluster
      • N3 Cluster
      • N5 Cluster
      • Orchestration
      • Sequences
      • Packages overview
        • sys
        • registry
    • Features
      • API Gateway
        • API v2
          • Conventions
            • API URL
            • HTTP methods and processors
            • Naming conventions
            • Query constraints
            • Error handling
          • Documents and records
            • Create document or record
            • Update document or record
            • Deactivate document or record
            • Read document or record
            • Read from CDoc collection
          • Queries
            • Read from query
          • Views
            • Read from view
          • Commands
            • Execute command
          • BLOBs
            • Create BLOB
            • Read BLOB
          • Temporary BLOBs
            • Create temporary BLOB
            • Read temporary BLOB
          • Schemas
            • List app workspaces
            • List workspace roles
            • Read workspace role schema
        • API v1
          • API Conventions
          • BLOBs
      • Admin Endpoint
      • Clusters
        • Bootstrap
        • Monitoring
        • Secure prometheus and grafana
        • Alerting
        • Maintenance
          • SELECT, UPDATE
      • VVMs
      • Applications
        • Deploy Application
        • Sidecar Applications
      • AuthNZ
        • Issue Principal Token
        • Refresh Principal Token
        • Enrich Principal Token
        • ACL Rules
        • Global Roles
      • Data types
        • Core types
        • Small integers
        • Uniques With Multiple Fields
        • Verifiable Fields
      • Workspaces
        • Create Workspace
        • Deactivate Workspace
        • See also (Workspaces)
      • Invites
        • Invite to Workspace
        • Join Workspace
        • Leave Workspace
        • Cancel sent Invite
        • Cancel accepted Invite
        • Update Invite roles
      • Users
        • Create a new user
        • Change user password
        • Send Email
        • Reset password
        • Change Email
      • Notifications
        • Heartbeats
      • Devices
        • Create a new device
        • Join device to workspace
      • Jobs
      • DMBS Drivers
        • AmazonDB Driver
      • Frozen
        • Ephemeral Storage
        • Storage Extensions
  • 🛠️Framework
    • Overview (Framework)
    • Features
      • vpm
      • vpm init
      • vpm tidy
      • vpm baseline
      • vpm orm
      • vpm build
      • API for testing
  • Development
    • Requirements Management
    • Requirements Management (Overview)
Powered by GitBook
On this page
  • Motivation
  • Technical design
  • Overview
  • pkg/btstrp.Bootstrap(bus IBus, IAppStructsProvider, appparts, clusterApp ClusterBuiltInApp, otherApps []BuiltInApp) error
  • c.cluster.DeployApp(app)
  • apppartsctrl.New(...): Get rid of builtInApps

Was this helpful?

Edit on GitHub
  1. 🚀Server
  2. Features
  3. Clusters

Bootstrap

PreviousClustersNextMonitoring

Last updated 5 months ago

Was this helpful?

Motivation

Problem: Applications and their partitions are deployed using cluster app, how to deploy the cluster application itself?

Solution: Bootstrap process. It "deploys" the cluster app and then uses this app to deploy built-in apps.

  • https://github.com/voedger/voedger/issues/1890

Technical design

Overview

    • "internal services"

    • "admin endpoint", vvm.provideAdminEndpoint()

    • "bootstrap", vvm.provideBootstrapOperator()

      • calls btstrp.Bootstrap(...)

    • "public endpoint"

    • "async actualizers"

  • Start pipeline

  • If DoSync returns error => shutdown

pkg/btstrp.Bootstrap(bus IBus, IAppStructsProvider, appparts, clusterApp ClusterBuiltInApp, otherApps []BuiltInApp) error

Params

  • otherApps does NOT include blobber, router

Alg

  • Deploy cluster app

    • Initialize cluster application workspace, if needed, using IAppStructsProvider

      • All ID must be predefined

    • Create blobber and router storages, if needed

      • Initialize AppStorageBlobber (* IAppStorage), AppStorageRouter (* IAppStorage)

      • sysmeta storage will be implicitly created, if needed

    • appparts: deploy single clusterApp partition

      • Note for the future: Must be scheduled to the Bootstrap Leader

  • Deploy builtin apps

    • For each app in otherApps

      • c.cluster.DeployApp(app)

        • Use Admin Endpoint to send requests

        • panic if not ok

        • Read/write to the table App + some views

  • Deploy partitions of builtin apps

    • For each app builtInApps

      • appparts: DeployApp

      • appparts: DeployAppPartition

c.cluster.DeployApp(app)

AuthN

  • System

Params

  • AppQName

  • AppDeploymentDescriptor // cluster.AppDeploymentDescriptor

Alg

  • Idempotent

  • Check application compatibility (409)

  • Create storage if not exists

  • Initialize appstructs data

  • Initialize App Workspaces

apppartsctrl.New(...): Get rid of builtInApps

  • Get rid of builtInApps

refactor bootstrap, #2005
Wire service pipeline, provideServicePipeline()
pkg/btstrp