Widemesh Environments

A Widemesh Environment is a network-isolated group of Stacks and Services; picture Environments as the flexible version of a cloud application programmed in one or more programming languages.

Each environment lives in a Rack, and its stack and services communicate freely in the network isolated from other services of other environments in the same Rack.

Environments groups together:

Each environment is given a unique name in the entire platform.

Learning the Basics

Typically the first environment created in your account is automatically created by mesh deploy, but you can provision a new empty environment with the following command:

mesh env create

You can list all your environments by typing:

mesh env ls

You can always delete environments an all it’s component by typing:

mesh env delete

Logging

Widemesh automatically aggregates logs produced by the instances of your app in a central place, and you can access it real-time with the following command:

mesh logs

Widemesh stores up to 1 hour and 500 Megabytes of logs at the time. By default, the command only shows the last minute of recorded log entries. To go beyond 1 minute of written logs, you can pass --since and some time duration.

Example time durations:

  • 1h = 1 hour
  • 15m = 15 minutes
  • 30s = 30 seconds

For example, the following command streams all the logs available in the last hour:

mesh logs --since 1h

Advanced

Migrating between Racks

There area few scenarios why you may want to move an environment between Racks:

  • When migrating to a more convenient Region of your Cloud Provider closer to your users.
  • When migrating to a new Cloud Provider Vendor
  • When migrating to a new Cloud Provider Account.

Migrating between racks is an operation subject to DNS propagation times, which in some cases could take up to 24 hours to propagate globally.

To avoid disruption of traffic as the DNS records propagate, Widemesh allows you to host the environment in multiple racks concurrently as a temporary measure when migrating to new racks. It’s as simple as typing:

mesh env update my-environment --rack my-old-rack,my-new-rack

The command above instructs Widemesh to host your environment in both my-old-rack and my-new-rack while the DNS propagates.

Note: The order of the --rack argument matter, the last Rack listed should be the new Rack.

Once you’re confident the new Rack is receiving all the traffic, then you can update the environment again to only leave the new Rack running:

mesh env update my-environment --rack my-new-rack

The command above effectively removes the environment from my-old-rack.

Note: While removing a rack from an environment frees resources from the Rack, it does not delete the Rack itself, and your cloud vendor still charges you even if the old Rack is empty after the migration.