Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update package-dir -> package #29

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crossplane-integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Please use the below command to deploy an IDP reference implementation with an A
```bash
idpbuilder create \
--use-path-routing \
--package-dir https://github.com/cnoe-io/stacks//ref-implementation \
--package-dir https://github.com/cnoe-io/stacks//crossplane-integrations
--package https://github.com/cnoe-io/stacks//ref-implementation \
--package https://github.com/cnoe-io/stacks//crossplane-integrations
```
## What is installed?

Expand All @@ -30,7 +30,7 @@ Once you click the create button, you will have a very similar setup as the basi
The only difference is we now have a resource for a S3 Bucket which is managed by Crossplane.

Note that Bucket is **not** created because Crossplane doesn't have necessary credentials to do so.
If you'd like it to actually create a bucket, update [the credentials secret file](crossplane-providers/provider-secret.yaml), then run `idpbuilder create --package-dir examples/ref-implementation`.
If you'd like it to actually create a bucket, update [the credentials secret file](crossplane-providers/provider-secret.yaml), then run `idpbuilder create --package https://github.com/cnoe-io/stacks//ref-implementation`.

In this example, we used Crossplane to provision resources, but you can use other cloud resource management tools such as Terraform instead.

Expand Down
10 changes: 5 additions & 5 deletions local-backup/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Local Backup with Velero and Minio

This example creates a configuration that allows you to back up Kubernetes objects
to your laptop (or wherever you are running idpbuilder from).
to your laptop (or wherever you are running idpbuilder from). It assumes that idpBuilder is on the path and that you have cloned this repository.

In short, it:
1. Creates a [MinIO](https://min.io/) installation that mounts a local directory.
Expand Down Expand Up @@ -34,7 +34,7 @@ Once you've made the change, run this command from the root of this repository.
# example: mkdir /Users/my-name/backup
mkdir <path/to/directory>

idpbuilder create --kind-config examples/local-backup/kind.yaml --package-dir examples/local-backup/
idpbuilder create --kind-config local-backup/kind.yaml --package local-backup/
```

This command:
Expand Down Expand Up @@ -81,7 +81,7 @@ kubectl apply -f https://raw.githubusercontent.com/vmware-tanzu/velero/main/exam
Once they are created and running, create a backup.

```bash
kubectl apply -f examples/local-backup/demo/backup.yaml
kubectl apply -f local-backup/demo/backup.yaml
```

This command is equivalent to this Velero command: `velero backup create nginx-backup --selector app=nginx`
Expand Down Expand Up @@ -119,7 +119,7 @@ kind delete clusters localdev && docker system prune -f
Once it is destroyed, create it again.

```bash
idpbuilder create --kind-config examples/local-backup/kind.yaml --package-dir examples/local-backup/
idpbuilder create --kind-config local-backup/kind.yaml --package local-backup/
```

Make sure everything looks good:
Expand Down Expand Up @@ -153,7 +153,7 @@ nginx-backup 1m
Target this backup to restore objects.

```bash
kubectl apply -f examples/local-backup/demo/restore.yaml
kubectl apply -f local-backup/demo/restore.yaml
```

This command is equivalent to `velero restore create --from-backup nginx-backup`.
Expand Down
4 changes: 2 additions & 2 deletions localstack-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
```bash
idpbuilder create \
--use-path-routing \
--package-dir https://github.com/cnoe-io/stacks//ref-implementation \
--package-dir https://github.com/cnoe-io/stacks//localstack-integration
--package https://github.com/cnoe-io/stacks//ref-implementation \
--package https://github.com/cnoe-io/stacks//localstack-integration
```

As you see above, this add-on to `idpbuilder` has a dependency on the [reference implementation](../ref-implementation/). This command primarily does the following:

1. Installs `localstack` helmchart as an `argo` application.
2. Adds localstack crossplane ProviderConfig, targetting localstack

Check failure on line 15 in localstack-integration/README.md

View workflow job for this annotation

GitHub Actions / Check for spelling errors

targetting ==> targeting

Once the custom package is installed, localstack can be used from the backstage template `app-with-aws-resources`, by changing the `providerConfigName` during the bucket configuration page from `default` to `localstack`.
7 changes: 1 addition & 6 deletions ref-implementation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ and be configured with the new host and port. you can use the [replace.sh](repla

```bash
idpbuilder create --use-path-routing \
--package-dir https://github.com/cnoe-io/stacks//ref-implementation
--package https://github.com/cnoe-io/stacks//ref-implementation
```

This will take ~6 minutes for everything to come up. To track the progress, you can go to the [ArgoCD UI](https://cnoe.localtest.me:8443/argocd/applications).
Expand All @@ -43,11 +43,6 @@ This will take ~6 minutes for everything to come up. To track the progress, you
If you don't want to install a package above, you can remove the ArgoCD Application file corresponding to the package you want to remove.
For example, if you want to remove Spark Operator, you can delete [this file](./spark-operator.yaml).

```bash
# remove spark operator from this installation.
rm examples/ref-implementation/spark-operator.yaml
```

The only package that cannot be removed this way is Keycloak because other packages rely on it.


Expand Down
6 changes: 4 additions & 2 deletions ref-implementation/codespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ Codespaces assigns random hostname to your specific instance. You need to make s
Instance host name is available as an environment variable (`CODESPACE_NAME`). Let's use it to setup our host names.
Run the following commands to update host name and ports. Port is set to 443 because this is the port used by the browser to access your instance.

Clone the [stacks](https://github.com/cnoe-io/stacks) repo.


```bash
cd examples/ref-implementation
cd ref-implementation

./replace.sh ${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} 443

Expand All @@ -44,7 +46,7 @@ Now you are ready to run idpbuilder with reference implementation.
```bash
idpbuilder create --protocol http \
--host ${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} \
--port 8080 --use-path-routing --package-dir examples/ref-implementation
--port 8080 --use-path-routing --package ref-implementation
```
Once idpbuilder finishes bootstrapping, you should have port 8080 forward in the port tab within Codespaces.

Expand Down
6 changes: 3 additions & 3 deletions ref-implementation/external-secrets/generate-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -e
INSTALL_YAML="manifests/install.yaml"
CHART_VERSION="0.9.11"

echo "# EXTERNAL SECRETS INSTALL RESOURCES" > ${INSTALL_YAML}
echo "# This file is auto-generated with 'examples/ref-impelmentation/external-secrets/generate-manifests.sh'" >> ${INSTALL_YAML}
echo "# EXTERNAL SECRETS INSTALL RESOURCES" >${INSTALL_YAML}
echo "# This file is auto-generated with 'ref-impelmentation/external-secrets/generate-manifests.sh'" >>${INSTALL_YAML}

helm repo add external-secrets --force-update https://charts.external-secrets.io
helm repo update
helm template --namespace external-secrets external-secrets external-secrets/external-secrets -f values.yaml --version ${CHART_VERSION} >> ${INSTALL_YAML}
helm template --namespace external-secrets external-secrets external-secrets/external-secrets -f values.yaml --version ${CHART_VERSION} >>${INSTALL_YAML}
14 changes: 7 additions & 7 deletions ref-implementation/replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
set -e
# Check if the new port number is provided as an argument
if [ "$#" -ne 2 ]; then
echo "Usage: NEW_HOST NEW_PORT"
exit 1
echo "Usage: NEW_HOST NEW_PORT"
exit 1
fi

# Assign the first script argument to NEW_PORT
Expand All @@ -16,8 +16,8 @@ NEW_PORT="$2"
# Base directory to start from, "." means the current directory
CURRENT_DIR=$(echo "${PWD##*/}")
if [[ ${CURRENT_DIR} != "ref-implementation" ]]; then
echo "please run this script from the examples/ref-implementation directory"
exit 10
echo "please run this script from the ref-implementation directory"
exit 10
fi
BASE_DIRECTORY="."

Expand All @@ -28,9 +28,9 @@ find "$BASE_DIRECTORY" -type f -name "*.yaml" -exec sed -i "s/cnoe\.localtest\.m

# Remove hostname-port configuration if the new port is 443. Browsers strip 443 but keycloak still expects 443 in url.
if [[ ${NEW_PORT} == "443" ]]; then
sed -i "/hostname-port/d" keycloak/manifests/install.yaml
sed -i "/hostname-admin/d" keycloak/manifests/install.yaml
sed -i '0,/:443/{s/:443//}' argo-workflows/manifests/dev/patches/cm-argo-workflows.yaml
sed -i "/hostname-port/d" keycloak/manifests/install.yaml
sed -i "/hostname-admin/d" keycloak/manifests/install.yaml
sed -i '0,/:443/{s/:443//}' argo-workflows/manifests/dev/patches/cm-argo-workflows.yaml
fi

echo "Replacement complete."
4 changes: 2 additions & 2 deletions terraform-integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Please use the below command to deploy an IDP reference implementation with an A
```bash
idpbuilder create \
--use-path-routing \
--package-dir https://github.com/cnoe-io/stacks//ref-implementation \
--package-dir https://github.com/cnoe-io/stacks//terraform-integrations
--package https://github.com/cnoe-io/stacks//ref-implementation \
--package https://github.com/cnoe-io/stacks//terraform-integrations
```

As you see above, this add-on to `idpbuilder` has a dependency to the [reference implementation](../ref-implementation/). This command primarily does the following:
Expand Down
Loading