Description
The ol deploy command automatically deploys Docker containerized services on different deployment platforms.
Rules
- Login to the OL Hub.
Syntax
ol deploy PROJECT_NAME [OPTIONS]
Arguments
PROJECT_NAME (required)
The OL Hub name of the project. Since the project is downloaded from the hub, its name must be identical to the project name on the OL Hub.
Options
Deployer-specific options
The deployer-specific configuration parameters and values. For example, the --client-master-url option of the Openshift deployer and --url is an option of the ol-cloud deployer.
--deployer
The deployer name. For example, openshift or ol-cloud.
--profile, -p
The name of the deployment profile that you want to use with the deployer. If none is specified, the command will use the default deployment profile; see ol config deployer.
--project-version, -pv
The OL Hub project version
Example
> ol deploy demo-account-details --profile dev
$ ol deploy demo-account-details --profile dev
Extended Description
When running ol deploy, specify the project name and the deployment configuration profile. The profile contains all the information necessary for the deployment, including the deployer name and the docker image file name and location. In addition to the configuration profile, you can add a new configuration option and value or override an existing profile configuration option. To learn more about deployment configuration profiles, see ol config deployer.
In the example below, the dev's profile --client-master-url value is overridden with a new value.
> ol deploy demo-account-details --profile dev --client-master-url https://api.ol-cluster02.sdk-hub.com:6444
$ ol deploy demo-account-details --profile dev --client-master-url https://api.ol-cluster02.sdk-hub.com:6444
If the deployment is successful, the following message is displayed:
Service available at https://demo-account-details.ol-cluster02.sdk-hub.com
Now, you can use the URL to access the service.
The ol deploy command executes a different deployment script for each deployer; still, all deployer scripts perform the following activity flow when they are executed:
- Pulling the deployer configuration profile and the deployed project from the OpenLegacy Hub,
- Reading the deployment configuration profile,
- Pulling the docker image from the OpenLegacy Docker repository,
- Creating a Docker compose file that syncs the downloaded project metadata with the Docker image,
- Configuring the deployment platform to work with the Docker image,
- Outputting the deployment URL.