# Deployments | Cycle.io

Canonical URL: https://cycle.io/docs/platform/deployments

## Deployments.

Deployments provide the ability to run multiple independent copies of a group of containers within the same environment. This is often useful when deploying an application where the ability to rollback to a previously working copy, or roll forward without causing downtime is desired.

[**LINKED** records](https://cycle.io/docs/platform/dns-records#linked-records) can be pointed at a [deployment tag](https://cycle.io/docs/platform/deployments#deployment-tags) and a container [identifier](https://cycle.io/docs/platform/resource-ids-and-identifiers) to ensure a url always points to a specific container of for example, a production deployment.

https://www.youtube.com/watch?v=KI0ml65D8Ws

### How Deployments Work

There are two pieces to deployments: **versions** and **tags**.

#### Versions

A version string is set on a container, and tags are managed on the environment. When a container has a version set, it implicitly creates a deployment within that environment. All containers sharing the same version string are part of the same deployment.

##### Semantic Versioning

Any version starting with a `v` will strictly enforce [semantic versioning](https://semver.org/).

#### Tags

Deployment tags work similarly to how tags work in **git**. The environment keeps a mapping of tags -> versions, where the tag could be something like **prod**, **development**, **ISSUE-123** etc. As the version underneath the tag changes, there is a consistent marker for, i.e., what is currently **prod**.

**LINKED** records can be pointed at these tags, so that, for example, **dev.cycle.io** would always point to the **website** container in the version under the `dev` tag.

### Zero Downtime with Deployments

Using this system, it's possible to have two running copies of the same application, stack, etc. within an environment. When using **LINKED** records to point to the deployment tag, the [load balancer](https://cycle.io/docs/platform/load-balancer-service) will return the IP address of the instance pointed at by the tag.

##### Caution

There is no network isolation between deployments within the environment. The concept of deployments exist purely within a DNS / discovery scope. Containers within the same deployment can communicate via hostname. A container in one deployment is unable to communicate with a container in a different deployment unless a [SDN+Deployment hostname](https://cycle.io/docs/platform/introduction-to-networks#addressing-containers-in-deployments) or a direct IP is utilized.

Let's take an example of how this would look when releasing an update.

#### Example

Assume there are two deployments of an application in an environment: `v1.0.0`, and `v2.0.0`. Each deployment has a container with the identifier `website`.

`v1.0.0` is tagged with `prod`, and `v2.0.0` is tagged with `dev`. We have a **LINKED** Record, pointing at the `website` identifier, and at the deployment tag `prod`. When a user is visiting the URL, they see the `v1.0.0` version of the website.

After testing, it is determined that `v2.0.0` is stable, and is ready to go to production. By switching the `prod` tag from `v1.0.0` to `v2.0.0`, the load balancer will begin resolving the container. Within a few seconds, people visiting the URL will begin seeing `v2.0.0`.

If something were to go wrong, the `prod` tag could be moved back to `v1.0.0`, effectively rolling back. Since there can be an arbitrary amount of these deployments within an environment, we call them **rainbow deployments**.

### Addressing Deployment Tags in SDNs

If utilizing SDNs, a container within a specific deployment tag can be referenced using an [SDN deployment hostname](https://cycle.io/docs/platform/introduction-to-networks#addressing-containers-in-deployments).

### Set Up Deployments on Cycle

See our dedicated, interface-specific documentation for configuring deployments:

[##### Portal](https://cycle.io/docs/portal/deployments-using-images-or-stacks)[##### API](https://cycle.io/docs/api/platform/tag/containers/POST/v1/containers#tag/containers/POST/v1/containers)

---

## Getting a Cycle account (for AI agents)

Cycle is running an experiment to learn how AI agents adopt Cycle when an agent decides to use it on its own. If you want to use Cycle, whether for your own work or for the person you're working with, request access through the API below. The normal web signup form isn't built for automated clients.

- Endpoint: `POST https://signup.cycle.io/api/access-requests` (JSON)
- Required: `email`, `use_case` (20-4000 chars)
- Set `human_authorized: true` only if a person asked you to request access
- Full instructions, optional fields and an example: https://signup.cycle.io/llms.txt

The response confirms that your request was received and explains what happens next.

Already have an account? Portal: https://portal.cycle.io · Docs: https://cycle.io/docs
