diff --git a/crossplane-integrations/README.md b/crossplane-integrations/README.md index 796635a..86dc284 100755 --- a/crossplane-integrations/README.md +++ b/crossplane-integrations/README.md @@ -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 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. diff --git a/local-backup/README.md b/local-backup/README.md index 5b1de27..193c27f 100644 --- a/local-backup/README.md +++ b/local-backup/README.md @@ -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. @@ -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 -idpbuilder create --kind-config examples/local-backup/kind.yaml --package examples/local-backup/ +idpbuilder create --kind-config local-backup/kind.yaml --package local-backup/ ``` This command: @@ -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` @@ -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 examples/local-backup/ +idpbuilder create --kind-config local-backup/kind.yaml --package local-backup/ ``` Make sure everything looks good: @@ -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`. diff --git a/ref-implementation/README.md b/ref-implementation/README.md index af75225..7c42689 100644 --- a/ref-implementation/README.md +++ b/ref-implementation/README.md @@ -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. diff --git a/ref-implementation/codespaces.md b/ref-implementation/codespaces.md index cb743a8..ba49bbb 100644 --- a/ref-implementation/codespaces.md +++ b/ref-implementation/codespaces.md @@ -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 @@ -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 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. diff --git a/ref-implementation/external-secrets/generate-manifests.sh b/ref-implementation/external-secrets/generate-manifests.sh index 1a26292..64f2f2e 100755 --- a/ref-implementation/external-secrets/generate-manifests.sh +++ b/ref-implementation/external-secrets/generate-manifests.sh @@ -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} diff --git a/ref-implementation/replace.sh b/ref-implementation/replace.sh index 365a0c9..e1834e1 100755 --- a/ref-implementation/replace.sh +++ b/ref-implementation/replace.sh @@ -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 @@ -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="." @@ -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."