update package-dir -> package (#29)
Signed-off-by: Nima Kaviani <nkaviani@amazon.com>
This commit is contained in:
parent
ad630da0ab
commit
7e0474b3bb
8 changed files with 27 additions and 30 deletions
|
@ -7,8 +7,8 @@ Please use the below command to deploy an IDP reference implementation with an A
|
||||||
```bash
|
```bash
|
||||||
idpbuilder create \
|
idpbuilder create \
|
||||||
--use-path-routing \
|
--use-path-routing \
|
||||||
--package-dir https://github.com/cnoe-io/stacks//ref-implementation \
|
--package 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//crossplane-integrations
|
||||||
```
|
```
|
||||||
## What is installed?
|
## What is installed?
|
||||||
|
|
||||||
|
@ -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.
|
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.
|
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.
|
In this example, we used Crossplane to provision resources, but you can use other cloud resource management tools such as Terraform instead.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Local Backup with Velero and Minio
|
# Local Backup with Velero and Minio
|
||||||
|
|
||||||
This example creates a configuration that allows you to back up Kubernetes objects
|
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:
|
In short, it:
|
||||||
1. Creates a [MinIO](https://min.io/) installation that mounts a local directory.
|
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
|
# example: mkdir /Users/my-name/backup
|
||||||
mkdir <path/to/directory>
|
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:
|
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.
|
Once they are created and running, create a backup.
|
||||||
|
|
||||||
```bash
|
```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`
|
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.
|
Once it is destroyed, create it again.
|
||||||
|
|
||||||
```bash
|
```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:
|
Make sure everything looks good:
|
||||||
|
@ -153,7 +153,7 @@ nginx-backup 1m
|
||||||
Target this backup to restore objects.
|
Target this backup to restore objects.
|
||||||
|
|
||||||
```bash
|
```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`.
|
This command is equivalent to `velero restore create --from-backup nginx-backup`.
|
||||||
|
|
|
@ -5,8 +5,8 @@ Please use the below command to deploy an IDP reference implementation with an A
|
||||||
```bash
|
```bash
|
||||||
idpbuilder create \
|
idpbuilder create \
|
||||||
--use-path-routing \
|
--use-path-routing \
|
||||||
--package-dir https://github.com/cnoe-io/stacks//ref-implementation \
|
--package 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//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:
|
As you see above, this add-on to `idpbuilder` has a dependency on the [reference implementation](../ref-implementation/). This command primarily does the following:
|
||||||
|
|
|
@ -27,7 +27,7 @@ and be configured with the new host and port. you can use the [replace.sh](repla
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
idpbuilder create --use-path-routing \
|
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).
|
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).
|
||||||
|
@ -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.
|
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).
|
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.
|
The only package that cannot be removed this way is Keycloak because other packages rely on it.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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.
|
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
|
```bash
|
||||||
cd examples/ref-implementation
|
cd ref-implementation
|
||||||
|
|
||||||
./replace.sh ${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} 443
|
./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
|
```bash
|
||||||
idpbuilder create --protocol http \
|
idpbuilder create --protocol http \
|
||||||
--host ${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} \
|
--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.
|
Once idpbuilder finishes bootstrapping, you should have port 8080 forward in the port tab within Codespaces.
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ set -e
|
||||||
INSTALL_YAML="manifests/install.yaml"
|
INSTALL_YAML="manifests/install.yaml"
|
||||||
CHART_VERSION="0.9.11"
|
CHART_VERSION="0.9.11"
|
||||||
|
|
||||||
echo "# EXTERNAL SECRETS INSTALL RESOURCES" > ${INSTALL_YAML}
|
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 "# 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 add external-secrets --force-update https://charts.external-secrets.io
|
||||||
helm repo update
|
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}
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
set -e
|
set -e
|
||||||
# Check if the new port number is provided as an argument
|
# Check if the new port number is provided as an argument
|
||||||
if [ "$#" -ne 2 ]; then
|
if [ "$#" -ne 2 ]; then
|
||||||
echo "Usage: NEW_HOST NEW_PORT"
|
echo "Usage: NEW_HOST NEW_PORT"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Assign the first script argument to NEW_PORT
|
# Assign the first script argument to NEW_PORT
|
||||||
|
@ -16,8 +16,8 @@ NEW_PORT="$2"
|
||||||
# Base directory to start from, "." means the current directory
|
# Base directory to start from, "." means the current directory
|
||||||
CURRENT_DIR=$(echo "${PWD##*/}")
|
CURRENT_DIR=$(echo "${PWD##*/}")
|
||||||
if [[ ${CURRENT_DIR} != "ref-implementation" ]]; then
|
if [[ ${CURRENT_DIR} != "ref-implementation" ]]; then
|
||||||
echo "please run this script from the examples/ref-implementation directory"
|
echo "please run this script from the ref-implementation directory"
|
||||||
exit 10
|
exit 10
|
||||||
fi
|
fi
|
||||||
BASE_DIRECTORY="."
|
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.
|
# 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
|
if [[ ${NEW_PORT} == "443" ]]; then
|
||||||
sed -i "/hostname-port/d" keycloak/manifests/install.yaml
|
sed -i "/hostname-port/d" keycloak/manifests/install.yaml
|
||||||
sed -i "/hostname-admin/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 '0,/:443/{s/:443//}' argo-workflows/manifests/dev/patches/cm-argo-workflows.yaml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Replacement complete."
|
echo "Replacement complete."
|
||||||
|
|
|
@ -7,8 +7,8 @@ Please use the below command to deploy an IDP reference implementation with an A
|
||||||
```bash
|
```bash
|
||||||
idpbuilder create \
|
idpbuilder create \
|
||||||
--use-path-routing \
|
--use-path-routing \
|
||||||
--package-dir https://github.com/cnoe-io/stacks//ref-implementation \
|
--package 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//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:
|
As you see above, this add-on to `idpbuilder` has a dependency to the [reference implementation](../ref-implementation/). This command primarily does the following:
|
||||||
|
|
Loading…
Reference in a new issue