{"id":17172940,"url":"https://github.com/20tab/talos","last_synced_at":"2025-04-13T02:13:18.278Z","repository":{"id":38178527,"uuid":"228632230","full_name":"20tab/talos","owner":"20tab","description":"A 20tab standard project.","archived":false,"fork":false,"pushed_at":"2024-12-11T17:04:13.000Z","size":1314,"stargazers_count":44,"open_issues_count":9,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-13T02:13:10.538Z","etag":null,"topics":["cicd","cookiecutter","digitalocean","docker","gitlab","k8s"],"latest_commit_sha":null,"homepage":"https://www.20tab.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/20tab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-17T14:17:58.000Z","updated_at":"2024-12-11T17:01:06.000Z","dependencies_parsed_at":"2023-10-03T08:46:49.618Z","dependency_job_id":"7e6fa923-8d97-41cb-908b-63f7c8c4d7c0","html_url":"https://github.com/20tab/talos","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Ftalos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Ftalos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Ftalos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Ftalos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/20tab","download_url":"https://codeload.github.com/20tab/talos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654094,"owners_count":21140236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","cookiecutter","digitalocean","docker","gitlab","k8s"],"created_at":"2024-10-14T23:49:03.239Z","updated_at":"2025-04-13T02:13:18.258Z","avatar_url":"https://github.com/20tab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Talos\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n\n\u003e A [20tab](https://www.20tab.com/) project.\n\n## 🧩 Requirements\n\nThe Talos script can be run either using Docker or a Python virtual environment.\n\n### 🐋 Docker\n\nIn order to run Talos via Docker, a working [Docker installation](https://docs.docker.com/get-docker/) is the only requirement.\n\n### 🐍 Virtual environment\n\nIn order to run Talos in a virtual environment, first clone the repository in a local projects directory and ensure it is your current directory:\n\n```console\ncd ~/projects\ngit clone git@github.com:20tab/talos.git\ncd talos\n```\n\nThen, create and activate a virtual environment and install the requirements:\n\n```console\npython3.12 -m venv .venv\nsource .venv/bin/activate\npython3 -m pip install --upgrade pip setuptools\npython3 -m pip install -r requirements/common.txt\n```\n\nThe `terraform` cli package is required, unless you want to generate a project only locally. To install it we suggest to use the official [install guide](https://learn.hashicorp.com/tutorials/terraform/install-cli).\n\n## 🔑 Credentials (optional)\n\n### 🌊 DigitalOcean\n\nIf DigitalOcean is chosen for deployment, a Personal Access Token with _write_ permission is required.\u003cbr/\u003e\nAdditionally, if DigitalOcean Spaces is the chosen media storage backend, a pair of Spaces access keys is required.\n[Digital Ocean Personal Access Token](https://cloud.digitalocean.com/account/api/)\n\n**Note:** all credentials can be generated in the DigitalOcean API configuration section.\u003cbr/\u003e\n⚠️ Beware that the token is shown only once after creation.\n\n### 🦊 GitLab\n\nIf the GitLab integration is enabled, a Personal Access Token with _api_ permission is required.\u003cbr/\u003e\nIt can be generated in the GitLab User Settings panel.\n[GitLab Personal Access Token](https://gitlab.com/-/profile/personal_access_tokens)\n\n**Note:** the token can be generated in the Access Tokens section of the GitLab User Settings panel.\u003cbr/\u003e\n⚠️ Beware that the token is shown only once after creation.\n\n### 🌎 Terraform Cloud\n\nIf the Terraform Cloud integration is enabled, a User API token is required.\u003cbr/\u003e\n[Terraform Cloud API Token](https://app.terraform.io/app/settings/tokens)\n\n**Note:** ⚠️ Beware that the token is shown only once after creation.\n\n## 🚀️ Quickstart\n\nChange to the projects directory, for example:\n\n```console\ncd ~/projects\n```\n\n### 🐋 Docker\n\n```console\ndocker run --interactive --tty --rm --volume $PWD/.dumps:/app/.dumps --volume $PWD/.logs:/app/.logs --volume $PWD:/data 20tab/talos:latest\n```\n\n**Note:** On a non-AMD64 architecture, `--platform linux/amd64` can be passed to force emulation.\n\n### 🐍 Virtual environment\n\n```console\nsource talos/.venv/bin/activate\n./talos/start.py\n```\n\n### ⚠️ Provisioning\n\nThe first run is manual, made from GitLab Pipeline. Use orchestrator generated README for more details.\n\n### Example\n\n```console\nProject name: My Project Name\nProject slug [my-project-name]:\nBackend type (django, none) [django]:\nBackend service slug [backend]:\nFrontend type (nextjs, none) [nextjs]:\nFrontend service slug [frontend]:\nDeploy type (digitalocean-k8s, other-k8s) [digitalocean-k8s]:\nTerraform backend (terraform-cloud, gitlab) [terraform-cloud]:\nTerraform host name [app.terraform.io]:\nTerraform Cloud User token:\nTerraform Organization: my-organization-name\nDo you want to create Terraform Cloud Organization 'my-organization-name'? [y/N]:\nChoose the environments distribution:\n  1 - All environments share the same stack (Default)\n  2 - Dev and Stage environments share the same stack, Prod has its own\n  3 - Each environment has its own stack\n (1, 2, 3) [1]:\nDo you want to enable the monitoring stack? [y/N]:\nDigitalOcean token:\nDo you want to configure DNS records? (BEWARE: NS must be set accordingly) [y/N]:\nDevelopment environment complete URL [https://dev.my-project-name.com]:\nStaging environment complete URL [https://stage.my-project-name.com]:\nProduction environment complete URL [https://www.my-project-name.com]:\nDo you want Traefik to generate SSL certificates? [Y/n]:\nLet's Encrypt certificates email: info@my-organization-email.com\nDo you want to use Redis? [y/N]:\nKubernetes cluster DigitalOcean region [fra1]:\nDatabase cluster DigitalOcean region [fra1]:\nDatabase cluster node size [db-s-1vcpu-2gb]:\nMedia storage (digitalocean-s3, aws-s3, local, none) [digitalocean-s3]:\nDo you want to use Sentry? [y/N]:\nDo you want to use Pact? [y/N]:\nDo you want to use GitLab? [Y/n]:\nGitLab group slug [my-project-name]:\nMake sure the GitLab \"my-project-name\" group exists before proceeding. Continue? [y/N]: y\nGitLab private token (with API scope enabled):\nComma-separated GitLab group owners []:\nComma-separated GitLab group maintainers []:\nComma-separated GitLab group developers []:\nDigitalOcean Spaces region [fra1]:\nS3 Access Key ID:\nS3 Secret Access Key:\nInitializing the orchestrator service:\n...cookiecutting the service\n...generating the .env file\n...creating the GitLab repository and associated resources\n...creating the Terraform Cloud resources\nInitializing the backend service:\n...cookiecutting the service\n...generating the .env file\n...formatting the cookiecut python code\n...compiling the requirements files\n\t- common.txt\n\t- test.txt\n\t- local.txt\n\t- remote.txt\n\t- base.txt\n...creating the '/static' directory\n...creating the GitLab repository and associated resources\n...creating the Terraform Cloud resources\nInitializing the frontend service:\n...cookiecutting the service\n...generating the .env file\n...creating the GitLab repository and associated resources\n...creating the Terraform Cloud resources\n```\n\n## 🗒️ Arguments\n\nThe following arguments can be appended to the Docker and shell commands\n\n#### User id\n\n`--uid=$UID`\n\n#### Group id\n\n`--gid=1000`\n\n#### Output directory\n\n`--output-dir=\"~/projects\"`\n\n#### Project name\n\n`--project-name=\"My project name\"`\n\n#### Project slug\n\n`--project-slug=\"my-project-name\"`\n\n#### Project dirname\n\n`--project-dirname=\"myprojectname\"`\n\n### 🎖️ Services\n\n#### Backend type\n\n| Value  | Description                                         | Argument                |\n| ------ | --------------------------------------------------- | ----------------------- |\n| django | https://github.com/20tab/django-continuous-delivery | `--backend-type=django` |\n| none   | the backend service will not be initialized         | `--backend-type=none`   |\n\n#### Backend service slug\n\n`--backend-service-slug=backend`\n\n#### Backend service port\n\n`--backend-service-port=8000`\n\n#### Frontend type\n\n| Value  | Description                                         | Argument                 |\n| ------ | --------------------------------------------------- | ------------------------ |\n| nextjs | https://github.com/20tab/nextjs-continuous-delivery | `--frontend-type=nextjs` |\n| none   | the frontend service will not be initialized        | `--frontend-type=none`   |\n\n#### Frontend service slug\n\n`--frontend-service-slug=frontend`\n\n#### Frontend service port\n\n`--frontend-service-port=3000`\n\n### 📐 Architecture\n\n#### Deploy type\n\n| Value            | Description                                 | Argument                             |\n| ---------------- | ------------------------------------------- | ------------------------------------ |\n| digitalocean-k8s | [DigitalOcean](#🌊-digitalocean-kubernetes) | `--deployment-type=digitalocean-k8s` |\n| other-k8s        | [Other Kubernetes](#☸️-other-kubernetes)    | `--deployment-type=other-k8s`        |\n\n#### Terraform backend\n\n| Name            | Argument                              |\n| --------------- | ------------------------------------- |\n| Terraform Cloud | `--terraform-backend=terraform-cloud` |\n| GitLab          | `--terraform-backend=gitlab`          |\n\n##### Terraform Cloud required argument\n\n`--terraform-cloud-hostname=app.terraform.io`\u003cbr/\u003e\n`--terraform-cloud-token={{terraform-cloud-token}}`\u003cbr/\u003e\n`--terraform-cloud-organization`\n\n##### Terraform Cloud create organization\n\n`--terraform-cloud-organization-create`\u003cbr/\u003e\n`--terraform-cloud-admin-email={{terraform-cloud-admin-email}}`\n\nDisabled args\n`--terraform-cloud-organization-create-skip`\n\n#### Environments distribution\n\nChoose the environments distribution:\nValue | Description | Argument\n------------- | ------------- | -------------\n1 | All environments share the same stack (Default) | `--environments-distribution=1`\n2 | Dev and Stage environments share the same stack, Prod has its own | `--environments-distribution=2`\n3 | Each environment has its own stack | `--environments-distribution=3`\n\n#### Project Domain\n\nIf you don't want DigitalOcean DNS configuration the following args are required\n\n`--project-url-dev=https://dev.project-domain.com`\u003cbr/\u003e\n`--project-url-stage=https://stage.project-domain.com`\u003cbr/\u003e\n`--project-url-prod=https://www.project-domain.com`\n\n#### Media storage\n\n| Value           | Description                                 | Argument                                     |\n| --------------- | ------------------------------------------- | -------------------------------------------- |\n| digitalocean-s3 | DigitalOcean Spaces are used to store media | [DigitalOcean Media storage](#media-storage) |\n| aws-s3          | AWS S3 are used to store media              | `--media-storage=aws-s3`                     |\n| local           | Docker Volume are used to store media       | `--media-storage=local`                      |\n| none            | Project have no media                       | `--media-storage=none`                       |\n\n### 🌊 DigitalOcean Kubernetes\n\n[DigitalOcean API Slugs](https://slugs.do-api.dev/)\n[DigitalOcean Database Slugs](https://docs.digitalocean.com/reference/api/api-reference/#tag/Databases)\n\n#### DigitalOcean Token\n\n`--digitalocean-token={{digitalocean-token}}`\n\n#### Media storage\n\n`--media-storage=digitalocean-s3`\u003cbr/\u003e\n`--spaces-bucket-region=fra1`\u003cbr/\u003e\n`--spaces-access-id`\u003cbr/\u003e\n`--spaces-secret-key`\n\n#### Project Domain\n\nIf you want DigitalOcean DNS configuration the following args are required\n\n`--project-domain=project-domain.com`\u003cbr/\u003e\n`--subdomain-dev=dev`\u003cbr/\u003e\n`--subdomain-stage=test`\u003cbr/\u003e\n`--subdomain-prod=www`\n\n#### Kubernetes cluster DigitalOcean region\n\n`\"--digitalocean-k8s-cluster-region=fra1`\n\n#### Database cluster DigitalOcean region\n\n`\"--digitalocean-database-cluster-region=fra1`\n\n#### Database cluster DigitalOcean node size\n\n`\"--digitalocean-database-cluster-node-size=db-s-1vcpu-2gb`\n\n#### Monitoring\n\nFor enabling monitoring the following arguments are needed:\n\nif project domain is managed use\n\n`--subdomain-monitoring=logs`\n\nelse use\n\n`--project-url-monitoring=https://logs.example.org/`\n\n#### Redis\n\nFor enabling redis integration the following arguments are needed:\n\n`--use-redis`\u003cbr/\u003e\n`--digitalocean-redis-cluster-region=fra1`\u003cbr/\u003e\n`--digitalocean-redis-cluster-node-size=db-s-1vcpu-2gb`\n\nDisabled args\n`--no-redis`\n\n### ☸️ Other Kubernetes\n\n#### Kubernetes cluster CA certificate\n\n`--kubernetes-cluster-ca-certificate={{absolute-path-to-certificate}}`\n\n#### Kubernetes host\n\n`--kubernetes-host={{kubernetes-host-url}}`\n\n#### Kubernetes token\n\n`--kubernetes-token={{kubernetes-token}}`\n\n#### Postgres\n\n`--postgres-image=postgres:14`\n`--postgres-persistent-volume-capacity=10Gi`\n`--postgres-persistent-volume-claim-capacity=\"\"`\n`--postgres-persistent-volume-host-path={{postgres-persistent-volume-host-path}}`\n\n#### Redis\n\n`--redis-image=redis:6.2`\n\n### 🦊 GitLab\n\n\u003e **⚠️ Important: Make sure the GitLab group exists before creating.** \u003e https://gitlab.com/gitlab-org/gitlab/-/issues/244345\n\nFor enabling gitlab integration the following arguments are needed:\n\n`--gitlab-private-token={{gitlab-private-token}}`\u003cbr/\u003e\n`--gitlab-group-slug={{gitlab-group-slug}}`\n\nAdd user to repository using comma separeted arguments\n\n`--gitlab-group-owners=user1, user@example.org`\u003cbr/\u003e\n`--gitlab-group-maintainers=user1, user@example.org`\u003cbr/\u003e\n`--gitlab-group-developers=user1, user@example.org`\n\n#### 👨‍⚖️ Pact\n\nFor enabling pact the following arguments are needed:\n\n`--pact-broker-url={{pact-broker-url}}`\u003cbr/\u003e\n`--pact-broker-username={{pact-broker-username}}`\u003cbr/\u003e\n`--pact-broker-password={{pact-broker-password}}`\n\n#### 🪖 Sentry\n\nFor enabling sentry integration the following arguments are needed:\n\n`--sentry-url=https://sentry.io/`\u003cbr/\u003e\n`--sentry-org={{sentry-org}}`\u003cbr/\u003e\n`--sentry-auth-token={{sentry-auth-token}}`\n\nIf the project has a backend service, the following argument is needed:\n\n`--backend-sentry-dsn={{backend-sentry-dsn}}`\n\nIf the project has a frontend service, the following argument is needed:\n\n`--frontend-sentry-dsn={{frontend-sentry-dsn}}`\n\n#### 🔇 Quiet\n\nNo confirmations shown.\n\n`--quiet`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20tab%2Ftalos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F20tab%2Ftalos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20tab%2Ftalos/lists"}