To test the workshop/playbook against an existing OCP Cluster which has been created for this lab, run the following command
to git clone the agnosticd project and next start the it.sh script
Remark
Review with the RHTE team, what should be the values to be used for the following parameters:
-
OCP_CONSOLE:
https://console-openshift-console.apps.shared-dev.dev.openshift.opentlc.com -
OCP_API:
https://api.shared-dev.dev.openshift.opentlc.com:6443 -
TARGET_HOST:
bastion.dev.openshift.opentlc.com -
OCP_USERNAME:
ec2-user
Open a terminal and execute the following commands to clone the agnosticd project and next to apply the workshop playbook
git clone https://github.com/halkyonio/agnosticd.git && cd agnosticd
git checkout development
cd ..
./scripts/it.sh agnosticd/ansible/roles ACTION GUID ENVwhere: ACTION corresponds to the ansible parameter to create or remove; GUID the ID of the vm created for your project and ENV` is the UAT platform to be used which is RHPDS prod or dev
Example: ./scripts/it.sh agnosticd/ansible/roles create namur-7027 prod
WARNING: Before to execute the ansible playbook, it is needed first to import your public key within the VM using this command:
ssh-copy-id -i ~/.ssh/YOUR_SSH_PUBLIC_KEY YOUR_USER@bastion.GUID.openshiftworkshop.comYou can ssh to the vm’s cluster using the information shared by the RHTE team if your ssh public key has been shared and imported within the VM
ssh cmoulliard-redhat.com@bastion.GUID.open.redhat.comTo request the creation of a cluster using one of the Ansible Playbooks part of the project agnosticd, log on on this web site https://www.opentlc.com/gg/manager.cgi using as user generic_tester and password TeST123!Go
as documented here. See section Log Into The GuidGrabber Manager. Once login succeded choose Deploy Lab Instances
Remark: To control if creation of the cluster succeeded, use this URL: https://spp.opentlc.com/miq_request/show_list
To access the cluster created and get the GUID, use this URL - www.opentlc.com/gg/gg.cgi?profile=generic_tester
Enter component as Key Activation and a valid e-mail address.
image::images/request-lab-guid.png
Log into spp.opentlc.com (using same user and password generic_tester) then go to services → my services
During the event the link will be https://www.opentlc.com/gg/gg.cgi?profile=generic_rhte
According to the info collected from the screen https://www.opentlc.com/gg/gg.cgi?profile=generic_rhte, get the GUID and bastion in order to ssh to the VM using this command
ssh lab-user@bastion.GUID.sandboxXXX.opentlc.comusing as password r3dh4t1!
Remark : Do sudo -i and you will be automatically logged in as cluster admin as root 🙂
USER=opentlc-mgr
PASSWORD=r3dh4t1!
oc login -u $USER -p $PASSWORD --server=https://api.cluster-bffb.bffb.sandbox171.opentlc.com:6443
USER=user1
PASSWORD=r3dh4t1!
oc login -u $USER -p $PASSWORD --server=https://api.cluster-bffb.bffb.sandbox171.opentlc.com:6443Grant the admin role to your user user1
oc adm policy add-cluster-role-to-user admin user1 --as=system:admin
