hpgrahsl / backstage-workshop-fork

Backstage workshop for Red Hat OpenShift

Home Page:https://redhat-scholars.github.io/backstage-workshop/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. When asked to clone the janus-idp/demo-setup repo, create a checkout of this workshop branch instead:

    git clone https://github.com/ryanj/janus-platforms.git
    cd janus-platforms/ansible/cluster-setup
    git checkout workshop
  2. 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

  3. 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!
  1. 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
  2. Wait for the operator installation to complete…​

  3. 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:

  1. 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.

  2. After gaining access to the quay repo. Visit https://quay.io and click on Profile → Account Settings → Robot Accounts → Create Robot Account

  3. Name the Robot Account "rhdh_pull_secret".

  4. Open your robot account and select the "Kubernetes Secret" tab. Download your pull secret yaml.

  5. Edit your pull secret yaml, setting the pull secret’s metadata.name field to: rhdh-pull-secret

  6. Install your pull secret in the backstage namespace: kubectl create -f secret.yaml -n backstage

  7. 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
  8. 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

About

Backstage workshop for Red Hat OpenShift

https://redhat-scholars.github.io/backstage-workshop/

License:Apache License 2.0


Languages

Language:HTML 86.6%Language:Java 6.1%Language:TypeScript 2.6%Language:Dockerfile 2.1%Language:Smarty 1.2%Language:JavaScript 1.1%Language:Handlebars 0.1%Language:CSS 0.0%Language:Shell 0.0%