Search
⌃K

Create, Update & Destroy

Create and use ephemeral environments to develop and test your application

Creating an environment

Velocity Environments are composed of the service(s) you will develop and their dependencies (and dependencies of dependencies...).
When you create a new Velocity Environment, you only need to specify the development candidates you want to work on locally. These are the services you wish to develop. Velocity will then automatically detect all their dependencies and will provide you with a working Velocity Environment for the selected development candidates.
veloctl env create --service serviceA [--service <service_name>]

Using Specific Versions

If you want to request a specific image tag for a service, you may add the image tag definition
veloctl env create --service serviceA:branch-123 [--service service:v3.2.0]
The requested tag must be available in your image registry

Naming Your Environment

If you want to control the name of your Velocity Environment, use the optional name parameter:
veloctl env create --service serviceA marty-timemachine-fix
The above command will create a Velocity Environment named marty-timemachine-fix.

Creating an environment from a blueprint file

In some cases, you may want to test a new version of your Velocity Environment configuration without changing the main Velocity Blueprint.
To do so, create an environment from a local Blueprint file, like so:
veloctl env create --file config.yml --override
When using --override the entire environment will be defined by the specified file.
To use a partial Blueprint file that is associated with a specific source, and merge it with the other Blueprint components, use the --source flag.
veloctl env create --file blueprint.yaml --source my-source
If --source isn't specified, the file will be associated with the "default" source (if it exists).
Learn More: Read our CLI Reference to learn more about creating environments.

Updating an environment

After a Velocity Environment is created, you can update it by using the env update command.

Updating to the latest blueprint

Update all running services to reflect changes in the latest Blueprint:
veloctl env update

Updating specific services

Update some services while keeping others untouched.
When running this command, the specified services will be updated based on the latest definition of the committed Velocity Blueprint.
veloctl env update -s <service-to-be-updated>
Please note that if you created the environment using the --file flag, you might have added services that don't exist in the main blueprint. Therefore, env update -s may fail. To update such services, use env update --file with an updated specification of the service.

Adding services to a running environment

Services defined in your Blueprint can be added to your running environment with the following command:
veloctl env update -s <service-to-be-added>

Removing services from a running environment

You can remove Velocity Services that no other running Velocity Service depends on by running:
veloctl env update -s <sevice-to-be-removed> --remove
NOTE: if a service is listed as a dependency of another running service, it cannot be removed from your environment.

Updating an environment using a blueprint file

Similarly to env create, env update can be run using a Blueprint file that includes all or part of the Velocity Environment configuration.
To use a partial Blueprint file that is associated with a specific source and merge it with the other components, use the --source flag.
veloctl env update --file blueprint.yaml --source my-source
Learn More: Read our CLI Reference to learn more about updating environments.

Destroying an environment

When you are done with development and wish to destroy your Velocity Environment, you can use the env destroy command:
# Implicitly (if `env current` was used)
veloctl env destroy
# ? Are you sure you want to destroy the 'exciting-friday-64' environment? (y/N)
# Explicitly
veloctl env destroy nice-afternoon-29
# Without confirmation
veloctl env destroy -y nice-afternoon-29
Once the Velocity Environment is destroyed, a confirmation will be displayed:
Environment successfully destroyed
Learn More: Read our CLI Reference to learn more about destroying environments.