Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into CU-86894qp5d-pn-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ronardcaktus committed Aug 15, 2024
2 parents 96ddf6f + 42326d3 commit 98c1f57
Show file tree
Hide file tree
Showing 12 changed files with 264 additions and 168 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Lint and Test code

on:
pull_request:
schedule:
# run once a week on early monday mornings
- cron: '22 2 * * 1'
push:
branches: [main, develop]

jobs:
test:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ RUN groupadd --gid $USER_GID $USERNAME \
# openssh-client -- for git over SSH
# sudo -- to run commands as superuser
# vim -- enhanced vi editor for commits
ENV KUBE_CLIENT_VERSION="v1.25.10"
ENV HELM_VERSION="3.12.0"
ENV KUBE_CLIENT_VERSION="v1.29.3"
ENV HELM_VERSION="3.14.4"
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
--mount=type=cache,mode=0755,target=/root/.cache/pip \
set -ex \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ These instructions assume that you will be working with dockerized services.
First add the following line to your `.env` file:
```sh
(hip)$ echo "DATABASE_URL=postgres://[email protected]:5433/hip" >> .env
(hip)$ echo "DATABASE_URL=postgres://[email protected]:5432/hip" >> .env
```
The `docker-compose.yml` sets up environment variables in a file, ``.postgres``.
Expand Down
57 changes: 33 additions & 24 deletions apps/reports/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,28 @@ def test_datareportslistpage_context_only_external_reports(db, rf):
"last_updated": date(year=2021, month=1, day=1),
"external": True,
}
external_reports_data = [
{
"type": "external_reports", # Block type
"value": {
"title": external_report_hiv["title"],
"url": external_report_hiv["url"],
"update_frequency": external_report_hiv["update_frequency"],
"last_updated": external_report_hiv["last_updated"],
},
},
{
"type": "external_reports",
"value": {
"title": external_report_hep_a["title"],
"url": external_report_hep_a["url"],
"update_frequency": external_report_hep_a["update_frequency"],
"last_updated": external_report_hep_a["last_updated"],
},
},
]
reports_list_page = DataReportListPageFactory(
external_reports__0__external_reports__title=external_report_hiv["title"],
external_reports__0__external_reports__url=external_report_hiv["url"],
external_reports__0__external_reports__update_frequency=external_report_hiv[
"update_frequency"
],
external_reports__0__external_reports__last_updated=external_report_hiv[
"last_updated"
],
external_reports__1__external_reports__title=external_report_hep_a["title"],
external_reports__1__external_reports__url=external_report_hep_a["url"],
external_reports__1__external_reports__update_frequency=external_report_hep_a[
"update_frequency"
],
external_reports__1__external_reports__last_updated=external_report_hep_a[
"last_updated"
],
external_reports=external_reports_data
)

context = reports_list_page.get_context(rf.get("/someurl/"))
Expand All @@ -127,15 +132,19 @@ def test_datareportslistpage_context_internal_and_external_reports(db, rf):
"last_updated": "2021-01-01",
"external": True,
}
external_reports_data = [
{
"type": "external_reports",
"value": {
"title": external_report_hiv["title"],
"url": external_report_hiv["url"],
"update_frequency": external_report_hiv["update_frequency"],
"last_updated": external_report_hiv["last_updated"],
},
},
]
reports_list_page = DataReportListPageFactory(
external_reports__0__external_reports__title=external_report_hiv["title"],
external_reports__0__external_reports__url=external_report_hiv["url"],
external_reports__0__external_reports__update_frequency=external_report_hiv[
"update_frequency"
],
external_reports__0__external_reports__last_updated=external_report_hiv[
"last_updated"
],
external_reports=external_reports_data
)
# Create some internal reports (DataReportDetailPages) for the DataReportListPage.
tuberculosis = DiseaseAndConditionDetailPageFactory(title="Tuberculosis")
Expand Down
7 changes: 4 additions & 3 deletions deploy/deploy-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
tasks:
- name: Add AWS for fluent bit helm chart (centralized logging)
tags: fluentbit
community.kubernetes.helm:
kubernetes.core.helm:
context: "{{ k8s_context|mandatory }}"
kubeconfig: "{{ k8s_kubeconfig }}"
chart_repo_url: "https://aws.github.io/eks-charts"
Expand All @@ -29,7 +29,7 @@
wait: yes
- name: Create Amazon CloudWatch Metrics namespace
tags: cloudwatch
community.kubernetes.k8s:
kubernetes.core.k8s:
context: "{{ k8s_context|mandatory }}"
kubeconfig: "{{ k8s_kubeconfig }}"
name: "{{ k8s_aws_cloudwatch_metrics_namespace }}"
Expand All @@ -38,7 +38,7 @@
state: present
- name: Add AWS CloudWatch Metrics helm chart (monitoring)
tags: cloudwatch
community.kubernetes.helm:
kubernetes.core.helm:
context: "{{ k8s_context|mandatory }}"
kubeconfig: "{{ k8s_kubeconfig }}"
chart_repo_url: "https://aws.github.io/eks-charts"
Expand All @@ -54,6 +54,7 @@
tags: cloudwatch
amazon.aws.cloudwatch_metric_alarm:
state: present
aws_profile: "{{ aws_profile }}"
region: us-east-1
name: "{{ item.name }}"
description: "{{ item.description }}"
Expand Down
10 changes: 5 additions & 5 deletions deploy/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@ cloudformation_stack:
k8s_cluster_type: aws
# aws eks describe-cluster --name=philly-hip-stack-cluster --query 'cluster.arn'
k8s_context: "arn:aws:eks:us-east-1:061553509755:cluster/{{ cluster_name }}"
k8s_ingress_nginx_chart_version: "4.6.0"
k8s_cert_manager_chart_version: "v1.11.1"
k8s_ingress_nginx_chart_version: "4.9.1"
k8s_cert_manager_chart_version: "v1.14.3"
k8s_letsencrypt_email: [email protected]
k8s_iam_users: [noop] # https://github.com/caktus/ansible-role-k8s-web-cluster/issues/17
# aws-for-fluent-bit
# - https://github.com/aws/eks-charts/tree/master/stable/aws-for-fluent-bit
# - https://artifacthub.io/packages/helm/aws/aws-for-fluent-bit
k8s_aws_fluent_bit_chart_version: "0.1.18"
k8s_aws_fluent_bit_chart_version: "0.1.32"
# aws-cloudwatch-metrics:
# - https://github.com/aws/eks-charts/tree/master/stable/aws-cloudwatch-metrics
# - https://artifacthub.io/packages/helm/aws/aws-cloudwatch-metrics
k8s_aws_cloudwatch_metrics_chart_version: "0.0.9"
k8s_aws_cloudwatch_metrics_chart_version: "0.0.11"
k8s_aws_cloudwatch_metrics_namespace: amazon-cloudwatch

# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -211,7 +211,7 @@ k8s_install_descheduler: yes
# You must set the k8s_descheduler_chart_version to match the Kubernetes
# node version (0.23.x -> K8s 1.23.x); see:
# https://github.com/kubernetes-sigs/descheduler#compatibility-matrix
k8s_descheduler_chart_version: v0.25.2
k8s_descheduler_chart_version: v0.29.0
# See values.yaml for options:
# https://github.com/kubernetes-sigs/descheduler/blob/master/charts/descheduler/values.yaml#L63
k8s_descheduler_release_values:
Expand Down
4 changes: 2 additions & 2 deletions deploy/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
- src: https://github.com/caktus/ansible-role-aws-web-stacks
name: caktus.aws-web-stacks
- src: https://github.com/caktus/ansible-role-k8s-web-cluster
version: v1.5.0
version: v1.6.0
name: caktus.k8s-web-cluster
# Note: caktus.django-k8s version 1.4.0 has been released, but deploys fail due to issue:
# msg: Failed to find exact match for rabbitmq.com/v1beta1.RabbitmqCluster by [kind, name, singularName, shortNames]
- src: https://github.com/caktus/ansible-role-django-k8s
name: caktus.django-k8s
version: v1.6.0
version: v1.9.0
- src: https://github.com/caktus/ansible-role-k8s-hosting-services
name: caktus.k8s-hosting-services
version: v0.12.0
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
args:
USER_UID: ${USER_UID:-1000}
USER_GID: ${USER_GID:-1000}
command: ["sleep", "infinity"]
command: [ "sleep", "infinity" ]
links:
- db:db
ports:
Expand Down
4 changes: 2 additions & 2 deletions requirements/base/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ django-sass-processor
django-phonenumber-field
django-honeypot
whitenoise
boto3==1.28.4
botocore==1.31.4
boto3==1.34.104
botocore==1.34.104
libsass
phonenumberslite
pdfid
Expand Down
6 changes: 3 additions & 3 deletions requirements/base/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ asgiref==3.3.4
# via django
beautifulsoup4==4.8.2
# via wagtail
boto3==1.28.4
boto3==1.34.104
# via -r requirements/base/base.in
botocore==1.31.4
botocore==1.34.104
# via
# -r requirements/base/base.in
# boto3
Expand Down Expand Up @@ -152,7 +152,7 @@ requests-oauthlib==1.3.0
# via social-auth-core
rjsmin==1.1.0
# via django-compressor
s3transfer==0.6.1
s3transfer==0.10.1
# via boto3
six==1.15.0
# via
Expand Down
6 changes: 3 additions & 3 deletions requirements/dev/dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ ansible==10.2.0
invoke-kubesae==0.1.0

# AWS tools
awscli==1.29.4
awscli==1.32.104
awslogs
Jinja2==3.0.3
openshift==0.12
openshift==0.13.2
kubernetes==12.0.0
kubernetes-validate~=1.25.0
kubernetes-validate~=1.29.1

pre-commit
coverage
Expand Down
Loading

0 comments on commit 98c1f57

Please sign in to comment.