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

Deployment should go after Docker image pushes #16

Open
gabmontes opened this issue Jun 4, 2024 · 5 comments
Open

Deployment should go after Docker image pushes #16

gabmontes opened this issue Jun 4, 2024 · 5 comments
Assignees

Comments

@gabmontes
Copy link

@dhidalgX it looks like the deployment action defined in blockscout_deployment.yml may run before the Docker images are build and pushed to the DockerHub repository (see publish-docker-image-every-push.yml).

@dhidalgX
Copy link

dhidalgX commented Jun 5, 2024

@gabmontes we'll do the necessary fixes... going to remove on: push from the deployment action:

@dhidalgX
Copy link

dhidalgX commented Jun 5, 2024

Also i've noticed some issues while generating the backups for postgres DB's,

We'll need to update the back up action to pick up this volumes...

@dhidalgX
Copy link

dhidalgX commented Jun 5, 2024

pg_dump and pg_restore to back up/restore postgress_db is being handle manually... We'll automate this process.

@dhidalgX
Copy link

dhidalgX commented Jun 5, 2024

During the last update we noticed some logs regarding PostgresSQL version upgrade from 14 to 15...

2024-06-04 23:25:20.738 UTC [1] FATAL:  database files are incompatible with server
2024-06-04 23:25:20.738 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 14, which is not compatible with this version 15.7 (Debian 15.7-1.pgdg120+1).
chmod: changing permissions of '/var/run/postgresql': Operation not permitted

After this changes and because of the points mentioned above... postgresDB was not able to restored completely.. we revert back to previous commit of blockscout and still indexing... once fully indexed we can try again to deploy the latest upgrade...

@dhidalgX
Copy link

dhidalgX commented Jun 5, 2024

@gabmontes @jcvernaleo here the workaround for latest block explorer deployment:

Since we are upgrading from postgres:14 to postgres:15:

We needed to build explorer from scratch this mean not using the github action:

  • run docker compose down --remove-orphans to stop everything from old setup, postgres:14
  • delete the old volumes to avoid permission denied from new deployment postgres:15
  • clone/pull latest commit.
  • docker compose up -d with new postgres:15
  • restore db's from pg_dump.

Note:

  • I think the issue here is... trying to overwrite the actual deployment .... which in this case delivers errors from new postgres:15 with access denied to database volumes and database files incompatible.
  • Need to include this type of deployments in the action (Upgrades)
  • We need to revisit the actual backup process, and automate some of the tasks
    Backup Status:
Backup Status Detail
Volumes/Config/Repo Automated During deployment through Github action
Instance backup/Snapshot Automated Through Backup Schedule in VULTR
Postgress DB Manual Using pg_dump (We need to automate this with a cron or something else... )

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

No branches or pull requests

2 participants