Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure sanchogov.tools sub-domain for the analytics service #849

Closed
MSzalowski opened this issue Apr 23, 2024 · 2 comments · Fixed by #868
Closed

Configure sanchogov.tools sub-domain for the analytics service #849

MSzalowski opened this issue Apr 23, 2024 · 2 comments · Fixed by #868

Comments

@MSzalowski
Copy link
Contributor

MSzalowski commented Apr 23, 2024

Why

To provide access to the analytics under one domain tree.

What

Configure sanchogov.tools sub-domain called participation - participation.sanchogov.tools

Setup infra (on the current govtool infrastructure) for the https://github.com/intersectMBO/govtool-analytics-dashboard

@MSzalowski
Copy link
Contributor Author

MSzalowski commented Apr 24, 2024

@placek Please write below the requirements for setting the infra such as secrets, details regarding the environment, and so on.

@placek placek self-assigned this Apr 24, 2024
@placek
Copy link
Contributor

placek commented Apr 24, 2024

Requirements:

  • Secrets set for each required ENV;
  • The address of a registry where you want to push docker images to (if such registry is present);
  • Extensive information on what are the services required to fully support that dashboard: what is externaly required, what internal services it depends on…
  • Who and how should be able to access that dashboard.

@placek placek moved this from To do to In progress in Govtool all Apr 24, 2024
adgud added a commit that referenced this issue Apr 24, 2024
This adds Terraform code that creats "participation" subdomains for each environments.
The exception is the beta environment, where DNS records are not handled with TF,
but need to be created manually.
adgud added a commit that referenced this issue Apr 24, 2024
This adds Terraform code that creats "participation" subdomains for each environments.
The exception is the beta environment, where DNS records are not handled with TF,
but need to be created manually.
@adgud adgud self-assigned this Apr 24, 2024
placek added a commit that referenced this issue Apr 24, 2024
[#849] Configure sanchogov.tools sub-domain for the analytics service
placek added a commit that referenced this issue Apr 24, 2024
Moved the Makefiles from various directories to the scripts directory
for better organization and consistency. Renamed the Makefiles
accordingly and updated the references within other files to use the new
paths in the scripts directory. This restructuring helps in streamlining
the build processes and eases maintenance tasks related to the make
files.
placek added a commit that referenced this issue Apr 24, 2024
…for scripts and infrastructure to meet the requirements stated in the
terraform configuration

In this commit, changes have been made to the `flake.nix` file to
utilize a more recent version of nixpkgs for both scripts and
infrastructure. The modifications ensure that the scripts and
infrastructure align with the specified requirements in the terraform
configuration. Specifically, the nodePkgs import has been updated to
allow unfree packages, and the packages.scripts and packages.infra
sections have been adjusted to utilize the nodePkgs instead of
defaultPkgs. This adjustment guarantees that the scripts and
infrastructure components are in line with the necessary configurations,
enhancing compatibility and meeting the user story's demands.
placek added a commit that referenced this issue Apr 24, 2024
A registry has been incorporated for the analytics-dashboard module
within the Terraform configuration. This modification introduces a new
module named "govtool-ecr-analytics-dashboard" sourced from
"./modules/ecr" with the repository name set to "analytics-dashboard."
By including this new module, the analytics-dashboard component is now
integrated into the infrastructure setup, aligning with the user story's
objective of configuring the sanchogov.tools sub-domain for the
analytics service.
placek added a commit that referenced this issue Apr 24, 2024
Included a target in the Makefile to facilitate the creation of a Docker
image for the analytics-dashboard component. This addition enables the
generation and pushing of the analytics-dashboard Docker image as part
of the deployment process. By introducing this functionality, the build
process now encompasses the analytics-dashboard, supporting the user
story's aim of configuring the sanchogov.tools sub-domain for the
analytics service.
placek added a commit that referenced this issue Apr 25, 2024
This commit enforces GitHub workflows to fetch submodules, ensuring that
the necessary dependencies are retrieved to build the
`analytics-dashboard`. By setting the `submodules` flag to `true` in the
workflows for beta, dev, staging, and test environments, the
actions/checkout step will now fetch the submodules as part of the build
process. This adjustment allows for the successful inclusion of the
analytics-dashboard submodule in the deployment workflow, aligning with
the user story's goal of configuring the `sanchogov.tools` sub-domain
for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
…ation

Include essential environment variables in the deployment configuration
for beta, dev, staging, and test environments. New environment variables
such as `NEXT_PUBLIC_GA4_PROPERTY_ID`, `GA_CLIENT_EMAIL`,
`GA_PRIVATE_KEY`, `GOOGLE_APPLICATION_CREDENTIALS`,
`SENTRY_IGNORE_API_RESOLUTION_ERROR`, and `NEXT_PUBLIC_API_URL` have
been added to the workflow files, enabling the successful deployment and
integration of the analytics-dashboard submodule. By introducing these
environment variables, the deployment process is now equipped with
essential information required for analytics functionality, aligning
with the user story's goal of configuring the `sanchogov.tools`
sub-domain for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
Include a new service, analytics-dashboard, in the Docker Compose
configuration file located at
scripts/govtool/config/templates/docker-compose.yml.tpl. This addition
introduces the analytics-dashboard service to the existing setup,
allowing the service to be deployed as part of the infrastructure. The
analytics-dashboard service is configured with necessary environment
variables such as NEXT_PUBLIC_GA4_PROPERTY_ID,
GOOGLE_APPLICATION_CREDENTIALS, GA_CLIENT_EMAIL, GA_PRIVATE_KEY,
SENTRY_IGNORE_API_RESOLUTION_ERROR, and NEXT_PUBLIC_API_URL to enable
proper functionality. The service's health is monitored through defined
health check parameters, ensuring its stability within the deployment
environment. By integrating the analytics-dashboard service into the
Docker Compose setup, the infrastructure aligns with the user story's
goal of configuring the sanchogov.tools sub-domain for the analytics
service.
placek added a commit that referenced this issue Apr 25, 2024
This commit enforces GitHub workflows to fetch submodules, ensuring that
the necessary dependencies are retrieved to build the
`analytics-dashboard`. By setting the `submodules` flag to `true` in the
workflows for beta, dev, staging, and test environments, the
actions/checkout step will now fetch the submodules as part of the build
process. This adjustment allows for the successful inclusion of the
analytics-dashboard submodule in the deployment workflow, aligning with
the user story's goal of configuring the `sanchogov.tools` sub-domain
for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
…ation

Include essential environment variables in the deployment configuration
for beta, dev, staging, and test environments. New environment variables
such as `NEXT_PUBLIC_GA4_PROPERTY_ID`, `GA_CLIENT_EMAIL`,
`GA_PRIVATE_KEY`, `GOOGLE_APPLICATION_CREDENTIALS`,
`SENTRY_IGNORE_API_RESOLUTION_ERROR`, and `NEXT_PUBLIC_API_URL` have
been added to the workflow files, enabling the successful deployment and
integration of the analytics-dashboard submodule. By introducing these
environment variables, the deployment process is now equipped with
essential information required for analytics functionality, aligning
with the user story's goal of configuring the `sanchogov.tools`
sub-domain for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
Include a new service, analytics-dashboard, in the Docker Compose
configuration file located at
scripts/govtool/config/templates/docker-compose.yml.tpl. This addition
introduces the analytics-dashboard service to the existing setup,
allowing the service to be deployed as part of the infrastructure. The
analytics-dashboard service is configured with necessary environment
variables such as NEXT_PUBLIC_GA4_PROPERTY_ID,
GOOGLE_APPLICATION_CREDENTIALS, GA_CLIENT_EMAIL, GA_PRIVATE_KEY,
SENTRY_IGNORE_API_RESOLUTION_ERROR, and NEXT_PUBLIC_API_URL to enable
proper functionality. The service's health is monitored through defined
health check parameters, ensuring its stability within the deployment
environment. By integrating the analytics-dashboard service into the
Docker Compose setup, the infrastructure aligns with the user story's
goal of configuring the sanchogov.tools sub-domain for the analytics
service.
placek added a commit that referenced this issue Apr 25, 2024
Moved the Makefiles from various directories to the scripts directory
for better organization and consistency. Renamed the Makefiles
accordingly and updated the references within other files to use the new
paths in the scripts directory. This restructuring helps in streamlining
the build processes and eases maintenance tasks related to the make
files.
placek added a commit that referenced this issue Apr 25, 2024
…for scripts and infrastructure to meet the requirements stated in the
terraform configuration

In this commit, changes have been made to the `flake.nix` file to
utilize a more recent version of nixpkgs for both scripts and
infrastructure. The modifications ensure that the scripts and
infrastructure align with the specified requirements in the terraform
configuration. Specifically, the nodePkgs import has been updated to
allow unfree packages, and the packages.scripts and packages.infra
sections have been adjusted to utilize the nodePkgs instead of
defaultPkgs. This adjustment guarantees that the scripts and
infrastructure components are in line with the necessary configurations,
enhancing compatibility and meeting the user story's demands.
placek added a commit that referenced this issue Apr 25, 2024
A registry has been incorporated for the analytics-dashboard module
within the Terraform configuration. This modification introduces a new
module named "govtool-ecr-analytics-dashboard" sourced from
"./modules/ecr" with the repository name set to "analytics-dashboard."
By including this new module, the analytics-dashboard component is now
integrated into the infrastructure setup, aligning with the user story's
objective of configuring the sanchogov.tools sub-domain for the
analytics service.
placek added a commit that referenced this issue Apr 25, 2024
Included a target in the Makefile to facilitate the creation of a Docker
image for the analytics-dashboard component. This addition enables the
generation and pushing of the analytics-dashboard Docker image as part
of the deployment process. By introducing this functionality, the build
process now encompasses the analytics-dashboard, supporting the user
story's aim of configuring the sanchogov.tools sub-domain for the
analytics service.
placek added a commit that referenced this issue Apr 25, 2024
…ation

Include essential environment variables in the deployment configuration
for beta, dev, staging, and test environments. New environment variables
such as `NEXT_PUBLIC_GA4_PROPERTY_ID`, `GA_CLIENT_EMAIL`,
`GA_PRIVATE_KEY`, `GOOGLE_APPLICATION_CREDENTIALS`,
`SENTRY_IGNORE_API_RESOLUTION_ERROR`, and `NEXT_PUBLIC_API_URL` have
been added to the workflow files, enabling the successful deployment and
integration of the analytics-dashboard submodule. By introducing these
environment variables, the deployment process is now equipped with
essential information required for analytics functionality, aligning
with the user story's goal of configuring the `sanchogov.tools`
sub-domain for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
Include a new service, analytics-dashboard, in the Docker Compose
configuration file located at
scripts/govtool/config/templates/docker-compose.yml.tpl. This addition
introduces the analytics-dashboard service to the existing setup,
allowing the service to be deployed as part of the infrastructure. The
analytics-dashboard service is configured with necessary environment
variables such as NEXT_PUBLIC_GA4_PROPERTY_ID,
GOOGLE_APPLICATION_CREDENTIALS, GA_CLIENT_EMAIL, GA_PRIVATE_KEY,
SENTRY_IGNORE_API_RESOLUTION_ERROR, and NEXT_PUBLIC_API_URL to enable
proper functionality. The service's health is monitored through defined
health check parameters, ensuring its stability within the deployment
environment. By integrating the analytics-dashboard service into the
Docker Compose setup, the infrastructure aligns with the user story's
goal of configuring the sanchogov.tools sub-domain for the analytics
service.
placek added a commit that referenced this issue Apr 25, 2024
Introduce a secret configuration for the analytics-dashboard service
within the Docker Compose setup. This modification includes the addition
of the `google-credentials.json` secret to enhance the security and
integrity of sensitive information utilized by the service. By
incorporating the secret, the analytics-dashboard service gains access
to the specified Google credentials, ensuring secure interactions with
external services and APIs, as mandated by the user story's requirement
to configure the `sanchogov.tools` sub-domain for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
In this commit, additional docker login commands were incorporated into
the target in the `common.mk` file located at `scripts/govtool`. These
new commands facilitate the authentication process for various
repository URLs, ensuring access to the necessary Docker images during
the build and deployment phases. With these additions, the script now
covers the login requirements for the `analytics-dashboard`, `backend`,
`frontend`, `metadata-validation`, and `status-service` repositories.
placek added a commit that referenced this issue Apr 25, 2024
Introduce a secret configuration for the analytics-dashboard service
within the Docker Compose setup. This modification includes the addition
of the `google-credentials.json` secret to enhance the security and
integrity of sensitive information utilized by the service. By
incorporating the secret, the analytics-dashboard service gains access
to the specified Google credentials, ensuring secure interactions with
external services and APIs, as mandated by the user story's requirement
to configure the `sanchogov.tools` sub-domain for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
Included a target in the Makefile to facilitate the creation of a Docker
image for the analytics-dashboard component. This addition enables the
generation and pushing of the analytics-dashboard Docker image as part
of the deployment process. By introducing this functionality, the build
process now encompasses the analytics-dashboard, supporting the user
story's aim of configuring the sanchogov.tools sub-domain for the
analytics service.
placek added a commit that referenced this issue Apr 25, 2024
…ation

Include essential environment variables in the deployment configuration
for beta, dev, staging, and test environments. New environment variables
such as `NEXT_PUBLIC_GA4_PROPERTY_ID`, `GA_CLIENT_EMAIL`,
`GA_PRIVATE_KEY`, `GOOGLE_APPLICATION_CREDENTIALS`,
`SENTRY_IGNORE_API_RESOLUTION_ERROR`, and `NEXT_PUBLIC_API_URL` have
been added to the workflow files, enabling the successful deployment and
integration of the analytics-dashboard submodule. By introducing these
environment variables, the deployment process is now equipped with
essential information required for analytics functionality, aligning
with the user story's goal of configuring the `sanchogov.tools`
sub-domain for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
Include a new service, analytics-dashboard, in the Docker Compose
configuration file located at
scripts/govtool/config/templates/docker-compose.yml.tpl. This addition
introduces the analytics-dashboard service to the existing setup,
allowing the service to be deployed as part of the infrastructure. The
analytics-dashboard service is configured with necessary environment
variables such as NEXT_PUBLIC_GA4_PROPERTY_ID,
GOOGLE_APPLICATION_CREDENTIALS, GA_CLIENT_EMAIL, GA_PRIVATE_KEY,
SENTRY_IGNORE_API_RESOLUTION_ERROR, and NEXT_PUBLIC_API_URL to enable
proper functionality. The service's health is monitored through defined
health check parameters, ensuring its stability within the deployment
environment. By integrating the analytics-dashboard service into the
Docker Compose setup, the infrastructure aligns with the user story's
goal of configuring the sanchogov.tools sub-domain for the analytics
service.
placek added a commit that referenced this issue Apr 25, 2024
In this commit, additional docker login commands were incorporated into
the target in the `common.mk` file located at `scripts/govtool`. These
new commands facilitate the authentication process for various
repository URLs, ensuring access to the necessary Docker images during
the build and deployment phases. With these additions, the script now
covers the login requirements for the `analytics-dashboard`, `backend`,
`frontend`, `metadata-validation`, and `status-service` repositories.
placek added a commit that referenced this issue Apr 25, 2024
Introduce a secret configuration for the analytics-dashboard service
within the Docker Compose setup. This modification includes the addition
of the `google-credentials.json` secret to enhance the security and
integrity of sensitive information utilized by the service. By
incorporating the secret, the analytics-dashboard service gains access
to the specified Google credentials, ensuring secure interactions with
external services and APIs, as mandated by the user story's requirement
to configure the `sanchogov.tools` sub-domain for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
…ation

Include essential environment variables in the deployment configuration
for beta, dev, staging, and test environments. New environment variables
such as `NEXT_PUBLIC_GA4_PROPERTY_ID`, `GA_CLIENT_EMAIL`,
`GA_PRIVATE_KEY`, `GOOGLE_APPLICATION_CREDENTIALS`,
`SENTRY_IGNORE_API_RESOLUTION_ERROR`, and `NEXT_PUBLIC_API_URL` have
been added to the workflow files, enabling the successful deployment and
integration of the analytics-dashboard submodule. By introducing these
environment variables, the deployment process is now equipped with
essential information required for analytics functionality, aligning
with the user story's goal of configuring the `sanchogov.tools`
sub-domain for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
Include a new service, analytics-dashboard, in the Docker Compose
configuration file located at
scripts/govtool/config/templates/docker-compose.yml.tpl. This addition
introduces the analytics-dashboard service to the existing setup,
allowing the service to be deployed as part of the infrastructure. The
analytics-dashboard service is configured with necessary environment
variables such as NEXT_PUBLIC_GA4_PROPERTY_ID,
GOOGLE_APPLICATION_CREDENTIALS, GA_CLIENT_EMAIL, GA_PRIVATE_KEY,
SENTRY_IGNORE_API_RESOLUTION_ERROR, and NEXT_PUBLIC_API_URL to enable
proper functionality. The service's health is monitored through defined
health check parameters, ensuring its stability within the deployment
environment. By integrating the analytics-dashboard service into the
Docker Compose setup, the infrastructure aligns with the user story's
goal of configuring the sanchogov.tools sub-domain for the analytics
service.
placek added a commit that referenced this issue Apr 25, 2024
In this commit, additional docker login commands were incorporated into
the target in the `common.mk` file located at `scripts/govtool`. These
new commands facilitate the authentication process for various
repository URLs, ensuring access to the necessary Docker images during
the build and deployment phases. With these additions, the script now
covers the login requirements for the `analytics-dashboard`, `backend`,
`frontend`, `metadata-validation`, and `status-service` repositories.
placek added a commit that referenced this issue Apr 25, 2024
Introduce a secret configuration for the analytics-dashboard service
within the Docker Compose setup. This modification includes the addition
of the `google-credentials.json` secret to enhance the security and
integrity of sensitive information utilized by the service. By
incorporating the secret, the analytics-dashboard service gains access
to the specified Google credentials, ensuring secure interactions with
external services and APIs, as mandated by the user story's requirement
to configure the `sanchogov.tools` sub-domain for the analytics service.
placek added a commit that referenced this issue Apr 25, 2024
…vtools-sub-domain-for-the-analytics-service

[#849] Configure sanchogov.tools sub-domain for the analytics service
@github-project-automation github-project-automation bot moved this from In progress to Done in Govtool all Apr 25, 2024
placek added a commit that referenced this issue Apr 25, 2024
In this commit, the docker-compose file was modified to include the
`google-credentials.json` file as a secret volume. This change was made
to ensure that the necessary Google credentials are available for the
analytics service running on the `participation.sanchogov.tools`
sub-domain. Including the `google-credentials.json` file in the
docker-compose configuration is crucial for the proper functioning of
the analytics dashboard service.
placek added a commit that referenced this issue Apr 25, 2024
In this commit, an argument (`NEXT_PUBLIC_API_URL`) was added to the
`Dockerfile` of the analytics-dasboard service. This change is necessary
to dynamically specify the API URL that the dashboard should connect to.
By introducing this build arg, the analytics dashboard service can now
adapt to different environments, like the
`participation.sanchogov.tools` sub-domain, as part of configuring the
analytics service under one domain tree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants