You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by jzakotnik March 27, 2024
One pain point from the pilots is that the upgrading is a somewhat complex process and no "update" Button exists in TruBudget. What would be the options and architecture how this could be done?
The text was updated successfully, but these errors were encountered:
Hi @jzakotnik I believe that in order to accomplish this we will need to introduce new piece of infrastructure on the level of server where docker is running.
Here's a high-level description of the solution:
High-Level Steps to Enable an "Upgrade" Button for Docker Infrastructure
Host-Level Script:
Create a shell script (upgrade.sh) on the host machine that:
Updates the environment variable with the new Docker image tag.
Pulls the new Docker images.
Restarts the services using Docker Compose.
Host-Level API Service:
Set up a lightweight API server on the host machine using Node.js and Express.
This server will expose an endpoint to trigger the upgrade.sh script.
Backend Service:
Modify your backend service (running in a container) to send HTTP requests to the host-level API.
This backend service will handle requests from the frontend to initiate the upgrade process.
Frontend Integration:
Add an "Upgrade" button to your frontend.
This button will send a request to the backend service with the desired new version tag.
Secure Communication:
Ensure secure communication between the backend service and the host-level API to prevent unauthorized access.
Workflow
User Interaction:
A user clicks the "Upgrade" button on the frontend and enters the desired version tag.
Frontend Request:
The frontend sends the version tag to the backend service.
Backend Processing:
The backend service forwards the version tag to the host-level API.
Host-Level Execution:
The host-level API triggers the upgrade.sh script to update the environment variables, pull the new images, and restart the services using Docker Compose.
By following these high-level steps, you can set up your infrastructure to support an "Upgrade" button on the frontend, allowing seamless upgrades of your Docker-based application.
graph TD;
A[Frontend] -->|1. Click 'Upgrade' Button| B[Backend Service];
B -->|2. Send Version Tag| C[Host-Level API];
C -->|3. Trigger upgrade.sh| D[upgrade.sh Script];
D -->|4. Update .env and Pull New Images| E[Docker Compose];
E -->|5. Restart Services| F[Docker Services];
style A fill:#f9f,stroke:#333,stroke-width:4px;
style B fill:#bbf,stroke:#333,stroke-width:4px;
style C fill:#f96,stroke:#333,stroke-width:4px;
style D fill:#ff9,stroke:#333,stroke-width:4px;
style E fill:#96f,stroke:#333,stroke-width:4px;
style F fill:#6f9,stroke:#333,stroke-width:4px;
Discussed in #1754
Originally posted by jzakotnik March 27, 2024
One pain point from the pilots is that the upgrading is a somewhat complex process and no "update" Button exists in TruBudget. What would be the options and architecture how this could be done?
The text was updated successfully, but these errors were encountered: