diff --git a/content/for-delivery-engineers/cd-pipelines/argocd/intro.md b/content/for-delivery-engineers/cd-pipelines/argocd/intro.md deleted file mode 100644 index e10b99d0..00000000 --- a/content/for-delivery-engineers/cd-pipelines/argocd/intro.md +++ /dev/null @@ -1 +0,0 @@ -# Introduction diff --git a/content/for-delivery-engineers/ci-pipelines/github-actions/intro.md b/content/for-delivery-engineers/ci-pipelines/github-actions/intro.md deleted file mode 100644 index 41358c52..00000000 --- a/content/for-delivery-engineers/ci-pipelines/github-actions/intro.md +++ /dev/null @@ -1 +0,0 @@ -# GitHub Actions diff --git a/content/for-delivery-engineers/ci-pipelines/tekton/bot-account.md b/content/for-delivery-engineers/ci-pipelines/tekton/bot-account.md deleted file mode 100644 index ca5df6cf..00000000 --- a/content/for-delivery-engineers/ci-pipelines/tekton/bot-account.md +++ /dev/null @@ -1,13 +0,0 @@ -# Bot Account Permissions - -Stakater bot account will need following permissions: - -## 1. GitOps Repository - -Bot account needs `admin` permission in GitOps repository as it's going to push to default branch of GitOps repository. Bot account is used by Tekton pipeline and push changes in GitOps repository. - -Default branch of repository is usually protected. In order to make any change to GitOps repository, developers will have to make PR and merge it to default branch. Bot account need to have `admin` permission to by pass this rule - -## 2. Application Repository - -Bot account needs `write` permission in application repository. As bot account is used by Tekton pipeline, pipeline bump tag version at the end of successful execution. To push tag to application repository, bot account need to have `write` permission there. diff --git a/content/for-delivery-engineers/ci-pipelines/tekton/intro.md b/content/for-delivery-engineers/ci-pipelines/tekton/intro.md deleted file mode 100644 index ee598656..00000000 --- a/content/for-delivery-engineers/ci-pipelines/tekton/intro.md +++ /dev/null @@ -1 +0,0 @@ -# Tekton diff --git a/content/for-delivery-engineers/cd-pipelines/.gitkeep b/content/for-delivery-engineers/explanation/.gitkeep similarity index 100% rename from content/for-delivery-engineers/cd-pipelines/.gitkeep rename to content/for-delivery-engineers/explanation/.gitkeep diff --git a/content/for-delivery-engineers/gitops/faq.md b/content/for-delivery-engineers/explanation/faq.md similarity index 100% rename from content/for-delivery-engineers/gitops/faq.md rename to content/for-delivery-engineers/explanation/faq.md diff --git a/content/for-delivery-engineers/gitops/introduction.md b/content/for-delivery-engineers/explanation/gitops-intro.md similarity index 100% rename from content/for-delivery-engineers/gitops/introduction.md rename to content/for-delivery-engineers/explanation/gitops-intro.md diff --git a/content/for-delivery-engineers/gitops/structure.md b/content/for-delivery-engineers/explanation/gitops-structure.md similarity index 98% rename from content/for-delivery-engineers/gitops/structure.md rename to content/for-delivery-engineers/explanation/gitops-structure.md index f637f94b..9c6b9ecd 100644 --- a/content/for-delivery-engineers/gitops/structure.md +++ b/content/for-delivery-engineers/explanation/gitops-structure.md @@ -1,4 +1,4 @@ -# GitOps structure +# Stakater opinionated GitOps structure We manage GitOps with two different kinds of repository with different purpose enlisted below: @@ -64,6 +64,8 @@ Inside `argocd-apps` folder, there are multiple clusters defined. Each cluster h └── README.md ``` +![Apps-GitOps-Structure](images/apps-gitops-config-structure.png) + ## Structure of Infra GitOps Config In each cluster folder there are folders containing resource for particular cluster. These include resources that are cluster scoped or don't belong to application tenant. It is further divided into 2 kinds of folders: diff --git a/content/for-delivery-engineers/explanation/images/apps-gitops-config-structure.png b/content/for-delivery-engineers/explanation/images/apps-gitops-config-structure.png new file mode 100644 index 00000000..3d924f19 Binary files /dev/null and b/content/for-delivery-engineers/explanation/images/apps-gitops-config-structure.png differ diff --git a/content/for-delivery-engineers/gitops/images/ci-cd-workflow.png b/content/for-delivery-engineers/explanation/images/ci-cd-workflow.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/ci-cd-workflow.png rename to content/for-delivery-engineers/explanation/images/ci-cd-workflow.png diff --git a/content/for-delivery-engineers/ci-pipelines/secrets.md b/content/for-delivery-engineers/explanation/secrets.md similarity index 67% rename from content/for-delivery-engineers/ci-pipelines/secrets.md rename to content/for-delivery-engineers/explanation/secrets.md index 84e65c23..71e57163 100644 --- a/content/for-delivery-engineers/ci-pipelines/secrets.md +++ b/content/for-delivery-engineers/explanation/secrets.md @@ -2,9 +2,9 @@ SAAP Pipelines requires secrets for CI/CD workflow. Following are the secrets used, along with their usage details. -## nexus-helm-auth-forked +## nexus-helm-auth -**Purpose:** nexus-helm-auth-forked secret is used in CI pipeline to push and pull helm charts from private nexus registry hosted on the cluster. This secret contains credentials for a machine-user to login into the registry. +**Purpose:** nexus-helm-auth secret is used in CI pipeline to push and pull helm charts from private nexus registry hosted on the cluster. This secret contains credentials for a machine-user to login into the registry. **Owner:** Stakater @@ -20,9 +20,9 @@ SAAP Pipelines requires secrets for CI/CD workflow. Following are the secrets us **Stored in:** Keeper -## nexus-docker-auth-forked +## nexus-docker-auth -**Purpose:** nexus-docker-auth-forked secret is used in CI pipeline to push and pull docker images from private nexus registry hosted on the cluster. This secret contains credentials for a machine-user to login into the registry. +**Purpose:** nexus-docker-auth secret is used in CI pipeline to push and pull docker images from private nexus registry hosted on the cluster. This secret contains credentials for a machine-user to login into the registry. **Owner:** Stakater @@ -38,9 +38,9 @@ SAAP Pipelines requires secrets for CI/CD workflow. Following are the secrets us **Stored in:** Keeper -## git-auth-forked +## git-auth -**Purpose:** git-auth-forked secret is used in CI pipeline. It's purpose is to clone git repositories into workspaces that are used in pipeline steps to perform any defined action. The secret contains a token that has access to defined user and repository permission (fine-grained token). +**Purpose:** git-auth secret is used in CI pipeline. It's purpose is to clone git repositories into workspaces that are used in pipeline steps to perform any defined action. The secret contains a token that has access to defined user and repository permission (fine-grained token). **Owner:** Stakater diff --git a/content/for-delivery-engineers/explanation/types-of-environments.md b/content/for-delivery-engineers/explanation/types-of-environments.md new file mode 100644 index 00000000..8efc427e --- /dev/null +++ b/content/for-delivery-engineers/explanation/types-of-environments.md @@ -0,0 +1,30 @@ +# Types of Environments + +There are three type of environments for each tenant: + +1. Sandbox Environment +1. CI/CD Environments +1. Other Environments + +## 1. Sandbox Environment + +A dedicated namespace in cluster for developer in the cluster for every member of the specific tenant, that will also be preloaded with any selected templates and consume the same pool of resources from the tenants quota creating safe remote dev namespaces that teams can use as scratch namespace for rapid prototyping and development. So, every developer gets a Kubernetes-based cloud development environment that feel like working on localhost. These environments are not present in our GitOps structure, they are deployed by `Multi Tenant Operator` if enabled in `Tenant` specification. + +## 2. CI/CD Environments + +There are three CI/CD environments per tenant + +The CI/CD Environments are special Environments that are part of CI/CD workflow. There are 3 kinds of CI/CD environments: + +1. Build - Build environment contains all Tekton pipeline configurations/resources like *pipeline,eventlistener,pipelinrun* etc. These pipelines respond to changes in Application/Service source repositories. This environment is used for running pipelines of tenant applications. + +1. Preview - Preview environment contains all preview application deployments. As soon as there is a new PR in application, pipeline creates new environment to test this PR. Each PR is deployed in separate namespace. + +1. Development - The dynamic test environment is automatically deleted and the Helm manifests are pushed to first permanent application environment i.e. `dev` by the CI pipeline when the pull request is merged. + +## 3. Other Environments + +There are applications environments like *qa,staging,pre-prod,prod* etc other than CI/CD environment. Application promotion in other environments is done manually by creating a PR to the GitOps repo which includes the: + +- bumping of the helm chart version in `Chart.yaml` and +- bumping image tag version in helm values in `values.yaml` diff --git a/content/for-delivery-engineers/gitops/environments.md b/content/for-delivery-engineers/gitops/environments.md deleted file mode 100644 index e89218d1..00000000 --- a/content/for-delivery-engineers/gitops/environments.md +++ /dev/null @@ -1,175 +0,0 @@ -# Environments - -## Types of environments - -There are three type of environments for each tenant: - -1. Sandbox Environment -1. CI/CD Environments -1. Other Environments - -### 1. Sandbox Environment - -A dedicated namespace in cluster for developer in the cluster for every member of the specific tenant, that will also be preloaded with any selected templates and consume the same pool of resources from the tenants quota creating safe remote dev namespaces that teams can use as scratch namespace for rapid prototyping and development. So, every developer gets a Kubernetes-based cloud development environment that feel like working on localhost. These environments are not present in our GitOps structure, they are deployed by `Multi Tenant Operator` if enabled in `Tenant` specification. - -### 2. CI/CD Environments - -There are three CI/CD environments per tenant - -The CI/CD Environments are special Environments that are part of CI/CD workflow. There are 3 kinds of CI/CD environments: - -1. Build - Build environment contains all Tekton pipeline configurations/resources like *pipeline,eventlistener,pipelinrun etc*. These pipelines respond to changes in Application/Service source repositories. This environment is used for running pipelines of tenant applications. - -1. Preview - Preview environment contains all preview application deployments. As soon as there is a new PR in application, pipeline creates new environment to test this PR. Each PR is deployed in separate namespace. - -1. Development - Once the PR is merged; the dynamic test environment is automatically deleted and the Helm manifests are pushed to first permanent application environment i.e. `dev` by the CI pipeline. - -### 3. Other Environments - -Other than CI/CD environment there are applications environments like *qa,staging,pre-prod,prod etc*. Application promotion in other environments is done manually by creating a PR to the GitOps repo which includes the: - -- bumping of the helm chart version in `Chart.yaml` and -- bumping image tag version in helm values in `values.yaml` - -## Add Environment to Apps GitOps Repository - -Lets see how can we add an environment to an application in a tenant. Lets say, we have added a production cluster and want to add a new environment in application for it to be deployed on production. - -1. Create a folder named `production` at `/` which corresponds to the production environment. Suppose `gabbar` as tenant name, `stakater-nordmart-review` as application name, `production` as cluster name, `prod` as environment name. - - ```bash - └── gabbar - └── stakater-nordmart-review - └── prod - ``` - -1. Add the Helm Chart of your application with production environment configurations. - - ```bash - └── gabbar - └── stakater-nordmart-review - └── prod - ├── Chart.yaml - ├── values.yaml - └── templates/ - ``` - -1. Add an folder `prod` inside `/argocd-apps`. Add an ArgoCD Application in this folder which points to `//prod`. - - ```yaml - # Name: stakater-nordmart-review.yaml(APP_NAME.yaml) - # Path: gabbar/argocd-apps/prod (TENANT_NAME/ argocd-apps/ENV_NAME/) - apiVersion: argoproj.io/v1alpha1 - kind: Application - metadata: - name: gabbar-prod-stakater-nordmart-review - namespace: openshift-gitops - spec: - destination: - namespace: TARGET_NAMESPACE - server: 'https://kubernetes.default.svc' - project: gabbar - source: - path: gabbar/stakater-nordmart-review/prod - repoURL: 'APPS_GITOPS_REPO_URL' - targetRevision: HEAD - syncPolicy: - automated: - prune: true - selfHeal: true - ``` - -1. Add a folder called production (if not present) corresponding to the cluster name inside `argocd-apps` at root level, Add an ArgoCD Application in this folder which points to `/argocd-apps/prod`. - - ```yaml - # Name: gabbar-prod.yaml (TENANT_NAME-ENV_NAME.yaml) - # Path: argocd-apps/prod - apiVersion: argoproj.io/v1alpha1 - kind: Application - metadata: - name: gabbar-prod - namespace: openshift-gitops - spec: - destination: - namespace: TARGET_NAMESPACE - server: 'https://kubernetes.default.svc' - project: gabbar - source: - path: gabbar/argocd-apps/prod - repoURL: 'APPS_GITOPS_REPO_URL' - targetRevision: HEAD - syncPolicy: - automated: - prune: true - selfHeal: true - ``` - -1. You should have a similar folder structure at the end: - - ```bash - ├── gabbar - | ├── stakater-nordmart-review - | | ├── prod - | | | ├── Chart.yaml - | | | ├── values.yaml - | | └── └── templates/ - ├── └── argocd-apps - | └── prod - | └── stakater-nordmart-review.yaml - └── argocd-apps - └── production (cluster name) - └── gabbar-prod.yaml - ``` - -1. Make sure Application that deploys applications inside `argocd-apps/cluster-name/` folder is deployed in relevant `infra-gitops-config` repository. - -## Application promotion - -To promote application from one environment to another; as mentioned above you will need to bump chart version and image tag version in that environment. You can do so by picking these versions from previous environment. - -This guide assumes that application is already [on-boarded](application-onboarding.md) to different environments. - -### 1. Promote chart - -To promote application from one environment to another, you can check the chart version from `Chart.yaml` file from one environment and update version in `Chart.yaml` of next environment: - -```yaml -apiVersion: v2 -dependencies: - - name: - repository: - version: 1.0.51 -description: A Helm chart for Kubernetes -name: -version: 1.0.51 -``` - -pick version `1.0.51` from above `Chart.yaml` and copy it in `Chart.yaml` of next environment - -### 2. Promote image - -To promote application from one environment to another, you can check the image tag version from `values.yaml` file from one environment and update version in `values.yaml` of next environment: - -`////values.yaml` - -```yaml -: - application: - deployment: - image: - repository: - tag: 1.0.51 -``` - -Pick version `1.0.51` and paste it to next environment - -`////values.yaml` - -```yaml -: - application: - deployment: - image: - repository: - tag: 1.0.50 -``` diff --git a/content/for-delivery-engineers/gitops/github.md b/content/for-delivery-engineers/gitops/github.md deleted file mode 100644 index acf8dc73..00000000 --- a/content/for-delivery-engineers/gitops/github.md +++ /dev/null @@ -1,10 +0,0 @@ -# Configuring GitOps-config repo on GitHub - -- Create a git repo and name it `gitops-config` and put in the description `Single source of truth for declarative workloads to be deployed on Stakater App Agility Platform` -- Enable branch protection; `Settings > Branches > Branch protection rules` and then click `Add rule` and select following only - -![main-branch-protection-rule](./images/main-branch-protection-rule.png) - -- Add the Stakater bot user as collaborator with `Admin` permissions (ask Stakater team about the bot user id); `Settings > Manage access > Invite people or team` - -![grant-admin-access](./images/grant-admin-access.png) diff --git a/content/for-delivery-engineers/gitops/gitlab.md b/content/for-delivery-engineers/gitops/gitlab.md deleted file mode 100644 index 82967160..00000000 --- a/content/for-delivery-engineers/gitops/gitlab.md +++ /dev/null @@ -1,8 +0,0 @@ -# Configuring `gitops-config` repo on GitLab - -- Create a git repo and name it `gitops-config` and put in the description Single source of truth for declarative workloads to be deployed on Stakater App Agility Platform -- `Settings > Access Tokens` name it `stakater-gitops-pat` and add these two scopes `read_api` and `read_repository` see the attachment - -![GitLab-pat](./images/gitlab-pat.png) - -- Copy the generated `PAT` and send to the Stakater support team. diff --git a/content/for-developers/tutorials/00-prepare-environment/.gitkeep b/content/for-delivery-engineers/how-to-guides/.gitkeep similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/.gitkeep rename to content/for-delivery-engineers/how-to-guides/.gitkeep diff --git a/content/for-developers/tutorials/00-prepare-environment/images/.gitkeep b/content/for-delivery-engineers/how-to-guides/configure-repository-secret/.gitkeep similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/.gitkeep rename to content/for-delivery-engineers/how-to-guides/configure-repository-secret/.gitkeep diff --git a/content/for-delivery-engineers/gitops/gitops-argocd-secrets.md b/content/for-delivery-engineers/how-to-guides/configure-repository-secret/configure-repository-secret.md similarity index 90% rename from content/for-delivery-engineers/gitops/gitops-argocd-secrets.md rename to content/for-delivery-engineers/how-to-guides/configure-repository-secret/configure-repository-secret.md index 861a6c38..e7549b6e 100644 --- a/content/for-delivery-engineers/gitops/gitops-argocd-secrets.md +++ b/content/for-delivery-engineers/how-to-guides/configure-repository-secret/configure-repository-secret.md @@ -1,10 +1,9 @@ # Configure Repository Secret for ArgoCD -We need to add secret in ArgoCD namespace that will allow read access over the `apps-gitops-config` repository created in previous section. +## GitHub -## Configure token or SSH keys +### Configure token or SSH keys -You need to configure token or SSH based access over the `apps-gitops-config` repository. Use the following links: - For token access @@ -29,7 +28,9 @@ By properly configuring the permissions and access levels for the PAT, you can e - [`Add SSH Public key to your GitHub Account`](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) or [`Add Deploy Key to your Repository`](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#deploy-keys) *Note: A deploy key is specific to a single repository and cannot be used for multiple repositories whereas, a single SSH key can be used for multiple repositories.* -## Create a Secret with Token or SSH key +## Kubernetes + +### Create a Kubernetes Secret with Token or SSH key Create a Kubernetes Secret in ArgoCD namespace with repository credentials. Each repository secret must have a url field and, depending on whether you connect using HTTPS, SSH, username and password (for HTTPS), sshPrivateKey (for SSH). @@ -75,7 +76,9 @@ stringData: Login to the ArgoCD UI. Click `Setting` from left sidebar, then `Repositories` to view connected repositories. > Make sure connection status is successful - ![`ArgoCD-repositories`](images/ArgoCD-repositories.png) + ![`ArgoCD-repositories`](../images/ArgoCD-repositories.png) + +### Create an External Secret > Ask stakater-admin or user belonging to `customer-root-tent` to add this secret via Vault and External Secrets to ArgoCD namespace. @@ -88,7 +91,7 @@ If connection status is failed, hover over the ❌ adjacent to `Failed` to view > Related GitHub Issue: [here](https://github.com/argoproj/argo-cd/issues/7723) If you see the following error. Check `argocd-ssh-known-hosts-cm` config map in ArgoCD namespace to verify that public key for repository server is added as `ssh_known_hosts`. -![`ArgoCD-repo-connection-ssh-issue`](images/ArgoCD-repo-connection-ssh-issue.png) +![`ArgoCD-repo-connection-ssh-issue`](../images/ArgoCD-repo-connection-ssh-issue.png) Some known hosts public keys might be missing in `argocd-ssh-known-hosts-cm` for older ArgoCD versions, Find full list of public keys against repository server [here](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#ssh-known-host-public-keys). > Note: If the error persists, contact **Stakater Support** to review it. diff --git a/content/for-delivery-engineers/gitops/images/ArgoCD-repo-connection-ssh-issue.png b/content/for-delivery-engineers/how-to-guides/images/ArgoCD-repo-connection-ssh-issue.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/ArgoCD-repo-connection-ssh-issue.png rename to content/for-delivery-engineers/how-to-guides/images/ArgoCD-repo-connection-ssh-issue.png diff --git a/content/for-delivery-engineers/gitops/images/ArgoCD-repositories.png b/content/for-delivery-engineers/how-to-guides/images/ArgoCD-repositories.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/ArgoCD-repositories.png rename to content/for-delivery-engineers/how-to-guides/images/ArgoCD-repositories.png diff --git a/content/for-developers/tutorials/01-access-cluster/.gitkeep b/content/for-delivery-engineers/tutorials/.gitkeep similarity index 100% rename from content/for-developers/tutorials/01-access-cluster/.gitkeep rename to content/for-delivery-engineers/tutorials/.gitkeep diff --git a/content/for-developers/tutorials/02-containerize-app/.gitkeep b/content/for-delivery-engineers/tutorials/01-configure-infra-gitops-config/.gitkeep similarity index 100% rename from content/for-developers/tutorials/02-containerize-app/.gitkeep rename to content/for-delivery-engineers/tutorials/01-configure-infra-gitops-config/.gitkeep diff --git a/content/for-delivery-engineers/tutorials/01-configure-infra-gitops-config/configure-infra-gitops-config.md b/content/for-delivery-engineers/tutorials/01-configure-infra-gitops-config/configure-infra-gitops-config.md new file mode 100644 index 00000000..d085f959 --- /dev/null +++ b/content/for-delivery-engineers/tutorials/01-configure-infra-gitops-config/configure-infra-gitops-config.md @@ -0,0 +1,128 @@ +# GitOps Onboarding + +Let us set up Stakater Opinionated GitOps Structure. + +Stakater's GitOps structure is composed of two repositories; one for deploying infrastructural resources, and one for deploying the application workloads. + +For the purpose of this tutorial, we will be using the name `infra-gitops-config` for the former repository and `apps-gitops-config` for the latter. +You can name these two repositories anything you want but make sure the names are descriptive. + +Let's set these two repositories up!! + +Objective: +Create your first tenant + +Key Results: + +- Create GitOps repository +- Tenant operator resources configured +- ArgoCD configured + +## Infra GitOps Config + +The cluster scoped infrastructural configurations are deployed through this repository. + +To make things easier, we have created a [template](https://github.com/stakater/infra-gitops-config.git) that you can use to create your infra repository. + +Team Stakater will create a root [Tenant](https://docs.stakater.com/mto/main/customresources.html#2-tenant), which will then create a root AppProject. +This AppProject will be used to sync all the Applications in `Infra Gitops Config` and it will provide visibility of these Applications in ArgoCD UI to customer cluster admins. + +1. Open up your SCM and create any empty repository. + +> Follow along GitHub/GitLab documentation for configuring other organization specific requirements set for source code repositories. + +1. Create a secret with read permissions over this repository. Navigate to following section for more info [Configure Repository Secret for ArgoCD](../../how-to-guides/configure-repository-secret/configure-repository-secret.md). Provide this secret to stakater-admin for it to be deployed with your ArgoCD instance. +1. Now let's copy the structure that we saw in the [template](https://github.com/stakater/infra-gitops-config.git). Add a folder bearing your cluster's name say `dev` at the root of the repository that you just created. + > If you plan on using this repository for multiple clusters, add a folder for each cluster. +1. Inside the folder created in step 2, add two folders; one named `argocd-apps`, and another one named `tenant-operator-config` + > The `argocd-apps` folder will contain ArgoCD applications that will _watch_ different resources added to the same repository. Let's spare ourselves from the details for now. +1. Open the `tenant-operator-config` folder and add two folders inside it: `quotas` and `tenants` +1. The tenants folder will contain the tenant you want to add to your cluster. Let's create one called `gabbar` by adding the file below: + + ```yaml + apiVersion: tenantoperator.stakater.com/v1beta1 + kind: Tenant + metadata: + name: gabbar + spec: + quota: gabbar-large + owners: + users: + - abc@gmail.com + argocd: + sourceRepos: + - 'https://github.com/your-organization/infra-gitops-config' + - 'https://github.com/your-organization/apps-gitops-config' + templateInstances: + - spec: + template: tenant-vault-access + sync: true + namespaces: + - build + - dev + - stage + specificMetadata: + - namespaces: + - gabbar-build + annotations: + openshift.io/node-selector: node-role.kubernetes.io/pipeline= + ``` + +1. We also need to add a quota for our `gabbar` tenant in our `quotas` folder created in step 4. So let's do it using the file below. The name of this quota need to match the name you specified in tenant CR. + + ```yaml + apiVersion: tenantoperator.stakater.com/v1beta1 + kind: Quota + metadata: + name: gabbar-large + annotations: + quota.tenantoperator.stakater.com/is-default: "false" + spec: + resourcequota: + hard: + requests.cpu: "16" + requests.memory: 32Gi + limitrange: + limits: + - defaultRequest: + cpu: 10m + memory: 50Mi + type: Container + ``` + +1. Now that the quota and the tenant have been added, let's create an ArgoCD application in the `argocd-apps` folder that will point to these resources and help us deploy them. +Open up the `argocd-apps` folder and add the following file to it: + + ```yaml + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + name: CLUSTER_NAME-tenant-operator-config + namespace: openshift-gitops + spec: + destination: + namespace: openshift-gitops + server: 'https://kubernetes.default.svc' + source: + path: CLUSTER_NAME/tenant-operator-config + repoURL: 'INFRA_GITOPS_REPO_URL' + targetRevision: HEAD + directory: + recurse: true + project: root-tenant + syncPolicy: + automated: + prune: true + selfHeal: true + ``` + + Make sure you replace the `repoUrl` and all instances of `CLUSTER_NAME` with your cluster's name. + If you notice the path, you will realize that this application is pointing to 'tenant-operator-config' folder housing your tenant and quotas. + +1. Deploy an ArgoCD application on the cluster pointing to `/argocd-apps` directory. You will need to ask Stakater Admin to create it as part of ArgoCD Instance. + +1. Login to ArgoCD and check if `infra-gitops-config` application is present. Validate the child application `tenant-operator-config`. + +We have set up the basic structure for our infra repository. Let's move on to the apps repository. + +More Info on **Tenant** and **Quota** at : [Multi Tenant Operator Custom Resources](https://docs.stakater.com/mto/main/customresources.html) diff --git a/content/for-developers/tutorials/03-package-app/.gitkeep b/content/for-delivery-engineers/tutorials/02-configure-apps-gitops-config/.gitkeep similarity index 100% rename from content/for-developers/tutorials/03-package-app/.gitkeep rename to content/for-delivery-engineers/tutorials/02-configure-apps-gitops-config/.gitkeep diff --git a/content/for-delivery-engineers/gitops/creating-gitops-structure.md b/content/for-delivery-engineers/tutorials/02-configure-apps-gitops-config/creating-gitops-structure.md similarity index 69% rename from content/for-delivery-engineers/gitops/creating-gitops-structure.md rename to content/for-delivery-engineers/tutorials/02-configure-apps-gitops-config/creating-gitops-structure.md index 1ebc0505..721c031e 100644 --- a/content/for-delivery-engineers/gitops/creating-gitops-structure.md +++ b/content/for-delivery-engineers/tutorials/02-configure-apps-gitops-config/creating-gitops-structure.md @@ -7,116 +7,13 @@ Stakater's GitOps structure is composed of two repositories; one for deploying i For the purpose of this tutorial, we will be using the name `infra-gitops-config` for the former repository and `apps-gitops-config` for the latter. You can name these two repositories anything you want but make sure the names are descriptive. -Let's set these two repositories up!! +Objective: +Define ArgoCD apps structure -## Infra GitOps Config +Key Results: -The cluster scoped infrastructural configurations are deployed through this repository. - -To make things easier, we have created a [template](https://github.com/stakater/infra-gitops-config.git) that you can use to create your infra repository. - -Team Stakater will create a root [Tenant](https://docs.stakater.com/mto/main/customresources.html#2-tenant), which will then create a root AppProject. -This AppProject will be used to sync all the Applications in `Infra Gitops Config` and it will provide visibility of these Applications in ArgoCD UI to customer cluster admins. - -1. Open up your SCM and create any empty repository. - -> Follow along GitHub/GitLab documentation for configuring other organization specific requirements set for source code repositories. - -1. Create a secret with read permissions over this repository. Navigate to following section for more info [Configure Repository Secret for ArgoCD](gitops-argocd-secrets.md). Provide this secret to stakater-admin for it to be deployed with your ArgoCD instance. -1. Now let's copy the structure that we saw in the [template](https://github.com/stakater/infra-gitops-config.git). Add a folder bearing your cluster's name say `dev` at the root of the repository that you just created. - > If you plan on using this repository for multiple clusters, add a folder for each cluster. -1. Inside the folder created in step 2, add two folders; one named `argocd-apps`, and another one named `tenant-operator-config` - > The `argocd-apps` folder will contain ArgoCD applications that will _watch_ different resources added to the same repository. Let's spare ourselves from the details for now. -1. Open the `tenant-operator-config` folder and add two folders inside it: `quotas` and `tenants` -1. The tenants folder will contain the tenant you want to add to your cluster. Let's create one called `gabbar` by adding the file below: - - ```yaml - apiVersion: tenantoperator.stakater.com/v1beta1 - kind: Tenant - metadata: - name: gabbar - spec: - quota: gabbar-large - owners: - users: - - abc@gmail.com - argocd: - sourceRepos: - - 'https://github.com/your-organization/infra-gitops-config' - - 'https://github.com/your-organization/apps-gitops-config' - templateInstances: - - spec: - template: tenant-vault-access - sync: true - namespaces: - - build - - dev - - stage - specificMetadata: - - namespaces: - - gabbar-build - annotations: - openshift.io/node-selector: node-role.kubernetes.io/pipeline= - ``` - -1. We also need to add a quota for our `gabbar` tenant in our `quotas` folder created in step 4. So let's do it using the file below. The name of this quota need to match the name you specified in tenant CR. - - ```yaml - apiVersion: tenantoperator.stakater.com/v1beta1 - kind: Quota - metadata: - name: gabbar-large - annotations: - quota.tenantoperator.stakater.com/is-default: "false" - spec: - resourcequota: - hard: - requests.cpu: "16" - requests.memory: 32Gi - limitrange: - limits: - - defaultRequest: - cpu: 10m - memory: 50Mi - type: Container - ``` - -1. Now that the quota and the tenant have been added, let's create an ArgoCD application in the `argocd-apps` folder that will point to these resources and help us deploy them. -Open up the `argocd-apps` folder and add the following file to it: - - ```yaml - apiVersion: argoproj.io/v1alpha1 - kind: Application - metadata: - name: CLUSTER_NAME-tenant-operator-config - namespace: openshift-gitops - spec: - destination: - namespace: openshift-gitops - server: 'https://kubernetes.default.svc' - source: - path: CLUSTER_NAME/tenant-operator-config - repoURL: 'INFRA_GITOPS_REPO_URL' - targetRevision: HEAD - directory: - recurse: true - project: root-tenant - syncPolicy: - automated: - prune: true - selfHeal: true - ``` - - Make sure you replace the `repoUrl` and all instances of `CLUSTER_NAME` with your cluster's name. - If you notice the path, you will realize that this application is pointing to 'tenant-operator-config' folder housing your tenant and quotas. - -1. Deploy an ArgoCD application on the cluster pointing to `/argocd-apps` directory. You will need to ask Stakater Admin to create it as part of ArgoCD Instance. - -1. Login to ArgoCD and check if `infra-gitops-config` application is present. Validate the child application `tenant-operator-config`. - -We have set up the basic structure for our infra repository. Let's move on to the apps repository. - -More Info on **Tenant** and **Quota** at : [Multi Tenant Operator Custom Resources](https://docs.stakater.com/mto/main/customresources.html) +- Apps GitOps repo created +- AppOfApps structure defined and configured ## Apps GitOps Config @@ -145,8 +42,7 @@ This GitOps structure supports: > Follow along GitHub/GitLab documentation for configuring other organization specific requirements set for source code repositories. -1. Create a secret with read permissions over this repository. Navigate to following section for more info [Configure Repository Secret for ArgoCD](gitops-argocd-secrets.md). We'll use this secret later in [Linking Apps GitOps with Infra GitOps -](#linking-apps-gitops-with-infra-gitops). +1. Create a secret with read permissions over this repository. Navigate to following section for more info [Configure Repository Secret for ArgoCD](../../how-to-guides/configure-repository-secret/configure-repository-secret.md). We'll use this secret later in [Linking Apps GitOps with Infra GitOps](#linking-apps-gitops-with-infra-gitops). ### Add a tenant diff --git a/content/for-developers/tutorials/04-deploy-app/.gitkeep b/content/for-delivery-engineers/tutorials/03-deploy-demo-app/.gitkeep similarity index 100% rename from content/for-developers/tutorials/04-deploy-app/.gitkeep rename to content/for-delivery-engineers/tutorials/03-deploy-demo-app/.gitkeep diff --git a/content/for-delivery-engineers/gitops/application-onboarding.md b/content/for-delivery-engineers/tutorials/03-deploy-demo-app/deploy-demo-app.md similarity index 94% rename from content/for-delivery-engineers/gitops/application-onboarding.md rename to content/for-delivery-engineers/tutorials/03-deploy-demo-app/deploy-demo-app.md index 017d2348..47c3e91c 100644 --- a/content/for-delivery-engineers/gitops/application-onboarding.md +++ b/content/for-delivery-engineers/tutorials/03-deploy-demo-app/deploy-demo-app.md @@ -1,4 +1,12 @@ -# Add new application +# Deploy demo app + +Objective +Deploy your first using GitOps + +Key Results: + +- Artifacts pushed to nexus +- App deployed using helm charts via ArgoCD This guide covers the step-by-step guide to onboard a new project/application/microservice on SAAP. @@ -13,8 +21,8 @@ In this section, we will use [`stakater-nordmart-review-ui`](https://github.com/ ## Prerequisites -- [`tenant` for application must be defined via `infra-gitops-config`](creating-gitops-structure.md#infra-gitops-config). -- [`tenant` for application should be onboarded onto `apps-gitops-config`](creating-gitops-structure.md#add-a-tenant). +- [`tenant` for application must be defined via `infra-gitops-config`](../01-configure-infra-gitops-config/configure-infra-gitops-config.md). +- [`tenant` for application should be onboarded onto `apps-gitops-config`](../02-configure-apps-gitops-config/creating-gitops-structure.md). - Docker Image and Helm Chart Repository hosted by Nexus must be available. - [helm](https://helm.sh/docs/intro/install/) - [git](https://git-scm.com/downloads) @@ -25,7 +33,7 @@ In this section, we will use [`stakater-nordmart-review-ui`](https://github.com/ > Ask admin for Docker and Helm Registry Credentials for pushing container images and helm chart respectively. -Find Nexus Docker registry URL and Helm Registry URL [here](../../managed-addons/nexus/routes.md). +Find Nexus Docker registry URL and Helm Registry URL [here](../../../managed-addons/nexus/routes.md). Alternatively, Navigate to the cluster Forecastle, search `nexus` using the search bar on top menu and copy the nexus url. @@ -33,7 +41,7 @@ Alternatively, Navigate to the cluster Forecastle, search `nexus` using the sear - `nexus-helm-reg-url` : Remove `https://` from the start, add `-helm` in URL after `nexus` and append `/repository/helm-charts/`. This URL points to Helm Registry referred as `nexus-helm-reg-url` in this tutorial for example `nexus-helm-stakater-nexus.apps.clustername.random123string.kubeapp.cloud/repository/helm-charts/` - ![nexus-Forecastle](./images/nexus-forecastle.png) + ![nexus-Forecastle](../images/nexus-forecastle.png) ### Login to Docker Registry @@ -169,7 +177,7 @@ If your application contains dependency charts run the following command in depl helm dependency build ``` - ![helm-dependency-build](./images/helm-dependency-build.png) + ![helm-dependency-build](../images/helm-dependency-build.png) 4. Run the following command to see the Kubernetes manifests are being generated successfully and validate whether they match your required configuration. This simple helm chart generates deployment, service and route resources. @@ -215,7 +223,7 @@ curl -u "helm-user":"password123" https://nexus-helm-stakater-nexus.{CLUSTER_DOM Navigate to `apps-gitops-config` repository and add a helm chart in path `gabbar/stakater-nordmart-review/dev` i.e. `//dev`. -![app-in-dev-env](./images/app-in-dev-env.png) +![app-in-dev-env](../images/app-in-dev-env.png) ```yaml # //dev/Chart.yaml @@ -246,14 +254,14 @@ version: 1.0.0 Login into ArgoCD UI using Forecastle console. Visit the application against dev environment inside your tenant. Usual naming convention is **tenantName-envName-appName**. Make sure that there aren't any error while deploying during ArgoCD. -![dev-ArgoCD-app](./images/dev-argocd-app.png) +![dev-ArgoCD-app](../images/dev-argocd-app.png) Visit the OpenShift console to verify the application deployment. -![review-web-pod](./images/review-web-pod.png) +![review-web-pod](../images/review-web-pod.png) -![review-web-route](./images/review-web-route.png) +![review-web-route](../images/review-web-route.png) Visit the application url using routes to check if application is working as expected. -![review-web-ui](./images/review-web-ui.png) +![review-web-ui](../images/review-web-ui.png) diff --git a/content/for-developers/tutorials/05-expose-app/.gitkeep b/content/for-delivery-engineers/tutorials/04-add-ci-pipeline-to-demo-app/.gitkeep similarity index 100% rename from content/for-developers/tutorials/05-expose-app/.gitkeep rename to content/for-delivery-engineers/tutorials/04-add-ci-pipeline-to-demo-app/.gitkeep diff --git a/content/for-delivery-engineers/gitops/images/app-in-dev-env.png b/content/for-delivery-engineers/tutorials/images/app-in-dev-env.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/app-in-dev-env.png rename to content/for-delivery-engineers/tutorials/images/app-in-dev-env.png diff --git a/content/for-delivery-engineers/gitops/images/dev-argocd-app.png b/content/for-delivery-engineers/tutorials/images/dev-argocd-app.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/dev-argocd-app.png rename to content/for-delivery-engineers/tutorials/images/dev-argocd-app.png diff --git a/content/for-delivery-engineers/gitops/images/github.png b/content/for-delivery-engineers/tutorials/images/github.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/github.png rename to content/for-delivery-engineers/tutorials/images/github.png diff --git a/content/for-delivery-engineers/gitops/images/gitlab-pat.png b/content/for-delivery-engineers/tutorials/images/gitlab-pat.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/gitlab-pat.png rename to content/for-delivery-engineers/tutorials/images/gitlab-pat.png diff --git a/content/for-delivery-engineers/gitops/images/grant-admin-access.png b/content/for-delivery-engineers/tutorials/images/grant-admin-access.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/grant-admin-access.png rename to content/for-delivery-engineers/tutorials/images/grant-admin-access.png diff --git a/content/for-delivery-engineers/gitops/images/helm-dependency-build.png b/content/for-delivery-engineers/tutorials/images/helm-dependency-build.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/helm-dependency-build.png rename to content/for-delivery-engineers/tutorials/images/helm-dependency-build.png diff --git a/content/for-delivery-engineers/gitops/images/main-branch-protection-rule.png b/content/for-delivery-engineers/tutorials/images/main-branch-protection-rule.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/main-branch-protection-rule.png rename to content/for-delivery-engineers/tutorials/images/main-branch-protection-rule.png diff --git a/content/for-delivery-engineers/gitops/images/nexus-forecastle.png b/content/for-delivery-engineers/tutorials/images/nexus-forecastle.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/nexus-forecastle.png rename to content/for-delivery-engineers/tutorials/images/nexus-forecastle.png diff --git a/content/for-delivery-engineers/gitops/images/review-web-pod.png b/content/for-delivery-engineers/tutorials/images/review-web-pod.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/review-web-pod.png rename to content/for-delivery-engineers/tutorials/images/review-web-pod.png diff --git a/content/for-delivery-engineers/gitops/images/review-web-route.png b/content/for-delivery-engineers/tutorials/images/review-web-route.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/review-web-route.png rename to content/for-delivery-engineers/tutorials/images/review-web-route.png diff --git a/content/for-delivery-engineers/gitops/images/review-web-ui.png b/content/for-delivery-engineers/tutorials/images/review-web-ui.png similarity index 100% rename from content/for-delivery-engineers/gitops/images/review-web-ui.png rename to content/for-delivery-engineers/tutorials/images/review-web-ui.png diff --git a/content/for-developers/tutorials/06-add-storage/.gitkeep b/content/for-developers/how-to-guides/add-a-new-environment-to-apps-gitops/.gitkeep similarity index 100% rename from content/for-developers/tutorials/06-add-storage/.gitkeep rename to content/for-developers/how-to-guides/add-a-new-environment-to-apps-gitops/.gitkeep diff --git a/content/for-developers/how-to-guides/add-a-new-environment-to-apps-gitops/add-a-new-environment-to-application.md b/content/for-developers/how-to-guides/add-a-new-environment-to-apps-gitops/add-a-new-environment-to-application.md new file mode 100644 index 00000000..bc413534 --- /dev/null +++ b/content/for-developers/how-to-guides/add-a-new-environment-to-apps-gitops/add-a-new-environment-to-application.md @@ -0,0 +1,100 @@ +# Add Environment to Apps GitOps Repository + +Lets see how can we add an environment to an application in a tenant. Lets say, we have added a production cluster and want to add a new environment in application for it to be deployed on production. + +Objectives: + +- Deploy your application to a new environment + +Key Results: + +- ArgoCD apps pointing to application environment created +- Helm chart with production configuration deployed + +1. Create a folder named `production` at `/` which corresponds to the production environment. Suppose `gabbar` as tenant name, `stakater-nordmart-review` as application name, `production` as cluster name, `prod` as environment name. + + ```bash + └── gabbar + └── stakater-nordmart-review + └── prod + ``` + +1. Add the Helm Chart of your application with production environment configurations. + + ```bash + └── gabbar + └── stakater-nordmart-review + └── prod + ├── Chart.yaml + ├── values.yaml + └── templates/ + ``` + +1. Add a folder `prod` inside `/argocd-apps`. Add an ArgoCD Application in this folder which points to `//prod`. + + ```yaml + # Name: stakater-nordmart-review.yaml(APP_NAME.yaml) + # Path: gabbar/argocd-apps/prod (TENANT_NAME/ argocd-apps/ENV_NAME/) + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + name: gabbar-prod-stakater-nordmart-review + namespace: openshift-gitops + spec: + destination: + namespace: TARGET_NAMESPACE + server: 'https://kubernetes.default.svc' + project: gabbar + source: + path: gabbar/stakater-nordmart-review/prod + repoURL: 'APPS_GITOPS_REPO_URL' + targetRevision: HEAD + syncPolicy: + automated: + prune: true + selfHeal: true + ``` + +1. Add a folder called production (if not present) corresponding to the cluster name inside `argocd-apps` at root level, Add an ArgoCD Application in this folder which points to `/argocd-apps/prod`. + + ```yaml + # Name: gabbar-prod.yaml (TENANT_NAME-ENV_NAME.yaml) + # Path: argocd-apps/prod + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + name: gabbar-prod + namespace: openshift-gitops + spec: + destination: + namespace: TARGET_NAMESPACE + server: 'https://kubernetes.default.svc' + project: gabbar + source: + path: gabbar/argocd-apps/prod + repoURL: 'APPS_GITOPS_REPO_URL' + targetRevision: HEAD + syncPolicy: + automated: + prune: true + selfHeal: true + ``` + +1. You should have a similar folder structure at the end: + + ```bash + ├── gabbar + | ├── stakater-nordmart-review + | | ├── prod + | | | ├── Chart.yaml + | | | ├── values.yaml + | | └── └── templates/ + ├── └── argocd-apps + | └── prod + | └── stakater-nordmart-review.yaml + └── argocd-apps + └── production (cluster name) + └── gabbar-prod.yaml + ``` + +1. Make sure Application that deploys applications inside `argocd-apps/cluster-name/` folder is deployed in relevant `infra-gitops-config` repository. diff --git a/content/for-developers/how-to-guides/promote-your-application/promote-your-application.md b/content/for-developers/how-to-guides/promote-your-application/promote-your-application.md new file mode 100644 index 00000000..7e168528 --- /dev/null +++ b/content/for-developers/how-to-guides/promote-your-application/promote-your-application.md @@ -0,0 +1,58 @@ +# Application promotion + +To promote application from one environment to another; as mentioned above you will need to bump chart version and image tag version in that environment. You can do so by picking these versions from previous environment. + +Objectives: + +- Promote your Application to another environment + +Key Results: + +- Image or Chart version updated + +This guide assumes that application is already [on-boarded](../../../for-delivery-engineers/tutorials/03-deploy-demo-app/deploy-demo-app.md) to different environments. + +## 1. Promote chart + +To promote application from one environment to another, you can check the chart version from `Chart.yaml` file from one environment and update version in `Chart.yaml` of next environment: + +```yaml +apiVersion: v2 +dependencies: + - name: + repository: + version: 1.0.51 +description: A Helm chart for Kubernetes +name: +version: 1.0.51 +``` + +pick version `1.0.51` from above `Chart.yaml` and copy it in `Chart.yaml` of next environment + +## 2. Promote image + +To promote application from one environment to another, you can check the image tag version from `values.yaml` file from one environment and update version in `values.yaml` of next environment: + +`////values.yaml` + +```yaml +: + application: + deployment: + image: + repository: + tag: 1.0.51 +``` + +Pick version `1.0.51` and paste it to next environment + +`////values.yaml` + +```yaml +: + application: + deployment: + image: + repository: + tag: 1.0.50 +``` diff --git a/content/for-developers/requirements-for-next-section.md b/content/for-developers/requirements-for-next-section.md deleted file mode 100644 index 50485494..00000000 --- a/content/for-developers/requirements-for-next-section.md +++ /dev/null @@ -1,6 +0,0 @@ -# Requirements for Next Section - -Before we move on to the next sections: - -- [Infra GitOps Config and Apps GitOps configuration is setup and Tenant is onboarded](../for-delivery-engineers/gitops/creating-gitops-structure.md) -- [Application is added on the GitOps Structure in an Environment](../for-delivery-engineers/gitops/application-onboarding.md) diff --git a/content/for-developers/tutorials/07-add-configmap/.gitkeep b/content/for-developers/tutorials/inner-loop/.gitkeep similarity index 100% rename from content/for-developers/tutorials/07-add-configmap/.gitkeep rename to content/for-developers/tutorials/inner-loop/.gitkeep diff --git a/content/for-developers/tutorials/08-add-secret/.gitkeep b/content/for-developers/tutorials/inner-loop/00-prepare-environment/.gitkeep similarity index 100% rename from content/for-developers/tutorials/08-add-secret/.gitkeep rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/.gitkeep diff --git a/content/for-developers/tutorials/09-add-dependency/.gitkeep b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/.gitkeep similarity index 100% rename from content/for-developers/tutorials/09-add-dependency/.gitkeep rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/.gitkeep diff --git a/content/for-developers/tutorials/00-prepare-environment/images/copy-login-command.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/copy-login-command.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/copy-login-command.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/copy-login-command.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/copy-login-token.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/copy-login-token.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/copy-login-token.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/copy-login-token.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/display-token.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/display-token.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/display-token.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/display-token.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/find-route.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/find-route.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/find-route.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/find-route.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/product-review-json-after-change.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/product-review-json-after-change.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/product-review-json-after-change.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/product-review-json-after-change.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/product-review-json-b4-change.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/product-review-json-b4-change.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/product-review-json-b4-change.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/product-review-json-b4-change.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/review-route.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/review-route.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/review-route.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/review-route.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/review-service-to-update.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/review-service-to-update.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/review-service-to-update.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/review-service-to-update.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/sandbox-env-after-tilt-up.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/sandbox-env-after-tilt-up.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/sandbox-env-after-tilt-up.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/sandbox-env-after-tilt-up.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/sandbox-env-b4-tilt-up.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/sandbox-env-b4-tilt-up.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/sandbox-env-b4-tilt-up.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/sandbox-env-b4-tilt-up.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/tilt-browser.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/tilt-browser.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/tilt-browser.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/tilt-browser.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/tilt-options-json.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/tilt-options-json.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/tilt-options-json.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/tilt-options-json.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/tilt-picking-up-change.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/tilt-picking-up-change.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/tilt-picking-up-change.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/tilt-picking-up-change.png diff --git a/content/for-developers/tutorials/00-prepare-environment/images/tilt-up.png b/content/for-developers/tutorials/inner-loop/00-prepare-environment/images/tilt-up.png similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/images/tilt-up.png rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/images/tilt-up.png diff --git a/content/for-developers/tutorials/00-prepare-environment/prepare-env.md b/content/for-developers/tutorials/inner-loop/00-prepare-environment/prepare-env.md similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/prepare-env.md rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/prepare-env.md diff --git a/content/for-developers/tutorials/00-prepare-environment/step-by-step-guide.md b/content/for-developers/tutorials/inner-loop/00-prepare-environment/step-by-step-guide.md similarity index 100% rename from content/for-developers/tutorials/00-prepare-environment/step-by-step-guide.md rename to content/for-developers/tutorials/inner-loop/00-prepare-environment/step-by-step-guide.md diff --git a/content/for-developers/tutorials/10-validate-logs/.gitkeep b/content/for-developers/tutorials/inner-loop/01-access-cluster/.gitkeep similarity index 100% rename from content/for-developers/tutorials/10-validate-logs/.gitkeep rename to content/for-developers/tutorials/inner-loop/01-access-cluster/.gitkeep diff --git a/content/for-developers/tutorials/01-access-cluster/access-cluster.md b/content/for-developers/tutorials/inner-loop/01-access-cluster/access-cluster.md similarity index 100% rename from content/for-developers/tutorials/01-access-cluster/access-cluster.md rename to content/for-developers/tutorials/inner-loop/01-access-cluster/access-cluster.md diff --git a/content/for-developers/tutorials/01-access-cluster/images/cloud-stakater-com-login.png b/content/for-developers/tutorials/inner-loop/01-access-cluster/images/cloud-stakater-com-login.png similarity index 100% rename from content/for-developers/tutorials/01-access-cluster/images/cloud-stakater-com-login.png rename to content/for-developers/tutorials/inner-loop/01-access-cluster/images/cloud-stakater-com-login.png diff --git a/content/for-developers/tutorials/01-access-cluster/images/cloud-stakater-com.png b/content/for-developers/tutorials/inner-loop/01-access-cluster/images/cloud-stakater-com.png similarity index 100% rename from content/for-developers/tutorials/01-access-cluster/images/cloud-stakater-com.png rename to content/for-developers/tutorials/inner-loop/01-access-cluster/images/cloud-stakater-com.png diff --git a/content/for-developers/tutorials/01-access-cluster/images/cluster-management-page.png b/content/for-developers/tutorials/inner-loop/01-access-cluster/images/cluster-management-page.png similarity index 100% rename from content/for-developers/tutorials/01-access-cluster/images/cluster-management-page.png rename to content/for-developers/tutorials/inner-loop/01-access-cluster/images/cluster-management-page.png diff --git a/content/for-developers/tutorials/01-access-cluster/images/forecastle-homepage.png b/content/for-developers/tutorials/inner-loop/01-access-cluster/images/forecastle-homepage.png similarity index 100% rename from content/for-developers/tutorials/01-access-cluster/images/forecastle-homepage.png rename to content/for-developers/tutorials/inner-loop/01-access-cluster/images/forecastle-homepage.png diff --git a/content/for-developers/tutorials/01-access-cluster/images/saap-admin-view.png b/content/for-developers/tutorials/inner-loop/01-access-cluster/images/saap-admin-view.png similarity index 100% rename from content/for-developers/tutorials/01-access-cluster/images/saap-admin-view.png rename to content/for-developers/tutorials/inner-loop/01-access-cluster/images/saap-admin-view.png diff --git a/content/for-developers/tutorials/11-expose-metrics/.gitkeep b/content/for-developers/tutorials/inner-loop/02-containerize-app/.gitkeep similarity index 100% rename from content/for-developers/tutorials/11-expose-metrics/.gitkeep rename to content/for-developers/tutorials/inner-loop/02-containerize-app/.gitkeep diff --git a/content/for-developers/tutorials/02-containerize-app/containerize-app.md b/content/for-developers/tutorials/inner-loop/02-containerize-app/containerize-app.md similarity index 96% rename from content/for-developers/tutorials/02-containerize-app/containerize-app.md rename to content/for-developers/tutorials/inner-loop/02-containerize-app/containerize-app.md index 22c69948..6e42cdd1 100644 --- a/content/for-developers/tutorials/02-containerize-app/containerize-app.md +++ b/content/for-developers/tutorials/inner-loop/02-containerize-app/containerize-app.md @@ -102,7 +102,7 @@ Read the following articles for more information: ## Login to Image Registry -Find the Image registry URL [here](../../../managed-addons/nexus/routes.md) or Navigate to the cluster Forecastle, search `nexus` using the search bar on top menu and copy the nexus url. +Find the Image registry URL [here](../../../../managed-addons/nexus/routes.md) or Navigate to the cluster Forecastle, search `nexus` using the search bar on top menu and copy the nexus url. - `nexus-docker-reg-url`: Remove `https://` from the start and add `-docker` in URL after `nexus`. This URL points to Docker Registry referred as `nexus-docker-reg-url` in this tutorial for example `nexus-docker-stakater-nexus.apps.clustername.random123string.kubeapp.cloud`. diff --git a/content/for-developers/tutorials/12-add-grafana-dashboard/.gitkeep b/content/for-developers/tutorials/inner-loop/03-package-app/.gitkeep similarity index 100% rename from content/for-developers/tutorials/12-add-grafana-dashboard/.gitkeep rename to content/for-developers/tutorials/inner-loop/03-package-app/.gitkeep diff --git a/content/for-developers/tutorials/03-package-app/package-app.md b/content/for-developers/tutorials/inner-loop/03-package-app/package-app.md similarity index 100% rename from content/for-developers/tutorials/03-package-app/package-app.md rename to content/for-developers/tutorials/inner-loop/03-package-app/package-app.md diff --git a/content/for-developers/tutorials/13-add-alerts/.gitkeep b/content/for-developers/tutorials/inner-loop/04-deploy-app/.gitkeep similarity index 100% rename from content/for-developers/tutorials/13-add-alerts/.gitkeep rename to content/for-developers/tutorials/inner-loop/04-deploy-app/.gitkeep diff --git a/content/for-developers/tutorials/04-deploy-app/deploy-app.md b/content/for-developers/tutorials/inner-loop/04-deploy-app/deploy-app.md similarity index 100% rename from content/for-developers/tutorials/04-deploy-app/deploy-app.md rename to content/for-developers/tutorials/inner-loop/04-deploy-app/deploy-app.md diff --git a/content/for-developers/tutorials/14-scale-app/.gitkeep b/content/for-developers/tutorials/inner-loop/05-expose-app/.gitkeep similarity index 100% rename from content/for-developers/tutorials/14-scale-app/.gitkeep rename to content/for-developers/tutorials/inner-loop/05-expose-app/.gitkeep diff --git a/content/for-developers/tutorials/05-expose-app/expose-app.md b/content/for-developers/tutorials/inner-loop/05-expose-app/expose-app.md similarity index 95% rename from content/for-developers/tutorials/05-expose-app/expose-app.md rename to content/for-developers/tutorials/inner-loop/05-expose-app/expose-app.md index 02f4661e..fb4e82d7 100644 --- a/content/for-developers/tutorials/05-expose-app/expose-app.md +++ b/content/for-developers/tutorials/inner-loop/05-expose-app/expose-app.md @@ -97,4 +97,4 @@ c. Obtain the load balancer IP address or domain name provided by your cloud pro ## Whitelisting application routes -See [Additional route configurations](../../../for-administrators/secure-your-cluster/secure-routes.md#additional-route-configuration) section on how to allow only whitelisted IPs for your application routes +See [Additional route configurations](../../../../for-administrators/secure-your-cluster/secure-routes.md#additional-route-configuration) section on how to allow only whitelisted IPs for your application routes diff --git a/content/for-developers/tutorials/14-scale-app/images/.gitkeep b/content/for-developers/tutorials/inner-loop/06-add-storage/.gitkeep similarity index 100% rename from content/for-developers/tutorials/14-scale-app/images/.gitkeep rename to content/for-developers/tutorials/inner-loop/06-add-storage/.gitkeep diff --git a/content/for-developers/tutorials/06-add-storage/persist-app.md b/content/for-developers/tutorials/inner-loop/06-add-storage/persist-app.md similarity index 100% rename from content/for-developers/tutorials/06-add-storage/persist-app.md rename to content/for-developers/tutorials/inner-loop/06-add-storage/persist-app.md diff --git a/content/for-developers/tutorials/15-validate-auto-reload/.gitkeep b/content/for-developers/tutorials/inner-loop/07-add-configmap/.gitkeep similarity index 100% rename from content/for-developers/tutorials/15-validate-auto-reload/.gitkeep rename to content/for-developers/tutorials/inner-loop/07-add-configmap/.gitkeep diff --git a/content/for-developers/tutorials/07-add-configmap/add-configmaps.md b/content/for-developers/tutorials/inner-loop/07-add-configmap/add-configmaps.md similarity index 100% rename from content/for-developers/tutorials/07-add-configmap/add-configmaps.md rename to content/for-developers/tutorials/inner-loop/07-add-configmap/add-configmaps.md diff --git a/content/for-developers/tutorials/16-validate-down-alert/.gitkeep b/content/for-developers/tutorials/inner-loop/08-add-secret/.gitkeep similarity index 100% rename from content/for-developers/tutorials/16-validate-down-alert/.gitkeep rename to content/for-developers/tutorials/inner-loop/08-add-secret/.gitkeep diff --git a/content/for-developers/tutorials/08-add-secret/add-secrets.md b/content/for-developers/tutorials/inner-loop/08-add-secret/add-secrets.md similarity index 100% rename from content/for-developers/tutorials/08-add-secret/add-secrets.md rename to content/for-developers/tutorials/inner-loop/08-add-secret/add-secrets.md diff --git a/content/for-developers/tutorials/08-add-secret/images/.gitignore b/content/for-developers/tutorials/inner-loop/08-add-secret/images/.gitignore similarity index 100% rename from content/for-developers/tutorials/08-add-secret/images/.gitignore rename to content/for-developers/tutorials/inner-loop/08-add-secret/images/.gitignore diff --git a/content/for-developers/tutorials/08-add-secret/images/create-secret.png b/content/for-developers/tutorials/inner-loop/08-add-secret/images/create-secret.png similarity index 100% rename from content/for-developers/tutorials/08-add-secret/images/create-secret.png rename to content/for-developers/tutorials/inner-loop/08-add-secret/images/create-secret.png diff --git a/content/for-developers/tutorials/08-add-secret/images/forecastle-vault.png b/content/for-developers/tutorials/inner-loop/08-add-secret/images/forecastle-vault.png similarity index 100% rename from content/for-developers/tutorials/08-add-secret/images/forecastle-vault.png rename to content/for-developers/tutorials/inner-loop/08-add-secret/images/forecastle-vault.png diff --git a/content/for-developers/tutorials/08-add-secret/images/ui-with-secret.png b/content/for-developers/tutorials/inner-loop/08-add-secret/images/ui-with-secret.png similarity index 100% rename from content/for-developers/tutorials/08-add-secret/images/ui-with-secret.png rename to content/for-developers/tutorials/inner-loop/08-add-secret/images/ui-with-secret.png diff --git a/content/for-developers/tutorials/08-add-secret/images/vault-ocic-login.png b/content/for-developers/tutorials/inner-loop/08-add-secret/images/vault-ocic-login.png similarity index 100% rename from content/for-developers/tutorials/08-add-secret/images/vault-ocic-login.png rename to content/for-developers/tutorials/inner-loop/08-add-secret/images/vault-ocic-login.png diff --git a/content/for-developers/tutorials/17-add-pdb/.gitkeep b/content/for-developers/tutorials/inner-loop/09-add-dependency/.gitkeep similarity index 100% rename from content/for-developers/tutorials/17-add-pdb/.gitkeep rename to content/for-developers/tutorials/inner-loop/09-add-dependency/.gitkeep diff --git a/content/for-developers/tutorials/09-add-dependency/add-dependency.md b/content/for-developers/tutorials/inner-loop/09-add-dependency/add-dependency.md similarity index 100% rename from content/for-developers/tutorials/09-add-dependency/add-dependency.md rename to content/for-developers/tutorials/inner-loop/09-add-dependency/add-dependency.md diff --git a/content/for-developers/tutorials/18-add-network-policy/.gitkeep b/content/for-developers/tutorials/inner-loop/10-validate-logs/.gitkeep similarity index 100% rename from content/for-developers/tutorials/18-add-network-policy/.gitkeep rename to content/for-developers/tutorials/inner-loop/10-validate-logs/.gitkeep diff --git a/content/for-developers/tutorials/10-validate-logs/images/kibana_index_page1.png b/content/for-developers/tutorials/inner-loop/10-validate-logs/images/kibana_index_page1.png similarity index 100% rename from content/for-developers/tutorials/10-validate-logs/images/kibana_index_page1.png rename to content/for-developers/tutorials/inner-loop/10-validate-logs/images/kibana_index_page1.png diff --git a/content/for-developers/tutorials/10-validate-logs/images/kibana_index_page2.png b/content/for-developers/tutorials/inner-loop/10-validate-logs/images/kibana_index_page2.png similarity index 100% rename from content/for-developers/tutorials/10-validate-logs/images/kibana_index_page2.png rename to content/for-developers/tutorials/inner-loop/10-validate-logs/images/kibana_index_page2.png diff --git a/content/for-developers/tutorials/10-validate-logs/validate-logs.md b/content/for-developers/tutorials/inner-loop/10-validate-logs/validate-logs.md similarity index 100% rename from content/for-developers/tutorials/10-validate-logs/validate-logs.md rename to content/for-developers/tutorials/inner-loop/10-validate-logs/validate-logs.md diff --git a/content/for-developers/tutorials/19-backup-data/.gitkeep b/content/for-developers/tutorials/inner-loop/11-expose-metrics/.gitkeep similarity index 100% rename from content/for-developers/tutorials/19-backup-data/.gitkeep rename to content/for-developers/tutorials/inner-loop/11-expose-metrics/.gitkeep diff --git a/content/for-developers/tutorials/11-expose-metrics/expose-metrics.md b/content/for-developers/tutorials/inner-loop/11-expose-metrics/expose-metrics.md similarity index 100% rename from content/for-developers/tutorials/11-expose-metrics/expose-metrics.md rename to content/for-developers/tutorials/inner-loop/11-expose-metrics/expose-metrics.md diff --git a/content/for-developers/tutorials/20-restore-data/.gitkeep b/content/for-developers/tutorials/inner-loop/12-add-grafana-dashboard/.gitkeep similarity index 100% rename from content/for-developers/tutorials/20-restore-data/.gitkeep rename to content/for-developers/tutorials/inner-loop/12-add-grafana-dashboard/.gitkeep diff --git a/content/for-developers/tutorials/12-add-grafana-dashboard/add-grafana-dashboard.md b/content/for-developers/tutorials/inner-loop/12-add-grafana-dashboard/add-grafana-dashboard.md similarity index 100% rename from content/for-developers/tutorials/12-add-grafana-dashboard/add-grafana-dashboard.md rename to content/for-developers/tutorials/inner-loop/12-add-grafana-dashboard/add-grafana-dashboard.md diff --git a/content/for-developers/tutorials/12-add-grafana-dashboard/images/grafana-dashboards-management.png b/content/for-developers/tutorials/inner-loop/12-add-grafana-dashboard/images/grafana-dashboards-management.png similarity index 100% rename from content/for-developers/tutorials/12-add-grafana-dashboard/images/grafana-dashboards-management.png rename to content/for-developers/tutorials/inner-loop/12-add-grafana-dashboard/images/grafana-dashboards-management.png diff --git a/content/for-developers/tutorials/12-add-grafana-dashboard/images/grafana-menu.png b/content/for-developers/tutorials/inner-loop/12-add-grafana-dashboard/images/grafana-menu.png similarity index 100% rename from content/for-developers/tutorials/12-add-grafana-dashboard/images/grafana-menu.png rename to content/for-developers/tutorials/inner-loop/12-add-grafana-dashboard/images/grafana-menu.png diff --git a/content/for-developers/tutorials/21-add-env-variable/.gitkeep b/content/for-developers/tutorials/inner-loop/13-add-alerts/.gitkeep similarity index 100% rename from content/for-developers/tutorials/21-add-env-variable/.gitkeep rename to content/for-developers/tutorials/inner-loop/13-add-alerts/.gitkeep diff --git a/content/for-developers/tutorials/13-add-alerts/add-alerts.md b/content/for-developers/tutorials/inner-loop/13-add-alerts/add-alerts.md similarity index 100% rename from content/for-developers/tutorials/13-add-alerts/add-alerts.md rename to content/for-developers/tutorials/inner-loop/13-add-alerts/add-alerts.md diff --git a/content/for-developers/tutorials/22-add-ci-pipeline/.gitkeep b/content/for-developers/tutorials/inner-loop/14-scale-app/.gitkeep similarity index 100% rename from content/for-developers/tutorials/22-add-ci-pipeline/.gitkeep rename to content/for-developers/tutorials/inner-loop/14-scale-app/.gitkeep diff --git a/content/for-developers/tutorials/17-add-pdb/add-pdb.md b/content/for-developers/tutorials/inner-loop/14-scale-app/images/.gitkeep similarity index 100% rename from content/for-developers/tutorials/17-add-pdb/add-pdb.md rename to content/for-developers/tutorials/inner-loop/14-scale-app/images/.gitkeep diff --git a/content/for-developers/tutorials/14-scale-app/images/HPA-Events.png b/content/for-developers/tutorials/inner-loop/14-scale-app/images/HPA-Events.png similarity index 100% rename from content/for-developers/tutorials/14-scale-app/images/HPA-Events.png rename to content/for-developers/tutorials/inner-loop/14-scale-app/images/HPA-Events.png diff --git a/content/for-developers/tutorials/14-scale-app/images/HPA-Events2.png b/content/for-developers/tutorials/inner-loop/14-scale-app/images/HPA-Events2.png similarity index 100% rename from content/for-developers/tutorials/14-scale-app/images/HPA-Events2.png rename to content/for-developers/tutorials/inner-loop/14-scale-app/images/HPA-Events2.png diff --git a/content/for-developers/tutorials/14-scale-app/images/HPA-Metrics.png b/content/for-developers/tutorials/inner-loop/14-scale-app/images/HPA-Metrics.png similarity index 100% rename from content/for-developers/tutorials/14-scale-app/images/HPA-Metrics.png rename to content/for-developers/tutorials/inner-loop/14-scale-app/images/HPA-Metrics.png diff --git a/content/for-developers/tutorials/14-scale-app/images/HPA-Metrics2.png b/content/for-developers/tutorials/inner-loop/14-scale-app/images/HPA-Metrics2.png similarity index 100% rename from content/for-developers/tutorials/14-scale-app/images/HPA-Metrics2.png rename to content/for-developers/tutorials/inner-loop/14-scale-app/images/HPA-Metrics2.png diff --git a/content/for-developers/tutorials/14-scale-app/scale-app.md b/content/for-developers/tutorials/inner-loop/14-scale-app/scale-app.md similarity index 100% rename from content/for-developers/tutorials/14-scale-app/scale-app.md rename to content/for-developers/tutorials/inner-loop/14-scale-app/scale-app.md diff --git a/content/for-developers/tutorials/18-add-network-policy/add-network-policy.md b/content/for-developers/tutorials/inner-loop/15-validate-auto-reload/.gitkeep similarity index 100% rename from content/for-developers/tutorials/18-add-network-policy/add-network-policy.md rename to content/for-developers/tutorials/inner-loop/15-validate-auto-reload/.gitkeep diff --git a/content/for-developers/tutorials/15-validate-auto-reload/validate-auto-reload.md b/content/for-developers/tutorials/inner-loop/15-validate-auto-reload/validate-auto-reload.md similarity index 100% rename from content/for-developers/tutorials/15-validate-auto-reload/validate-auto-reload.md rename to content/for-developers/tutorials/inner-loop/15-validate-auto-reload/validate-auto-reload.md diff --git a/content/for-developers/tutorials/19-backup-data/backup-data.md b/content/for-developers/tutorials/inner-loop/16-validate-down-alert/.gitkeep similarity index 100% rename from content/for-developers/tutorials/19-backup-data/backup-data.md rename to content/for-developers/tutorials/inner-loop/16-validate-down-alert/.gitkeep diff --git a/content/for-developers/tutorials/16-validate-down-alert/validate-down-alert.md b/content/for-developers/tutorials/inner-loop/16-validate-down-alert/validate-down-alert.md similarity index 100% rename from content/for-developers/tutorials/16-validate-down-alert/validate-down-alert.md rename to content/for-developers/tutorials/inner-loop/16-validate-down-alert/validate-down-alert.md diff --git a/content/for-developers/tutorials/inner-loop/17-add-pdb/.gitkeep b/content/for-developers/tutorials/inner-loop/17-add-pdb/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/inner-loop/17-add-pdb/add-pdb.md b/content/for-developers/tutorials/inner-loop/17-add-pdb/add-pdb.md new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/inner-loop/18-add-network-policy/.gitkeep b/content/for-developers/tutorials/inner-loop/18-add-network-policy/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/inner-loop/18-add-network-policy/add-network-policy.md b/content/for-developers/tutorials/inner-loop/18-add-network-policy/add-network-policy.md new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/inner-loop/19-backup-data/.gitkeep b/content/for-developers/tutorials/inner-loop/19-backup-data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/inner-loop/19-backup-data/backup-data.md b/content/for-developers/tutorials/inner-loop/19-backup-data/backup-data.md new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/inner-loop/20-restore-data/.gitkeep b/content/for-developers/tutorials/inner-loop/20-restore-data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/20-restore-data/restore-data.md b/content/for-developers/tutorials/inner-loop/20-restore-data/restore-data.md similarity index 100% rename from content/for-developers/tutorials/20-restore-data/restore-data.md rename to content/for-developers/tutorials/inner-loop/20-restore-data/restore-data.md diff --git a/content/for-developers/tutorials/inner-loop/21-add-env-variable/.gitkeep b/content/for-developers/tutorials/inner-loop/21-add-env-variable/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/21-add-env-variable/add-env-variable.md b/content/for-developers/tutorials/inner-loop/21-add-env-variable/add-env-variable.md similarity index 100% rename from content/for-developers/tutorials/21-add-env-variable/add-env-variable.md rename to content/for-developers/tutorials/inner-loop/21-add-env-variable/add-env-variable.md diff --git a/content/for-developers/tutorials/outer-loop/.gitkeep b/content/for-developers/tutorials/outer-loop/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/outer-loop/add-application-to-gitops/.gitkeep b/content/for-developers/tutorials/outer-loop/add-application-to-gitops/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/outer-loop/add-build-environment/.gitkeep b/content/for-developers/tutorials/outer-loop/add-build-environment/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/outer-loop/add-build-environment/add-environment.md b/content/for-developers/tutorials/outer-loop/add-build-environment/add-environment.md new file mode 100644 index 00000000..fc0d2894 --- /dev/null +++ b/content/for-developers/tutorials/outer-loop/add-build-environment/add-environment.md @@ -0,0 +1,91 @@ +# Add environment + +Lets see how can we add an environment to an application in a tenant. Lets say, we have added a production cluster and want to add a new environment in application for it to be deployed on production. + +1. Create a folder named `production` at `/` which corresponds to the production environment. Suppose `gabbar` as tenant name, `stakater-nordmart-review` as application name, `production` as cluster name, `prod` as environment name. + + ```bash + └── gabbar + └── stakater-nordmart-review + └── prod + ``` + +1. Add the Helm Chart of your application with production environment configurations. + + ```bash + └── gabbar + └── stakater-nordmart-review + └── prod + ├── Chart.yaml + ├── values.yaml + └── templates/ + ``` + +1. Add an folder `prod` inside `/argocd-apps`. Add an ArgoCD Application in this folder which points to `//prod`. + + ```yaml + # Name: stakater-nordmart-review.yaml(APP_NAME.yaml) + # Path: gabbar/argocd-apps/prod (TENANT_NAME/ argocd-apps/ENV_NAME/) + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + name: gabbar-prod-stakater-nordmart-review + namespace: openshift-gitops + spec: + destination: + namespace: TARGET_NAMESPACE + server: 'https://kubernetes.default.svc' + project: gabbar + source: + path: gabbar/stakater-nordmart-review/prod + repoURL: 'APPS_GITOPS_REPO_URL' + targetRevision: HEAD + syncPolicy: + automated: + prune: true + selfHeal: true + ``` + +1. Add a folder called production (if not present) corresponding to the cluster name inside `argocd-apps` at root level, Add an ArgoCD Application in this folder which points to `/argocd-apps/prod`. + + ```yaml + # Name: gabbar-prod.yaml (TENANT_NAME-ENV_NAME.yaml) + # Path: argocd-apps/prod + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + name: gabbar-prod + namespace: openshift-gitops + spec: + destination: + namespace: TARGET_NAMESPACE + server: 'https://kubernetes.default.svc' + project: gabbar + source: + path: gabbar/argocd-apps/prod + repoURL: 'APPS_GITOPS_REPO_URL' + targetRevision: HEAD + syncPolicy: + automated: + prune: true + selfHeal: true + ``` + +1. You should have a similar folder structure at the end: + + ```bash + ├── gabbar + | ├── stakater-nordmart-review + | | ├── prod + | | | ├── Chart.yaml + | | | ├── values.yaml + | | └── └── templates/ + ├── └── argocd-apps + | └── prod + | └── stakater-nordmart-review.yaml + └── argocd-apps + └── production (cluster name) + └── gabbar-prod.yaml + ``` + +1. Make sure Application that deploys applications inside `argocd-apps/cluster-name/` folder is deployed in relevant `infra-gitops-config` repository. diff --git a/content/for-developers/tutorials/outer-loop/add-ci-pipeline/.gitkeep b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/22-add-ci-pipeline/add-ci-pipeline.md b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/add-ci-pipeline.md similarity index 100% rename from content/for-developers/tutorials/22-add-ci-pipeline/add-ci-pipeline.md rename to content/for-developers/tutorials/outer-loop/add-ci-pipeline/add-ci-pipeline.md diff --git a/content/for-developers/tutorials/22-add-ci-pipeline/images/add-route.png b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/add-route.png similarity index 100% rename from content/for-developers/tutorials/22-add-ci-pipeline/images/add-route.png rename to content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/add-route.png diff --git a/content/for-developers/tutorials/22-add-ci-pipeline/images/pipeline-basic.png b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/pipeline-basic.png similarity index 100% rename from content/for-developers/tutorials/22-add-ci-pipeline/images/pipeline-basic.png rename to content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/pipeline-basic.png diff --git a/content/for-developers/tutorials/22-add-ci-pipeline/images/pipeline-running.png b/content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/pipeline-running.png similarity index 100% rename from content/for-developers/tutorials/22-add-ci-pipeline/images/pipeline-running.png rename to content/for-developers/tutorials/outer-loop/add-ci-pipeline/images/pipeline-running.png diff --git a/content/for-developers/tutorials/outer-loop/promote-application/.gitkeep b/content/for-developers/tutorials/outer-loop/promote-application/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/content/for-developers/tutorials/outer-loop/promote-application/promote-app.md b/content/for-developers/tutorials/outer-loop/promote-application/promote-app.md new file mode 100644 index 00000000..4755fe46 --- /dev/null +++ b/content/for-developers/tutorials/outer-loop/promote-application/promote-app.md @@ -0,0 +1,50 @@ +# Promote the application + +To promote application from one environment to another; as mentioned above you will need to bump chart version and image tag version in that environment. You can do so by picking these versions from previous environment. + +This guide assumes that application is already [on-boarded](../../../../for-delivery-engineers/tutorials/03-deploy-demo-app/deploy-demo-app.md) to different environments. + +## 1. Promote chart + +To promote application from one environment to another, you can check the chart version from `Chart.yaml` file from one environment and update version in `Chart.yaml` of next environment: + +```yaml +apiVersion: v2 +dependencies: + - name: + repository: + version: 1.0.51 +description: A Helm chart for Kubernetes +name: +version: 1.0.51 +``` + +pick version `1.0.51` from above `Chart.yaml` and copy it in `Chart.yaml` of next environment + +## 2. Promote image + +To promote application from one environment to another, you can check the image tag version from `values.yaml` file from one environment and update version in `values.yaml` of next environment: + +`////values.yaml` + +```yaml +: + application: + deployment: + image: + repository: + tag: 1.0.51 +``` + +Pick version `1.0.51` and paste it to next environment + +`////values.yaml` + +```yaml +: + application: + deployment: + image: + repository: + tag: 1.0.50 +``` diff --git a/mkdocs.yml b/mkdocs.yml index 455e1d48..b6a59ef8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -124,54 +124,51 @@ nav: - for-administrators/help/faq.md - For Delivery Engineers: - for-delivery-engineers/overview.md - - GitOps: - - for-delivery-engineers/gitops/introduction.md - - for-delivery-engineers/gitops/structure.md - - for-delivery-engineers/gitops/creating-gitops-structure.md - - for-delivery-engineers/gitops/gitops-argocd-secrets.md - - for-delivery-engineers/gitops/application-onboarding.md - - for-delivery-engineers/gitops/environments.md - - for-delivery-engineers/gitops/github.md - - for-delivery-engineers/gitops/gitlab.md - - for-delivery-engineers/gitops/faq.md - - Continous Integration: - - for-delivery-engineers/ci-pipelines/secrets.md - - Tekton: - - for-delivery-engineers/ci-pipelines/tekton/intro.md - - for-delivery-engineers/ci-pipelines/tekton/bot-account.md - - GitHub Actions: - - for-delivery-engineers/ci-pipelines/github-actions/intro.md - - Continous Delivery: - - ArgoCD: - - for-delivery-engineers/cd-pipelines/argocd/intro.md + - Explanation: + - for-delivery-engineers/explanation/gitops-intro.md + - for-delivery-engineers/explanation/gitops-structure.md + - for-delivery-engineers/explanation/secrets.md + - for-delivery-engineers/explanation/types-of-environments.md + - for-delivery-engineers/explanation/faq.md + - How To guides: + - for-delivery-engineers/how-to-guides/configure-repository-secret/configure-repository-secret.md + - Tutorials: + - for-delivery-engineers/tutorials/01-configure-infra-gitops-config/configure-infra-gitops-config.md + - for-delivery-engineers/tutorials/02-configure-apps-gitops-config/creating-gitops-structure.md + - for-delivery-engineers/tutorials/03-deploy-demo-app/deploy-demo-app.md + - For Developers: - Tutorials: - - for-developers/tutorials/00-prepare-environment/prepare-env.md - - for-developers/tutorials/00-prepare-environment/step-by-step-guide.md - - for-developers/tutorials/01-access-cluster/access-cluster.md - - for-developers/tutorials/02-containerize-app/containerize-app.md - - for-developers/tutorials/03-package-app/package-app.md - - for-developers/tutorials/04-deploy-app/deploy-app.md - - for-developers/tutorials/05-expose-app/expose-app.md - - for-developers/tutorials/06-add-storage/persist-app.md - - for-developers/tutorials/07-add-configmap/add-configmaps.md - - for-developers/tutorials/08-add-secret/add-secrets.md - - for-developers/tutorials/09-add-dependency/add-dependency.md - - for-developers/tutorials/10-validate-logs/validate-logs.md - - for-developers/tutorials/11-expose-metrics/expose-metrics.md - - for-developers/tutorials/12-add-grafana-dashboard/add-grafana-dashboard.md - - for-developers/tutorials/13-add-alerts/add-alerts.md - - for-developers/tutorials/14-scale-app/scale-app.md - - for-developers/tutorials/15-validate-auto-reload/validate-auto-reload.md - - for-developers/tutorials/16-validate-down-alert/validate-down-alert.md - - for-developers/tutorials/17-add-pdb/add-pdb.md - - for-developers/tutorials/18-add-network-policy/add-network-policy.md - - for-developers/tutorials/19-backup-data/backup-data.md - - for-developers/tutorials/20-restore-data/restore-data.md - - for-developers/tutorials/21-add-env-variable/add-env-variable.md - - for-developers/tutorials/22-add-ci-pipeline/add-ci-pipeline.md + - for-developers/tutorials/inner-loop/00-prepare-environment/prepare-env.md + - for-developers/tutorials/inner-loop/00-prepare-environment/step-by-step-guide.md + - for-developers/tutorials/inner-loop/01-access-cluster/access-cluster.md + - for-developers/tutorials/inner-loop/02-containerize-app/containerize-app.md + - for-developers/tutorials/inner-loop/03-package-app/package-app.md + - for-developers/tutorials/inner-loop/04-deploy-app/deploy-app.md + - for-developers/tutorials/inner-loop/05-expose-app/expose-app.md + - for-developers/tutorials/inner-loop/06-add-storage/persist-app.md + - for-developers/tutorials/inner-loop/07-add-configmap/add-configmaps.md + - for-developers/tutorials/inner-loop/08-add-secret/add-secrets.md + - for-developers/tutorials/inner-loop/09-add-dependency/add-dependency.md + - for-developers/tutorials/inner-loop/10-validate-logs/validate-logs.md + - for-developers/tutorials/inner-loop/11-expose-metrics/expose-metrics.md + - for-developers/tutorials/inner-loop/12-add-grafana-dashboard/add-grafana-dashboard.md + - for-developers/tutorials/inner-loop/13-add-alerts/add-alerts.md + - for-developers/tutorials/inner-loop/14-scale-app/scale-app.md + - for-developers/tutorials/inner-loop/15-validate-auto-reload/validate-auto-reload.md + - for-developers/tutorials/inner-loop/16-validate-down-alert/validate-down-alert.md + - for-developers/tutorials/inner-loop/17-add-pdb/add-pdb.md + - for-developers/tutorials/inner-loop/18-add-network-policy/add-network-policy.md + - for-developers/tutorials/inner-loop/19-backup-data/backup-data.md + - for-developers/tutorials/inner-loop/20-restore-data/restore-data.md + - for-developers/tutorials/inner-loop/21-add-env-variable/add-env-variable.md + - for-developers/tutorials/outer-loop/add-build-environment/add-environment.md + - for-developers/tutorials/outer-loop/add-ci-pipeline/add-ci-pipeline.md + - for-developers/tutorials/outer-loop/promote-application/promote-app.md - How-to guides: - for-developers/how-to-guides/overview.md + - for-developers/how-to-guides/add-a-new-environment-to-apps-gitops/add-a-new-environment-to-application.md + - for-developers/how-to-guides/promote-your-application/promote-your-application.md - Explanation: - for-developers/explanation/developer-training.md - for-developers/explanation/plan-your-deployment.md