Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support https://github.com/RedHatGov/redhatgov.github.io/issues/401 #181

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions openshift4_aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,53 @@ The ansible-ocp4-install-aws playbooks were developed to enable simple and rapid

## Build Notes

### RHEL 8

To set this up for deployment, you need to add Ansible Automation Platform:

```
$ sudo subscription-manager repos --enable ansible-automation-platform-2.1-for-rhel-8-x86_64-rpms
$ sudo dnf install git
```

Create an `ansible` virtual environment, and install the following Python modules:

```
$ python3 -m venv ~/ansible
$ source ~/ansible/bin/activate
$ pip install ansible ansible-navigator awscli boto3 kubernetes passlib requests

Once this is done, clone the repo, and configure it for deployment:

```
$ git clone https://github.com/RedHatGov/redhatgov.workshops.git
$ cd redhatgov.workshops/openshift4_aws/group_vars/all
$ cp all.yml_example all.yml
```

Fill out the following variables (at a minimum):

- openshift_cluster_admin_password
- openshift_user_password
- aws_region
- openshift_cluster_name
- openshift_cluster_base_domain

Copy over your pull secret, as mentioned below, to the base directory (openshift4-aws):

```
$ cp /path/to/downloaded/pull-secret.txt /path/to/openshift4-aws/pull-secret
```

Make sure that you have defined your AWS credentials, either in environment variables, or in `~/.aws/credentials` so that communications can function with the cloud environment.

You will need to install the following collections:

- amazon.aws
- community.crypto
- community.general
- community.sops

### Mac OS X

#### ARM work-arounds
Expand Down
6 changes: 3 additions & 3 deletions openshift4_aws/group_vars/all/all.yml_example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
openshift_installer_type: local

# get installation files playbook variables
openshift_version: 4.7.6
openshift_version: 4.10.6
openshift_installer_path: "{{ ansible_env.PWD }}"
openshift_build_path: "{{ ansible_env.PWD }}/build"
openshift_odo_version: 2.0.1
Expand All @@ -25,7 +25,7 @@ openshift_cluster_base_domain: CHANGE_ME
openshift_cluster_fqdn: "{{ openshift_cluster_name }}.{{ openshift_cluster_base_domain }}"
openshift_control_node_instance_type: m5a.xlarge # default = 4vCPUs / 16 GB RAM (i.e. m5a.xlarge)
openshift_control_node_replicas: 3 # use a value of '3' only
openshift_worker_node_instance_type: m5a.2xlarge # default = 8 vCPUs / 32 GB RAM (i.e. m5a.2xlarge)
openshift_worker_node_instance_type: m5a.2xlarge # default = 8 vCPUs / 32 GB RAM (i.e. m5a.2xlarge)
openshift_worker_node_replicas: 3 # default = '3' Node counts of =< 3 are valid
openshift_install_pull_secret: " {{ lookup('file', '{{ openshift_installer_path }}/pull-secret') }}"
openshift_node_ssh_public_key: "{{ lookup('file', '{{ openshift_build_path }}/{{ openshift_cluster_name }}-key.pub') }}"
Expand All @@ -45,7 +45,7 @@ deploy_pipelines: False
deploy_serverless: False

# ansible automation
deploy_ansible_automation: False
deploy_ansible_automation: False
deploy_ansible_automation_workshop: False

# service mesh operator variables
Expand Down
4 changes: 2 additions & 2 deletions openshift4_aws/roles/create_openshift_users/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
when: openshift_installer_type == "automation"

- name: generate users.htpasswd file - create admin account entry
htpasswd:
community.general.htpasswd:
create: yes
path: "{{ openshift_build_path }}/users.htpasswd"
name: "{{ openshift_cluster_admin_username }}"
password: "{{ openshift_cluster_admin_password }}"
state: present

- name: generate users.htpasswd file - create workshop user entries
htpasswd:
community.general.htpasswd:
path: "{{ openshift_build_path }}/users.htpasswd"
name: "user{{ item }}"
password: "{{ openshift_user_password }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
apiVersion: v1
kind: Namespace
metadata:
labels:
openshift.io/cluster-monitoring: "true"
name: ansible-automation-platform
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: ansible-automation-platform-operator
namespace: ansible-automation-platform
spec:
targetNamespaces:
- ansible-automation-platform
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: ansible-automation-platform
namespace: ansible-automation-platform
spec:
installPlanApproval: Automatic
name: ansible-automation-platform-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
151 changes: 0 additions & 151 deletions openshift4_aws/roles/deploy_ansible_automation/tasks/deploy.yml

This file was deleted.

Loading