Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from janus-idp/main
Browse files Browse the repository at this point in the history
get latest
  • Loading branch information
malacourse authored Mar 16, 2023
2 parents 8809f53 + 4fc183b commit 8b0eadb
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 17 deletions.
21 changes: 17 additions & 4 deletions ansible/cluster-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export GITHUB_ORGANIZATION=
open "https://github.com/organizations/$GITHUB_ORGANIZATION/settings/apps/new?name=$GITHUB_ORGANIZATION-webook&url=https://janus-idp.io/blog&webhook_active=false&public=false&administration=write&checks=write&actions=write&contents=write&statuses=write&vulnerability_alerts=write&dependabot_secrets=write&deployments=write&discussions=write&environments=write&issues=write&packages=write&pages=write&pull_requests=write&repository_hooks=write&repository_projects=write&secret_scanning_alerts=write&secrets=write&security_events=write&workflows=write&webhooks=write"
```

1. Set the `GITHUB_APP_ID` environment variable to the App ID of the App you just created. Generate a `Private Key` for this app and download the private key file. Set the fully qualified path to the `GITHUB_KEY_FILE` environment variable.
1. Set the `GITHUB_APP_ID` environment variable to the App ID of the App you just created. Then, generate a `Private Key` for this app and **download** the private key file. Set the fully qualified path to the `GITHUB_KEY_FILE` environment variable.

``` sh
export GITHUB_APP_ID=
Expand All @@ -92,7 +92,7 @@ export GITHUB_ORGANIZATION=
Create an GitHub OAuth application in order to use GitHub as an Identity Provider for Backstage.

``` sh
open "https://github.com/settings/applications/new?oauth_application[name]=$JANUS_IDP_BOOTSRAP-identity-provider&oauth_application[url]=https://assemble-demo.apps$OPENSHIFT_CLUSTER_INFO&oauth_application[callback_url]=https://keycloak-backstage.apps$OPENSHIFT_CLUSTER_INFO/auth/realms/backstage/broker/github/endpoint"
open "https://github.com/settings/applications/new?oauth_application[name]=$GITHUB_ORGANIZATION-identity-provider&oauth_application[url]=https://assemble-demo.apps$OPENSHIFT_CLUSTER_INFO&oauth_application[callback_url]=https://keycloak-backstage.apps$OPENSHIFT_CLUSTER_INFO/auth/realms/backstage/broker/github/endpoint"
```

Set the `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` environment variables with the values from the OAuth application.
Expand All @@ -110,7 +110,7 @@ export GITHUB_CLIENT_SECRET=
Create a **second** GitHub OAuth application to enable Dev Spaces to seamlessly push code changes to the repository for new components created in Backstage.

``` sh
open "https://github.com/settings/applications/new?oauth_application[name]=$JANUS_IDP_BOOTSRAP-dev-spaces&oauth_application[url]=https://devspaces.apps$OPENSHIFT_CLUSTER_INFO&oauth_application[callback_url]=https://devspaces.apps$OPENSHIFT_CLUSTER_INFO/api/oauth/callback"
open "https://github.com/settings/applications/new?oauth_application[name]=$GITHUB_ORGANIZATION-dev-spaces&oauth_application[url]=https://devspaces.apps$OPENSHIFT_CLUSTER_INFO&oauth_application[callback_url]=https://devspaces.apps$OPENSHIFT_CLUSTER_INFO/api/oauth/callback"
```

Set the `GITHUB_DEV_SPACES_CLIENT_ID` and `GITHUB_DEV_SPACES_CLIENT_SECRET` environment variables will the values from the OAuth application.
Expand All @@ -123,6 +123,15 @@ export GITHUB_DEV_SPACES_CLIENT_ID=
export GITHUB_DEV_SPACES_CLIENT_SECRET=
```

## Install

Clone the `assemble-platforms` repo and run the next commands from inside of the `ansible/cluster-setup` directory

```sh
git clone https://github.com/janus-idp/assemble-platforms.git
cd assemble-platforms/ansible/cluster-setup
```

### Run the Software Templates Setup Playbook

Fork the [Software Templates](https://github.com/janus-idp/software-templates) repository to your organization. Ensure that the name of the forked repo remains as `software-templates`
Expand All @@ -133,7 +142,7 @@ Execute the following command to complete setup of the fork. This playbook will
ansible-playbook ./template.yaml
```

## Install
### Run Cluster Setup Playbook

[Inventory values](inventory/group_vars/all.yml) can be changed, but it is not required

Expand All @@ -147,6 +156,10 @@ ansible-playbook site.yaml -i inventory

### FAQ

#### Stuck on `FAILED - RETRYING: [localhost]: Wait for Keycloak to be Ready (xxx retries left)` for over 2 minutes

Bounce the pod deployed by the `keycloak` StatefulSet in the `backstage` namespace. The playbook will pick up again once the new pod is up.

#### Failed on `Run RHSSO Backstage Helm Chart` during initial run `no matches for kind \"Keycloak\" in version...`

The RHSSO operator may not have completed installation, try rerunning the Ansible Playbook.
Expand Down
5 changes: 0 additions & 5 deletions ansible/cluster-setup/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
values:
dns:
zone: "{{ cluster_host[1:] }}"
values_files: ["../../charts/vault/values.yaml"]
create_namespace: true
- name: Install Vault Config Chart.
hosts: 'localhost'
Expand Down Expand Up @@ -116,7 +115,6 @@
name: pipelines
namespace: "{{ item.pipelinesnamespace }}"
chart_ref: ../../charts/pipelines-operator
values_files: ["../../charts/pipelines-operator/values.yaml"]
create_namespace: true
- name: Install RHSSO Backstage Chart.
hosts: 'localhost'
Expand Down Expand Up @@ -149,7 +147,6 @@
enabled: "{{ false if lookup('ansible.builtin.env', 'GITHUB_CLIENT_SECRET') == '' else true }}"
backstage:
host: "assemble-demo.apps{{ cluster_host }}"
values_files: ["../../charts/rhsso-backstage/values.yaml"]
create_namespace: true
- name: Wait for Keycloak to be Ready
with_items: "{{ env }}"
Expand Down Expand Up @@ -229,7 +226,6 @@
password: "{{ lookup('ansible.builtin.env', 'GITHUB_TOKEN') }}"
url: "https://github.com/{{ lookup('ansible.builtin.env', 'GITHUB_ORGANIZATION') }}"
type: "git"
values_files: ["../../charts/gitops-operator/values.yaml"]
create_namespace: true
- name: Apply ApplicationSet for Infra Deployment
with_items: "{{ env }}"
Expand Down Expand Up @@ -282,7 +278,6 @@
password: "{{ argocd_admin_pwd }}"
waitCycles: 25
url: "https://argocd-server-{{ item.gitopsnamespace }}.apps{{ cluster_host }}"
values_files: ["../../charts/assemble-backstage/values.yaml"]
create_namespace: true
- name: Populate Vault with Secrets.
hosts: 'localhost'
Expand Down
3 changes: 0 additions & 3 deletions charts/devspaces/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ kind: Subscription
metadata:
name: devspaces
namespace: openshift-operators
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "-1"
spec:
channel: stable
installPlanApproval: Automatic
Expand Down
Binary file modified docs/docs/getting_started/assets/org-client-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
24 changes: 19 additions & 5 deletions docs/docs/getting_started/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ export GITHUB_ORGANIZATION=
open "https://github.com/organizations/$GITHUB_ORGANIZATION/settings/apps/new?name=$GITHUB_ORGANIZATION-webook&url=https://janus-idp.io/blog&webhook_active=false&public=false&administration=write&checks=write&actions=write&contents=write&statuses=write&vulnerability_alerts=write&dependabot_secrets=write&deployments=write&discussions=write&environments=write&issues=write&packages=write&pages=write&pull_requests=write&repository_hooks=write&repository_projects=write&secret_scanning_alerts=write&secrets=write&security_events=write&workflows=write&webhooks=write"
```

1. Set the `GITHUB_APP_ID` environment variable to the App ID of the App you just created. Generate a `Private Key` for this app and download the private key file. Set the fully qualified path to the `GITHUB_KEY_FILE` environment variable.

1. Set the `GITHUB_APP_ID` environment variable to the App ID of the App you just created. Then, generate a `Private Key` for this app and **download** the private key file. Set the fully qualified path to the `GITHUB_KEY_FILE` environment variable.
``` sh
export GITHUB_APP_ID=
```
Expand All @@ -97,7 +96,7 @@ export GITHUB_ORGANIZATION=
Create an GitHub OAuth application in order to use GitHub as an Identity Provider for Backstage.

``` sh
open "https://github.com/settings/applications/new?oauth_application[name]=$JANUS_IDP_BOOTSRAP-identity-provider&oauth_application[url]=https://assemble-demo.apps$OPENSHIFT_CLUSTER_INFO&oauth_application[callback_url]=https://keycloak-backstage.apps$OPENSHIFT_CLUSTER_INFO/auth/realms/backstage/broker/github/endpoint"
open "https://github.com/settings/applications/new?oauth_application[name]=$GITHUB_ORGANIZATION-identity-provider&oauth_application[url]=https://assemble-demo.apps$OPENSHIFT_CLUSTER_INFO&oauth_application[callback_url]=https://keycloak-backstage.apps$OPENSHIFT_CLUSTER_INFO/auth/realms/backstage/broker/github/endpoint"
```

Set the `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` environment variables with the values from the OAuth application.
Expand All @@ -115,7 +114,7 @@ export GITHUB_CLIENT_SECRET=
Create a **second** GitHub OAuth application to enable Dev Spaces to seamlessly push code changes to the repository for new components created in Backstage.

``` sh
open "https://github.com/settings/applications/new?oauth_application[name]=$JANUS_IDP_BOOTSRAP-dev-spaces&oauth_application[url]=https://devspaces.apps$OPENSHIFT_CLUSTER_INFO&oauth_application[callback_url]=https://devspaces.apps$OPENSHIFT_CLUSTER_INFO/api/oauth/callback"
open "https://github.com/settings/applications/new?oauth_application[name]=$GITHUB_ORGANIZATION-dev-spaces&oauth_application[url]=https://devspaces.apps$OPENSHIFT_CLUSTER_INFO&oauth_application[callback_url]=https://devspaces.apps$OPENSHIFT_CLUSTER_INFO/api/oauth/callback"
```

Set the `GITHUB_DEV_SPACES_CLIENT_ID` and `GITHUB_DEV_SPACES_CLIENT_SECRET` environment variables will the values from the OAuth application.
Expand All @@ -128,7 +127,16 @@ export GITHUB_DEV_SPACES_CLIENT_ID=
export GITHUB_DEV_SPACES_CLIENT_SECRET=
```

### Run the Software Templates Setup Playbook
## Install

Clone the `assemble-platforms` repo and run the next commands from inside of the `ansible/cluster-setup` directory

```sh
git clone https://github.com/janus-idp/assemble-platforms.git
cd assemble-platforms/ansible/cluster-setup
```

### Run Cluster Setup Playbook

Fork the [Software Templates](https://github.com/janus-idp/software-templates) repository to your organization. Ensure that the name of the forked repo remains as `software-templates`

Expand All @@ -153,8 +161,14 @@ ansible-playbook site.yaml -i inventory

### FAQ

??? question "Stuck on `FAILED - RETRYING: [localhost]: Wait for Keycloak to be Ready (xxx retries left)` for over 2 minutes"
Bounce the pod deployed by the `keycloak` StatefulSet in the `backstage` namespace. The playbook will pick up again once the new pod is up.

??? question "Failed on `Run RHSSO Backstage Helm Chart` during initial run `no matches for kind \"Keycloak\" in version...`"
The RHSSO operator may not have completed installation, try rerunning the Ansible Playbook.
??? question "Failed on `Create Manifests Repo`"
Most likely an environment variable is not set, or not set correctly. Validate, delete the Postgres Database Deployment and re-try the playbook.
??? question "Log in to Argo Cluster"
To access the console, the password for the `admin` user can be found in the `argocd-cluster` secret.

0 comments on commit 8b0eadb

Please sign in to comment.