|
| 1 | +# Overview |
| 2 | + |
| 3 | +These are the Helm charts to install DataOps TestGen on a Kubernetes |
| 4 | +environment. This README includes instructions for installing TestGen on a |
| 5 | +minikube instance, including the application database engine, added by the |
| 6 | +`testgen-services` charts. The application itself is installed by the |
| 7 | +`testgen-app` charts. When installing on cloud, it's likely that the |
| 8 | +application database will be provisioned by a cloud provider, and therefore |
| 9 | +installing the `testgen-services` charts is not necessary. |
| 10 | + |
| 11 | +# Preparing the Environment |
| 12 | + |
| 13 | +Here are the instructions to create a local minikube cluster where DataOps |
| 14 | +TestGen and its services will be installed. When deploying to a cloud / |
| 15 | +production environment, this step should be adjusted accordingly. |
| 16 | + |
| 17 | +Assuming that minikube is installed, the following command will create a |
| 18 | +cluster named dk-testgen and configure the local kubectl tool to issue commands |
| 19 | +against the cluster. When running helm commands against an existing cluster, |
| 20 | +it's important to make sure that the kubectl tool is pointing to the correct |
| 21 | +profile. |
| 22 | + |
| 23 | +```shell |
| 24 | +minikube start -p dk-testgen --namespace datakitchen |
| 25 | +``` |
| 26 | + |
| 27 | +# Configuration |
| 28 | + |
| 29 | +Whenever a helm command is used to generate manifests from templates |
| 30 | +(`install`, `upgrade`), it will rely on pre-configured values to do so. Helm |
| 31 | +provides a variety of ways to define these values. You can find the complete |
| 32 | +configuration set that is also used as a default in each charts’ folder, in the |
| 33 | +values.yaml file. |
| 34 | + |
| 35 | +No additional configuration is recommended for the `testgen-services` charts. |
| 36 | + |
| 37 | +The `testgen-app` charts require some configuration to be fine tuned. The best |
| 38 | +way to do that is to save it in a values file, so that the same configuration |
| 39 | +set can be easily used on the first install and future upgrades. |
| 40 | + |
| 41 | +The following configuration is recommended for experimental installations, but |
| 42 | +you're free to adjust it for your needs. The next installation steps assumes |
| 43 | +that a file named tg-values.yaml exists with this configuration. |
| 44 | + |
| 45 | +```yaml |
| 46 | +testgen: |
| 47 | + |
| 48 | + # Password that will be assigned to the 'admin' user during the database preparation |
| 49 | + uiPassword: "admin" |
| 50 | + |
| 51 | + # Whether to trust the target database certificates. |
| 52 | + trustTargetDatabaseCertificate: true |
| 53 | + |
| 54 | + # Whether to run the SSL certificate verifications when connecting to DataOps Observability |
| 55 | + observabilityVerifySsl: false |
| 56 | + |
| 57 | +image: |
| 58 | + |
| 59 | + # DataOps TestGen version to be installed / upgraded |
| 60 | + tag: v3.0 |
| 61 | +``` |
| 62 | +
|
| 63 | +# Installing |
| 64 | +
|
| 65 | +The following command will install the required services for DataOps TestGen, |
| 66 | +which currently is the Postgres database. This step is not needed when the |
| 67 | +database is provisioned in a cloud environment. |
| 68 | +
|
| 69 | +```shell |
| 70 | +helm install --create-namespace --wait testgen-services deploy/charts/testgen-services/ |
| 71 | +``` |
| 72 | + |
| 73 | +The following command will install the application. As part of the process, a |
| 74 | +one-time database configuration will be automatically performed. Note that the |
| 75 | +custom configuration values are being used. |
| 76 | + |
| 77 | +```shell |
| 78 | +helm install --wait -f tg-values.yaml testgen-app deploy/charts/testgen-app/ |
| 79 | +``` |
| 80 | + |
| 81 | +At this point you should have a fully functional instance of DataOps TestGen |
| 82 | +installed. If you're looking to secure the UI password, you can delete it from |
| 83 | +the values file. |
| 84 | + |
| 85 | +# Accessing the Application |
| 86 | + |
| 87 | +In order to use your TestGen instance, you have to use your web browser to |
| 88 | +login to it. Your username will be admin and the password the one you |
| 89 | +configured earlier. |
| 90 | + |
| 91 | +It may be needed that you forward the application HTTP port in order to be able |
| 92 | +to access it. This is especially necessary if you are using the docker driver |
| 93 | +for minikube installed into a mac OS. The following command forwards the TesGen |
| 94 | +“http” port to the host's 8501 port. |
| 95 | + |
| 96 | +```shell |
| 97 | +kubectl port-forward svc/testgen-app 8501:http |
| 98 | +``` |
| 99 | + |
| 100 | +# Upgrading |
| 101 | + |
| 102 | +When you already have a running instance of TestGen and want to upgrade it to a |
| 103 | +newer version, you can do so without losing any data by running the |
| 104 | +`upgrade-system-version` TestGen command from the target version's image. The |
| 105 | +helm charts will do this automatically when you upgrade. You should edit your |
| 106 | +values file to update the image tag value to the desired version, and then run |
| 107 | +the following command. |
| 108 | + |
| 109 | +```shell |
| 110 | +helm upgrade --wait -f tg-values.yaml testgen-app deploy/charts/testgen-app/ |
| 111 | +``` |
| 112 | + |
| 113 | +# Uninstalling |
| 114 | + |
| 115 | +The following commands will uninstall almost everything that was created |
| 116 | +through the helm templates. It usually preserves data, which is helpful to |
| 117 | +avoid unplanned data loss, but will likely break a future install attempt. |
| 118 | + |
| 119 | +```shell |
| 120 | +helm uninstall testgen-app |
| 121 | +``` |
| 122 | + |
| 123 | +```shell |
| 124 | +helm uninstall testgen-services |
| 125 | +``` |
| 126 | + |
| 127 | +If you're uninstalling to re-install from scratch, and the data previously |
| 128 | +generated can be purged, issue the following command to delete the database |
| 129 | +volume so that the next installation will re-create and re-populate it |
| 130 | +successfully. |
| 131 | + |
| 132 | +```shell |
| 133 | +kubectl delete pvc data-testgen-services-postgresql-0 |
| 134 | +``` |
0 commit comments