Create, Update & Destroy
Create and use ephemeral environments to develop and test your application
An environment is composed of the service(s) you will develop and their dependencies (and dependencies of dependencies...).
When you create a new environment, you only need to specify the development candidates. These are the services you wish to develop. Velocity will automatically detect all their dependencies and will provide you with a working environment for the selected development candidates.
veloctl env create --service serviceA [--service <service_name>]
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
If you want to control the name of your environment, use the optional name parameter:
veloctl env create --service serviceA marty-timemachine-fix
In some cases, you may want to test a new version of your environment configuration without changing the main blueprint.
To do so, create an environment from a blueprint file
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 exists)
After an environment is created, you can update it by using the
env update
command.Update all running services to reflect changes in the latest blueprint:
veloctl env update
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 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. Services defined in your blueprint can be added to your running environment with the following command:
veloctl env update -s <service-to-be-added>
You can remove services that no other running 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.
Similarly to
env create
, env update
can be run using a blueprint file that includes all or part of the environment configuration. Update all running services based on the blueprint file:
veloctl env update --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 components, use the
--source
flag.veloctl env update --file blueprint.yaml --source my-source
When you are done with development and wish to destroy your 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 environment is destroyed, a confirmation will be displayed:
Environment successfully destroyed
Last modified 1d ago