1.0.6 • Published 8 months ago

@spheron/compute v1.0.6

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

Usage

The package exports SpheronClient class, which includes methods for working with clusters, marketplace apps, cluster instances and their configurations. The constructor of SpheronClient takes in one parameter token. Check the Access Token section for information on how to create a token.

import SpheronClient from "@spheron/compute";
...
const client = new SpheronClient({ token });
await client.instance.create(
    configuration: {
      image: dockerImage,
      tag: dockerImageTag,
      ports: [{ containerPort: containerPort, exposedPort: exposedPort }],
      environmentVariables: [{ key:"key", value: "value"}],
      secretEnvironmentVariables: [{ key:"key", value: "secretValue"}],
      commands: [],
      args: [],
      region: deployRegion,
      machineImageId: computeMachineId,
    },
    healthCheckConfig: {
      path: healthCheckPath,
      port: healthCheckPort,
    },
    type: ComputeTypeEnum.DEMAND,
  }
);

For more information about the Compute methods, check out the DOCS

Access Token

To create the token that is used with the SpheronClient, follow the instructions in the DOCS. When you are creating the tokens, please choose compute type in the dashboard.

Learn More

You can learn more about Spheron and Compute SDK here:

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

11 months ago

1.0.1

12 months ago

1.0.0

12 months ago