diff --git a/docs/deploy-applications/hello-world-adding-configurations.md b/docs/deploy-applications/hello-world-adding-configurations.md new file mode 100644 index 000000000..4bcd673d3 --- /dev/null +++ b/docs/deploy-applications/hello-world-adding-configurations.md @@ -0,0 +1,126 @@ +--- +id: adding-configurations-and-secrets-to-the-hello-world-app-glueops-platform +title: Adding Application Configurations +type: tutorial +--- + +# Adding Application Configurations/Secrets +:::caution +Before diving in, it's essential to have a [Hello World App Deployment](../deploy-applications/deploy-hello-world-to-glueops) running. Once that's in place, we can explore how to tweak its greeting using configurations and secrets. +::: + +In this guide, you'll learn how to add configurations and secrets to your applications using the GlueOps platform. As an example, we'll update the default greeting of your existing 'Hello World' app to showcase this functionality. + +## Let's create the new greeting message + +:::info prerequisites + +Before you get started we will begin referencing links located on your cluster information home page: + `https://cluster-info.` + +_Using the URL above, replace `` with the correct value provided by your Platform Administrator_ +::: + +Once you are on the cluster info home page, click on the `Resource/Link` for `Secrets Management`. You will then be taking our our secrets management system (Vault). For the role enter "editor" as you will need read/write access and then click on `Sign in with OIDC Provider` + +![Alt text](./images/login.png) + +To create our first configuration/secret, Click on "Create secret +` + +![Alt text](./images/create-secret.png) + +Finally, let's enter in the details for the new greeting message. For the field `Path for this secret` you will want to use `app-projectname` in our case our demo projectname as used in other tutorials is `antoniostacos`. +For the `key` enter `GREETING_MESSAGE` (this is indeed case sensitive) and for the value (left of the `key`) enter: `¡Hola Mundo!`. + +![Alt text](./images/create-secret-greeting-message.png) + +Once complete, click Save! + +You can expect the confirmation page to look like this: + +![Alt text](./images/saved-secret.png) + +## Let's wrap up and get this new greeting deployed! + +:::info +You will need to go back to your `values.yaml` within your deployment configurations repository. In this case case it's the same repo/file you used when you initially deployed the "Hello World!" application. + +``` +deployment-configurations +├── apps +│ └── app-antoniostacos +│ └── envs +│ └── qa +│ └── values.yaml < +``` +::: + + +We are going to add the following YAML to the very bottom of the existing file: + +```yaml +externalSecret: + enabled: true + secrets: + : + dataFrom: + key: secret/ +``` + +:::caution Replacements: + + `` with the name you used when adding the secret/configuration. In our case it's `app-antoniostacos` + + +```yaml +externalSecret: + enabled: true + secrets: + app-antoniostacos: + dataFrom: + key: secret/app-antoniostacos +``` +::: + +And that's it! Save the file, commit the changes and push them back up! Within a few moments you should see the greeting changed on the QA deployment of your "Hello World" website. + +:::info Reference + +In case you aren't sure where to place the `YAML` in this guide, it would look like this when appended to the previously provided `YAML`: + + +```yaml +image: + repository: '/' + registry: ghcr.io + pullPolicy: Always + port: 8080 + tag: main +service: + enabled: true +deployment: + replicas: 1 + enabled: true + imagePullPolicy: Always + imagePullSecrets: + resources: + requests: + cpu: 100m + memory: 128Mi + +ingress: + enabled: true + ingressClassName: public + entries: + - name: public + hosts: + - hostname: '-qa.apps.' + +externalSecret: + enabled: true + secrets: + : + dataFrom: + key: secret/ +``` +::: diff --git a/docs/deploy-applications/hello-world.md b/docs/deploy-applications/hello-world.md index 4951512e4..e252fafda 100644 --- a/docs/deploy-applications/hello-world.md +++ b/docs/deploy-applications/hello-world.md @@ -1,6 +1,6 @@ --- id: deploy-hello-world-to-glueops -title: Deploy a "Hello World" Application +title: Deploy "Hello World" type: tutorial --- @@ -330,7 +330,7 @@ deployment: replicas: 1 enabled: true imagePullPolicy: Always - imagePullSecrets: regcred + imagePullSecrets: resources: requests: cpu: 100m @@ -349,8 +349,9 @@ ingress: Ensure you replace the placeholders appropriately: - `` and `` with your GitHub organization and application repository names. -- Replace `` with your chosen app name. -- Replace `` with your assigned captain domain, provided by the Platform Administrators. +- `` with your chosen app name. +- `` with your assigned captain domain, provided by the Platform Administrators. +- `` if your image is in a private registry you will need to specify a value provided by the Platform Administrators. Otherwise use `nil`. ::: Once you've done the above, commit your changes to the deployment configurations repository and push the changes. In a short while, you should be able to access your app at the URL: `https://-qa.apps.` diff --git a/docs/deploy-applications/images/create-secret-greeting-message.png b/docs/deploy-applications/images/create-secret-greeting-message.png new file mode 100644 index 000000000..c7fc5c6ec Binary files /dev/null and b/docs/deploy-applications/images/create-secret-greeting-message.png differ diff --git a/docs/deploy-applications/images/create-secret.png b/docs/deploy-applications/images/create-secret.png new file mode 100644 index 000000000..4d72be178 Binary files /dev/null and b/docs/deploy-applications/images/create-secret.png differ diff --git a/docs/deploy-applications/images/login.png b/docs/deploy-applications/images/login.png new file mode 100644 index 000000000..114353f8c Binary files /dev/null and b/docs/deploy-applications/images/login.png differ diff --git a/docs/deploy-applications/images/saved-secret.png b/docs/deploy-applications/images/saved-secret.png new file mode 100644 index 000000000..3a62949fa Binary files /dev/null and b/docs/deploy-applications/images/saved-secret.png differ diff --git a/sidebars.js b/sidebars.js index 5b2464c1c..d97b655b9 100644 --- a/sidebars.js +++ b/sidebars.js @@ -26,8 +26,7 @@ const sidebars = { collapsible: true, items: [ "deploy-applications/deploy-hello-world-to-glueops", - "deploy-applications/deploy-docusarus-website-to-glueops", - "deploy-applications/deploy-python-app-to-glueops" + "deploy-applications/adding-configurations-and-secrets-to-the-hello-world-app-glueops-platform" ], link: { type: "generated-index",