Widemesh Component: Stacks

Widemesh Stacks

A Widemesh Stack builds and keeps its Services synchronized to a version of the source code deployed.

Stack names are unique within environments and are part of the DNS names for the services inside them.

Polyglot Applications

An environment could feature one or more stacks, each Stack deploying source-code based on different programming languages, enabling the creation of polyglot cloud apps.

Example:

  • frontend developed with Node.js
  • backend developed with Ruby

Formulas

Stack builds its source code independently from each other using formulas; Widemesh only supports two types of formula: buildpack and dockerfile with buildpack being the default for all new stacks unless otherwise specified.

To create a stack with buildpack formula:

mesh create stack --buildpack

To create a stack with dockerfile formula:

mesh create stack --dockerfile

Same with deployments: mesh deploy --buildpack or mesh deploy --dockerfile.

Intra-DNS Resolution

Each Stack composes part of the DNS resolution of each of its service hostnames, the format for service hostnames is as follows:

<stack-name>-<service-name>

Example: If the Stack is named app then to perform network request to its services web or worker you could use the hostname app-web and app-worker like in curl http://app-web and curl http://app-worker.