Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create design for RemoteConfig #657

Open
2 tasks
Tracked by #400
jeromy-cannon opened this issue Oct 8, 2024 · 2 comments
Open
2 tasks
Tracked by #400

Create design for RemoteConfig #657

jeromy-cannon opened this issue Oct 8, 2024 · 2 comments
Assignees
Labels
Design Issue/PR for feature design documents P0 An issue impacting production environments or impacting multiple releases or multiple individuals.

Comments

@jeromy-cannon
Copy link
Contributor

jeromy-cannon commented Oct 8, 2024

interface SemanticVersion {
  major: number // MAJOR version when you make incompatible API changes
  minor: number // MINOR version when you add functionality in a backward compatible manner
  package: number // PATCH version when you make backward compatible bug fixes
}

NOTE: node-semver provides a library for working with semantic compliant versions, greater than, less than, etc. The project published a new version 3 months ago and seems to be actively maintained with nearly 350M downloads per week.

interface Migration {
  migratedAt: Date
  migratedBy: EmailAddress // see https://github.com/hashgraph/solo/issues/590
  fromVersion: SemanticVersion
}

interface ConfigMetaData {
  name: string // name of the deployment also same as namespace
  lastUpdatedAt: Date
  lastUpdateBy: EmailAddress // see https://github.com/hashgraph/solo/issues/590
  migration: Migration
}

enum ComponentType {
  ConsensusNode = "CONSENSUS_NODE"
  HaProxy = "HAPROXY"  // HAProxy Service
  EnvoyProxy = "ENVOY_PROXY" // Envoy Service
  MirrorNode = "MIRROR_NODE"
  MirrorNodeExplorer = "MIRROR_NODE_EXPLORER"
  Relay = "RELAY"
}

interface Component {
  name: string
  cluster: string
  namespace: string
}

interface RelayComponent extends Component {
  consensusNodeAliases: string[]
}

interface RemoteCommand {
  version: SemanticVersion
  metadata: ConfigMetaData
  clusters: Map<cluster: string, namespace: string>
  components: Map<componentType: ComponentType, Map<componentName: string, component: Component>>
  constructor(localConfig: localConfig, namespace?: string, cluster?: string, context?: string) : RemoteCommand
  async read(): boolean
  async write(): boolean
}

Tasks

required by: #591

@jeromy-cannon jeromy-cannon added Design Issue/PR for feature design documents P1 High priority issue. Required to be completed in the assigned milestone. labels Oct 8, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Solo Oct 8, 2024
@jeromy-cannon jeromy-cannon moved this from 🆕 New to 🔖 Ready in Solo Oct 8, 2024
@jeromy-cannon jeromy-cannon added P0 An issue impacting production environments or impacting multiple releases or multiple individuals. and removed P1 High priority issue. Required to be completed in the assigned milestone. labels Oct 11, 2024
@jeromy-cannon jeromy-cannon self-assigned this Oct 24, 2024
@jeromy-cannon
Copy link
Contributor Author

  • Mutation command/subcommands:
    • solo cluster setup
    • solo cluster reset
    • solo mirror-node deploy
    • solo mirror-node destroy
    • solo network deploy
    • solo network destroy
    • solo network refresh - currently not used or tested...
    • solo relay deploy
    • solo relay destroy
    • solo node setup
    • solo node start
    • solo node stop
    • solo node refresh
    • solo node add
    • solo node add-prepare
    • solo node add-submit-transactions
    • solo node add-execute
    • solo node update
    • solo node delete
    • solo node delete-prepare
    • solo node delete-submit-transactions
    • solo node delete-execute
    • solo node prepare-upgrade
    • solo node freeze-upgrade
    • solo account init
    • solo account update - I think this could cause issues if it was a system account
    • (skip) solo account create - I think this does not require a lock/lease because it is a new account and won't impact the state of the deployement

@jeromy-cannon
Copy link
Contributor Author

```mermaid
flowchart TD
    subgraph LocalConfiguration
        A[LocalConfig]
        A --> |"saved as"| B[~/.solo/solo-local-config.yaml]
        B --> |"userEmailAddress"| F["EmailAddress"]
        B --> |"deployments"| L["Deployment Map"]
        L --> M["Deployment name: string"]
        L --> N["Deployment clusters: string[]"]
    end

    subgraph RemoteConfiguration
        C[RemoteConfig]
        C --> |"stored as ConfigMap"| D[solo-remote-config]
        D --> |"in namespace"| E[solo-e2e]
    end

    subgraph ClusterContexts
        O[Clusters]
        P[Context/Cluster Relationship]
        Q["context: kind-cluster-solo-1"]
        R["context: kind-cluster-solo-2"]
        S["cluster-1"]
        T["cluster-2"]
    end

    A --> |"created with"| "solo context use --context solo-e2e --namespace solo-e2e --cluster solo-e2e"
    A -.-> |"validates with"| C
    C -.-> |"retrieved by"| "solo context get --context solo-e2e --namespace solo-e2e --cluster solo-e2e"

    subgraph DeploymentProcess
        V["solo deployment create --namespace solo-e2e"]
        W[Prompts for Clusters]
        W --> X["Clusters: cluster-1, cluster-2"]
        W --> Y["Contexts: kind-cluster-solo-1, kind-cluster-solo-2"]
        V --> W
    end

    A --> |"updated with new deployment"| X & Y
    C -.-> |"RemoteConfig generated in clusters"| X & Y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Issue/PR for feature design documents P0 An issue impacting production environments or impacting multiple releases or multiple individuals.
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant