Compare commits

..

32 Commits

Author SHA1 Message Date
85a8820234
Merge pull request #37 from ditkrg/dev
Add Environment variables page
2023-05-03 13:46:01 +03:00
8474cde70e
specify kubectl version 2023-04-27 17:08:54 +03:00
Shakar
b38a071c8d
Use the new github runner that can deploy public repos
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-27 16:01:04 +03:00
Shakar
b2a9bee17a
Adds SIDEKIQ__REDIS_URL
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-06 11:21:26 +03:00
Shakar
9fc3370f81
Adds Redis__URL
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-06 10:55:51 +03:00
Shakar Bakr
4f2255c4b3
Changes the name of the database connection string env variable
Adds REDIS__CONNECTION_STRING

Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2023-04-05 02:17:16 +03:00
Shakar
e46c18d86f
S3__REGION is not needed.
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 17:13:05 +03:00
Shakar
a700e397a8
Revert "Deploy using Rancher Fleet"
This reverts commit 77bf4f8da9.

Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 17:05:15 +03:00
Shakar
4e8bdaabde
Revert "Deletes tests-base"
This reverts commit b56c6075eb.

Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 17:04:31 +03:00
Shakar
70ee7a9161
Deleted a the section in Environment variables
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 16:57:32 +03:00
Shakar
b56c6075eb
Revert "Revert "Deletes tests-base""
This reverts commit d96f56d825.

Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 16:56:16 +03:00
Shakar
e5a275f94c
Fix the description of these environment variables
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 16:54:18 +03:00
Shakar
77bf4f8da9
Revert "Revert "Deploy using Rancher Fleet""
This reverts commit 55467a497a.

Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 16:37:21 +03:00
Shakar
d2aadc4c40
Update environment variables page
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 16:34:26 +03:00
Shakar
1796c41532
Changes s3 variables
Adds RabbitMQ__URL
Updates the description of service url

Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 14:24:41 +03:00
Shakar
f0ba09a679
Revert "run on local git hub runners"
This reverts commit 74416c9d83.
2023-04-04 14:19:53 +03:00
Shakar
6ce207ab44
Revert "fix typo"
This reverts commit 2715fde766.
2023-04-04 14:19:37 +03:00
Shakar
55467a497a
Revert "Deploy using Rancher Fleet"
This reverts commit 74f7e1ccec.
2023-04-04 14:16:59 +03:00
Shakar
d96f56d825
Revert "Deletes tests-base"
This reverts commit 5b5d186cce.
2023-04-04 14:15:49 +03:00
Shakar
93b0fe0123
Updates environment variables
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 13:55:48 +03:00
Shakar
5b5d186cce
Deletes tests-base
Adds production in fleet.yaml

Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-03-28 09:42:14 +03:00
Shakar bakr
a1872f83a4
Merge branch 'main' into dev 2023-03-27 16:45:26 +03:00
Shakar
74f7e1ccec
Deploy using Rancher Fleet
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-03-27 16:40:42 +03:00
Shakar
79699b5a07
Add mongodb
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-03-27 13:11:30 +03:00
Shakar
2715fde766
fix typo
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-03-27 12:50:33 +03:00
74416c9d83
run on local git hub runners 2023-03-26 12:22:48 +03:00
Shakar
26b2d96c58
Fix typo
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-03-26 12:03:44 +03:00
Shakar
d1003af28e
Adds environment variables page
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-03-26 12:03:18 +03:00
70a5f968fc
Merge pull request #33 from ditkrg/dev
Dev
2023-03-12 16:08:46 +03:00
fad8e2360d
Merge branch 'main' into dev 2023-03-12 16:08:38 +03:00
f33658fca5
Updates Annex 2 2023-03-12 16:08:10 +03:00
cbba8316fe
Merge pull request #23 from ditkrg/dev
Dev
2022-11-01 10:49:10 +03:00
5 changed files with 76 additions and 70 deletions

View File

@ -22,7 +22,7 @@ env:
jobs:
deploy:
timeout-minutes: 10
runs-on: ubuntu-20.04
runs-on: [self-hosted, ubuntu-jammy, public]
environment:
url: ${{ inputs.env_url }}
name: ${{ inputs.env_name }}
@ -32,7 +32,9 @@ jobs:
uses: actions/checkout@v3
- name: Kubectl tool installer
uses: Azure/setup-kubectl@v3
uses: azure/setup-kubectl@v3
with:
version: v1.25.8
- uses: azure/k8s-set-context@v3
with:

View File

@ -40,11 +40,11 @@ Use the following checklist when dealing with a microservices architecture inter
```JSON
{
meta: {
page: {
pagination: {
totalPages: "integer"
count: "integer",
limitValue: "integer",
currentPage: "integer"
rowsPerPage: "integer",
page: "integer"
}
}
}

View File

@ -0,0 +1,59 @@
# Environment Variables for Micro-Service Applications
This document provides a brief description of the environment variables that are used by the micro-service applications developed and maintained by the Department of Information & Technology (DIT). These variables are used to configure various aspects of the applications, such as database connections, cloud storage access, message queue settings, etc. The environment variables follow a standard naming convention that consists of two parts: the prefix and the suffix. The prefix indicates the component or service that the variable belongs to, and the suffix indicates the specific parameter or attribute that the variable represents. For example, `DATABASE__HOST` is an environment variable that specifies the host name of the database server for the application.
The following table lists the environment variables that are common to all DIT micro-service applications, along with their descriptions.
| Environment Variable | Description |
| :---------------------------- | :------------------------------------------------------------------------ |
| CAS\_\_URL | URL for the Central Authentication Service (CAS) |
| CAS\_\_M2M_CLIENT_ID | Client ID for machine-to-machine authentication with the CAS |
| CAS\_\_M2M_CLIENT_SECRET | Client secret for machine-to-machine authentication with the CAS |
| DATABASE\_\_CONNECTION_STRING | The connection string of database server |
| DATABASE\_\_URL | The URL format for the connection string of database server |
| DATABASE\_\_HOST | The host name or IP address of the database server |
| DATABASE\_\_USERNAME | The username for accessing the database |
| DATABASE\_\_PASSWORD | The password for accessing the database |
| DATABASE\_\_NAME | The name of the database |
| DATABASE\_\_PORT | The port number of the database server |
| S3\_\_ENDPOINT | The endpoint URL of the S3 bucket |
| S3\_\_ACCESS_KEY_ID | The access key ID for accessing the S3 bucket |
| S3\_\_SECRET_ACCESS_KEY | The secret access key for accessing the S3 bucket |
| S3\_\_SELF_BUCKET | The name of the S3 bucket used for storing self-related files |
| S3\_\_UPLOADS_API_BUCKET | The name of the S3 bucket used for storing uploaded files via Uploads API |
| SIDEKIQ\_\_USERNAME | The username for accessing the Sidekiq web interface |
| SIDEKIQ\_\_PASSWORD | The password for accessing the Sidekiq web interface |
| SIDEKIQ\_\_REDIS_URL | The URL of the redis database used by the Sidekiq web interface |
| REDIS\_\_URL | The URL format for the connection string of redis database server |
| REDIS\_\_CONNECTION_STRING | The connection string of redis database server |
| REDIS_SENTINEL\_\_HOST | The host name or IP address of the Redis Sentinel server |
| REDIS_SENTINEL\_\_PORT | The port number of the Redis Sentinel server |
| REDIS_SENTINEL\_\_PASSWORD | The password for accessing the Redis Sentinel server |
| REDIS_SENTINEL\_\_MASTER | The name of the Redis Sentinel master |
| REDIS\_\_PASSWORD | The password for accessing the Redis server |
| REDIS\_\_DB | The number of the Redis database |
| SIDEKIQ\_\_REDIS_DB | The number of the Redis database for Sidekiq |
| SENTRY\_\_DSN | The data source name (DSN) for Sentry error tracking |
| SENTRY\_\_TRACE_RATE | The sampling rate for Sentry performance tracing |
| SENTRY\_\_ENVIRONMENT | The environment name for Sentry error tracking |
| GATEWAY\_\_CERTIFICATE | The certificate file for accessing the gateway service |
| RABBITMQ\_\_URL | The URL the RabbitMQ server |
| RABBITMQ\_\_HOST | The host name or IP address of the RabbitMQ server |
| RABBITMQ\_\_PORT | The port number of the RabbitMQ server |
| RABBITMQ\_\_VHOST | The virtual host name of the RabbitMQ server |
| RABBITMQ\_\_USERNAME | The username for accessing the RabbitMQ server |
| RABBITMQ\_\_PASSWORD | The password for accessing the RabbitMQ server |
| RABBITMQ\_\_EXCHANGE_NAME | The name of the exchange for RabbitMQ server |
## Environment Variables for Micro-Service Applications
1. Use double underscores (\_\_) to separate words in the variable name.
2. Use all uppercase letters for the variable name.
3. Use descriptive names for the variable that indicate their purpose or usage.
4. Use consistent naming across all microservice applications developed by DIT.
5. Store environment variables securely, using an encrypted secrets store, such as HashiCorp Vault or Amazon Secrets Manager.
6. Avoid hard-coding sensitive information, such as passwords or API keys, in the code.
## Conclusion
The standard naming convention for environment variables used by microservice applications developed and maintained by the Department of Information & Technology (DIT) has been outlined in this document. Following these guidelines will ensure consistency and clarity across all microservice applications developed by DIT.

73
package-lock.json generated
View File

@ -10,7 +10,7 @@
"dependencies": {
"@docusaurus/core": "2.0.0-beta.15",
"@docusaurus/preset-classic": "2.0.0-beta.15",
"@mdx-js/react": "^2.3.0",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
@ -2318,18 +2318,6 @@
"react-dom": "^16.8.4 || ^17.0.0"
}
},
"node_modules/@docusaurus/theme-classic/node_modules/@mdx-js/react": {
"version": "1.6.22",
"resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz",
"integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"peerDependencies": {
"react": "^16.13.1 || ^17.0.0"
}
},
"node_modules/@docusaurus/theme-common": {
"version": "2.0.0-beta.15",
"resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-2.0.0-beta.15.tgz",
@ -2453,18 +2441,6 @@
"react-dom": "*"
}
},
"node_modules/@docusaurus/utils/node_modules/@mdx-js/react": {
"version": "1.6.22",
"resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz",
"integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"peerDependencies": {
"react": "^16.13.1 || ^17.0.0"
}
},
"node_modules/@docusaurus/utils/node_modules/@mdx-js/runtime": {
"version": "1.6.22",
"resolved": "https://registry.npmjs.org/@mdx-js/runtime/-/runtime-1.6.22.tgz",
@ -2578,19 +2554,15 @@
}
},
"node_modules/@mdx-js/react": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-2.3.0.tgz",
"integrity": "sha512-zQH//gdOmuu7nt2oJR29vFhDv88oGPmVw6BggmrHeMI+xgEkp1B2dX9/bMBSYtK0dyLX/aOmesKS09g222K1/g==",
"dependencies": {
"@types/mdx": "^2.0.0",
"@types/react": ">=16"
},
"version": "1.6.22",
"resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz",
"integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"peerDependencies": {
"react": ">=16"
"react": "^16.13.1 || ^17.0.0"
}
},
"node_modules/@mdx-js/util": {
@ -3151,11 +3123,6 @@
"@types/unist": "*"
}
},
"node_modules/@types/mdx": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.3.tgz",
"integrity": "sha512-IgHxcT3RC8LzFLhKwP3gbMPeaK7BM9eBH46OdapPA7yvuIUJ8H6zHZV53J8hGZcTSnt95jANt+rTBNUUc22ACQ=="
},
"node_modules/@types/mime": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
@ -14353,14 +14320,6 @@
"prismjs": "^1.23.0",
"react-router-dom": "^5.2.0",
"rtlcss": "^3.3.0"
},
"dependencies": {
"@mdx-js/react": {
"version": "1.6.22",
"resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz",
"integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==",
"requires": {}
}
}
},
"@docusaurus/theme-common": {
@ -14430,12 +14389,6 @@
"url-loader": "^4.1.1"
},
"dependencies": {
"@mdx-js/react": {
"version": "1.6.22",
"resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz",
"integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==",
"requires": {}
},
"@mdx-js/runtime": {
"version": "1.6.22",
"resolved": "https://registry.npmjs.org/@mdx-js/runtime/-/runtime-1.6.22.tgz",
@ -14545,13 +14498,10 @@
}
},
"@mdx-js/react": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-2.3.0.tgz",
"integrity": "sha512-zQH//gdOmuu7nt2oJR29vFhDv88oGPmVw6BggmrHeMI+xgEkp1B2dX9/bMBSYtK0dyLX/aOmesKS09g222K1/g==",
"requires": {
"@types/mdx": "^2.0.0",
"@types/react": ">=16"
}
"version": "1.6.22",
"resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz",
"integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==",
"requires": {}
},
"@mdx-js/util": {
"version": "1.6.22",
@ -14962,11 +14912,6 @@
"@types/unist": "*"
}
},
"@types/mdx": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.3.tgz",
"integrity": "sha512-IgHxcT3RC8LzFLhKwP3gbMPeaK7BM9eBH46OdapPA7yvuIUJ8H6zHZV53J8hGZcTSnt95jANt+rTBNUUc22ACQ=="
},
"@types/mime": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",

View File

@ -16,7 +16,7 @@
"dependencies": {
"@docusaurus/core": "2.0.0-beta.15",
"@docusaurus/preset-classic": "2.0.0-beta.15",
"@mdx-js/react": "^2.3.0",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",