diff --git a/README.kustomize.md b/README.kustomize.md index 77a4bcc..05f04c7 100644 --- a/README.kustomize.md +++ b/README.kustomize.md @@ -120,12 +120,25 @@ To simplify the experience, we have created a `configure.sh` script to automate ### A. Scripted installation +To create a new deployment you can use following command. + ```bash -./configure.sh -i -s +ubuntu@xxxx:~/deployment$ ./configure.sh +Usage: ./configure.sh {apply|delete} [-s ] [-i ] ``` When looking into the `configure.sh` script, you will notice that `microk8s` is utilized. You are encouraged to adjust the overlay to suit your requirements or create a new overlay as needed. +```bash +ubuntu@xxxx:~/deployment$ ./configure.sh apply -i x.x.x.x -s /media/storage +``` + +To delete you can use the deletion argument. + +```bash +ubuntu@xxxx:~/deployment$ ./configure.sh delete +``` + ### B. Native installation If you prefer to use `kustomize` directly without the `configure.sh` script, that's perfectly fine. You can adjust an existing overlay or create a new one to suit your needs. By using the `kustomize` configuration mechanism, you can override our `base` directory settings. diff --git a/configure.sh b/configure.sh index 18d3eb1..f65b48a 100755 --- a/configure.sh +++ b/configure.sh @@ -6,7 +6,8 @@ get_ip_address() { } # Parse command line arguments -command="" +command=$1 +shift while getopts ":s:i:" opt; do case $opt in s) storage_path="$OPTARG" @@ -18,9 +19,6 @@ while getopts ":s:i:" opt; do esac done -shift $((OPTIND -1)) -command=$1 - if [ "$command" == "apply" ]; then if [ -z "$storage_path" ]; then echo "Usage: $0 apply -s [-i ]"