Skip to content

Commit

Permalink
Remove separate web-terminal-install script
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsauter committed Oct 2, 2023
1 parent fe73cf4 commit 8ff845e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 99 deletions.
4 changes: 0 additions & 4 deletions deploy/install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env bash
set -ue

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

verbose=false
dry_run=false
use_local_chart=false
Expand Down Expand Up @@ -123,8 +121,6 @@ while [ "$#" -gt 0 ]; do
*) echo "Unknown parameter passed: $1"; exit 1;;
esac; shift; done

cd "${script_dir}"

values_fileS=$(echo "$values_file" | tr "," "\n")
values_args=()
for valueFile in ${values_fileS}; do
Expand Down
54 changes: 15 additions & 39 deletions docs/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,27 @@ Download the template and fill in the values according to the comments in that f

[source]
----
curl -L https://raw.githubusercontent.com/opendevstack/ods-pipeline/master/deploy/values.yaml.tmpl -o values.yaml
curl -fsSL https://raw.githubusercontent.com/opendevstack/ods-pipeline/v0.14.0-preview.1/deploy/values.yaml.tmpl -o values.yaml
----

TIP: It is recommended to keep this file around after the installation so that it can be reused when updating ODS Pipeline to future versions.

=== Step 2: Running the install script

==== Option 1: With external API access

If you have access to the OpenShift API from your local machine, simply login to the OpenShift cluster and install ODS Pipeline by running:
Login to the OpenShift cluster in your terminal, then run:

[source]
----
./install.sh -n <your_cd_namespace>
curl -fsSL https://raw.githubusercontent.com/opendevstack/ods-pipeline/v0.14.0-preview.1/deploy/install.sh | bash -s -- -n=<your_cd_namespace>
----

The script will interactively ask for credentials (such as Bitbucket access token) and will create corresponding K8s secrets. If you prefer to pass these secrets via flags, see `./install.sh --help` for all options.

IMPORTANT: If tasks need to trust a private certificate, pass `--private-cert <host>`. This will create a K8s secret containing the certificate from the specified host, which will then be mounted in pods during task runs.
The script will interactively ask for credentials (such as Bitbucket access token) and will create corresponding K8s secrets. If you prefer to pass these secrets via flags, use `--help` to see all options.

TIP: You may pass `--dry-run` to review what `install.sh` will do before actually running the script.
IMPORTANT: If tasks need to trust a private certificate, pass `--private-cert=<host>`. This will create a K8s secret containing the certificate from the specified host, which will then be mounted in pods during task runs.

==== Option 2: Without external API access
TIP: If you want to review the changes first before applying them, supply `--dry-run`.

If you do not have access to the OpenShift API from your local machine, you can use the https://docs.openshift.com/container-platform/latest/web_console/odc-about-web-terminal.html[OpenShift Web Terminal] to install ODS Pipeline. Open a web terminal in your `*-cd` namespace, then run:

[source]
----
curl -L https://raw.githubusercontent.com/opendevstack/ods-pipeline/master/scripts/web-terminal-install.sh | bash
----

This will install all prerequisites automatically. Then you can clone the repository and run `./install.sh -n <your_cd_namespace>`.

`./install.sh` will interactively ask for credentials (such as Bitbucket access token) and will create corresponding K8s secrets. If you prefer to pass these secrets via flags, see `./install.sh --help` for all options.
TIP: If you do not have access to the OpenShift API from your local machine, you can use the https://docs.openshift.com/container-platform/latest/web_console/odc-about-web-terminal.html[OpenShift Web Terminal]. Open a web terminal in the target namespace and make sure the `values.yaml` file is present in the working directory there. Then run the installation script as described above. Note that you must either install the `helm-diff` plugin using `helm plugin install https://github.com/databus23/helm-diff --version "v3.3.2"` beforehand or supply `--no-diff` when running the install script.

=== Step 3: Exposing a route to the pipeline manager

Expand All @@ -86,32 +73,21 @@ The update procedure consists of two quick steps:

=== Step 1: Updating the chart values

Check if any new values have been introduced in `values.yaml.tmpl` and update your `values.yaml` (which you hopefully retained from the installation) accordingly.
Ensure that the `values.yaml` file you used during installation is located in the working directory. Then check if any new values have been introduced in link:https://raw.githubusercontent.com/opendevstack/ods-pipeline/v0.14.0-preview.1/deploy/values.yaml.tmpl[`values.yaml.tmpl`] and update `values.yaml` accordingly.

=== Step 2: Running the install script
TIP: If you cannot find the `values.yaml` file from the installation, create it again using the values found in the current Helm installation.

==== Option 1: With external API access
=== Step 2: Running the install script

If you have access to the OpenShift API from your local machine, you can simply login to the OpenShift cluster in your terminal, then update the ODS Pipeline installation by running:
Login to the OpenShift cluster in your terminal, then run:

[source]
----
./install.sh -n <your_cd_namespace>
curl -fsSL https://raw.githubusercontent.com/opendevstack/ods-pipeline/v0.14.0-preview.1/deploy/install.sh | bash -s -- -n=<your_cd_namespace>
----

TIP: You may also use `--dry-run` to see the changes first.

TIP: By default, the credentials stored in the K8s secrets will not be updated. If you want to make a change, pass any new values as flags to `install.sh` (see `./install.sh --help` for all options) or update the secrets manually.

==== Option 2: Without external API access

If you do not have access to the OpenShift API from your local machine, you can use the https://docs.openshift.com/container-platform/latest/web_console/odc-about-web-terminal.html[OpenShift Web Terminal] to install ODS Pipeline. Open a web terminal in your `*-cd` namespace, then run:

[source]
----
curl -L https://raw.githubusercontent.com/opendevstack/ods-pipeline/master/scripts/web-terminal-install.sh | bash
----
TIP: If you want to review the changes first before applying them, supply `--dry-run`.

This will install all prerequisites automatically and update your ODS Pipeline installation to the latest state of your Git repository.
TIP: By default, the credentials stored in the K8s secrets will not be updated. If you want to make a change, pass any new values as flags to the install script (supply `--help` to see all options) or update the secrets manually.

TIP: The credentials stored in the K8s secrets will not be updated. If you need to change those, update them manually.
TIP: If you do not have access to the OpenShift API from your local machine, you can use the https://docs.openshift.com/container-platform/latest/web_console/odc-about-web-terminal.html[OpenShift Web Terminal]. Open a web terminal in the target namespace and make sure the `values.yaml` file is present in the working directory there. Then run the installation script as described above. Note that you must either install the `helm-diff` plugin using `helm plugin install https://github.com/databus23/helm-diff --version "v3.3.2"` beforehand or supply `--no-diff` when running the install script.
56 changes: 0 additions & 56 deletions scripts/web-terminal-install.sh

This file was deleted.

0 comments on commit 8ff845e

Please sign in to comment.