This repository has been archived by the owner on Jan 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from janus-idp/main
merge
- Loading branch information
Showing
22 changed files
with
532 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./docs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- uses: actions/cache@v2 | ||
with: | ||
key: ${{ github.ref }} | ||
path: .cache | ||
- run: pip install mkdocs-material | ||
- run: mkdocs gh-deploy --force |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Assemble with Ansible | ||
|
||
A guide to installing `Assemble with Ansible` | ||
|
||
## Prerequisites | ||
|
||
- Access to an Openshift 4+ deployment and logged in with the CLI | ||
- Install the Following CLIs | ||
- [ansible](https://www.ansible.com/)/[ansible-galaxy](https://galaxy.ansible.com/) | ||
- [helm](https://helm.sh/) | ||
- Please use the version included with your Openshift Deployment | ||
- [pip3](https://pypi.org/project/pip/) | ||
- Install ansible's `kubernetes.core` and `community.general` collections: | ||
|
||
## Setup | ||
|
||
1. The Ansible `kubernetes.core` collections needs to be installed before using this playbook. | ||
|
||
``` sh | ||
ansible-galaxy collection install kubernetes.core | ||
``` | ||
|
||
1. The `kubernetes`, `openshift`, and `PyYAML` python packages need to be installed before using this playbook. | ||
|
||
``` sh | ||
pip3 install --user kubernetes openshift PyYAML | ||
``` | ||
|
||
1. The `helm diff` plugin should to be installed before using this playbook. | ||
|
||
``` sh | ||
helm plugin install https://github.com/databus23/helm-diff | ||
``` | ||
|
||
1. Login to OpenShift | ||
1. If you want to use the GitHub integration, generate a Personal Access Token for GitHub and set the `GITHUB_TOKEN` environment variable. | ||
See the official [Backstage Documentation](https://backstage.io/docs/getting-started/configuration#setting-up-a-github-integration) for information on how to create one. For the purposes of a demonstration, a Personal Access Token will do. | ||
1. If you want to use GitHub as an IDP for backstage then create an GitHub app and set the `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` environment variables. | ||
- Create a [GitHub OAuth Application](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) within the desired organization. | ||
- Use the following commands to generate the sample values used for this demo and fill them in using the GitHub UI: | ||
|
||
**Homepage URL:** | ||
|
||
```sh | ||
echo "https://assemble-demo.apps$(oc cluster-info | grep -Eo '.cluster(.*?).com')" | ||
``` | ||
|
||
**Authorization Callback URL:** | ||
|
||
```sh | ||
echo "https://keycloak-backstage.apps$(oc cluster-info | grep -Eo '.cluster(.*?).com')/auth/realms/backstage/broker/github/endpoint" | ||
``` | ||
|
||
2. OPTIONAL: If you would like setup to include GitOps configuration, create a [Github Organization](https://github.com/settings/organizations) and set the `GITHUB_ORGANIZATION` environment variable to the name of the Organization. You may also use any organization you are a member of, as long as you have the ability to create new repositories within it. | ||
|
||
## Install | ||
|
||
[Inventory values](inventory/group_vars/all.yml) can be changed, but not required | ||
|
||
Run Command: | ||
|
||
```sh | ||
ansible-playbook site.yaml -i inventory | ||
``` | ||
|
||
### FAQ | ||
|
||
#### 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. | ||
|
||
#### 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. | ||
|
||
> Note: If there is an issue post the Postgres database creation please delete the database (or the entire namespace) before attempting to rerun the ansible playbook. | ||
|
||
#### Unable to login to Argo Cluster | ||
|
||
Admin password can be found on `argocd-cluster` secret. And the username is `admin` |
3 changes: 0 additions & 3 deletions
3
ansible/inventory/group_vars/all.yml → ...luster-setup/inventory/group_vars/all.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
|
||
|
||
|
||
env: | ||
- namespace: "backstage" | ||
companyname: "ACME Inc" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Customize Software Templates | ||
|
||
These steps will customize the Janus software templates for use within your OpenShift cluster. | ||
|
||
## Prerequisites | ||
|
||
- Access to an Openshift 4+ deployment and logged in with the CLI | ||
- A GitHub Organization for which you have access to | ||
|
||
## Setup | ||
|
||
1. Set the `GITHUB_ORGANIZATION` environment variable to the name of your organization. | ||
|
||
``` sh | ||
export GITHUB_ORGANIZATION= #set your Git Hub org name here | ||
``` | ||
|
||
2. Fork the [Software Templates](https://github.com/janus-idp/software-templates) repository to your organization. | ||
|
||
3. Run the ansible playbook to complete setup. This playbook with customize your fork of the Software Templates repo with relevant information pertaining to your cluster, mimicking the structure of a custom template being used in an enterprise IT environment. | ||
|
||
```sh | ||
ansible-playbook ./site.yaml | ||
``` | ||
|
||
### FAQ | ||
|
||
#### 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. | ||
|
||
#### 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. | ||
|
||
> Note: If there is an issue post the Postgres database creation please delete the database (or the entire namespace) before attempting to rerun the ansible playbook. | ||
|
||
#### Unable to login to Argo Cluster | ||
|
||
Admin password can be found on `argocd-cluster` secret. And the username is `admin` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
- name: Gather Cluster Info. | ||
gather_facts: false | ||
hosts: 'localhost' | ||
tasks: | ||
- name: Determine Host | ||
shell: "oc cluster-info | grep -Eo '.cluster(.*?).com'" | ||
register: cluster_response | ||
- name: Set Dev Spaces Instance | ||
set_fact: | ||
dev_spaces_instance: "devspaces.apps{{ cluster_response.stdout }}" | ||
- debug: var=cluster_response.stdout_lines | ||
- name: Customize Software Template | ||
gather_facts: false | ||
hosts: 'localhost' | ||
tasks: | ||
- name: Insert Dev Spaces Instance Information | ||
shell: | | ||
cd ../../../ | ||
git clone https://github.com/{{ lookup('ansible.builtin.env', 'GITHUB_ORGANIZATION') }}/software-templates.git | ||
cd software-templates | ||
find . -type f -not -path '*/\.git/*' -exec sed -i '' -e "s/devspaces.apps.example-cluster.com/{{ dev_spaces_instance }}/g" {} + | ||
git add -A | ||
git commit -m "initial customization" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Architecture | ||
|
||
![Architecture](assets/architecture.drawio.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Assemble Demo Setup | ||
|
||
Assemble can also be evaluated using the new [demo.redhat.com](https://demo.redhat.com/catalog) demo. | ||
|
||
More Information coming... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Getting Started | ||
|
||
## Prerequisite | ||
|
||
- Openshift 4.10+ | ||
- Ansible | ||
- TBD | ||
|
||
## Installation | ||
|
||
Talk about installation through the playbook TBD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# :wrench: Assemble :wrench: | ||
|
||
Assemble is a platform built on the back of [Janus IDP](https://github.com/janus-idp/redhat-backstage-build) and [Backstage](https://backstage.io/docs/overview/what-is-backstage), with the goal of helping application teams get started quicker. | ||
|
||
## Why Should I use Assemble? | ||
|
||
TBD |
Oops, something went wrong.