-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
2,206 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Set a Windows command prompt | ||
PROMPT=$P (Pipenv)$G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
# Python Environment | ||
/.venv/ | ||
|
||
# IDE Configuration | ||
/.idea/ | ||
**/.idea/ | ||
|
||
# Binaries (e.g., Helm, Packer, Terraform) | ||
/bin/ | ||
|
||
# Terraform Local State | ||
.terraform | ||
*.tfstate | ||
*.tfstate.backup | ||
*.tfstate.lock.info | ||
terraform.tfstate | ||
terraform.tfstate.backup | ||
terraform.tfstate.lock.info | ||
|
||
# Local Staging | ||
/.staging/ | ||
|
||
# Secrets, defined using /** so we can also define exceptions | ||
/secrets/** | ||
|
||
# Exception to create /secrets/server/prod | ||
!/secrets/client | ||
!/secrets/client/.gitignore | ||
!/secrets/configuration | ||
!/secrets/configuration/.gitignore | ||
!/secrets/tests | ||
!/secrets/tests/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
################################################################################ | ||
# Defines dependencies only for the top-level tasks. | ||
# Python-based sub-projects each include their own Pipfile. | ||
################################################################################ | ||
|
||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
pipenv = "*" | ||
requests = "*" | ||
|
||
[packages.aws-infrastructure] | ||
git = "https://github.com/fogies/aws-infrastructure.git" | ||
subdirectory = "aws_infrastructure" | ||
editable = true | ||
|
||
################################################################################ | ||
# When co-developing aws-infrastructure, helpful to point at a branch. | ||
################################################################################ | ||
# git = "https://github.com/<accountname>/aws-infrastructure.git" | ||
# ref = "<branchname>" | ||
################################################################################ | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_version = "3.9" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Dependency charts | ||
/charts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v2 | ||
type: application | ||
|
||
name: migraine-celery | ||
description: Infrastructure for migraine app deployment | ||
|
||
# Chart version, expected to follow Semantic Versioning <https://semver.org/> | ||
version: 0.1.0 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Dependency charts | ||
/charts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v2 | ||
type: application | ||
|
||
name: migraine-flask | ||
description: Infrastructure for migraine app deployment | ||
|
||
# Chart version, expected to follow Semantic Versioning <https://semver.org/> | ||
version: 0.1.0 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Dependency charts | ||
/charts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v2 | ||
type: application | ||
|
||
name: migraine-ingress | ||
description: Infrastructure for migraine app deployment | ||
|
||
# Chart version, expected to follow Semantic Versioning <https://semver.org/> | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# https://doc.traefik.io/traefik/middlewares/stripprefix/ | ||
|
||
apiVersion: 'traefik.containo.us/v1alpha1' | ||
kind: 'Middleware' | ||
|
||
metadata: | ||
name: 'ingress-couchdb-web-stripprefix-db' | ||
labels: | ||
app: 'migraine' | ||
|
||
spec: | ||
entryPoints: | ||
- 'web' | ||
stripPrefix: | ||
prefixes: | ||
- '/db' | ||
forceSlash: false | ||
|
||
--- | ||
|
||
# https://kubernetes.io/docs/concepts/services-networking/ingress/ | ||
# https://www.thebookofjoel.com/k3s-cert-manager-letsencrypt | ||
|
||
apiVersion: 'traefik.containo.us/v1alpha1' | ||
kind: 'IngressRoute' | ||
|
||
metadata: | ||
name: 'ingress-couchdb-web' | ||
labels: | ||
app: 'migraine' | ||
|
||
spec: | ||
routes: | ||
- kind: 'Rule' | ||
match: 'HostRegexp(`{any:.+}`) && PathPrefix(`/db/`)' | ||
priority: 10000 | ||
middlewares: | ||
- name: 'enable-cors' | ||
namespace: 'ingress-traefik' | ||
- name: 'ingress-couchdb-web-stripprefix-db' | ||
services: | ||
- kind: 'Service' | ||
name: 'migraine-database-svc-couchdb' | ||
port: 5984 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
repositories: | ||
# aws-infrastructure helm repository | ||
# | ||
# When developing charts that will later be merged, it can be helpful to instead point at a branch: | ||
# url: 'https://raw.githubusercontent.com/<account>/aws-infrastructure/<branch>/helm_repo/' | ||
- name: 'aws-infrastructure' | ||
url: 'https://raw.githubusercontent.com/fogies/aws-infrastructure/main/helm_repo/' | ||
|
||
- name: 'couchdb' | ||
url: 'https://apache.github.io/couchdb-helm' | ||
|
||
releases: | ||
# ingress-crd contains the CRDs required by ingress | ||
- name: 'ingress-crd' | ||
chart: 'aws-infrastructure/ingress-crd' | ||
version: '0.1.0' | ||
|
||
# ingress is then the actual ingress, including Traefik and cert-manager | ||
- name: 'ingress' | ||
chart: 'aws-infrastructure/ingress' | ||
version: '0.4.0' | ||
needs: | ||
- 'ingress-crd' | ||
|
||
# CouchDB instance | ||
- name: 'migraine-database' | ||
chart: 'couchdb/couchdb' | ||
version: '3.3.4' | ||
values: | ||
- './values/secrets_couchdb_generated.values.yaml' | ||
# adminUsername: 'XXXXXXXXXX' | ||
# adminPassword: 'XXXXXXXXXX' | ||
# cookieAuthSecret: 'XXXXXXXXXX' | ||
# couchdbConfig: | ||
# couchdb: | ||
# uuid: 'XXXXXXXXXX' | ||
- clusterSize: 3 | ||
image: | ||
repository: 'couchdb' | ||
tag: '3.2.0' | ||
pullPolicy: 'Always' | ||
resources: | ||
requests: | ||
cpu: 200m | ||
memory: 128Mi | ||
limits: | ||
cpu: 200m | ||
memory: 256Mi | ||
|
||
# migraine-celery | ||
# Installed from a local chart, managed in helmfile-config.yaml | ||
- name: 'migraine-celery' | ||
chart: './charts/migraine-celery.tgz' | ||
values: | ||
- './values/ecr_generated.values.yaml' | ||
|
||
# migraine-flask | ||
# Installed from a local chart, managed in helmfile-config.yaml | ||
- name: 'migraine-flask' | ||
chart: './charts/migraine-flask.tgz' | ||
values: | ||
- './values/ecr_generated.values.yaml' | ||
|
||
# migraine-ingress | ||
# Installed from a local chart, managed in helmfile-config.yaml | ||
- name: 'migraine-ingress' | ||
chart: './charts/migraine-ingress.tgz' | ||
needs: | ||
- 'ingress-crd' | ||
|
||
helmDefaults: | ||
# Prefer explicit management of CRDs via releases | ||
args: | ||
- '--skip-crds' | ||
|
||
# Prefer explicit errors | ||
missingFileHandler: 'Error' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Path to the Helmfile relative to location of this helmfile-config.yaml | ||
helmfile: 'helmfile.yaml' | ||
|
||
# Dependencies to be uploaded so they can be referenced as local files | ||
dependencies: | ||
- file: '../.staging/helm_repo/migraine-celery-0.1.0.tgz' | ||
destination: './charts/migraine-celery.tgz' | ||
- file: '../.staging/helm_repo/migraine-flask-0.1.0.tgz' | ||
destination: './charts/migraine-flask.tgz' | ||
- file: '../.staging/helm_repo/migraine-ingress-0.1.0.tgz' | ||
destination: './charts/migraine-ingress.tgz' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
REM Convenience script for activating Pipenv | ||
|
||
C:\Python39\Scripts\pipenv.exe run cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This file exists only to create directory structure. | ||
# Ignore rules for creating the directory structure are in the root .gitignore. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This file exists only to create directory structure. | ||
# Ignore rules for creating the directory structure are in the root .gitignore. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This file exists only to create directory structure. | ||
# Ignore rules for creating the directory structure are in the root .gitignore. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
celery = "*" | ||
|
||
[dev-packages] | ||
# Used by Celery filesystem broker in Windows development | ||
pypiwin32 = {version = "*", sys_platform = "== 'win32'"} | ||
# Dependencies of pypiwin32 must explicitly mark sys_platform per issue https://github.com/pypa/pipenv/issues/4117 | ||
pywin32 = {version = "*", sys_platform = "== 'win32'"} | ||
|
||
[requires] | ||
python_version = "3.9" |
Oops, something went wrong.