-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
142 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...etes/modules/ROOT/pages/installation.adoc → ...les/ROOT/pages/installation-minikube.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ernetes/modules/ROOT/pages/openshift.adoc → ...es/ROOT/pages/installation-openshift.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
doc/kubernetes/modules/ROOT/pages/prerequisite/prerequisite-rosa.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
= Installing OpenShift on AWS | ||
:description: OpenShift is a pre-requisite if the setup is about to be tested on OpenShift. | ||
|
||
This module is intended to automate tasks around provisioning OpenShift clusters in AWS via ROSA tool, as described in the https://console.redhat.com/openshift/create/rosa/getstarted[ROSA installation guide]. | ||
The scripts are located in the folder `provision/aws` in this repository. | ||
|
||
== Prerequisites | ||
|
||
. Install the https://aws.amazon.com/cli/[AWS CLI] | ||
.. Run the commands to install the AWS command line tool: | ||
+ | ||
[source,bash] | ||
---- | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
unzip awscliv2.zip | ||
sudo ./aws/install | ||
---- | ||
.. Create Access keys in https://us-east-1.console.aws.amazon.com/iamv2/home?region=us-east-1#/users[AWS Identity and Access Management ] | ||
... Click on your user account | ||
... Click on *Security credentials* | ||
... Click on *Create access key* under *Access keys* | ||
... Select *Command Line Interface (CLI)* | ||
... Check the box for *I understand the above recommendation and want to proceed to create an access key* | ||
... Click *Next* | ||
... Enter `AWS CLI` as the description tag value and click on *Create access key* | ||
... Leave the tab open for the next step | ||
.. Run | ||
+ | ||
---- | ||
aws configure | ||
---- | ||
|
||
... AWS Access Key ID: *<copy/paste from above>* | ||
... AWS Secret Access Key: *<copy/paste from above>* | ||
... Default region name: *us-east-1* | ||
... Default output format: <Leave blank> | ||
.. Test using: | ||
+ | ||
[source,bash] | ||
---- | ||
aws sts get-caller-identity | ||
---- | ||
|
||
. Perform the steps outlined in the https://console.redhat.com/openshift/create/rosa/getstarted[ROSA installation guide]: | ||
.. Enable ROSA Service in AWS account | ||
.. Download and install the ROSA command line tool | ||
.. Create the service linked role for the Elastic Load Balancer | ||
.. Log in to the ROSA CLI with your Red Hat account token and create AWS account roles and policies | ||
.. Verify your credentials and quota | ||
|
||
== Installation | ||
|
||
The installation process is automated in the `rosa_create_cluster.sh` script in the folder `provision/aws` which takes its parameters from environment variables. | ||
|
||
It loads environment variables pre-set in `.env` file inside the `aws/` directory. | ||
|
||
The script creates the OCP cluster via `rosa create cluster` command, additionally it creates the required operator roles and OIDC provider. | ||
After the installation process is finished, it creates a new admin user. | ||
|
||
.Example `.env` file | ||
---- | ||
CLUSTER_NAME=rosa-kcb | ||
ADMIN_PASSWORD=needs-to-have-at-least-14-ascii-characters | ||
VERSION=4.12.15 | ||
REGION=eu-central-1 | ||
COMPUTE_MACHINE_TYPE=m5.xlarge | ||
MULTI_AZ=false | ||
REPLICAS=3 | ||
---- | ||
|
||
=== Mandatory parameters | ||
|
||
`VERSION`:: OCP cluster version. | ||
`REGION`:: AWS region where the cluster should run. | ||
`COMPUTE_MACHINE_TYPE`:: https://aws.amazon.com/ec2/instance-types/[AWS instance type] for the default OCP worker machine pool. | ||
`MULTI_AZ`:: Boolean parameter to indicate whether the OCP cluster should span multiple Availability Zones within the selected region. | ||
`REPLICAS`:: Number of worker nodes. | ||
If multi-AZ installation is selected, then this needs to be a multiple of the number of AZs available in the region. | ||
For example, if the region has 3 AZs, then replicas need to be set to some multiple of 3. | ||
+ | ||
Use the following command to find out about the AZs in the region: | ||
+ | ||
[source,bash,subs=+quotes] | ||
---- | ||
aws ec2 describe-availability-zones --region _region-name_ | ||
---- | ||
|
||
=== Optional parameters | ||
|
||
`CLUSTER_NAME`:: Name of the cluster. | ||
If not set, the value of the `$(whoami)` command will be used. | ||
`ADMIN_PASSWORD`:: Password for the `cluster-admin` user. | ||
If not set, it will be autogenerated by `rosa create admin`. | ||
Needs to have at least 14 ASCII characters. | ||
|
||
== Finding URLs | ||
|
||
To find out about existing clusters and their URLs, use the following commands: | ||
|
||
[source,bash,subs=+quotes] | ||
---- | ||
rosa list clusters | ||
rosa describe cluster -c _cluster-name_ | ||
---- | ||
|
||
== Re-create admin user | ||
|
||
The above installation script creates an admin user automatically but in case the user needs to re-created it can be done via the `rosa_recreate_admin.sh` script, providing the `CLUSTER_NAME` and optionally `ADMIN_PASSWORD` parameter. | ||
|
||
Additionally, an AWS secret named `+${CLUSTER_NAME}-cluster-admin+` will be created via AWS Secrets Manager. | ||
|
||
== Uninstallation | ||
|
||
The uninstallation is handled by the `rosa_delete_cluster.sh` script. | ||
|
||
The only required parameter is `CLUSTER_NAME`. | ||
|
||
Additionally, it deletes the cluster's operator roles and OIDC provider, and the admin user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1 @@ | ||
= AWS provisioning module | ||
|
||
This module is intended to automate tasks around provisioning OpenShift clusters in AWS via ROSA tool, | ||
as described in the ROSA installation guide: https://console.redhat.com/openshift/create/rosa/getstarted | ||
|
||
== Prerequisities | ||
|
||
. Enable ROSA Service in AWS account - *MANUAL STEP* | ||
. Download and install the ROSA and AWS command line tools - *MANUAL STEP* | ||
. Create the service linked role for the Elastic Load Balancer | ||
. Log in to the ROSA CLI with your Red Hat account token and create AWS account roles and policies - *MANUAL STEP* | ||
. Verify your credentials and quota | ||
|
||
== Installation | ||
|
||
The installation process is automated in the `rosa_create_cluster.sh` script | ||
which takes its parameters from environment variables. | ||
|
||
It will load environment variables pre-set in `.env` file inside the `aws/` directory. | ||
|
||
The script will create the OCP cluster via `rosa create cluster` command, | ||
additionally it will create the required operator roles and OIDC provider. | ||
After the installation process is finished it will create a new admin user. | ||
|
||
=== Optional parameters: | ||
- `CLUSTER_NAME` - Name of the cluster. If not set, the value of `$(whoami)` command will be used. | ||
- `ADMIN_PASSWORD` - Password for the `cluster-admin` user. If not set, it will be autogenerated by `rosa create admin`. | ||
|
||
=== Mandatory parameters: | ||
- `VERSION` - OCP cluster version. | ||
- `REGION` - AWS region where the cluster should run. | ||
- `COMPUTE_MACHINE_TYPE` - https://aws.amazon.com/ec2/instance-types/[AWS instance type] for the default OCP worker machine pool. | ||
- `MULTI_AZ` - Boolean parameter to indicate whether the OCP cluster should span multiple Availability Zones within the selected region. | ||
- `REPLICAS` - Number of worker nodes. If multi-AZ installation is selected then this needs to be a multiple | ||
of the number of AZs available in the region. For example if the region has 3 AZs, then replicas need to be set to some multiple of 3. | ||
|
||
=== Example `.env` file | ||
[source,bash] | ||
---- | ||
CLUSTER_NAME=rosa-kcb | ||
ADMIN_PASSWORD=needs-to-have-at-least-14-ascii-characters | ||
VERSION=4.12.15 | ||
REGION=eu-central-1 | ||
COMPUTE_MACHINE_TYPE=m5.xlarge | ||
MULTI_AZ=false | ||
REPLICAS=3 | ||
---- | ||
|
||
|
||
== Re-create admin user | ||
|
||
The above installation script will create an admin user automatically but in case | ||
the user needs to re-created it can be done via the `rosa_recreate_admin.sh` script, | ||
providing the `CLUSTER_NAME` and optionally `ADMIN_PASSWORD` parameter. | ||
|
||
Additionally, an AWS secret named `${CLUSTER_NAME}-cluster-admin` will be created via AWS Secrets Manager. | ||
|
||
|
||
== Uninstallation | ||
|
||
The uninstallation is handled by the `rosa_delete_cluster.sh` script. | ||
|
||
The only required parameter is `CLUSTER_NAME`. | ||
|
||
Additionally it will delete cluster's operator roles and OIDC provider, | ||
and the admin user. | ||
See https://www.keycloak.org/keycloak-benchmark/kubernetes-guide/latest/prerequisite/prerequisite-rosa[Installing OpenShift on AWS] on how to use these scripts. |