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

Test: #92 #82 #81 #97 #171 #172 #179

Closed
wants to merge 65 commits into from
Closed

Test: #92 #82 #81 #97 #171 #172 #179

wants to merge 65 commits into from

Conversation

jankun4 and others added 30 commits February 5, 2024 00:49
Accept optional DRepHash. When provided, filter out governance actions on which the given DRep has already voted on.
…o fix/75-multiple-instances-of-the-wallet-opening
Co-authored-by: Ryan Williams <[email protected]>
Signed-off-by: Igor Velickovic <[email protected]>
This commit updates the README.md file to align with the new backend/frontend
naming convention for the SanchoNet GovTool project, as part of the ongoing
effort detailed in ticket #85. Previously, the documentation links used the old
'vva-be' and 'vva-fe' naming, which is now replaced with 'backend' and 'frontend'
respectively. This change ensures consistency across our project documentation,
following the updates made by @adgud.
This commit involves updating the README.md files for both the backend and
frontend components of the GovTool project. These changes are part of the
ongoing efforts for ticket #85, ensuring that all references to the old 'vva-be'
and 'vva-fe' codenames are replaced with the new 'backend' and 'frontend'
naming convention. This is a continuation of the work done by @adgud, aiming to
maintain consistency across the project's documentation and directory structure.
This commit updates the DEPLOY.md documentation in the docs/operations folder,
as part of the work outlined in ticket #85. The purpose of these changes is to
ensure that our deployment documentation reflects the new naming convention.

Technical Details:
- Updated the reference in the AWS setup instructions, changing the directory path
  from `./src/terraform` to `./infra/terraform`.
  This reflects the new directory structure under the 'infra' directory.
In this commit, we're updating the docker-compose.yml file within the
scripts/govtool directory. This is in line with the ongoing efforts for
ticket #85, focusing on aligning all parts of our project with the new
backend/frontend naming convention. This update changes the build contexts
for both the backend and frontend services in the Docker Compose configuration,
replacing the outdated paths with the new ones that reflect our current project
structure. This is an important step to ensure consistency across all our
development and deployment tools.

Technical Details:
- The build context for the 'vva-be' service in docker-compose.yml was updated
  from `vva-be` to `../../govtool/backend`.
- Similarly, the build context for the 'vva-fe' service was changed from `vva-fe`
  to `../../govtool/frontend`.
This commit involves renaming various configuration files related to the backend
service of the GovTool project. The change is part of the ongoing work for
ticket #85, where we're aligning all aspects of the project with the new
backend/frontend naming convention. This update specifically targets the
configuration files, changing the 'vva-be' references to 'backend'.

Technical Details:
- Renamed the configuration file from `.github/vva-be-config.json` to
  `.github/backend-config.json`.
- Updated the configuration file paths in the scripts/govtool directory, changing
  from `scripts/govtool/config/secrets/vva-be-config.json` and
  `scripts/govtool/config/secrets/vva-be-config.json.tpl` to
  `scripts/govtool/config/secrets/backend-config.json` and
  `scripts/govtool/config/secrets/backend-config.json.tpl` respectively.
- In both the `docker-compose.yml` and `docker-compose.sanchonet.yml` files,
  updated the command and secrets sections to use the new `backend-config.json`
  file. This ensures that the Docker containers for the backend service use the
  correct configuration file when deployed.
- Updated the `prepare-config.sh` script to replace the old template path with
  the new `backend-config.json.tpl`, ensuring the script correctly generates the
  required configuration files for deployment and development environments.
This commit focuses on renaming container services in various Docker Compose
and Grafana configuration files as part of the efforts detailed in ticket #85.
The goal is to align all service names with the new backend/frontend naming
convention.

Technical Details:
- In the Grafana provisioning alerting configuration (alerting.yml), updated
  the Prometheus expression to use `backend@docker` instead of `vva-be@docker`.
  This change is crucial for accurate monitoring and alerting based on the
  new service names.
- Updated the Grafana dashboard configuration (vva.json), changing the Prometheus
  expression to reference `frontend@docker` instead of `vva-fe@docker`. This ensures
  that the dashboard accurately reflects the traffic and metrics for the frontend
  service.
- In both the `docker-compose.sanchonet.yml` and `docker-compose.yml` files,
  renamed the services from `vva-be` to `backend` and from `vva-fe` to `frontend`.
  This update affects how these services are referenced and managed within our
  Docker Compose environments, aligning them with the new project naming standards.
…rvices

This commit revises the Traefik configuration labels within our Docker Compose
files (docker-compose.yml and docker-compose.sanchonet.yml), as part of the
work specified in ticket #85. The aim is to replace the old 'vva-be' and 'vva-fe'
labels with 'backend' and 'frontend', in line with the new naming convention
adopted across the project.

Technical Details:
- In the `docker-compose.sanchonet.yml` file, updated all Traefik labels for
  the backend service, replacing 'vva-be' with 'backend'. This includes updates
  to router rules, middlewares, and service definitions.
- Similarly, updated the frontend service labels in the same file, changing
  'vva-fe' to 'frontend'. This change affects router rules and service
  definitions, ensuring the frontend service is correctly identified and
  routed by Traefik.
- Made analogous updates in the `docker-compose.yml` file, ensuring that local
  development environments also reflect these changes. This includes updating
  the Traefik labels for both the backend and frontend services to use the new
  service names.
This commit updates the volume mappings for the FakeDB database schema in the
docker-compose.yml file, as a part of the work detailed in ticket #85. The
modification is necessary to reflect the new backend/frontend naming convention
and directory structure in the GovTool project. Specifically, this change
ensures that the database initialization scripts for the FakeDB service are
correctly sourced from the updated locations within the project.

Technical Details:
- Changed the volume mappings for the FakeDB service within the
  docker-compose.yml file. The paths for the database initialization scripts
  'fakedbsync_users.sql' and 'schema6.sql' have been updated from
  `./vva-be/misc/...` to `../../govtool/backend/misc/...`.
- This update ensures that when the FakeDB service is started, it correctly
  locates and executes the initialization scripts stored in the new backend
  directory, maintaining the integrity and functionality of the development
  environment.
…docker compose

This commit changes the local domain names for the backend and frontend services
in the docker-compose.yml file, as part of the initiative in ticket #85. The
modification is aimed at aligning the local development environment with the
new backend/frontend naming convention. By updating the domain names, we ensure
that the local URLs used for accessing these services reflect the updated
project structure and naming standards.

Technical Details:
- Updated the Traefik router rule for the backend service. The local domain
  name is changed from `vva-be.localhost` to `backend-govtool.localhost`. This
  alteration is specified in the label `traefik.http.routers.backend.rule`.
- For the frontend service, updated the Traefik router rule to change its
  local domain from `vva-fe.localhost` to `frontend-govtool.localhost`. This
  change is reflected in the label `traefik.http.routers.frontend.rule`.
This commit updates the Makefile within the scripts/govtool directory to
reflect the new project naming conventions as outlined in ticket #85. The
change involves renaming the Docker Compose project from the old 'vva' prefix
to 'govtool'. This renaming is crucial to maintain consistency throughout
the project's infrastructure and deployment scripts, aligning them with
the updated naming standards.

Technical Details:
- Modified the Docker Compose commands in the Makefile. Changed the project
  name prefix in the `-p` (project name) option from `vva-$(env)-$(cardano_network)`
  to `govtool-$(env)-$(cardano_network)`. This affects both the `deploy-stack`
  and `toggle-maintenance` targets in the Makefile.
- These changes ensure that when deploying or managing the Docker Compose
  stacks, the correct, updated project name is used, which is vital for
  proper identification and management of the containers in different
  environments.
This commit focuses on updating the database name for the FakeDB service from 'vva' to 'govtool'. This change is made across various configuration files and workflows as part of the efforts described in ticket #85. The update is essential to ensure that the database name aligns with the new backend/frontend naming convention and provides consistency across the project's development, testing, and deployment environments.

Technical Details:
- Updated the `backend-config.json` file in the `.github` directory and the `scripts/govtool/config/secrets` directory. Changed the 'dbname' field from 'vva' to 'govtool' in the 'fakedbsyncconfig' object.
- Modified the `.github/workflows/build-and-deploy.yml` file, updating the `FAKEDBSYNC_POSTGRES_DB` environment variable from 'vva' to 'govtool'. This change ensures that the GitHub Actions workflows utilize the correct database name during build and deployment processes.
- Changed the `FAKEDBSYNC_POSTGRES_DB` variable in the `.env.example` file in the `scripts/govtool` directory, ensuring that local development environments are correctly configured to use the new database name.
- In the `docker-compose.yml` file within the `scripts/govtool` directory, updated the `POSTGRES_DB` environment variable for the postgres service from 'vva' to 'govtool'. This ensures that the correct database is created and used when running the Docker Compose setup.
This commit updates the README.md file in the govtool/backend directory, adding a crucial note regarding the potential renaming of the backend executable. As part of the ongoing efforts outlined in ticket #85, this note is essential to prepare for the upcoming changes that align with the project's rebranding and development strategies.

This note informs readers and developers that the executable previously known as 'vva-be' is anticipated to be officially renamed to 'govtool-backend'.  The change is in line with the project's updated branding and functional scope. It is planned to be implemented soon as part of a planned refactor
This commit introduces a new functionality in the GovTool deployment Makefile to establish an SSH connection to a target environment. This feature is particularly useful in the context of the ongoing efforts to improve infrastructure configuration and management. The addition of this SSH helper simplifies the process of connecting to various environments, aligning with the goal of enhancing operational efficiency and ease of access for maintenance and deployment tasks.

The technical implementation involves adding a new `ssh` target in the Makefile. This target ensures that necessary environment variables such as `cardano_network` and `env` are defined before initiating the SSH connection. The implementation sets the terminal type to `xterm-256color` to avoid issues with different terminal settings and then executes the SSH command using the `ssh_url` variable.
This commit renames the Grafana dashboard configuration file from 'vva.json' to
'govtool.json' in the scripts/govtool/config/grafana-provisioning/dashboards
directory. This change is a continuation of the effort detailed in ticket #111,
as an extension of the issue #85, where we are updating various components
of the project to align with the new naming convention.

Technical Details:
- Renamed the Grafana dashboard configuration file from
  `scripts/govtool/config/grafana-provisioning/dashboards/vva.json` to
  `scripts/govtool/config/grafana-provisioning/dashboards/govtool.json`.
- Also updated the 'id' property of the dashboard within the file from 2 to 3.
  This change is a routine update to maintain the uniqueness and
  integrity of the dashboard's identification within the Grafana system.
This commit updates the Traefik Let's Encrypt (LE) admin email address in the
`.github/workflows/build-and-deploy.yml` file. The change is a part of the
ongoing rebranding efforts detailed in epic ticket #111, where 'vva' is being
replaced with 'govtool'. The updated email address, `[email protected]`,
reflects this rebranding, ensuring that the administrative contact for Traefik LE
certificates is consistent with the new project name.

Technical Details:
- Modified the `TRAEFIK_LE_EMAIL` environment variable in the GitHub Actions
  workflow file. Changed from `[email protected]` to
  `[email protected]`. This change was made in two places within the
  file to ensure consistency across different job configurations.
This commit updates Prometheus configuration in prepare-config.sh as part
of the ongoing efforts in rebranding epic #111.
The change is a part of the broader initiative to update all project components
to the new 'govtool' naming, ensuring consistency and clarity as the project
moves towards open-source community involvement.

Technical details:
- In the `scripts/govtool/prepare-config.sh` script, the external label for Prometheus
  monitoring has been updated from 'vva' to 'govtool'. This change ensures that
  metrics scraped by Prometheus are correctly associated with the GovTool project,
  reflecting the new project name and aiding in consistent monitoring and analytics.
.
placek and others added 22 commits February 13, 2024 12:04
This commit introduces the capability to execute arbitrary Docker Compose
commands on target environments directly from the Makefile, significantly
enhancing operational flexibility and efficiency for managing
the GovTool project's infrastructure.

By enabling the execution of arbitrary Docker Compose commands, this enhancement
empowers developers and operators to perform complex orchestration tasks more
efficiently, directly aligning with DevOps best practices for automation
and management of containerized environments.

This addition facilitates a wide range of Docker Compose operations, such
as service management, logs monitoring, and environment diagnostics,
directly from the Makefile without the need for direct interaction
with the deployment server.

Technical Details:
- Updated `scripts/govtool/Makefile` to include a new `docker` recipe, allowing the execution of user-defined Docker Compose commands via the `cmd` variable.
- The recipe also ensures that the SSH key of the deployment server is added to known hosts, preventing interactive prompts that could hinder automated workflows.
This commit introduces a `nix-shell` configuration for the Terraform
infrastructure setup within the GovTool project, aimed at streamlining
and unifying the development environment setup process. By leveraging Nix,
the project benefits from a reproducible and declarative approach to manage
dependencies, ensuring consistent environments across all development
and CI/CD pipelines.

The adoption of Nix and the introduction of a `nix-shell` environment
underscore the project's commitment to DevOps best practices, focusing on
reproducibility, ease of setup, and streamlined development workflows.
This setup not only enhances the developer experience but also aligns with
the project's objectives of maintaining high standards of reliability
and consistency across all environments.

Technical Details:
- Added `infra/terraform/.env.example` to provide a template for the required environment variables, including `AWS_PROFILE` for AWS CLI configurations and `NIXPKGS_ALLOW_UNFREE` to allow the installation of unfree packages (the two packages that we provide already are un-free already).
- Introduced `infra/terraform/shell.nix` to define the Nix shell environment, specifying `awscli2` and `terraform` as the primary dependencies. This setup ensures that developers have access to the exact versions of these tools required by the project, minimizing "works on my machine" problems.
Summary:
This commit rolls back the names of the S3 bucket and DynamoDB table used
for Terraform state management to their original identifiers. This change is
crucial for maintaining access to our current infrastructure setup before
we proceed with renaming and rebranding efforts within our infrastructure
configuration. By reverting these names, we ensure continuity and access
to existing resources, which is necessary for a smooth transition to the
new naming convention. This step is preparatory, aimed at minimizing disruption
and maintaining operational integrity during the rebranding process.

Technical Details:
Modifications were made in Terraform configuration file, versions.tf, within the infra/terraform directory. The changes are as follows:

S3 Bucket Name: The Terraform backend configuration in versions.tf has been updated to point back to the original S3 bucket, changing from govtool-terraform-state to vva-terraform-state. This reversion ensures that Terraform commands continue to interface with the existing state file, preserving the link to our current infrastructure assets.

DynamoDB Table Name: Similarly, the DynamoDB table used for state locking has been reverted from govtool-terraform-locks to vva-terraform-locks. This change is crucial for maintaining state consistency and preventing concurrent execution conflicts during Terraform operations.
This commit introduces a strategic approach to renaming Terraform
resources within our AWS infrastructure, moving from the legacy codename
"VVA" to the new project identifier "GovTool". The migration is
orchestrated through the addition of two new Terraform files:
`vva_to_govtool_migration_20240212.tf` in both the main Terraform
directory and within the `govtool-ec2` module. These files serve as a
temporary mechanism to facilitate a seamless transition of resource and
module names across the infrastructure.

Key Highlights:
- The migration files outline a series of `moved` directives, explicitly
  mapping old resource and module identifiers to their new names. This
  approach ensures Terraform can manage the renaming process efficiently,
  minimizing the risk of resource duplication or loss.
- The migration is carefully planned to ensure no disruption to the
  ongoing operations, preserving the state of resources and their
  configurations throughout the process.
- A note within each migration file indicates their temporary nature,
  with instructions to remove these files once all stakeholders have
  successfully applied the migration. This step is crucial to prevent
  clutter in the Terraform codebase and maintain the integrity of the
  infrastructure as code practices. The migration files should be
  removed before project goes open source.

This renaming initiative is a critical component of our broader
rebranding efforts, reflecting the project's evolution and aligning our
infrastructure with the new brand identity.
This commit updates the Cardano node version used within the Sanchonet
environment to `8.8.0-pre`, aligning with the latest implementation
enhancements and security updates. This change is reflected in the
`docker-compose.sanchonet.yml` file, ensuring that our infrastructure
remains at the forefront of technological advancements and maintains
compatibility with the evolving Cardano ecosystem.

Key Changes:
- The Cardano node image has been updated from `8.7.2` to `8.8.0-pre`, a
  pre-release version that incorporates the latest features and
improvements from the Cardano development team.

By staying updated with the latest versions of critical infrastructure
components like the Cardano node, we ensure that our platform remains
secure, efficient, and capable of leveraging the latest advancements in
the Cardano ecosystem. This proactive approach to infrastructure
management underscores our commitment to excellence and our dedication
to supporting the Cardano community with the most up-to-date and
reliable services possible.
…n-in-infrastructure-configuration

[#97] Rebrand the application in infrastructure configuration
…euse across environments

Summary:
To enhance and fix our deployment script's reliability and ensure
environment-specific configurations are not mistakenly reused locally, this
commit introduces a critical update to the script responsible for
preparing configurations, including the Nginx setup. Recognizing the
need for distinct configurations across different deployment
environments, we've implemented a change to automatically remove the
Nginx configuration directory once the deployment script has executed.
This action prevents potential conflicts and misconfigurations when
deploying to multiple environments by ensuring that each deployment
starts with a clean slate regarding Nginx setup.

The change has been introduced after an incident[^1] occurred during
efforts on #97, where mutliple deployments on multiple environments had
to be performed avoiding the GitHub Action workflow, since they were not
yet introduced to the repository.

The problem is irrelevant on the GitHub workflows since they are
executed in isolation on containerized environment.

Technical Details:
The modification was made in the scripts/govtool/prepare-config.sh
script, where a command to remove the Nginx configuration directory
($nginx_config_dir) has been added. This line is strategically placed
before the creation of new configuration directories and files, ensuring
that any pre-existing Nginx configuration is cleared out before
generating new ones. This approach guarantees that configurations from a
previous deployment do not linger and affect subsequent deployments to
different environments. The logic specifically targets the scenario
where the deployment script is run multiple times locally across various
environments, addressing a previously overlooked aspect of our
deployment process. This change is part of our ongoing efforts to refine
our deployment practices, ensuring they are robust, clean, and tailored
to the specific requirements of each environment.
The change has no impact on GitHub workflow since the execution od the
deployment there is performed in isolation with no cached nor reused
file system storage.
Additionally the documentation note has been added to deployment
instructions to keep track of what actually happens during the deploy
process and how does this impact the target environments.

By incorporating this update, we mitigate the risk of configuration
leakage between environments, a critical aspect of maintaining the
integrity and isolation of our deployment processes. This change
underscores our commitment to continuous improvement in our deployment
strategies, ensuring they align with best practices and the unique
demands of our infrastructure.

[^1]: #174
…pt-for-conditional-generation-of-basicauth-configuration-files

[#171] Remove Nginx config post-deployment to prevent configuration reuse across environments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants