Item | URL | Access |
---|---|---|
OpenShift Container Platform |
Username: <student_id> |
|
Linux SSH private key |
https://instructor.labs.sysdeseng.com/summit/managing-ocp-install-beyond.pem |
Username: student |
In this lab, we will review the install of the OpenShift Container Platform using Ansible Tower that we started at the beginning of this session.
With the OpenShift Container Platform installation complete, let’s perform a few tests to validate the status of the environment. There are two primary methods for accessing OpenShift: the web console and the Command Line tool (CLI).
From your workstation, open a web browser and navigate to the following address:
Tip
|
You can also copy and paste your exact URL from the Workflow Job Template Extra Variables section from the variable openshift_cluster_public_url .
|
If successful, you should see the following page representing the OpenShift landing page:
Login using the username student_id
and the provided credentials to access the web console.
The OpenShift web console provides an interactive way to interact with the OpenShift platform. After successfully authenticating, you are presented with an overview page containing all of the projects that you have access to, along with resources that can be deployed to the platform. Since you are a normal user, you do not have access to any projects by default.
In subsequent labs, we will explore the OpenShift web console in further detail.
Now that we have had an opportunity to login to the OpenShift web console from a developer’s standpoint, let’s shift over to an administrative and operations point of view and access the cluster directly using the terminal.
The instances are deployed within the AWS environment, login to the OpenShift Master instance as ec2-user:
-
Linux
ssh -i managing-ocp-install-beyond.pem ec2-user@master-<student_id>.labs.sysdeseng.com
Access to the cluster is available using the system:admin user which has the cluster-admin role. This can be confirmed by executing the following command which should confirm the currently logged in user is system:admin
oc whoami
As one would expect, users with the cluster-admin role have elevated permissions in comparison to normal users, such as <student_id> which was utilized previously when browsing the web console.
Cluster administrators can view all of the nodes that constitute the cluster:
oc get nodes
View all of the Projects that have been created by users or as part of the base infrastructure to support the platform:
oc get projects
List all of the Persistent Volumes that have been defined:
oc get pv
Now check out the OpenShift on AWS cloud provider integration.
sudo cat /etc/origin/cloudprovider/aws.conf
[Global]
Zone = us-east-2a
The cloud provider integration file tells OpenShift how to interact with AWS. You can see that it’s doing so via the AWS API which leverages the AWS credentials that were created prior to your going through the lab. This integration between OpenShift and AWS enable capabilities like dynamic storage provisioning for applications. Cloud Provider configurations are specific to each provider, for example, you also have cloud provider configurations for OpenStack, Azure, VMware, etc…
Let’s check out the storage class as well, continuing on the integration story.
oc get storageclass
By defining the AWS cloud provider, the OpenShift installer automatically configures a storage class to support persistent storage.
oc describe storageclass gp2
Notice that the provisioner is the gp2/ebs provisioner and the is-default-class
is set to 'yes'. The usage of the is-default-class annotation defines a Default Storage Class that will automatically provision instances when a Persistent Volume Claim is created.
You can use the OpenShift Command line tool as a user with cluster administrator role to access the entire set of configurations for the platform as time permits.
Note
|
With great power comes great responsibility. Executing commands as a user with cluster administrator rights has the potential to negatively impact the overall health of the environment. |
Important
|
If you need to teardown the OpenShift Environment and start over, execute the Terminate-OCP job template. However, be extremely careful not to launch Terminate_All or 3-Terminate_All as this will also delete your Tower instance. Please raise your hand and inform one of the lab instructors if this happens. If you do this too late into the lab you may not have enough time to finish. See this table for a reference of typical times for the Tower jobs: [Appendix D - Average Tower Job Times] |
This concludes lab 3