Commit 69a57101 authored by totte's avatar totte
Browse files

Move remainder of tasks to issue tracker, consolidate information

parent f924e623
......@@ -15,5 +15,4 @@ nginx.conf
nginx.production.conf
nginx.staging.conf
README.md
CONTRIBUTING.md
db.sqlite3
# Development
## Using the Django development server
- File
- Settings
- Build, Execution, Deployment
- Console
- Python Console
- DEBUG=true
- SECRET_KEY=somethinglong
- ALLOWED_HOSTS=127.0.0.1,localhost
- Django Console
- DEBUG=true
- SECRET_KEY=somethinglong
- ALLOWED_HOSTS=127.0.0.1,localhost
- Run
- Edit Configurations
- Django server
- DEBUG=true
- SECRET_KEY=somethinglong
- ALLOWED_HOSTS=127.0.0.1,localhost
## Using Docker
- Run
- Edit Configurations
- Docker
- `./docker-compose.override.yml; ./docker-compose.yml;`
`.env` file required
# Deployment
## Staging
`.env` file required
## Production
`.env` file required
# Tools
# Requirements
## VCS
- git
## IDE
- PyCharm Professional
- Docker integration plugin
## CI/CD
- GitLab EE (with CI/CD, Runner (docker executor) and Registry)
- Git
- Docker
- Docker Compose
## Languages & libraries
- Python 3 (https://hub.docker.com/_/python)
- Pipenv
- Django
- Gunicorn
## Other
- Nginx (separate, custom-built container, https://hub.docker.com/_/nginx)
- Redis (separate container, https://hub.docker.com/_/redis)
- PostgreSQL (separate container, https://hub.docker.com/_/postgres)
## Integrations
- certbot
- Fastly
- Datadog
- Sentry
----
GitLab EE settings
## General
### General project
- Project name: Mélange
- Project description: None
- Topics: python, django, postgresql, docker, gunicorn, nginx, redis
### Permissions
- Project visibility: Public
- Issues: Yes
- Repository: Yes
- Merge requests: Yes
- Pipelines: Yes
- Container registry: Yes
- Git Large File Storage: No
- Packages: No
- Wiki: No
- Snippets: No
### Issue settings
- Default description template for issues: None
### Merge request
- Merge method: Fast-forward merge
- Default description template for merge requests: None
- Only allow merge requests to be merged if the pipeline succeeds
- Only allow merge requests to be merged if all discussions are resolved
- Automatically resolve merge request diff discussions when they become outdated
- Show link to create/view merge request when pushing from the command line
### Merge request approvals
- Approvers: totte
- Approvals required: 1
- Can override approvers and approvals required per merge request
- Remove all approvals in a merge request when new commits are pushed to its source branch
- Enable self approval of merge requests
### Service desk
- Enabled
### Badges
- TODO
## Integrations
- TODO (GitLab Matrix bot)
## Repository
### Default branch
Default branch: master
### Push rules
- Committer restriction
- Do not allow users to remove git tags with `git push`
- Check whether author is a GitLab user
- Prevent committing secrets to Git
### Mirroring repositories
- None
### Protected branches
- master, Maintainers, Maintainers
### Protected tags
- *, Maintainers
### Deploy keys
- None
### Deploy tokens
- Yes
## CI/CD
### General pipelines
- git fetch
- Timeout 1h
- Public pipelines
- Auto-cancel redundant, pending pipelines
- Pipeline status: master
- Coverage report: master
### Auto DevOps
- False
### Protected Environments
- production, Maintainers
### Runners
- docker executors needed
### Environment variables
- DATABASE_URL
- DEBUG (production)
- SECRET_KEY
- SSH_KNOWN_HOSTS
- SSH_PRIVATE_KEY
### Pipeline triggers
- None
### License Management
- None
## Operations
### Error Tracking
- Active
- Sentry API URL
- Auth Token
### Jaeger tracing
- Jaeger URL (none set)
----
# Fastly
- Mélange (www.chakralinux.org)
- Active, logging to Datadog
- Discourse (community.chakralinux.org)
- Active, logging to Datadog
- GitLab (code.chakralinux.org)
- Inactive
- CCR (ccr.chakralinux.org)
- Active, logging to Datadog
- Simple Machines Forum (it.chakralinux.org)
- Active, logging to Datadog
# Datadog
- Fastly logs
- ditto
- agent installed
- /var/log/nginx/www.chakralinux.org_access.log
- /var/log/nginx/www.chakralinux.org_error.log
- /var/log/nginx/it.chakralinux.org_access.log
- /var/log/nginx/it.chakralinux.org_error.log
- squirtle
- agent installed
- /var/discourse/shared/standalone/log/var-log/nginx/access.log
- /var/discourse/shared/standalone/log/var-log/nginx/error.log
- /var/discourse/shared/standalone/log/var-log/nginx/access.letsencrypt.log
- /var/discourse/shared/standalone/log/var-log/nginx/error.letsencrypt.log
- /var/discourse/shared/standalone/log/var-log/postgres/current
- Discourse (/etc/datadog-agent/conf.d/discourse.d/conf.yaml)
- /var/discourse/shared/standalone/log/rails/production_errors.log
- /var/discourse/shared/standalone/log/rails/production.log
- bulbasaur
- agent installed, integrated with GitLab/Prometheus
- charmander
- agent installed
- cubone
- agent installed
- pikachu & raichu
- agent only packaged for amd64, not installed!
# Sentry
# Statuspage.io
- https://status.chakralinux.org/
- www.chakralinux.org
- community.chakralinux.org
- code.chakralinux.org
- ccr.chakralinux.org - missing!
- it.chakralinux.org - missing!
- CDN (Fastly)
- CSS (AWS)
- EDS (Mailgun)
# Mailgun
- Outgoing: noreply@m.chakralinux.org
# Gandi
- Incoming: code@chakra.email
- Incoming: community@chakra.email
# GitLab (operations)
- Metrics: Prometheus
- Tracing: Jaeger
- Error Tracking: Sentry
----
Submit feature request to JetBrains for support of authentication to self-hosted GitLab (Docker) Registry when 2FA is
enabled, and access tokens need to be used. See https://code.chakralinux.org/profile/personal_access_tokens,
https://docs.gitlab.com/ee/user/project/container_registry.html#build-and-push-images-using-gitlab-ci.
----
- Docker Compose
- PyCharm Professional
- Docker integration plugin
- Python 3
# Workflow
......@@ -216,26 +29,37 @@ https://docs.gitlab.com/ee/user/project/container_registry.html#build-and-push-i
Add [release notes](https://docs.gitlab.com/ee/workflow/releases.html), and use
[semantic versioning](https://semver.org/).
## CI
(TODO)
- On push to all branches except for `master`:
- **test source**
- On push to `master`:
- **build image**
- **test image**
- **release** (tag images as `latest`)
- **deploy** `latest` images to staging.chakralinux.org
- On pushing tag to `master`:
- **release** (tag `latest` images as `$CI_COMMIT_TAG`)
- **deploy** `$CI_COMMIT_TAG` images to www.chakralinux.org
----
Advice for using Docker:
# Settings for the Django development server
- File
- Settings
- Build, Execution, Deployment
- Console
- Python Console
- `DEBUG=true`
- `SECRET_KEY=somethinglong`
- `ALLOWED_HOSTS=127.0.0.1,localhost`
- Django Console
- `DEBUG=true`
- `SECRET_KEY=somethinglong`
- `ALLOWED_HOSTS=127.0.0.1,localhost`
- Run
- Edit Configurations
- Django server
- `DEBUG=true`
- `SECRET_KEY=somethinglong`
- `ALLOWED_HOSTS=127.0.0.1,localhost`
## Settings for Docker
- Run
- Edit Configurations
- Docker
- `./docker-compose.override.yml; ./docker-compose.yml;`
- `.env` file required
# Advice for using Docker
- 1 application or service = 1 container
- Run process in foreground (don’t use `systemd`, `upstart` or any other similar tools)
- Use volumes for persistent data (outside of a container lifetime).
- Use of `docker exec` is preferred to `ssh` for accessing a container.
- Avoid manual changes inside a container – keep it in `docker-compose.yml` or `Dockerfile` for the sake of consistency.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment