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

[REQUEST] How to update strelka? #439

Closed
derfel1989 opened this issue Feb 23, 2024 · 5 comments
Closed

[REQUEST] How to update strelka? #439

derfel1989 opened this issue Feb 23, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@derfel1989
Copy link

Is your feature request related to a problem? Please describe.
I wish to update Strelka, but for every release, I run the installation process again.

Note: There is no mention of it in the documentation.

Describe the solution you'd like
Update automatically via watchtower. (Docker Hub)

Describe alternatives you've considered
A script to check weekly, for example, if there is an update available, so start it.

Thank you.

@derfel1989 derfel1989 added the enhancement New feature or request label Feb 23, 2024
@Derekt2
Copy link
Contributor

Derekt2 commented Feb 23, 2024

Watchtower does seems to solve this problem of redeploying automatically, since the images are public

docker run -d \
    --name watchtower \
    -v /var/run/docker.sock:/var/run/docker.sock \
    containrrr/watchtower \
    target/strelka-backend target/strelka-frontend target/strelka-manager target/strelka-ui target/strelka-filestream target/strelka-fileshot target/strelka-oneshot

should work depending on which images you're pulling & running

@Derekt2
Copy link
Contributor

Derekt2 commented Feb 24, 2024

If you're running these images on kubernetes, keel seems a good option too: https://keel.sh/ or flux: https://fluxcd.io/flux/guides/image-update/

But I'm not sure there's anything we can add to the strelka project since these are implementation/deployment specific.

@Het-Joshi
Copy link

  1. Watchtower: You can use Watchtower to automatically update your Docker containers, including those running Strelka. This involves running Watchtower as a separate container, which monitors your Docker containers for updates and automatically pulls and restarts them when new versions are available on Docker Hub.

  2. Custom Script: You can write a custom script that checks for updates to Strelka on a regular basis (e.g., weekly) and automatically pulls and restarts the Docker containers if updates are available. This would involve scripting the Docker commands to pull the latest images and restart the containers.

#!/bin/bash

# Function to check for updates and update Docker containers if needed
check_and_update_strelka() {
    local current_version=$(docker image inspect -f '{{ .Created }}' target/strelka-backend | cut -d 'T' -f1)
    local latest_version=$(curl -s https://registry.hub.docker.com/v1/repositories/target/strelka-backend/tags | jq -r 'max_by(.last_updated) | .last_updated')

    if [[ "$current_version" != "$latest_version" ]]; then
        echo "New version of Strelka available. Updating..."
        docker-compose pull
        docker-compose up -d
        echo "Strelka updated successfully!"
    else
        echo "Strelka is already up to date."
    fi
}

# Main function to execute the update check
main() {
    echo "Checking for updates to Strelka..."
    check_and_update_strelka
}

# Execute the main function
main
  1. Keel or Flux (for Kubernetes): If you're using Kubernetes to deploy Strelka, you can consider using tools like Keel or Flux to automate the update process. These tools can monitor container image repositories for new versions and automatically update the deployments in your Kubernetes cluster.

  2. Manual Update: Alternatively, you can continue manually updating Strelka by running the installation process again for each release. While this option requires more manual effort, it may be suitable if you prefer to have more control over the update process.

@Derekt2
Copy link
Contributor

Derekt2 commented Feb 26, 2024

That's a good summary & script option! Up to @phutelmyer if he wants to consider adding something to the documentation, maybe under FAQ or management?

We also have an entire Kubernetes manifest section here, with no mention of it in the documentation. Including it with a note as to whether or not those resources are maintained/supported could be helpful.

@derfel1989
Copy link
Author

derfel1989 commented Feb 26, 2024

I have faced many problems updating via Watchtower or re-deploying the new docker image.
Usually, the stack didn't work after the update, or they lost connection with the database. However, when I reran the installation process it did not happen.

Having a documented process to update the Strelka stack would be good. Watchtower is the best option from my standpoint. We might need to determine permanent volumes to lose data through the updates.

Thank you for your thoughts @Derekt2 @Het-Joshi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants