Skip to content

Instantly share code, notes, and snippets.

@erikerlandson
Last active November 1, 2019 19:20
Show Gist options
  • Save erikerlandson/ed2be7e9d6f3184ee775274dac075f31 to your computer and use it in GitHub Desktop.
Save erikerlandson/ed2be7e9d6f3184ee775274dac075f31 to your computer and use it in GitHub Desktop.
Instructions for standing up the ML workflows on openshift workshop in RHPDS

In RHPDS, Request: Service Catalogs > Workshops > Openshift 4 Workshop

It will take 40+ mins to provision the OCP cluster. When you receive the RHPDS email confirming the cluster is ready:

$ export RHPDS_GUID=<your-guid>  # from rhpds email
$ export RHPDS_USER=<user-name>  # your rhpds user name
$ export NUM_LAB_USERS=10 # how many lab/workshop users will you be hosting?
# log into host: (use creds provided in rhpds email)
# (preferred-auth flag may nor may not be necessary)
$ ssh -o PreferredAuthentications=password ${RHPDS_USER}@bastion.${RHPDS_GUID}.open.redhat.com
# following is on the bastion host:
$ mkdir .ssh ; chmod 700 .ssh ; curl https://github.com/erikerlandson.keys > .ssh/authorized_keys ; chmod 700 .ssh/authorized_keys
$ sudo rm /tmp/osrcp*
$ exit  # log out of bastion

If you haven't already, clone the agnosticd repo, and cd to the ansible directory:

$ git clone [email protected]:redhat-cop/agnosticd
$ cd /path/to/git/agnosticd/ansible

Invoke the following ansible commands, to set up a workshop user (user1 in the following):

$ ansible-playbook -i bastion.${RHPDS_GUID}.open.redhat.com, -u ${RHPDS_USER} \
configs/ocp-workloads/ocp-workload.yml \
-e"ansible_user=${RHPDS_USER}" -e"ocp_username=opentlc-mgr" \
-e"ocp_workload=ocp4-workload-rhte-analytics_data_ocp_infra" -e"silent=True" \
-e"guid=$RHPDS_GUID" -e"ACTION=create" \
-e"jupyter_notebook_memory=6Gi" -e"deploy_odh_cr=true" \
-e"rgw_service_ip=rook-ceph-rgw-my-store" -e"rgw_service_port=8000"
$ ansible-playbook -i bastion.${RHPDS_GUID}.open.redhat.com, -u ${RHPDS_USER} \
configs/ocp-workloads/ocp-workload.yml \
-e"ansible_user=${RHPDS_USER}" -e"ocp_username=opentlc-mgr" \
-e"ocp_workload=ocp4-workload-rhte-analytics_data_ocp_workshop" \
-e"silent=True" \
-e"guid=$RHPDS_GUID" \
-e"ACTION=create" \
-e"num_users=${NUM_LAB_USERS}" \
-e"jupyter_notebook_memory=6Gi" -e"deploy_odh_cr=true" \
-e"rgw_service_ip=rook-ceph-rgw-my-store" -e"rgw_service_port=8000" \
&& \
ansible-playbook -i bastion.${RHPDS_GUID}.open.redhat.com, -u ${RHPDS_USER} \
configs/ocp-workloads/ocp-workload.yml \
-e"num_users=${NUM_LAB_USERS}" \
-e"ansible_user=${RHPDS_USER}" -e"ocp_username=opentlc-mgr" \
-e"ocp_workload=ocp4-workload-ml-workflows-workshop" -e"silent=True" -e"guid=$RHPDS_GUID" \
-e"ACTION=create" -e"jupyter_notebook_memory=6Gi" -e"deploy_odh_cr=true" \
-e"rgw_service_ip=rook-ceph-rgw-my-store" -e"rgw_service_port=8000" \
-e"instructor_mode=true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment