|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: aap_ocp_install |
| 4 | +parent: infra.aap_utilities |
| 5 | +--- |
| 6 | + |
| 7 | +# infra.aap_utilities.aap_ocp_install |
| 8 | + |
| 9 | +A role to install Ansible Automation Platform (AAP) 2.x on OpenShift using the operator. |
| 10 | + |
| 11 | +## Requirements |
| 12 | + |
| 13 | +This role requires the `kubernetes` (version 12.0.0 or later) Python module. |
| 14 | +In addition the kubernetes.core and redhat.openshift Ansible collections are required. |
| 15 | + |
| 16 | +## Role Variables |
| 17 | + |
| 18 | +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. |
| 19 | + |
| 20 | +| Variable Name | Required | Default Value | Description | |
| 21 | +| aap_ocp_install_namespace | Yes | None | Namespace to create operator, controller, and hub in | |
| 22 | +| aap_ocp_install_create_namespace | No | None | Create the Namespace for the operator, controller and hub. Valid values are: `true`, `false` | |
| 23 | +| aap_ocp_install_namespace_manifest_overrides | No | None | Namespace to create operator, controller, and hub in | |
| 24 | +| aap_ocp_install_connection | Yes | None | Dictionary containing keys defined in the `connection variables table` | |
| 25 | +| aap_ocp_install_operator | Yes* | None | YAML Manifest to override the generated operator `Namespace` resource | |
| 26 | +| aap_ocp_install_controller | Yes* | None | Dictionary containing keys defined in the `controller variables table` | |
| 27 | +| aap_ocp_install_hub | Yes* | None | Dictionary containing keys defined in the `hub variables table` | |
| 28 | + |
| 29 | +\* Variable and required keys must be defined when the type of tag is specified (e.g. `--tags controller` requires the aap_ocp_install_controller variable be defined). |
| 30 | +If the variable is omitted the corresponding component will not be installed (e.g. if only aap_ocp_install_hub variable is defined then the operator and controller installation will be skipped) |
| 31 | + |
| 32 | +### aap_ocp_install_connection keys |
| 33 | + |
| 34 | +| Key Name | Required | Default Value | Description | |
| 35 | +| host | Yes | None | OCP cluster to create the AAP objects in | |
| 36 | +| username | Yes* | None | Username to use for authenticating with OCP | |
| 37 | +| password | Yes* | None | Password to use for authenticating with OCP | |
| 38 | +| api_key | Yes* | None | OCP API Token | |
| 39 | +| validate_certs | | None | Validate SSL certificates. Valid values are: `true`, `false` | |
| 40 | + |
| 41 | +\* Either `api_key` or `username` and `password` can be specified. |
| 42 | + |
| 43 | +### aap_ocp_install_operator keys |
| 44 | + |
| 45 | +| Key Name | Required | Default Value | Description | |
| 46 | +| channel | Yes | None | Channel to subscribe (e.g. stable-2.2 or stable-2.2-cluster-scoped) | |
| 47 | +| approval | | Automatic | Update approval method. Valid values are Automatic or Manual. | |
| 48 | +| operatorgroup_create | | true | Create the `OperatorGroup` for the Operator | |
| 49 | +| operatorgroup_manifest_overrides | | | YAML Manifest to override the generated `OperatorGroup` resource | |
| 50 | +| subscription_manifest_overrides | | | YAML Manifest to override the generated `Subscription` resource | |
| 51 | + |
| 52 | +> ℹ️ **NOTE** |
| 53 | +> |
| 54 | +> When `approval` is set to `Manual` the operator will be installed with `Automatic` approval and then after installation the approval will be updated to Manual. |
| 55 | +
|
| 56 | +### aap_ocp_install_controller keys |
| 57 | + |
| 58 | +| Key Name | Required | Default Value | Description | |
| 59 | +| instance_name | Yes | None | Name of the controller instance to create | |
| 60 | +| namespace | | None | Name of the namespace to create the controller instance in. If not specified `aap_ocp_install_namespace` will be used. | |
| 61 | +| namespace_manifest_overrides | | None | YAML Manifest to override the generated `Namespace` resource for the controller if the `namespace` key is defined | |
| 62 | +| admin_user | | admin | Username to use for the admin account | |
| 63 | +| replicas | | 1 | How many replicas to create. | |
| 64 | +| garbage_collect_secrets | | false | Whether or not to remove secrets upon instance removal | |
| 65 | +| image_pull_policy | | IfNotPresent | The image pull policy | |
| 66 | +| create_preload_data | | true | Whether or not to preload data upon instance creation | |
| 67 | +| projects_persistence | | false | Whether or not the /var/lib/projects directory will be persistent | |
| 68 | +| projects_storage_size | | 8Gi | Size of /var/lib/projects persistent volume claim (PVC) | |
| 69 | +| link_text | | Automation Controller (<INSTANCE_NAME>) | Text used for creating the OCP application link | |
| 70 | +| controller_manifest_overrides | | None | YAML Manifest to override the generated `AutomationController` resource link | |
| 71 | +| consolelink_manifest_overrides | | None | YAML Manifest to override the generated `ConsoleLink` resource | |
| 72 | + |
| 73 | +### aap_ocp_install_hub keys |
| 74 | + |
| 75 | +| Key Name | Required | Default Value | Description | |
| 76 | +| instance_name | Yes | None | Name of the hub instance to create | |
| 77 | +| namespace | | None | Name of the namespace to create the hub instance in. If not specified `aap_ocp_install_namespace` will be used. | |
| 78 | +| namespace_manifest_overrides | | None | YAML Manifest to override the generated `Namespace` resource for the hub if the `namespace` key is defined | |
| 79 | +| link_text | | Automation Hub (<INSTANCE_NAME>) | Text used for creating the OCP application link | |
| 80 | +| hub_manifest_overrides | | None | YAML Manifest to override the generated `AutomationHub` resource | |
| 81 | +| consolelink_manifest_overrides | | None | YAML Manifest to override the generated `ConsoleLink` resource | |
| 82 | + |
| 83 | +### aap_ocp_install_eda keys |
| 84 | + |
| 85 | +| Key Name | Required | Default Value | Description | |
| 86 | +| instance_name | Yes | None | Name of the EDA instance to create | |
| 87 | +| namespace | | None | Name of the namespace to create the EDA instance in. If not specified `aap_ocp_install_namespace` will be used. | |
| 88 | +| namespace_manifest_overrides | | None | YAML Manifest to override the generated `Namespace` resource for the EDA if the `namespace` key is defined | |
| 89 | +| link_text | | EDA Controller (<INSTANCE_NAME>) | Text used for creating the OCP application link | |
| 90 | +| eda_manifest_overrides | | None | YAML Manifest to override the generated `EDA` resource | |
| 91 | +| consolelink_manifest_overrides | | None | YAML Manifest to override the generated `ConsoleLink` resource | |
| 92 | + |
| 93 | +## Dependencies |
| 94 | + |
| 95 | +This role depends on the redhat.openshift and kubernetes.core collections. |
| 96 | + |
| 97 | +## Example Playbook |
| 98 | + |
| 99 | +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: |
| 100 | + |
| 101 | +```yml |
| 102 | +- name: Install AAP on OCP playbook |
| 103 | + hosts: localhost |
| 104 | + gather_facts: false |
| 105 | + |
| 106 | + vars: |
| 107 | + aap_ocp_install_connection: |
| 108 | + host: "https://api.crc.testing:6443" |
| 109 | + username: kubeadmin |
| 110 | + password: <PASSWORD> |
| 111 | + validate_certs: false |
| 112 | + aap_ocp_install_namespace: aap-test |
| 113 | + aap_ocp_install_operator: |
| 114 | + channel: "stable-2.2" |
| 115 | + aap_ocp_install_controller: |
| 116 | + instance_name: automationcontroller |
| 117 | + aap_ocp_install_hub: |
| 118 | + instance_name: automationhub |
| 119 | + aap_ocp_install_eda: |
| 120 | + instance_name: edacontroller |
| 121 | + |
| 122 | + roles: |
| 123 | + - infra.aap_utilities.aap_ocp_install |
| 124 | +... |
| 125 | +``` |
| 126 | + |
| 127 | +## License |
| 128 | + |
| 129 | +[GPLv3+0](https://github.com/redhat-cop/aap_utilities#licensing) |
| 130 | + |
| 131 | +## Author Information |
| 132 | + |
| 133 | +* Brant Evans |
| 134 | +* Derek Waters |
| 135 | +* Andrew Block |
0 commit comments