Skip to content

Commit 52275d1

Browse files
author
Anton
authored
CLOUDP-84353: updated instructions for Openshift creation (#152)
1 parent 1dd4c08 commit 52275d1

File tree

2 files changed

+59
-18
lines changed

2 files changed

+59
-18
lines changed

docs/dev/openshift-cluster-install.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,39 @@ https://cloud.redhat.com/openshift/install/aws/installer-provisioned
55

66
1. Ensure you have an AWS account configured in `~/.aws/credentials`
77
1. Download and unpack the MacOS installer
8-
1. Run `./openshift-install create cluster`. (*TODO this default configuration results in quite a big cluster, this needs
9-
to be changed to a smaller values somehow*)
10-
* choose the zone that has enough VPCs
11-
* specify the Pull Secrets (can be copied from the link above)
8+
1. Copy the `scripts/openshift/install-config.yaml` to some `<temp_directory>`. Set the following:
9+
* `pullSecret: '<..>'` (copy the content of the Pull Secrets from the link above)
10+
* `sshKey: | \n` (public ssh Key)
11+
1. Run `./openshift-install create cluster --dir=<temp_directory>`.
12+
* `--dir=` points to the directory where the `install-config.yaml` is located
1213
* the installer will verify permissions and will show the ones that are missing - it's necessary to give them to your AWS account
1314
1. Wait for ~40 minutes
1415

16+
Some notes on configuration of the cluster:
17+
* it's not possible to have less than 3 replicas for control plane and 2 replicas for worker nodes
18+
(see https://docs.openshift.com/container-platform/4.7/installing/installing_aws/installing-aws-customizations.html?extIdCarryOver=true&intcmp=7013a000002CtetAAC&sc_cid=701f2000001OH7iAAG#installation-configuration-parameters_installing-aws-customizations)
19+
* by default Openshift uses `m5.xlarge` for controlPlane nodes and `m5.large` for worker nodes. `m5.xlarge` uses 16Gb for memory
20+
and this is the smallest memory allowed for each controlplane instance. In our development we use `t3.xlarge` which provides the same
21+
memory but costs cheaper.
22+
* removing the existing cluster can be done by calling `./openshift-install destroy cluster` (not sure if this needs the SSH keys)
23+
1524
The log of the last installation:
1625

1726
```
18-
➜ openshift-install-mac ./openshift-install create cluster
19-
? SSH Public Key /Users/alisovenko/.ssh/id_aws_rsa.pub
20-
? Platform aws
27+
➜ ./openshift-install create cluster --dir=/Users/alisovenko/temp-openshift
2128
INFO Credentials loaded from default AWS environment variables
22-
? Region eu-west-3
23-
? Base Domain mongokubernetes.com
24-
? Cluster Name atlas.operator.openshift
25-
? Pull Secret [? for help] **********
26-
WARNING Missing permissions to fetch Quotas and therefore will skip checking them: failed to load limits for servicequotas: failed to list default serviceqquotas for ec2: AccessDeniedException: User: arn:aws:iam::268558157000:user/anton.lisovenko is not authorized to perform: servicequotas:ListAWSDefaultServiceQuotas, make sure you have `servicequotas:ListAWSDefaultServiceQuotas` permission available to the user.
29+
INFO Consuming Install Config from target directory
30+
WARNING Missing permissions to fetch Quotas and therefore will skip checking them: failed to load limits for servicequotas: failed to list serviceqquotas for ec2: AccessDeniedException: User: arn:aws:iam::268558157000:user/anton.lisovenko is not authorized to perform: servicequotas:ListServiceQuotas, make sure you have `servicequotas:ListAWSDefaultServiceQuotas` permission available to the user.
2731
INFO Creating infrastructure resources...
28-
INFO Waiting up to 20m0s for the Kubernetes API at https://api.atlas.operator.openshift.mongokubernetes.com:6443...
32+
INFO Waiting up to 20m0s for the Kubernetes API at https://api.atlas.operator.mongokubernetes.com:6443...
2933
INFO API v1.20.0+bd9e442 up
3034
INFO Waiting up to 30m0s for bootstrapping to complete...
3135
INFO Destroying the bootstrap resources...
32-
INFO Waiting up to 40m0s for the cluster at https://api.atlas.operator.openshift.mongokubernetes.com:6443 to initialize...
36+
INFO Waiting up to 40m0s for the cluster at https://api.atlas.operator.mongokubernetes.com:6443 to initialize...
3337
INFO Waiting up to 10m0s for the openshift-console route to be created...
3438
INFO Install complete!
35-
INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/Users/alisovenko/Downloads/Soft/openshift-install-mac/auth/kubeconfig'
36-
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.atlas.operator.openshift.mongokubernetes.com
37-
INFO Login to the console with user: "kubeadmin", and password: "(erased)"
38-
INFO Time elapsed: 36m53s
39+
INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/Users/alisovenko/workspace/mongodb-atlas-kubernetes/scripts/openshift/auth/kubeconfig'
40+
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.atlas.operator.mongokubernetes.com
41+
INFO Login to the console with user: "kubeadmin", and password: "*****"
42+
INFO Time elapsed: 35m55s
3943
```
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
apiVersion: v1
2+
baseDomain: mongokubernetes.com
3+
compute:
4+
- architecture: amd64
5+
hyperthreading: Enabled
6+
name: worker
7+
platform:
8+
aws:
9+
type: m5.large
10+
replicas: 2
11+
controlPlane:
12+
architecture: amd64
13+
hyperthreading: Enabled
14+
name: master
15+
platform:
16+
aws:
17+
type: t3.xlarge
18+
replicas: 3
19+
metadata:
20+
creationTimestamp: null
21+
name: atlas.operator
22+
networking:
23+
clusterNetwork:
24+
- cidr: 10.128.0.0/14
25+
hostPrefix: 23
26+
machineNetwork:
27+
- cidr: 10.0.0.0/16
28+
networkType: OpenShiftSDN
29+
serviceNetwork:
30+
- 172.30.0.0/16
31+
platform:
32+
aws:
33+
region: eu-west-3
34+
publish: External
35+
pullSecret: <add_pull_secrets>
36+
sshKey: |
37+
ssh-rsa <add_ssh_public_key>

0 commit comments

Comments
 (0)