To learn about the Software Templates that were used in this workshop, explore the scaffolder-templates
folder. For additional Template examples, see https://github.com/janus-idp/software-templates
To set up your own workshop cluster, implement the following changes to the demo-setup installation process:
-
First, create a checkout of this
workshop
branch (instead of using thejanus-idp/demo-setup
repo):git clone https://github.com/ryanj/janus-platforms.git cd janus-platforms/ansible/cluster-setup git checkout workshop
-
Next, fork this repo while setting the owner input to your new github org, and the name of the new repo to:
software-templates
-
Then, complete the rest of the demo-setup installation process (while skipping the optional quay section). That doc will instruct you to export several variables that will be used in the upcoming example commands
-
Create another OAuth app to provide GitHub Auth into the Openshift cluster:
open "https://github.com/organizations/$GITHUB_ORGANIZATION/settings/applications/new/?oauth_application[name]=$GITHUB_ORGANIZATION-auth&oauth_application[url]=https://oauth-openshift.apps$OPENSHIFT_CLUSTER_INFO&oauth_application[callback_url]=https://oauth-openshift.apps$OPENSHIFT_CLUSTER_INFO/oauth2callback/github"
-
Configure your new GitHub OAuth App’s client
id
andsecret
, and include your gh org in the list of approved orgs:open "https://console-openshift-console.apps$OPENSHIFT_CLUSTER_INFO/settings/idp/github"
-
Change the Base permissions for all repos to "Write"
open "https://github.com/organizations/$GITHUB_ORGANIZATION/settings/member_privileges/"
-
Install the CoP Namespace Configuration Operator from OperatorHub:
oc new-project namespace-configuration-operator oc create -f https://raw.githubusercontent.com/redhat-cop/namespace-configuration-operator/master/config/operatorhub/operator.yaml # wait for the operator installation to complete... sleep 60 cat <<EOF | oc create -f - kind: UserConfig apiVersion: redhatcop.redhat.io/v1alpha1 metadata: name: test-user-config spec: annotationSelector: {} identityExtraFieldSelector: {} labelSelector: {} providerName: github templates: - excludedPaths: - .spec.replicas - .metadata - .status objectTemplate: | - apiVersion: project.openshift.io/v1 kind: Project metadata: name: {{ .Name }} - apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ .Name }}-rolebinding namespace: {{ .Name }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: admin subjects: - apiGroup: rbac.authorization.k8s.io kind: User name: {{ .Name }} EOF
-
Increase cluster capacity by scaling up machineSets (if needed):
open "https://console-openshift-console.apps$OPENSHIFT_CLUSTER_INFO/k8s/ns/openshift-machine-api/machine.openshift.io~v1beta1~MachineSet"
-
Switch from Janus to RHDH (see below)
-
Invite users to your github org:
open "https://github.com/orgs/$GITHUB_ORGANIZATION/people"
TipFor larger workshops try uploading a list of github user ids using a script -
Distribute the following onboarding information to each workshop attendee:
echo "Attendee invite: https://github.com/orgs/$GITHUB_ORGANIZATION/invitation" && echo "Workshop Instructions: https://bit.ly/rhdh-workshop" && echo "Cluster URL: https://console-openshift-console.apps$OPENSHIFT_CLUSTER_INFO"
WarningWorkshop users need to accept their org invitation before accessing the cluster
To switch to the latest RHDH image, you will need to complete the following:
-
Request access to the following quay repo via email:
quay.io/rhdh/developer-hub-rhel9
. Requests from Internal Red Hatters should be sent to rhdh@redhat.com. Requests from customers should be sent to rhdh-interest@redhat.com. -
After gaining access to the quay repo. Visit https://quay.io and click on Profile → Account Settings → Robot Accounts → Create Robot Account
-
Name the Robot Account "rhdh_pull_secret".
-
Open your robot account and select the "Kubernetes Secret" tab. Download your pull secret yaml.
-
Edit your pull secret yaml, setting the pull secret’s
metadata.name
field to:rhdh-pull-secret
-
Install your pull secret in the backstage namespace:
kubectl create -f secret.yaml -n backstage
-
Update the janus deployment to reference the new image pull secret:
kubectl patch deploy/janus-dev -n backstage -p '{"spec":{"template":{"spec":{"imagePullSecrets":[{"name":"rhdh-pull-secret"}],"containers":[{"name":"janus-backstage","image":"quay.io/rhdh/developer-hub-rhel9:0.1"}]}}}}'
workshop content is available at: https://redhat-scholars.github.io/backstage-workshop
Install local development dependencies via npm
:
npm install
Launch a local development server:
npm start