Backstage Workshop
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
Workshop Cluster Setup
To set up your own workshop cluster, implement the following changes to the demo-setup installation process:
-
When asked to clone the
janus-idp/demo-setup
repo, create a checkout of thisworkshop
branch instead:git clone https://github.com/ryanj/janus-platforms.git cd janus-platforms/ansible/cluster-setup git checkout workshop
-
When asked to fork the
janus-idp/software-templates
repo to your new GH Org, fork this repo instead:https://github.com/redhat-scholars/backstage-workshop
. Make sure to change the name of the resulting repo to:software-templates
-
After creating your new GH Org, visit the
org/settings/member_privileges
admin page, and change the Base permissions for all repos to "Write"open "https://github.com/organizations/$GITHUB_ORGANIZATION/settings/member_privileges/"
If you a using a ROSA cluster that is configured to use GH Auth for cluster access, proceed to the next section to install the Namespace Configuration Operator
Install the Namespace Configuration Operator (Optional)
Warning
|
This section is NOT intended for RHPD users! This section is ONLY for ROSA users who have configured GH Auth as their primary authentication scheme! |
-
Optionally, 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…
-
After the operator installation has completed, install the following
UserConfig
yaml: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
Janus to RHDH
To switch to the latest RHDH image, you will need to complete the folowing:
-
Request access to the following quay repo:
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:
oc edit deploy/janus-dev -n backstage
-
then update the
imagePullSecrets: []
setting as follows:imagePullSecrets: - name: rhdh-pull-secret
-
-
Update the janus deployment to reference the private quay image:
oc edit deploy/janus-dev -n backstage
-
then update the second
image:
line as follows:image: quay.io/rhdh/developer-hub-rhel9:0.1
-
Workshop Content Development
workshop content is available at: https://redhat-scholars.github.io/backstage-workshop
Local Development with Gulp
Install local development dependencies via npm
:
npm install
Launch a local development server:
npm start
Promoting your changes
Add and commit your changes, then run git push
to trigger a new deployment:
git push origin master