Skip to content

Commit

Permalink
Merge pull request #3036 from spryker/SriRamyaVadlamudi-patch-1
Browse files Browse the repository at this point in the history
Update connect-a-code-repository.md
  • Loading branch information
andriitserkovnyi authored Feb 6, 2025
2 parents df9825c + 5fad226 commit 419765d
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 49 deletions.
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ commonOptions = {
/www.jetbrains.com\/[\.\w\-\/\?]+/,
/docs.spring.io\/[\.\w\-\/\?]+/,
/redisdesktop.com\/[\.\w\-\/\?]+/,
/jwt.io\/[\.\w\-\/\?]+/,
/developer.computop.com\/[\.\w\-\/\?]+/,
/www.centralbank.cy\/[\.\w\-\/\?]+/,
/www.gnu.org\/[\.\w\-\/\?]+/,
/www.mysql.com\/[\.\w\-\/\?]+/,
/www.gnu.org\/[\.\w\-\/\?]+/,
/algolia.com\/[\.\w\-\/\?]+/,
/www.facebook.com\/[\.\w\-\/\?]+/

Expand Down
89 changes: 54 additions & 35 deletions docs/ca/dev/add-variables-in-the-parameter-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ redirect_from:
- /docs/ca/dev/managing-parameters-in-the-parameter-store.html
---



Variables, such as parameters and secrets, are used for multiple purposes, like storing mail server details or providing Composer authentication details to the build and deploy process securely.

{% info_block infoBox %}
Expand All @@ -25,27 +23,72 @@ This feature is part of a gradual rollout and will be available to everyone even

{% endinfo_block %}

For complex or system-critical changes to variables, we recommend consulting with our support to prevent unexpected issues.

## Customer-owned and Spryker-owned variables

There are two types of environment variables in the Spryker Cloud Commerce OS: those owned by the customer and those owned by Spryker.
There are two types of environment variables: customer-owned and Spryker-owned.

Spryker-owned variables are managed and can be updated only with the help of Spryker Cloud or support teams.

Customer-owned variables are created and managed by you or implementation partner. You have full control over these variables and can add or edit them according to your needs. Changes to these variables don't automatically propagate into a running environment. To apply changes made to your environment variables, you need to run an ECS-updater-* pipeline to bring them to the containers or run a full redeploy. You can do this whole process without creating support tickets.

### Customer-owned variables with limited access

The following customer-owned variables can be updated only with the help of Spryker Cloud or support teams:

* /{project}/{environment}/secret/scheduler/limited/{variable_name}

Customer-owned variables are created and managed by you—the onboarded customer or implementation partner. You have full control over these variables and can add or edit them according to your needs. However, keep in mind that changes to these variables don't automatically propagate into the running environment. To apply changes made to your environment variables, you need to run an ECS-updater-* pipeline to bring them to the containers (full re-deploy would also do the trick, of course). This process doesn't require intervention of the Spryker Cloud or support team.
* /{project}/{environment}/secret/pipeline/limited/{variable_name}

If there is a need to modify a Spryker-owned environment variable, it must be done through the Spryker Cloud or support team, as it needs to be coordinated with our DevOps team to ensure proper application and consistency.
* /{project}/{environment}/secret/infra/limited/{variable_name}

* /{project}/{environment}/secret/common/limited/{variable_name}

* /{project}/{environment}/secret/app/limited/{variable_name}

* /{project}/{environment}/config/scheduler/limited/{variable_name}

* /{project}/{environment}/config/pipeline/limited/{variable_name}

* /{project}/{environment}/config/infra/limited/{variable_name}

* /{project}/{environment}/config/common/limited/{variable_name}

By adhering to these guidelines, you can effectively manage your environment variables without risking the system stability. It also helps in maintaining a seamless experience while working with the Spryker Cloud Commerce OS.
* /{project}/{environment}/config/app/limited/{variable_name}

Please remember that improper management of environment variables can lead to unexpected issues. Therefore, it's recommended to consult the Spryker Cloud or support team for any complex or system-critical changes.

## Naming convention for variables

Variables must follow this naming convention: `/{project}/{environment}/{type}/{bucket}/{grant}/{variable_name}`.

{% info_block warningBox "Reserved variables" %}
Placeholder description:

* `type`: defines the type of a variable. Possible values:
* `config`: parameter
* `secret`: secret

Reserved variables are variable names that have special meaning in Spryker Cloud Commerce OS. Since their names are reserved, you can't define your own variables using these names.
<BR> The reserved variable names are the following:
* `SPRYKER_*` *(Every variable name with that prefix)*
* `bucket`: defines what services a variable is used for. Possible values:
* `common`: used by all the buckets.
* `app`: used only by application services.
* `scheduler`: used by the scheduler.

* `grant`: Defines access permissions to variables. Possible values:
* `public`: readable and writable
* `limited`: readable

Path examples:

* /fashion_club_store/staging/config/common/limited/composer_pass

* /deans_jeans/prod/config/app/public/mail_host

### Reserved variables

Reserved variables are reserved in Spryker for dedicated functions. These names can't be used to create more variables. If you're already using reserved variables in your code, you need to change their names to avoid any service issues.

Reserved variables:
* `SPRYKER_*`: Every variable name with this prefix
* `ALLOWED_IP`
* `BLACKFIRE_AGENT_SOCKET`
* `BLACKFIRE_SERVER_ID`
Expand Down Expand Up @@ -85,30 +128,6 @@ Reserved variables are variable names that have special meaning in Spryker Cloud
* `TIDEWAYS_ENVIRONMENT`


If you are already using these reserved variables in your code, you need to change their names to avoid any service issues.

{% endinfo_block %}

Placeholder description:

* `type`: defines the type of a variable. Possible values:
* `config`: parameter
* `secret`: secret

* `bucket`: defines what services a variable is used for. Possible values:
* `common`: used by all the buckets.
* `app`: used only by application services.
* `scheduler`: used by the scheduler.

* `grant`: Defines access permissions to variables. Possible values:
* `public`: readable and writable
* `limited`: readable

Path examples:

* /fashion_club_store/staging/config/common/limited/composer_pass

* /deans_jeans/prod/config/app/public/mail_host

## Variable path hierarchy

Expand Down
38 changes: 25 additions & 13 deletions docs/ca/dev/connect-a-code-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ This document describes how to connect a code repository to Spryker Cloud Commer

If you specified a code repository in the Onboarding Questionnaire, we connected it to your Staging environment during the initial setup. To connect a code repository to another environment, follow this document.

Note that we are only supporting the Cloud variants of the repositories listed below. To connect the On-Premises repository, check the documentation of your git repository provider about mirroring the repository to one of the following providers.
Spryker supports only the cloud variants of the repositories listed below. To connect an on-premises repository, check the documentation of your Git repository provider about mirroring it to one of the following providers.

{% endinfo_block %}

Spryker Cloud Commerce OS supports the following version control systems:
Spryker supports the following version control systems:

* [GitHub](https://github.com/)
* [Bitbucket](https://bitbucket.org/)
* [GitLab](https://gitlab.com/)

Spryker Cloud also offers support for all the Git repositories that support AWS CodeCommit push mirroring. Similar to the GitLab setup, you can configure all the commits from your version control system to be mirrored to Spryker Cloud and consumed by our pipelines to build and deploy your system.
Spryker also supports all the Git repositories that support AWS CodeCommit push mirroring. Similar to the GitLab setup, you can configure all the commits from your version control system to be mirrored to Spryker and consumed by our pipelines to build and deploy your system.

We recommend mapping your branches to environments as follows:

Expand All @@ -41,16 +41,28 @@ We recommend mapping your branches to environments as follows:

## Connect a GitHub code repository


1. Configure a GitHub code repository.
2. On the [support portal](https://support.spryker.com/) in the Infrastructure Change Request category, create a Change to existing Parameter Store Variable case and provide the following details:
* **URL**
* **Branch**
3. Provide the **Access token** by following [Share a secret](/docs/about/all/support/share-secrets-with-the-spryker-support-team.html#share-a-secret).

We connect the code repository shortly after you provide the details.


1. Log into the AWS management console of the environment you want to connect a repository to.
2. Go to **CodePipeline**.
3. One the **Pipelines** page, select the pipeline you want to connect the repository to.
4. On the page of the pipeline, click **Edit**.
This opens the pipeline editing page.
5. In the **Edit: Source** pane, click **Edit stage**.
6. In the **Spryker_App_Src** section, click the *Edit action* button.

![edit-action](https://spryker.s3.eu-central-1.amazonaws.com/docs/ca/dev/connect-a-code-repository.md/edit-action.png)

This opens the **Edit action** window.
7. For **Action provider**, select **GitHub(via GitHub App)**.
This adds GitHub related fields to the window.
8. Click **Connect to GitHub** and authorize AWS CodePipeline to access your GitHub repository.
9. For **Repository name**, enter and select the repository you want to connect.
10. For **Branch name**, enter and select the branch you want to connect.
11. Click **Done**.
12. In the **Edit: Source** pane, click **Done**.
13. Scroll up and click **Save**.
14. In the **Save pipeline changes** window, click **Save**.

Your GitHub repository is now successfully connected!


## Connect a Bitbucket code repository
Expand Down

0 comments on commit 419765d

Please sign in to comment.