OpenShift 4 AWS Installation IPI at OpenTLC
- Login opentlc
- Order Catalog > OPENTLC Openshift 4 Labs > Openshift 4 Installation Lab
> ssh user@host
> git clone https://github.com/okkyhtf/ocp4-at-opentlc.git
> cd ocp4-at-opentlc/
> vim prepare-openshift-installer.sh
export AWSKEY={AWSKEY generated from opentlc}
export AWSSECRETKEY={AWSSECRETKEY generated from opentlc}
export REGION=ap-southeast-1
export OCP_VERSION=4.7.4
export GUID={GUID generated from opentlc}
> sudo -i
> cd ${HOME}/ocp4-at-opentlc/
> ./prepare-openshift-installer.sh
It will shows this log once done,
+ oc completion bash
+ echo 'Please exit the session and relogin again to enable the Bash completion.'
Please exit the session and relogin again to enable the Bash completion.
> exit
> sudo -i
> tmux new -s ocp_install
> time openshift-install create cluster --dir $HOME/cluster-${GUID} --log-level debug
CA certificate = --> use default
SSH Public Key /root/.ssh/cluster-${GUID}-key.pub
Platform aws
AWS Region = ap-southeast-1
Base Domain = sandbox???.opentlc.com
Cluster Name = sample-cluster
Pull Secret = ***** download from try.openshift.com
During installation, script will ask for pull secret. Download at try.openshift.com .
Below is end of installation screen
...
INFO Waiting up to 30m0s for the cluster at https://api.sample-cluster.sandbox????.opentlc.com:6443 to initialize...
...
DEBUG Still waiting for the cluster to initialize: Working towards 4.4.4: 99% complete, waiting on authentication, console, ingress, monitoring
DEBUG Still waiting for the cluster to initialize: Working towards 4.4.4: 99% complete
DEBUG Still waiting for the cluster to initialize: Working towards 4.4.4: 100% complete, waiting on authentication
DEBUG Cluster is initialized
INFO Waiting up to 10m0s for the openshift-console route to be created...
DEBUG Route found in openshift-console namespace: console
DEBUG Route found in openshift-console namespace: downloads
DEBUG OpenShift console route is created
INFO Install complete!
INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/root/cluster-cfbf/auth/kubeconfig'
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.sample-cluster.sandbox???.opentlc.com --> generated
INFO Login to the console with user: kubeadmin, password: ??? --> generated
real 42m54.337s --> time needed for installation
user 0m33.311s
sys 0m2.008s
> oc login --token=$TOKEN --server=https://api.sample-cluster.sandbox930.opentlc.com:6443
> htpasswd -nb admin mypassword
Copy output on .txt file and upload on OpenShift web console (user management)
oc adm policy add-cluster-role-to-user cluster-admin ocpadmin
In case of you forgot your OCP's Kubeadmin password, we can check our installation log files which can be found on .openshift_install.log
, and located in $HOME/cluster-${GUID}
.
vi $HOME/cluster-${GUID}/.openshift_install.log