ol config deployer

Create or update deployer profile

Description

The ol config deployer command creates or updates deployer profiles containing the configuration parameter of each deployer. Once it is created, the profile is saved in the OL Hub backend. Finally, the profile configuration parameters are loaded when the deployer is run with the ol deploy command.

Rules

  • Login to the OL Hub.

Syntax

ol config deployer DEPLOYER_NAME [OPTIONS]

Arguments

DEPLOYER_NAME (required)

The name of the deployer plugin for which you want to create or update a profile, e.g., openshift, ol-cloud.

Options

Deployer-specific options

The deployer-specific configuration parameters and values. 

--profile, -p

The name of the deployment profile that you want to create or update, e.g., "dev", "prod" 

--default

Apply the --default flag to insert the deployer-specific options used in the command to the default profile. If the option already exists in the default profile, it will be overridden.

--rewrite

Rewrite the configuration profile.

Example

> ol config deployer openshift --client-master-url https://api.ol-cluster02.sdk-hub.com:6443 --client-token token --namespace default --replicas 1 --image=openlegacy/oracle-db:latest --selector app=oracle content_co
$ ol config deployer openshift --client-master-url https://api.ol-cluster02.sdk-hub.com:6443 --client-token token --namespace default --replicas 1 --image=openlegacy/oracle-db:latest --selector app=oracle content_co

Extended Description

A deployer profile consists of a set of deployer-specific configuration options. Instead of explicitly specifying those options, you can add the option set by specifying the profile name. 

You can create several profiles for the same deployer plugin to satisfy particular use cases. For example, you can define one deployer profile under the name "dev" that includes properties of the development environment and another under "prod" that works with the production environment.

Creating a default deployer profile

The default deployer profile is created automatically on the first execution of the ol config deployer or the ol deploy command

 To create a default deployer profile, run the ol config deployer command.

> ol config deployer openshift --client-master-url https://api.ol-cluster02.sdk-hub.com:6443 --client-token token --namespace default --replicas=1 --image openlegacy/oracle-db:latest --selector app=oracle
$ ol config deployer openshift --client-master-url https://api.ol-cluster02.sdk-hub.com:6443 --client-token token --namespace default --replicas=1 --image openlegacy/oracle-db:latest --selector app=oracle

The following profile is created in the OpenLegacy Hub:

{
    "elements": [
        {
            "id": "00a70535-176e-43d8-a757-546b82653f5c",
            "name": "openshift",
            "modifiedAt": "2021-10-19T14:38:40.502428Z",
            "modifiedBy": "",
            "createdAt": "2021-10-19T14:38:40.008329Z",
            "type": "OPENSHIFT",
            "profiles": {
                "$default": {
                    "image": "openlegacy/oracle-db:latest",
                    "hubUrl": "https://api.ol-hub.com",
                    "command": "",
                    "replicas": 1,
                    "selector": {
                        "app": "oracle"
                    },
                    "hubApiKey": null,
                    "namespace": "default",
                    "clientToken": "token",
                    "clientMasterUrl": "https://api.ol-cluster02.sdk-hub.com:6443"
                }
            }
        }
    ],
    "total": 1
}

Creating a deployer profile

To create a deployer profile with a specified name use the --profile option. 

> ol config deployer openshift --profile dev --client-master-url https://api.ol-cluster02.sdk-hub.com:6443 --namespace=default --replicas 1 --selector app=oracle
$ ol config deployer openshift --profile dev --client-master-url https://api.ol-cluster02.sdk-hub.com:6443 --namespace=default --replicas 1 --selector app=oracle

The additional profile is created in the OpenLegacy Hub:

{
    "elements": [
        {
            "id": "00a70535-176e-43d8-a757-546b82653f5c",
            "name": "openshift",
            "defaultDeployer": true,
            "modifiedAt": "2021-10-20T15:54:09.119456Z",
            "modifiedBy": "Dori Frost",
            "createdAt": "2021-10-19T14:38:40.008329Z",
            "type": "OPENSHIFT",
            "profiles": {
                "$default": {
                    "image": "openlegacy/oracle-db:latest",
                    "hubUrl": "https://api.ol-hub.com",
                    "command": "",
                    "replicas": 1,
                    "selector": {},
                    "hubApiKey": null,
                    "namespace": "default",
                    "clientToken": "token",
                    "clientMasterUrl": "https://api.ol-cluster02.sdk-hub.com:6444"
                },
                "cobol-cics": {
                    "image": "openlegacy/mf-cics-ts",
                    "hubUrl": "https://api.ol-hub.com",
                    "command": "",
                    "replicas": "1",
                    "selector": {},
                    "hubApiKey": null,
                    "namespace": "default",
                    "clientToken": "token",
                    "clientMasterUrl": "https://api.ol-cluster02.sdk-hub.com:6444"
                }
            }
        }
    ],
    "total": 1
}

Updating a deployer profile

To update a deployer profile, run the ol config deployer module with the options you want to update. For example, to update the default profile run:

> ol config deployer openshift --client-master-url https://api.ol-cluster02.sdk-hub.com:7554 content_copy
$ ol config deployer openshift --client-master-url https://api.ol-cluster02.sdk-hub.com:7554 content_copy

To update the "dev" profile run

> ol config deployer openshift --profile "dev" --client-master-url=https://api.ol-cluster02.sdk-hub.com:7554
$ ol config deployer openshift --profile "dev" --client-master-url=https://api.ol-cluster02.sdk-hub.com:7554

❗️

You can omit options with the same values as the existing profile options.